Inserted data into frontend from models for some views
This commit is contained in:
@@ -1,46 +1,61 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<h1><?php echo $this->clubname; ?></h1>
|
||||
<h1><?php echo htmlentities($this->club->getName()); ?></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 class='clubs_content_row'><?php echo nl2br(htmlentities($this->club->getAddress())); ?></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Internet</div>
|
||||
<div class='clubs_content_row'><?php echo htmlentities($this->internet); ?></div>
|
||||
<div class='clubs_title_row'>Stadt</div>
|
||||
<div class='clubs_content_row'><?php echo htmlentities($this->club->getCity()); ?></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 class='clubs_title_row'>Homepage</div>
|
||||
<div class='clubs_content_row'><a href='<?php echo htmlentities($this->club->getHomepage()); ?>' target='_blank'><?php echo htmlentities($this->club->getHomepage()); ?></a></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 class='clubs_content_row'><a href='mailto:<?php echo htmlentities($this->club->getMail()); ?>'><?php echo htmlentities($this->club->getMail()); ?></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 class='clubs_title_row'>IBAN / BIC</div>
|
||||
<div class='clubs_content_row'><?php echo htmlentities($this->club->getIban()); ?> / <?php echo htmlentities($this->club->getBic()); ?></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Gemeinnützigkeit</div>
|
||||
<div class='clubs_content_row'><span class='icon-<?php echo $this->club->isCharitable() ? 'ok' : 'cancel'; ?>'></span> Der Verein ist <?php echo $this->club->isCharitable() ? '' : '<b>nicht</b>'; ?> gemeinnützig.</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'>Angebote</div>
|
||||
<div class='clubs_content_row'>
|
||||
<?php if($this->hasOptions):
|
||||
<?php if($this->hasOffers):
|
||||
|
||||
// Put all options there
|
||||
foreach($this->options as $k=>$v):
|
||||
foreach($this->club->getOffers() as $o):
|
||||
?>
|
||||
<input type="checkbox" disabled="disabled" <?php if(isset($v)) echo 'checked="checked"'; ?>> <?php echo htmlentities($k); ?><br />
|
||||
<span class='icon-<?php echo $o['valid'] ? 'ok' : 'cancel-2'; ?>'></span>
|
||||
<?php if($o['valid']) echo '<b>'; ?>
|
||||
<?php echo htmlentities($o['offer']->getName()); ?><br />
|
||||
<?php if($o['valid']) echo '</b>'; ?>
|
||||
<?php
|
||||
endforeach;
|
||||
|
||||
@@ -52,47 +67,54 @@ endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(count($this->trainingPlaces) > 0): ?>
|
||||
<?php if(count($this->club->getPlaces()) > 0): ?>
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Räumlichkeiten</div>
|
||||
<?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']); ?>
|
||||
</div>
|
||||
<?php foreach($this->club->getPlaces() as $p): ?>
|
||||
<div class='clubs_content_row'>
|
||||
<b><?php echo htmlentities($p->getName()); ?></b><br />
|
||||
<i>Adresse</i>
|
||||
<?php //echo nl2br(htmlentities($p->getAddress())); ?>
|
||||
<?php echo $p->getArea() === null ? '' : '<br />Fläche: ' . htmlentities($p->getArea()) . 'qm'; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class='clubs_content_row'><a href='<?php echo ""; ?>'><span class='icon-new'></span> Neue Assoziation anlegen</a></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(count($this->persons) > 0) : ?>
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Präsident</div>
|
||||
<div class='clubs_content_row'>
|
||||
<a href='<?php echo Route::_("index.php?view=user&userid={$this->club->getPresident()->getId()}"); ?>'>
|
||||
<?php echo htmlentities("{$this->club->getPresident()->getName()} ({$this->club->getPresident()->getCity()})"); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(count($this->club->getUsers()) > 0) : ?>
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Assoziierte Personen</div>
|
||||
<div class='clubs_content_row'>
|
||||
<ul>
|
||||
<?php foreach($this->persons as $p): ?>
|
||||
<li>
|
||||
<a href='?option=com_clubs&view=user&id=<?php echo $p['id']; ?>'><?php echo htmlentities($p['name']); ?></a>:
|
||||
<?php echo htmlentities($p['position']); ?>
|
||||
<?php if ($p['modify']) echo ' (Club-Admin)'; ?>
|
||||
<?php if($this->canModify): ?>
|
||||
<a href='?option=com_clubs&view=clubassoc&assoc=<?php echo $p['assoc']; ?>'>Ändern</a>
|
||||
<a href='?option=com_clubs&task=club.delassoc&assoc=<?php echo $p['assoc']; ?>'>Löschen</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach($this->club->getUsers() as $uassoc): ?>
|
||||
<li>
|
||||
<a href='?option=com_clubs&view=user&id=<?php echo $uassoc->getUser()->getId(); ?>'>
|
||||
<?php echo htmlentities($uassoc->getUser()->getName()); ?>
|
||||
</a>:
|
||||
<?php echo htmlentities($uassoc->getPosition()->getName()); ?>
|
||||
<?php if ($uassoc->isAdmin()) echo ' (Club-Admin)'; ?>
|
||||
<!--<?php //if($this->canModify): ?>
|
||||
<a href='?option=com_clubs&view=clubassoc&assoc=<?php //echo $p['assoc']; ?>'>Ändern</a>
|
||||
<a href='?option=com_clubs&task=club.delassoc&assoc=<?php //echo $p['assoc']; ?>'>Löschen</a>-->
|
||||
<?php //endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if($this->canModify): ?>
|
||||
<a href='<?php echo $this->urlNewPerson; ?>'>Neue Assoziation anlegen</a>
|
||||
<?php endif; ?>
|
||||
<?php //if($this->canModify): ?>
|
||||
<a href='<?php echo ""; ?>'><span class='icon-new'></span> Neue Assoziation anlegen</a>
|
||||
<?php //endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->canModify): ?>
|
||||
<div class='clubs_row'>
|
||||
<a href="?option=com_clubs&view=clubdata&clubid=<?php echo $this->clubid; ?>">Stammdaten anpassen</a><br />
|
||||
<a href="?option=com_clubs&view=clubplaces&clubid=<?php echo $this->clubid; ?>">Räumlichkeiten anpassen</a><br />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user