35 lines
873 B
PHP
35 lines
873 B
PHP
<?php
|
|
|
|
use Joomla\CMS\Factory;
|
|
use Joomla\CMS\HTML\HTMLHelper;
|
|
use Joomla\CMS\MVC\View\HtmlView;
|
|
use Joomla\CMS\Uri\Uri;
|
|
|
|
// No direct access.
|
|
defined('_JEXEC') or die;
|
|
|
|
class ClubsViewClub extends HtmlView
|
|
{
|
|
|
|
public function display($tpl = null)
|
|
{
|
|
$input = Factory::getApplication()->input;
|
|
$id = $input->getInt('clubid', -1);
|
|
|
|
$clubFactory = new CommonClubsModelFactoryClub();
|
|
$this->club = $clubFactory->loadById($id);
|
|
|
|
$this->hasOffers = false;
|
|
foreach($this->club->getOffers() as $o)
|
|
if($o['valid'])
|
|
{
|
|
$this->hasOffers = true;
|
|
break;
|
|
}
|
|
HTMLHelper::_('jquery.framework');
|
|
Factory::getDocument()->addScript(Uri::base(true) . "components/com_clubs/js/edit.js");
|
|
|
|
parent::display($tpl);
|
|
}
|
|
}
|