Made clubs view in the backend working generally (no CUD)
This commit is contained in:
parent
f8df0c3fc4
commit
4dc78c21af
@ -10,7 +10,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
protected $name;
|
protected $name;
|
||||||
protected $address;
|
protected $address;
|
||||||
protected $city;
|
protected $city;
|
||||||
protected $homapge;
|
protected $homepage;
|
||||||
protected $mail;
|
protected $mail;
|
||||||
protected $iban;
|
protected $iban;
|
||||||
protected $bic;
|
protected $bic;
|
||||||
@ -36,9 +36,9 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getHomapge()
|
public function getHomepage()
|
||||||
{
|
{
|
||||||
return $this->homapge;
|
return $this->homepage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,7 +110,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
*/
|
*/
|
||||||
public function setHomapge(string $homapge)
|
public function setHomapge(string $homapge)
|
||||||
{
|
{
|
||||||
$this->homapge = $homapge;
|
$this->homepage = $homapge;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -209,10 +209,10 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getOffers()
|
// public function getOffers()
|
||||||
{
|
// {
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
protected function loadCustomData($assoc)
|
protected function loadCustomData($assoc)
|
||||||
@ -232,12 +232,12 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
|
|
||||||
protected function getDataMappings()
|
protected function getDataMappings()
|
||||||
{
|
{
|
||||||
return array('neme', 'address', 'city', 'homepage', 'mail', 'iban', 'bic', 'charitable');
|
return array('name', 'address', 'city', 'homepage', 'mail', 'iban', 'bic', 'charitable');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRequiredDataMappings()
|
protected function getRequiredDataMappings()
|
||||||
{
|
{
|
||||||
return array('neme', 'address', 'city', 'mail', 'iban', 'bic', 'charitable');
|
return array('name', 'address', 'city', 'mail', 'iban', 'bic', 'charitable');
|
||||||
}
|
}
|
||||||
|
|
||||||
private const tableName = '#__club_clubs';
|
private const tableName = '#__club_clubs';
|
||||||
|
@ -11,18 +11,26 @@ defined('_JEXEC') or die;
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width='30%'>Bezeichnung</th>
|
<th width='30%'>Bezeichnung</th>
|
||||||
|
<th width='25%'>Stadt</th>
|
||||||
|
<th width='20%'>Homepage</th>
|
||||||
|
<th width='25%'>E-Mail</th>
|
||||||
<th width='5%'>Löschen?</th>
|
<th width='5%'>Löschen?</th>
|
||||||
<th width='5%'>id</th>
|
<th width='5%'>id</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<?php foreach($this->offers as $offer): ?>
|
<?php foreach($this->clubs as $club): ?>
|
||||||
<?php $link = Route::_('index.php?option=com_clubs&view=offer&id=' . $offer->getId()); ?>
|
<?php $link = Route::_('index.php?option=com_clubs&view=club&id=' . $club->getId()); ?>
|
||||||
|
<?php $url = htmlentities($club->getHomepage()); ?>
|
||||||
|
<?php $mail = htmlentities($club->getMail()); ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($offer->getName()); ?></a></td>
|
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($club->getName()); ?></a></td>
|
||||||
<td><a href='<?php echo Route::_('index.php?option=com_clubs&task=offer.delete&id=' . $offer->getId()); ?>'>Del</a></td>
|
<td><?php echo htmlentities($club->getCity()); ?></td>
|
||||||
<td><?php echo htmlentities($offer->getId()); ?></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><?php echo htmlentities($club->getId()); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div><a href='<?php echo Route::_('index.php?option=com_clubs&view=offer&id=new'); ?>'>Neues Angebot anlegen</a></div>
|
<div><a href='<?php echo Route::_('index.php?option=com_clubs&view=club&id=new'); ?>'>Neuen Verein anlegen</a></div>
|
||||||
|
@ -12,6 +12,7 @@ class ClubsViewClubs extends HtmlView
|
|||||||
function display($tpl = null)
|
function display($tpl = null)
|
||||||
{
|
{
|
||||||
// $this->offers = ClubsOffer::loadOffers();
|
// $this->offers = ClubsOffer::loadOffers();
|
||||||
|
$this->clubs = ClubsClub::loadClubs();
|
||||||
|
|
||||||
ToolbarHelper::title('Club-Management - Clubs');
|
ToolbarHelper::title('Club-Management - Clubs');
|
||||||
parent::display($tpl);
|
parent::display($tpl);
|
||||||
|
Loading…
Reference in New Issue
Block a user