Frontend für Verbandsorgane erstellt.

This commit is contained in:
Jürgen Meyer
2026-02-11 13:58:12 +01:00
parent 3cb3fa2b28
commit d462137424
6 changed files with 184 additions and 4 deletions
@@ -22,6 +22,8 @@ COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_CLUBS="Vereine"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_VENUES="Spielorte"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_APPOINTMENTS="Termine"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_MATCH_RESCHEDULING="Spielverlegungen"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_ASSOCIATION_BODIES="Verbandsorgane"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_HALL_OF_FAME="Hall Of Fame"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_TITLE="Titel"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_TITLE_DESC="Titel, der im Fenster oben angezeigt wird"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_DESCRIPTION="Beschreibung"
@@ -22,6 +22,8 @@ COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_CLUBS="Clubs"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_VENUES="Venues"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_APPOINTMENTS="Appointments"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_MATCH_RESCHEDULING="Match reschedulings"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_ASSOCIATION_BODIES="Association bodies"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_HALL_OF_FAME="Hall of fame"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_TITLE="Title"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_TITLE_DESC="Title which will be shows on top"
COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_DESCRIPTION="Description"
@@ -1085,6 +1085,15 @@ if ($task == "spielerbild") {
}
} else if ($content == 'spielverlegungen') {
spielverlegungen();
} else if ($content == 'verbandsorgane') {
switch ($task) {
case 'verbandsorgane_details':
verbandsorganeDetails();
break;
default:
verbandsorgane();
break;
}
} else if ($content == 'login') {
userAuth();
} else if ($content == 'login_refresh') {
@@ -4242,6 +4251,56 @@ function spielverlegungen(): void
}
}
function verbandsorgane(): void
{
$db = getDatabase();
global $params;
$jInput = Factory::getContainer()->get(SiteApplication::class)->input;
$query = "SELECT t1.*, COUNT(t2.verbandsorgane_id) AS anzahl"
. "\n FROM #__sportsmanager_verbandsorgane t1"
. "\n LEFT JOIN #__sportsmanager_mitglied_von_verbandsorgan t2 ON t2.verbandsorgane_id = t1.verbandsorgane_id"
. "\n GROUP BY t1.verbandsorgane_id"
. kategorieFilter("HAVING t1.kategorie IN")
. "\n ORDER BY t1.reihenfolge;";
$verbandsorgane = loadObjectList($db, $query);
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);
}
}
}
function verbandsorganeDetails($uebergabe_id = 0): void
{
$db = getDatabase();
global $params;
$jInput = Factory::getContainer()->get(SiteApplication::class)->input;
if ($uebergabe_id == 0)
$id = $jInput->get('id', 0, 'INT');
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";
$mitglieder = loadObjectList($db, $query);
if (isJson()) {
echo json_encode($verbandsorgane);
} else {
HTML_sportsmanager::verbandsorganeDetails($params->get('titel'), $params->get('beschreibung'), $verbandsorgane[0], $mitglieder);
}
}
function begegnungSpielplan($teamansicht = false): void
{
$db = getDatabase();
@@ -25,6 +25,8 @@
<option value="spielorte"><![CDATA[COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_VENUES]]></option>
<option value="termine"><![CDATA[COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_APPOINTMENTS]]></option>
<option value="spielverlegungen"><![CDATA[COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_MATCH_RESCHEDULING]]></option>
<option value="verbandsorgane"><![CDATA[COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_ASSOCIATION_BODIES]]></option>
<option value="hall_of_fame"><![CDATA[COM_SPORTSMANAGER_LAYOUT_GENERAL_CONTENT_OPTION_HALL_OF_FAME]]></option>
</field>
<field name="titel"
type="text"
@@ -3951,7 +3951,8 @@ static function spielverlegungen($titel, $beschreibung, $rows): void
}
?>
<div class="uk-overflow-auto">
<table class="uk-table-shrink contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>" style='width: 1000px;'>
<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'); ?>">
<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>
@@ -3983,10 +3984,10 @@ static function spielverlegungen($titel, $beschreibung, $rows): void
?>
</td>
<td nowrap style='text-align: center;'>
<?php echo str_replace(" ", "<br>", date('d.m.Y h:i', strtotime($row->Termin_alt))); ?>
<?php echo str_replace(" ", "<br>", date('d.m.Y H:i', strtotime($row->Termin_alt))); ?>
</td>
<td nowrap style='text-align: center;'>
<?php echo $row->Termin_neu == "" ? "" : str_replace(" ", "<br>", date('d.m.Y h:i', strtotime($row->Termin_neu))); ?>
<?php echo $row->Termin_neu == "" ? "" : str_replace(" ", "<br>", date('d.m.Y H:i', strtotime($row->Termin_neu))); ?>
</td>
<td nowrap style='text-align: left;'>
<?php echo htmlentities_utf8($row->Begruendung_beantragt); ?>
@@ -4001,6 +4002,120 @@ static function spielverlegungen($titel, $beschreibung, $rows): void
<?php
}
static function verbandsorgane($titel, $beschreibung, $rows): void
{
global $params;
if (!empty($titel)) { ?>
<style>td{padding: 3px;}</style>
<div
class="componentheading<?php echo $params->get('pageclass_sfx'); ?>"><?php echo htmlentities_utf8($titel); ?></div><?php }
if (!empty($beschreibung)) {
?>
<div class="uk-overflow-auto">
<table class="contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>">
<tr>
<td><?php echo str_contains($beschreibung, ">") ? $beschreibung : htmlentities_utf8($beschreibung); ?></td>
</tr>
</table>
</div>
<?php
}
if (count($rows) > 0) {
?>
<table style='width: 600px; 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>
</tr>
<?php
$k = 0;
foreach ($rows as $row) {
?>
<tr class="sectiontableentry<?php echo $k + 1;
$k = ($k + 1) % 2; ?><?php echo $params->get('pageclass_sfx'); ?>">
<td nowrap>
<a href="<?php echo SportsManagerURL('&task=verbandsorgane_details&id=' . $row->verbandsorgane_id); ?>">
<?php echo htmlentities_utf8(NichtLeererString($row->verbandsorgan)); ?>
</a>
</td>
<td nowrap>
<?php echo $row->anzahl; ?>
</td>
<td nowrap>
<?php echo $row->email; ?>
</td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
<span class="article_seperator<?php echo $params->get('pageclass_sfx'); ?>">&nbsp;</span>
<?php
}
static function verbandsorganeDetails($titel, $beschreibung, $verbandsorgan, $rows): void
{
global $params;
if (!empty($titel)) { ?>
<style>td{padding: 3px;}</style>
<div
class="componentheading<?php echo $params->get('pageclass_sfx'); ?>"><?php echo htmlentities_utf8($titel); ?></div><?php }
if (!empty($beschreibung)) {
?>
<div class="uk-overflow-auto">
<table class="contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>">
<tr>
<td><?php echo str_contains($beschreibung, ">") ? $beschreibung : htmlentities_utf8($beschreibung); ?></td>
</tr>
</table>
</div>
<?php
}
echo "<H1>" . $verbandsorgan->verbandsorgan . "</H1>";
echo $verbandsorgan->beschreibung;
if (count($rows) > 0) {
?>
<table style='width: 800px;' class="contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>">
<?php
$k = 0;
foreach ($rows as $row) {
?>
<tr class="sectiontableentry<?php echo $k + 1;
$k = ($k + 1) % 2; ?><?php echo $params->get('pageclass_sfx'); ?>">
<td nowrap>
<?php echo htmlentities_utf8($row->nachname . ", " . $row->vorname); ?>
</td>
<td nowrap>
<?php echo $row->funktion; ?>
</td>
<td nowrap>
<?php echo $row->zusatzinfo; ?>
</td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
<span class="article_seperator<?php echo $params->get('pageclass_sfx'); ?>">&nbsp;</span>
<?php
}
static function spieler($beschreibung, $rows, $sortierung, $statistik, $beginn, $kategorie, $filter, $veranstaltungid, $einstufungid, $veranstaltungen, $veranstalterid, $veranstalter, $einstufungen, $details_anzeigen): void
{
global $params;
@@ -1073,7 +1073,7 @@ COM_SPORTSMANAGER_TRAINING_DAYS="Training days"
COM_SPORTSMANAGER_NOT_ACTUALIZED_DATA="Data not updated"
COM_SPORTSMANAGER_ASSOCIATION_BODIES="Association bodies"
COM_SPORTSMANAGER_ASSOCIATION_BODY="Association body"
COM_SPORTSMANAGER_ASSOCIATION_BODY="Add association body"
COM_SPORTSMANAGER_ADD_ASSOCIATION_BODY="Add association body"
COM_SPORTSMANAGER_REALLY_REMOVE_ASSOCIATION_BODY="Do you really want to remove this association body?"
COM_SPORTSMANAGER_INVALID_ASSOCIATION_BODY_NAME="Invalid association body name"
COM_SPORTSMANAGER_NAME_NOT_COMPLETE="The name is not completely filled in"