Started writing code for views
This commit is contained in:
34
src/site/views/club/tmpl/default.php
Normal file
34
src/site/views/club/tmpl/default.php
Normal 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>
|
||||
|
||||
26
src/site/views/club/view.html.php
Normal file
26
src/site/views/club/view.html.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user