List views updated to new structure
This commit is contained in:
parent
904d31843a
commit
eb704af915
@ -7,7 +7,7 @@ class CommonClubsModelPosition extends AbstractCommonClubsModel
|
||||
{
|
||||
protected function getFactory()
|
||||
{
|
||||
new CommonClubsModelFactoryPosition();
|
||||
return new CommonClubsModelFactoryPosition();
|
||||
}
|
||||
|
||||
public function getName()
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
// No direct access.
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
@ -11,26 +10,25 @@ defined('_JEXEC') or die;
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='30%'>Bezeichnung</th>
|
||||
<th width='25%'>Stadt</th>
|
||||
<th width='20%'>Stadt</th>
|
||||
<th width='20%'>Homepage</th>
|
||||
<th width='25%'>E-Mail</th>
|
||||
<th width='5%'>Löschen?</th>
|
||||
<th width='5%'>id</th>
|
||||
<th width='20%'>E-Mail</th>
|
||||
<th width='10%'></th>
|
||||
<th width='3%'>id</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($this->clubs as $club): ?>
|
||||
<?php $link = Route::_('index.php?option=com_clubs&view=club&id=' . $club->getId()); ?>
|
||||
<?php foreach($this->objects as $club): ?>
|
||||
<?php $url = htmlentities($club->getHomepage()); ?>
|
||||
<?php $mail = htmlentities($club->getMail()); ?>
|
||||
<tr>
|
||||
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($club->getName()); ?></a></td>
|
||||
<td><a href='<?php echo str_replace('__ID__', $club->getId(), $this->changeUrl); ?>'><?php echo htmlentities($club->getName()); ?></a></td>
|
||||
<td><?php echo htmlentities($club->getCity()); ?></td>
|
||||
<td><a href='<?php echo $url; ?>' target='_blank'><?php echo $url; ?></a></td>
|
||||
<td><a href='mailto:<?php echo $mail; ?>'><?php echo $mail; ?></a></td>
|
||||
<td><!--<a href='<?php echo Route::_('index.php?option=com_clubs&task=club.delete&id=' . $club->getId()); ?>'>Del</a> --></td>
|
||||
<td><a href='<?php echo str_replace('__ID__', $club->getId(), $this->delUrl); ?>'><span class='icon-delete'></span>Löschen</a></td>
|
||||
<td><?php echo htmlentities($club->getId()); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<div><a href='<?php echo Route::_('index.php?option=com_clubs&view=club&id=new'); ?>'>Neuen Verein anlegen</a></div>
|
||||
<div><a href='<?php echo $this->addUrl; ?>'><span class='icon-new'></span>Neuen Verein anlegen</a></div>
|
||||
|
@ -1,22 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class ClubsViewClubs extends HtmlView
|
||||
class ClubsViewClubs extends AbstractClubsViewList
|
||||
{
|
||||
|
||||
function display($tpl = null)
|
||||
{
|
||||
// $this->offers = ClubsOffer::loadOffers();
|
||||
$factory = new CommonClubsModelFactoryClub();
|
||||
$this->clubs = $factory->loadElements();
|
||||
|
||||
ToolbarHelper::title('Club-Management - Clubs');
|
||||
ToolbarHelper::title('Club-Management - Clubs', 'cube');
|
||||
parent::display($tpl);
|
||||
}
|
||||
protected function getFactory()
|
||||
{
|
||||
return new CommonClubsModelFactoryClub();
|
||||
}
|
||||
|
||||
protected function getSingleBaseName()
|
||||
{
|
||||
return 'club';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
// No direct access.
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
@ -11,18 +10,17 @@ defined('_JEXEC') or die;
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='30%'>Bezeichnung</th>
|
||||
<th width='5%'>Löschen?</th>
|
||||
<th width='5%'></th>
|
||||
<th width='5%'>id</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($this->positions as $position): ?>
|
||||
<?php $link = Route::_('index.php?option=com_clubs&view=position&id=' . $position->getId()); ?>
|
||||
<?php foreach($this->objects as $position): ?>
|
||||
<tr>
|
||||
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($position->getName()); ?></a></td>
|
||||
<td><a href='<?php echo Route::_('index.php?option=com_clubs&task=position.delete&id=' . $position->getId()); ?>'>Del</a></td>
|
||||
<td><a href='<?php echo str_replace('__ID__', $position->getId(), $this->changeUrl); ?>'><?php echo htmlentities($position->getName()); ?></a></td>
|
||||
<td><a href='<?php echo str_replace('__ID__', $position->getId(), $this->delUrl); ?>'><span class='icon-delete'></span>Löschen</a></td>
|
||||
<td><?php echo htmlentities($position->getId()); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<div><a href='<?php echo Route::_('index.php?option=com_clubs&view=position&id=new'); ?>'>Neuen Posten anlegen</a></div>
|
||||
<div><a href='<?php echo $this->addUrl; ?>'><span class='icon-new'></span>Neuen Posten anlegen</a></div>
|
||||
|
@ -1,20 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class ClubsViewPositions extends HtmlView
|
||||
class ClubsViewPositions extends AbstractClubsViewList
|
||||
{
|
||||
|
||||
function display($tpl = null)
|
||||
{
|
||||
$this->positions = ClubsPosition::loadPositions();
|
||||
|
||||
ToolbarHelper::title('Club-Management - Positionen');
|
||||
ToolbarHelper::title('Club-Management - Positionen', 'users');
|
||||
parent::display($tpl);
|
||||
}
|
||||
protected function getFactory()
|
||||
{
|
||||
return new CommonClubsModelFactoryPosition();
|
||||
}
|
||||
|
||||
protected function getSingleBaseName()
|
||||
{
|
||||
return 'position';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -14,22 +14,22 @@ defined('_JEXEC') or die;
|
||||
<th width='20%'>Name</th>
|
||||
<th width='30%'>Ort</th>
|
||||
<th width='30%'>E-Mail</th>
|
||||
<th width='5%'>Löschen?</th>
|
||||
<th width='5%'></th>
|
||||
<th width='5%'>id</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($this->users as $user): ?>
|
||||
<?php $link = Route::_('index.php?option=com_clubs&view=user&id=' . $user->getId()); ?>
|
||||
<?php foreach($this->objects as $user): ?>
|
||||
<?php $link = str_replace('__ID__', $user->getId(), $this->changeUrl); ?>
|
||||
<tr>
|
||||
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($user->getUser()); ?></a></td>
|
||||
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($user->getUserName()); ?></a></td>
|
||||
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($user->getName()); ?></a></td>
|
||||
<td><?php echo htmlentities($user->getCity()); ?></td>
|
||||
<td><a href='mailto:<?php echo htmlentities($user->getMail()); ?>'><?php echo htmlentities($user->getMail()); ?></a></td>
|
||||
<td><a href='<?php echo Route::_('index.php?option=com_clubs&task=user.delete&id=' . $user->getId()); ?>'>Del</a></td>
|
||||
<td><a href='<?php echo str_replace('__ID__', $user->getId(), $this->delUrl); ?>'><span class='icon-delete'></span>Löschen</a></td>
|
||||
<td><?php echo htmlentities($user->getId()); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<div><a href='<?php echo Route::_('index.php?option=com_clubs&view=user&id=new'); ?>'>Neuen Benutzer anlegen</a></div>
|
||||
<div><a href='<?php echo $this->addUrl; ?>'><span class='icon-new'></span>Neuen Benutzer anlegen</a></div>
|
||||
|
||||
|
@ -1,22 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// JLoader::register("ClubsModelUser", JPATH_ROOT . "/administrator/components/com_clubs/models/user.php");
|
||||
|
||||
class ClubsViewUsers extends HtmlView
|
||||
class ClubsViewUsers extends AbstractClubsViewList
|
||||
{
|
||||
function display($tpl = null)
|
||||
{
|
||||
$this->users = ClubsUser::loadUsers();
|
||||
|
||||
ToolbarHelper::title('Club-Management - Personen', 'user');
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
protected function getFactory()
|
||||
{
|
||||
return new CommonClubsModelFactoryUser();
|
||||
}
|
||||
|
||||
protected function getSingleBaseName()
|
||||
{
|
||||
return 'user';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user