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:
parent
ed87808391
commit
45ead93503
@ -1,18 +1,18 @@
|
||||
DROP TABLE IF EXISTS `jtmxc_club_keys`;
|
||||
CREATE TABLE `jtmxc_club_keys` (
|
||||
DROP TABLE IF EXISTS `dev_club_keys`;
|
||||
CREATE TABLE `dev_club_keys` (
|
||||
`privkey` text NOT NULL,
|
||||
`publickey` text NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `jtmxc_club_keys` VALUES ('-----BEGIN PRIVATE KEY-----\nMIIEwAIBADANBgkqhkiG9w0BAQEFAASCBKowggSmAgEAAoIBAQDvZHhLHHqmfnnP\noj5Y7AtS0UvEN8XLzNdHj/0nHBVHrXDMNul8phbCaevuaXcYTZvb9JBTAO019Bnu\nCoj6KFrk0Cw/zcVgVHryguNCr2DeLaxAXyArfkKNZPuG/kTw1mxE6ebeR886JVU0\nfQpIi3zDGAHpXxaKO7EttnvQK8NRd4h5O5EI6dCnmMn/8xY/d5G7AsZKuAxq01ZB\nmmUrkRKrQtBTwUeJWhtfT+XjOa1n1FVIwmqz4O2sqbfm0pa6PX0BNT0CUp0RI1wN\nGmF6bh/WkQ8h3jmTamzZ2cQUwDnL7ByAJqexJrrPacRbE6EotCGODjuBXDSy02PJ\nZk0fThZpAgMBAAECggEBANJaU0WU8cUo73pekzBpwY11MYFqjJiHF0ffo0/hYmWI\nZsxbGBGak/cjQdhNvgOR9nlxTfxRnR7CrqI3iaNfIHdc4PTzqBL8SMid8HohRxoT\nwf8SV19AY9SAvnAhL4z8rUhky6PYL6RlN5iWoxmZz/hSOSPKlTDEQOztI6CJQ+hp\nUFEiOLq/TSWB1DYEu6qAQRyI5wcC1QMo+zB/zBwIuM3DsB2f6Xtj86kXzU/bGeDj\nNLbsCuhRbFyMgvcJ3z6KQTvREZOGkeF22HA+ZVH7bWf00PqCEjq2I/XFHZGK61X4\n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sxx6pn55z6I+WOwL\nUtFLxDfFy8zXR4/9JxwVR61wzDbpfKYWwmnr7ml3GE2b2/SQUwDtNfQZ7gqI+iha\n5NAsP83FYFR68oLjQq9g3i2sQF8gK35CjWT7hv5E8NZsROnm3kfPOiVVNH0KSIt8\nwxgB6V8WijuxLbZ70CvDUXeIeTuRCOnQp5jJ//MWP3eRuwLGSrgMatNWQZplK5ES\nq0LQU8FHiVobX0/l4zmtZ9RVSMJqs+DtrKm35tKWuj19ATU9AlKdESNcDRphem4f\n1pEPId45k2ps2dnEFMA5y+wcgCansSa6z2nEWxOhKLQhjg47gVw0stNjyWZNH04W\naQIDAQAB\n-----END PUBLIC KEY-----\n');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `jtmxc_club_users`;
|
||||
CREATE TABLE `jtmxc_club_users` (
|
||||
DROP TABLE IF EXISTS `dev_club_users`;
|
||||
CREATE TABLE `dev_club_users` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`user` varchar(30) NOT NULL,
|
||||
`password` varchar(150) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `jtmxc_club_users` VALUES (1,'chris','$2y$10$2/aeOfLlLwFx7JYXpaAOH.CG0ZtvkzTuK6nojvSIuOYlTbSd07CqC');
|
||||
INSERT INTO `dev_club_users` VALUES (1,'chris','$2y$10$2/aeOfLlLwFx7JYXpaAOH.CG0ZtvkzTuK6nojvSIuOYlTbSd07CqC');
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
.clubs_content_row
|
||||
{
|
||||
margin-left: 2em;
|
||||
padding-left: 2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.clubs_title_row
|
||||
{
|
||||
@ -12,3 +13,19 @@
|
||||
{
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
input.clubs,
|
||||
textarea.clubs
|
||||
{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.clubs > tbody > tr > th
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.clubs-invisible
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
34
src/site/js/assoc.js
Normal file
34
src/site/js/assoc.js
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
jQuery(function($){
|
||||
function update_show_overrides()
|
||||
{
|
||||
// One of the checkboxes was clicked. Verify that all input fields are set up correctly.
|
||||
|
||||
if(! $('#check-mail').prop('checked'))
|
||||
$('#mail').addClass('clubs-invisible');
|
||||
else
|
||||
$('#mail').removeClass('clubs-invisible');
|
||||
|
||||
if(! $('#check-phone').prop('checked'))
|
||||
$('#phone').addClass('clubs-invisible');
|
||||
else
|
||||
$('#phone').removeClass('clubs-invisible');
|
||||
|
||||
if(! $('#check-mobile').prop('checked'))
|
||||
$('#mobile').addClass('clubs-invisible');
|
||||
else
|
||||
$('#mobile').removeClass('clubs-invisible');
|
||||
|
||||
if(! $('#check-address').prop('checked'))
|
||||
$('#address').addClass('clubs-invisible');
|
||||
else
|
||||
$('#address').removeClass('clubs-invisible');
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
update_show_overrides();
|
||||
});
|
||||
|
||||
$(".check-dedicated").click(update_show_overrides);
|
||||
});
|
@ -12,6 +12,11 @@ defined('_JEXEC') or die;
|
||||
<div class='clubs_content_row'><?php echo nl2br(htmlentities($this->address)); ?></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>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Kontaktperson</div>
|
||||
<div class='clubs_content_row'><?php echo htmlentities($this->contactperson); ?></div>
|
||||
@ -28,7 +33,66 @@ defined('_JEXEC') or die;
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Assoziierte Personen</div>
|
||||
<!-- FIXME <div class='clubs_content_row'><?php echo htmlentities($this->phone); ?></div>-->
|
||||
<div class='clubs_title_row'>Angebote</div>
|
||||
<div class='clubs_content_row'>
|
||||
<?php if($this->hasOptions):
|
||||
|
||||
// Put all options there
|
||||
foreach($this->options as $k=>$v):
|
||||
?>
|
||||
<input type="checkbox" disabled="disabled" <?php if(isset($v)) echo 'checked="checked"'; ?>> <?php echo htmlentities($k); ?><br />
|
||||
<?php
|
||||
endforeach;
|
||||
|
||||
else:
|
||||
|
||||
// No options specified in the database
|
||||
?>Der Verein hat keine Angebote festgelegt.<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(count($this->trainingPlaces) > 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 endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(count($this->persons) > 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; ?>
|
||||
</ul>
|
||||
<?php if($this->canModify): ?>
|
||||
<a href='<?php echo $this->urlNewPerson; ?>'>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; ?>
|
||||
|
||||
|
@ -13,11 +13,43 @@ class ClubsViewClub extends HtmlView
|
||||
public function display(string $tpl = null)
|
||||
{
|
||||
// FIXME Insert code from DB
|
||||
$this->clubid = 43;
|
||||
$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;
|
||||
|
||||
// ?option=com_clubs&view=searchperson&data=<?php echo urlencode('{"clubid":' . $this->clubid . "}");
|
||||
$dataValue = array();
|
||||
$dataValue['clubid'] = $this->clubid;
|
||||
|
||||
$dataAbort = array(
|
||||
'urlAbort' => (Uri::getInstance()->toString()),
|
||||
'urlSelect' => '?option=com_clubs&view=clubassoc&person=%u',
|
||||
'data' => json_encode($dataValue)
|
||||
);
|
||||
$this->urlNewPerson = htmlentities("?option=com_clubs&view=searchperson&" . http_build_query($dataAbort));
|
||||
|
||||
Factory::getDocument()->addStyleSheet(Uri::base(true) . "components/com_clubs/css/clubs.css");
|
||||
|
||||
|
55
src/site/views/clubassoc/tmpl/default.php
Normal file
55
src/site/views/clubassoc/tmpl/default.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<h1>Assoziierte Person</h1>
|
||||
|
||||
<form action="?option=com_clubs&task=<?php echo $this->taskName; ?>" method="post">
|
||||
<input type="hidden" name='personid' value='<?php echo $this->personId; ?>'>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Name</div>
|
||||
<div class='clubs_content_row'><?php echo htmlentities($this->userName); ?></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Funktion im Verein</div>
|
||||
<div class='clubs_content_row'><?php echo $this->userFunction;?></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>E-Mail</div>
|
||||
<div class='clubs_content_row'><input id='check-mail' type='checkbox' name='mailDedicated' value='true' class='clubs check-dedicated' <?php if($this->mailDedicated) echo 'checked'; ?>> Abweichend von Einstellungen der Person</div>
|
||||
<div class='clubs_content_row'><input id='mail' type='text' name='mail' value='<?php echo htmlentities($this->userMail); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Telefon</div>
|
||||
<div class='clubs_content_row'><input id='check-phone' type='checkbox' name='phoneDedicated' value='true' class='clubs check-dedicated' <?php if($this->phoneDedicated) echo 'checked'; ?>> Abweichend von Einstellungen der Person</div>
|
||||
<div class='clubs_content_row'><input id='phone' type='text' name='phone' value='<?php echo htmlentities($this->userPhone); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Handy</div>
|
||||
<div class='clubs_content_row'><input id='check-mobile' type='checkbox' name='mobileDedicated' value='true' class='clubs check-dedicated' <?php if($this->mobileDedicated) echo 'checked'; ?>> Abweichend von Einstellungen der Person</div>
|
||||
<div class='clubs_content_row'><input id='mobile' type='text' name='mobile' value='<?php echo htmlentities($this->userMobile); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Adresse</div>
|
||||
<div class='clubs_content_row'><input id='check-address' type='checkbox' name='addressDedicated' value='true' class='clubs check-dedicated' <?php if($this->addressDedicated) echo 'checked'; ?>> Abweichend von Einstellungen der Person</div>
|
||||
<div class='clubs_content_row'><textarea id='address' name="address" rows='4' class='clubs'><?php echo htmlentities($this->userAddress); ?></textarea></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Admin</div>
|
||||
<div class='clubs_content_row'><input type="checkbox" name='isAdmin' value='true' <?php if($this->userIsAdmin) echo 'checked'; ?>> Benutzer ist Administrator für den Verein</div>
|
||||
</div>
|
||||
|
||||
<input type="submit" value='Speichern' name='submit'>
|
||||
<input type="reset" value='Werte zurücksetzen'>
|
||||
<a href='?option=com_clubs&view=club&clubid=<?php echo $this->clubid; ?>'>Abbrechen</a>
|
||||
</form>
|
67
src/site/views/clubassoc/view.html.php
Normal file
67
src/site/views/clubassoc/view.html.php
Normal 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);
|
||||
}
|
||||
|
||||
}
|
58
src/site/views/clubdata/tmpl/default.php
Normal file
58
src/site/views/clubdata/tmpl/default.php
Normal file
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<h1>Stammdaten anpassen</h1>
|
||||
|
||||
<form method="post" action="?option=com_clubs&task=club.savedata">
|
||||
<input type="hidden" name='clubid' value='<?php echo $this->clubid; ?>'>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Name des Vereins</div>
|
||||
<div class='clubs_content_row'><input type='text' name='name' value='<?php echo htmlentities($this->clubname); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Adresse</div>
|
||||
<div class='clubs_content_row'>
|
||||
<textarea rows="4" class='clubs'><?php echo htmlentities($this->address); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Internet</div>
|
||||
<div class='clubs_content_row'><input type='text' name='internet' value='<?php echo htmlentities($this->internet); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Kontaktperson</div>
|
||||
<div class='clubs_content_row'><input type='text' name='contactperson' value='<?php echo htmlentities($this->contactperson); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Mail-Adresse</div>
|
||||
<div class='clubs_content_row'><input type='text' name='email' value='<?php echo htmlentities($this->email); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Telefon</div>
|
||||
<div class='clubs_content_row'><input type='text' name='telephone' value='<?php echo htmlentities($this->phone); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Angebote</div>
|
||||
<div class='clubs_content_row'>
|
||||
<?php foreach($this->options as $k=>$v): ?>
|
||||
<input type="checkbox" <?php if(isset($v)) echo 'checked="checked"'; ?> name='options[]'> <?php echo htmlentities($k); ?><br />
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="submit" value='Speichern' name='submit'>
|
||||
<input type="reset" value='Werte zurücksetzen'>
|
||||
<a href='?option=com_clubs&view=club&clubid=<?php echo $this->clubid; ?>'>Abbrechen</a>
|
||||
</form>
|
||||
|
48
src/site/views/clubdata/view.html.php
Normal file
48
src/site/views/clubdata/view.html.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class ClubsViewClubData extends HtmlView
|
||||
{
|
||||
|
||||
public function display(string $tpl = null)
|
||||
{
|
||||
// FIXME Insert code from DB
|
||||
$this->clubid = 43;
|
||||
$this->clubname = "Testclub";
|
||||
$this->address = "Straße 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', 'placeid'=>12);
|
||||
// $this->trainingPlaces[] = array('name'=>'Schule', 'street'=>'Straße', 'city'=>'SB', 'plz'=>'12345', 'placeid'=>14);
|
||||
|
||||
$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;
|
||||
|
||||
Factory::getDocument()->addStyleSheet(Uri::base(true) . "components/com_clubs/css/clubs.css");
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
}
|
43
src/site/views/clubplace/tmpl/default.php
Normal file
43
src/site/views/clubplace/tmpl/default.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<h1>Räumlichkeit anpassen</h1>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Name des Vereins</div>
|
||||
<div class='clubs_content_row'><?php echo htmlentities($this->clubname); ?></div>
|
||||
</div>
|
||||
|
||||
<form method="post" action='?option=com_clubs&task=<?php echo $this->taskName; ?>'>
|
||||
<input type="hidden" name='placeid' value='<?php echo $this->place['placeid']; ?>'>
|
||||
<input type="hidden" name='clubid' value='<?php echo $this->clubid; ?>'>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Name</div>
|
||||
<div class='clubs_content_row'><input type="text" name='alias' value='<?php echo htmlentities($this->place['name']); ?>' class='clubs'>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Straße</div>
|
||||
<div class='clubs_content_row'><input type='text' name='street' value='<?php echo htmlentities($this->place['street']); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>PLZ</div>
|
||||
<div class='clubs_content_row'><input type='text' name='zip' value='<?php echo htmlentities($this->place['plz'] ); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Ort</div>
|
||||
<div class='clubs_content_row'><input type='text' name='city' value='<?php echo htmlentities($this->place['city']); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<input type="submit" value='Speichern' name='submit'>
|
||||
<input type="reset" value='Werte zurücksetzen'>
|
||||
<a href='?option=com_clubs&view=clubplaces&clubid=<?php echo $this->clubid; ?>'>Abbrechen</a>
|
||||
</form>
|
28
src/site/views/clubplace/view.html.php
Normal file
28
src/site/views/clubplace/view.html.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class ClubsViewClubPlace extends HtmlView
|
||||
{
|
||||
|
||||
public function display(string $tpl = null)
|
||||
{
|
||||
// FIXME Insert code from DB
|
||||
$this->clubid = 43;
|
||||
$this->clubname = "Testclub";
|
||||
|
||||
$this->place = array('name'=>'Schule', 'street'=>'Straße', 'city'=>'SB', 'plz'=>'12345', 'placeid'=>12);
|
||||
|
||||
$this->taskName = 'club.addplace';
|
||||
|
||||
Factory::getDocument()->addStyleSheet(Uri::base(true) . "components/com_clubs/css/clubs.css");
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
}
|
33
src/site/views/clubplaces/tmpl/default.php
Normal file
33
src/site/views/clubplaces/tmpl/default.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<h1>Räumlichkeiten anpassen</h1>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Name des Vereins</div>
|
||||
<div class='clubs_content_row'><?php echo htmlentities($this->clubname); ?></div>
|
||||
</div>
|
||||
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Verfügbare Räumlichkeiten</div>
|
||||
<?php if(count($this->trainingPlaces) == 0): ?>
|
||||
<p>Bisher wurden keine Trainingsräme definiert.</p>
|
||||
<?php else: ?>
|
||||
<?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']); ?><br />
|
||||
<a href='?option=com_clubs&view=clubplace&palce=<?php echo $p['placeid']; ?>'>Ändern</a>
|
||||
<a href='?option=com_clubs&task=club.delplace&place=<?php echo $p['placeid']; ?>'>Löschen</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<a href='?option=com_clubs&view=clubplace&place=new&club=<?php echo $this->clubid; ?>'>Neuen Raum anlegen</a>
|
||||
</div>
|
||||
|
||||
<a href='?option=com_clubs&view=club&clubid=<?php echo $this->clubid; ?>'>Zurück zur Verwaltung des Vereins</a>
|
28
src/site/views/clubplaces/view.html.php
Normal file
28
src/site/views/clubplaces/view.html.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class ClubsViewClubPlaces extends HtmlView
|
||||
{
|
||||
|
||||
public function display(string $tpl = null)
|
||||
{
|
||||
// FIXME Insert code from DB
|
||||
$this->clubid = 43;
|
||||
$this->clubname = "Testclub";
|
||||
|
||||
$this->trainingPlaces = array();
|
||||
$this->trainingPlaces[] = array('name'=>'Schule', 'street'=>'Straße', 'city'=>'SB', 'plz'=>'12345', 'placeid'=>12);
|
||||
// $this->trainingPlaces[] = array('name'=>'Schule', 'street'=>'Straße', 'city'=>'SB', 'plz'=>'12345', 'placeid'=>14);
|
||||
|
||||
Factory::getDocument()->addStyleSheet(Uri::base(true) . "components/com_clubs/css/clubs.css");
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
}
|
38
src/site/views/searchperson/tmpl/default.php
Normal file
38
src/site/views/searchperson/tmpl/default.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<h1>Person auswählen</h1>
|
||||
|
||||
<h2>Suche</h2>
|
||||
<form action='<?php echo $this->formAction; ?>' method='post'>
|
||||
<div class='clubs_row'>
|
||||
<div class='clubs_title_row'>Name</div>
|
||||
<div class='clubs_content_row'><input type="text" name='search' value='<?php echo htmlentities($this->search); ?>' class='clubs'></div>
|
||||
</div>
|
||||
|
||||
<input type="submit" value='Suchen'>
|
||||
<a href='<?php echo htmlentities($this->urlAbort); ?>'>Abbrechen</a>
|
||||
</form>
|
||||
|
||||
<?php if($this->searchDone): ?>
|
||||
<h2>Suchergebnis</h2>
|
||||
<table width='100%' class='clubs'>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Ort</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($this->searchResult as $r): ?>
|
||||
<tr>
|
||||
<td><?php echo $r['name']; ?></td>
|
||||
<td><?php echo $r['city']; ?></td>
|
||||
<td><a href='<?php printf($this->urlSelect, $r['id']); ?>'>Auswählen</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php endif; ?>
|
34
src/site/views/searchperson/view.html.php
Normal file
34
src/site/views/searchperson/view.html.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class ClubsViewSearchPerson extends HtmlView
|
||||
{
|
||||
|
||||
public function display(string $tpl = null)
|
||||
{
|
||||
// FIXME Insert code from DB
|
||||
$inp = Factory::getApplication()->input;
|
||||
|
||||
$this->search = $inp->get('search', '');
|
||||
$this->urlAbort = $inp->get('urlAbort', '?option=com_clubs', 'raw');
|
||||
$this->urlSelect = $inp->get('urlSelect', '?option=com_clubs', 'raw');
|
||||
|
||||
$this->formAction = Uri::getInstance()->toString();
|
||||
|
||||
$this->searchDone = true;
|
||||
|
||||
$this->searchResult = array();
|
||||
$this->searchResult[] = array('name'=>'Max Mustermann', 'city'=>'Völklingen', 'id'=>21);
|
||||
|
||||
Factory::getDocument()->addStyleSheet(Uri::base(true) . "components/com_clubs/css/clubs.css");
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
}
|
@ -30,7 +30,24 @@ defined('_JEXEC') or die;
|
||||
<div class='clubs_content_row'><?php echo htmlentities($this->mobile); ?></div>
|
||||
</div>
|
||||
|
||||
<?php if(count($this->clubs) > 0): ?>
|
||||
<div class='clubs_row'>
|
||||
<a href="?option=com_clubs&view=userdata&id=<?php echo $this->id; ?>">Daten anpassen</a><br />
|
||||
<div class='clubs_title_row'>Vereinstätigkeiten</div>
|
||||
<div class='clubs_content_row'>
|
||||
<ul>
|
||||
<?php foreach($this->clubs as $c): ?>
|
||||
<li>
|
||||
<a href='?option=com_clubs&view=club&id=<?php echo $c['id']; ?>'><?php echo htmlentities($c['club']); ?> als <?php echo htmlentities($c['position']); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->canModify): ?>
|
||||
<div class='clubs_row'>
|
||||
<a href="?option=com_clubs&view=userdata&id=<?php echo $this->id; ?>">Stammdaten anpassen</a><br />
|
||||
<a href="?option=com_clubs&view=userpwd&id=<?php echo $this->id; ?>">Passwort ändern</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -19,6 +19,11 @@ class ClubsViewUser extends HtmlView
|
||||
$this->phone = "0123456";
|
||||
$this->mobile = "0178 8375";
|
||||
|
||||
$this->clubs = array();
|
||||
$this->clubs[] = array('club'=>'Clubname', 'id'=>3, 'position'=>'Präsident');
|
||||
|
||||
$this->canModify = false;
|
||||
|
||||
Factory::getDocument()->addStyleSheet(Uri::base(true) . '/components/com_clubs/css/clubs.css');
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user