Started writing code for views

This commit is contained in:
2019-04-07 16:31:23 +02:00
parent 773eb1092d
commit 628514eb4e
14 changed files with 313 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
<?php
// No direct access.
defined('_JEXEC') or die;
?>
<h1><?php echo $this->clubname; ?></h1>
<div class='clubs_row'>
<div class='clubs_title_row'>Adresse</div>
<div class='clubs_content_row'><?php echo nl2br(htmlentities($this->address)); ?></div>
</div>
<div class='clubs_row'>
<div class='clubs_title_row'>Kontaktperson</div>
<div class='clubs_content_row'><?php echo htmlentities($this->contactperson); ?></div>
</div>
<div class='clubs_row'>
<div class='clubs_title_row'>Mail-Adresse</div>
<div class='clubs_content_row'><a href='mailto:<?php echo htmlentities($this->email); ?>'><?php echo htmlentities($this->email); ?></a></div>
</div>
<div class='clubs_row'>
<div class='clubs_title_row'>Telefon</div>
<div class='clubs_content_row'><?php echo htmlentities($this->phone); ?></div>
</div>
<div class='clubs_row'>
<div class='clubs_title_row'>Assoziierte Personen</div>
<!-- FIXME <div class='clubs_content_row'><?php echo htmlentities($this->phone); ?></div>-->
</div>

View File

@@ -0,0 +1,26 @@
<?php
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
// No direct access.
defined('_JEXEC') or die;
class ClubsViewClub extends HtmlView
{
public function display(string $tpl = null)
{
// FIXME Insert code from DB
$this->clubname = "Testclub";
$this->address = "Strasse 1\n66123 Ort";
$this->contactperson = "Max Mustermann";
$this->email = "me@club.de";
$this->phone = "012345";
Factory::getDocument()->addStyleSheet(Uri::base(true) . "components/com_clubs/css/clubs.css");
parent::display($tpl);
}
}