Continued working on views.

Not yet everything finished but big part of the views are present now.
No AJAX was introduced yet. This is going to be done later.
This commit is contained in:
2019-04-10 18:01:30 +02:00
parent ed87808391
commit 45ead93503
17 changed files with 612 additions and 11 deletions

View File

@@ -0,0 +1,33 @@
<?php
// No direct access.
defined('_JEXEC') or die;
?>
<h1>R&auml;umlichkeiten anpassen</h1>
<div class='clubs_row'>
<div class='clubs_title_row'>Name des Vereins</div>
<div class='clubs_content_row'><?php echo htmlentities($this->clubname); ?></div>
</div>
<div class='clubs_row'>
<div class='clubs_title_row'>Verf&uuml;gbare R&auml;umlichkeiten</div>
<?php if(count($this->trainingPlaces) == 0): ?>
<p>Bisher wurden keine Trainingsr&auml;me definiert.</p>
<?php else: ?>
<?php foreach($this->trainingPlaces as $p): ?>
<div class='clubs_content_row'>
<?php echo htmlentities($p['name']); ?><br />
<?php echo htmlentities($p['street']); ?><br />
<?php echo htmlentities($p['plz'] . " " . $p['city']); ?><br />
<a href='?option=com_clubs&view=clubplace&palce=<?php echo $p['placeid']; ?>'>&Auml;ndern</a>
<a href='?option=com_clubs&task=club.delplace&place=<?php echo $p['placeid']; ?>'>L&ouml;schen</a>
</div>
<?php endforeach; ?>
<?php endif; ?>
<a href='?option=com_clubs&view=clubplace&place=new&club=<?php echo $this->clubid; ?>'>Neuen Raum anlegen</a>
</div>
<a href='?option=com_clubs&view=club&clubid=<?php echo $this->clubid; ?>'>Zur&uuml;ck zur Verwaltung des Vereins</a>

View File

@@ -0,0 +1,28 @@
<?php
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Uri\Uri;
// No direct access.
defined('_JEXEC') or die;
class ClubsViewClubPlaces extends HtmlView
{
public function display(string $tpl = null)
{
// FIXME Insert code from DB
$this->clubid = 43;
$this->clubname = "Testclub";
$this->trainingPlaces = array();
$this->trainingPlaces[] = array('name'=>'Schule', 'street'=>'Straße', 'city'=>'SB', 'plz'=>'12345', 'placeid'=>12);
// $this->trainingPlaces[] = array('name'=>'Schule', 'street'=>'Straße', 'city'=>'SB', 'plz'=>'12345', 'placeid'=>14);
Factory::getDocument()->addStyleSheet(Uri::base(true) . "components/com_clubs/css/clubs.css");
parent::display($tpl);
}
}