Continued working on views.

Not yet everything finished but big part of the views are present now.
No AJAX was introduced yet. This is going to be done later.
This commit is contained in:
2019-04-10 18:01:30 +02:00
parent ed87808391
commit 45ead93503
17 changed files with 612 additions and 11 deletions

View File

@@ -0,0 +1,67 @@
<?php
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\HTML\HTMLHelper;
// No direct access.
defined('_JEXEC') or die;
class ClubsViewClubAssoc extends HtmlView
{
public function display(string $tpl = null)
{
// FIXME Insert code from DB
$inp = Factory::getApplication()->input;
$this->userName = 'Max Muster';
$this->userMail = 'Foo@bar.com';
$this->userPhone = '34';
$this->userMobile = '4987';
$this->userAddress="Foo\nBar\nBax";
$this->userIsAdmin = true;
$this->clubid = 43;
$this->mailDedicated = true;
$this->clubname = "Testclub";
$this->address = "Strasse 1\n66123 Ort";
$this->contactperson = "Max Mustermann";
$this->email = "me@club.de";
$this->phone = "012345";
$this->internet = "http://wichtig.de";
$this->options = array("Step" => NULL, "JMD" => 1, "Divers." => NULL);
$this->hasOptions = false;
foreach($this->options as $o)
if(isset($o))
{
$this->hasOptions = true;
break;
}
$this->trainingPlaces = array();
// $this->trainingPlaces[] = array('name'=>'Schule', 'street'=>'Straße', 'city'=>'SB', 'plz'=>'12345');
// $this->trainingPlaces[] = array('name'=>'Schule', 'street'=>'Straße', 'city'=>'SB', 'plz'=>'12345');
$this->persons = array();
$this->persons[] = array('name'=>'Max', 'position'=>'Präsident', 'id'=>3, 'assoc'=>6, 'modify'=>true);
$this->persons[] = array('name'=>'Max', 'position'=>'Präsident', 'id'=>3, 'assoc'=>7, 'modify'=>false);
$this->canModify = true;
if($inp->get('assoc', -1, 'INT') == -1)
$this->taskName = 'club.addassoc';
else
$this->taskName = 'club.chassoc';
HTMLHelper::_('jquery.framework');
Factory::getDocument()->addStyleSheet(Uri::base(true) . "components/com_clubs/css/clubs.css");
Factory::getDocument()->addScript(Uri::base(true) . "components/com_clubs/js/assoc.js");
parent::display($tpl);
}
}