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:
33
src/site/views/clubplaces/tmpl/default.php
Normal file
33
src/site/views/clubplaces/tmpl/default.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<h1>Rä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ügbare Räumlichkeiten</div>
|
||||
<?php if(count($this->trainingPlaces) == 0): ?>
|
||||
<p>Bisher wurden keine Trainingsrä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']; ?>'>Ändern</a>
|
||||
<a href='?option=com_clubs&task=club.delplace&place=<?php echo $p['placeid']; ?>'>Lö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ück zur Verwaltung des Vereins</a>
|
||||
28
src/site/views/clubplaces/view.html.php
Normal file
28
src/site/views/clubplaces/view.html.php
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user