mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
Einige Optimierungen
This commit is contained in:
@@ -4257,21 +4257,32 @@ function verbandsorgane(): void
|
||||
global $params;
|
||||
$jInput = Factory::getContainer()->get(SiteApplication::class)->input;
|
||||
|
||||
$query = "SELECT t1.*, COUNT(t2.verbandsorgane_id) AS anzahl"
|
||||
$query = "SELECT t1.*, COUNT(t2.verbandsorgane_id) AS anzahl, t3.veranstalterbezeichnung AS organisation"
|
||||
. "\n FROM #__sportsmanager_verbandsorgane t1"
|
||||
. "\n LEFT JOIN #__sportsmanager_mitglied_von_verbandsorgan t2 ON t2.verbandsorgane_id = t1.verbandsorgane_id"
|
||||
. "\n LEFT JOIN #__sportsmanager_veranstalter t3 ON t3.veranstalter_id = t1.veranstalter_id"
|
||||
. "\n GROUP BY t1.verbandsorgane_id"
|
||||
. kategorieFilter("HAVING t1.kategorie IN")
|
||||
. "\n ORDER BY t1.reihenfolge;";
|
||||
$verbandsorgane = loadObjectList($db, $query);
|
||||
|
||||
$query = "SELECT COUNT(veranstalter_id) AS anzahl"
|
||||
. "\n FROM #__sportsmanager_verbandsorgane"
|
||||
. "\n GROUP BY veranstalter_id"
|
||||
. kategorieFilter("WHERE kategorie IN");
|
||||
$organisationen = loadObjectList($db, $query);
|
||||
if (count($organisationen) > 1)
|
||||
$organisation_zeigen = true;
|
||||
else
|
||||
$organisation_zeigen = false;
|
||||
|
||||
if (count($verbandsorgane) == 1){
|
||||
verbandsorganeDetails($verbandsorgane[0]->verbandsorgane_id);
|
||||
} else {
|
||||
if (isJson()) {
|
||||
echo json_encode($verbandsorgane);
|
||||
} else {
|
||||
HTML_sportsmanager::verbandsorgane($params->get('titel'), $params->get('beschreibung'), $verbandsorgane);
|
||||
HTML_sportsmanager::verbandsorgane($params->get('titel'), $params->get('beschreibung'), $verbandsorgane, $organisation_zeigen);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4287,11 +4298,12 @@ function verbandsorganeDetails($uebergabe_id = 0): void
|
||||
else
|
||||
$id = $uebergabe_id;
|
||||
|
||||
|
||||
$query = "SELECT * FROM #__sportsmanager_verbandsorgane WHERE verbandsorgane_id = $id";
|
||||
$verbandsorgane = loadObjectList($db, $query);
|
||||
|
||||
$query = "SELECT * FROM #__sportsmanager_mitglied_von_verbandsorgan WHERE verbandsorgane_id = $id";
|
||||
$query = "SELECT * FROM #__sportsmanager_mitglied_von_verbandsorgan"
|
||||
. "\n WHERE verbandsorgane_id = $id"
|
||||
. "\n ORDER BY reihenfolge, nachname, vorname";
|
||||
$mitglieder = loadObjectList($db, $query);
|
||||
|
||||
if (isJson()) {
|
||||
|
||||
@@ -3951,14 +3951,14 @@ static function spielverlegungen($titel, $beschreibung, $rows): void
|
||||
}
|
||||
?>
|
||||
<div class="uk-overflow-auto">
|
||||
<table style='width: 100%; border-collapse: collapse;'
|
||||
<table style='border-collapse: collapse;'
|
||||
class="uk-table-hover uk-table-divider uk-table-middle dtfl-table-medium contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>">
|
||||
<tr class="sectiontableheader<?php echo $params->get('pageclass_sfx'); ?>">
|
||||
<th nowrap style='text-align: center; width: 180px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_COMPETITION'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: center; width: 200px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_MATCH'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: center; width: 150px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_OLD_DATE'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: center; width: 150px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_NEW_DATE'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: left; width: 280px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_COMMENT'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: center; width: 200px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_COMPETITION'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: center; width: 300px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_MATCH'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: center; width: 160px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_OLD_DATE'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: center; width: 160px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_NEW_DATE'); ?></STRONG></th>
|
||||
<th nowrap style='text-align: left; width: 300px;'><STRONG><?php echo Text::_('COM_SPORTSMANAGER_COMMENT'); ?></STRONG></th>
|
||||
</tr>
|
||||
<?php
|
||||
if (count($rows) > 0) {
|
||||
@@ -4002,7 +4002,7 @@ static function spielverlegungen($titel, $beschreibung, $rows): void
|
||||
<?php
|
||||
}
|
||||
|
||||
static function verbandsorgane($titel, $beschreibung, $rows): void
|
||||
static function verbandsorgane($titel, $beschreibung, $rows, $organisation_zeigen): void
|
||||
{
|
||||
global $params;
|
||||
if (!empty($titel)) { ?>
|
||||
@@ -4023,12 +4023,15 @@ static function verbandsorgane($titel, $beschreibung, $rows): void
|
||||
|
||||
if (count($rows) > 0) {
|
||||
?>
|
||||
<table style='width: 600px; border-collapse: collapse;'
|
||||
<table style='border-collapse: collapse;'
|
||||
class="uk-table-hover uk-table-divider uk-table-middle dtfl-table-medium contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>">
|
||||
<tr class="sectiontableheader<?php echo $params->get('pageclass_sfx'); ?>">
|
||||
<th style='text-align: left; width: 250px;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_ASSOCIATION_BODIES'); ?></strong></th>
|
||||
<th style='text-align: left; width: 100px;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_MEMBERS'); ?></strong></th>
|
||||
<th style='text-align: left; width: 250px;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_EMAIL'); ?></strong></th>
|
||||
<?PHP if ($organisation_zeigen){ ?>
|
||||
<th style='text-align: left; width: 150px;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_ORGANISATION'); ?></strong></th>
|
||||
<?PHP } ?>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -4048,6 +4051,11 @@ static function verbandsorgane($titel, $beschreibung, $rows): void
|
||||
<td nowrap>
|
||||
<?php echo $row->email; ?>
|
||||
</td>
|
||||
<?PHP if ($organisation_zeigen){ ?>
|
||||
<td nowrap>
|
||||
<?php echo $row->organisation; ?>
|
||||
</td>
|
||||
<?PHP } ?>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@@ -4086,8 +4094,9 @@ static function verbandsorganeDetails($titel, $beschreibung, $verbandsorgan, $ro
|
||||
|
||||
if (count($rows) > 0) {
|
||||
?>
|
||||
<table style='width: 800px;' class="contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>">
|
||||
|
||||
<H2>Mitglieder</H2>
|
||||
<table style='width: 100%; border-collapse: collapse;'
|
||||
class="uk-table-hover uk-table-divider uk-table-middle dtfl-table-medium contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>">
|
||||
<?php
|
||||
|
||||
$k = 0;
|
||||
|
||||
@@ -7634,7 +7634,7 @@ class HTML_sportsmanager_admin
|
||||
:</label>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<textarea name="beschreibung" id="description" cols="50" rows="8"
|
||||
<textarea name="beschreibung" id="description" cols="80" rows="12"
|
||||
title="<?php echo Text::_('COM_SPORTSMANAGER_USE_HTML'); ?>"><?php echo htmlentities_utf8($row->beschreibung); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user