Spielpunkte-Wertung neben die Einheit, die sie uebernimmt

Sven 2026-09-08: „hier wuerde ich die Option direkt unter ‚Saetze pro Spiel'
ziehen und abhaengig von der Einstellung bei ‚Saetze pro Spiel' benennen".

Die vierte Wertung („ohne Umrechnung") uebernimmt das Spielergebnis als
Spielpunkte — welche Zahl das ist, sagt aber ein ANDERES Feld: Tore bei
„Einer", Saetze bei „Mehrere". Sie stand bisher zwei Gruppen weiter oben unter
„Begegnung", also getrennt von der Angabe, die ihre Bedeutung festlegt.

- „Spielpunkte pro Spiel" (Einzel + Doppel) sitzt jetzt direkt unter „Saetze
  pro Spiel" in der Gruppe „Spiel" — wo sie hingehoert: es ist eine Angabe zum
  einzelnen Spiel, nicht zur Begegnung. „Begegnung abgeschlossen bei" bleibt in
  der Gruppe „Begegnung".
- Der Eintrag heisst jetzt nach der gewaehlten Einheit: „Ohne Umrechnung –
  Saetze sind die Spielpunkte" bzw. „… Tore sind die Spielpunkte". Ueber
  dasselbe data-tore/data-saetze-Verfahren, das die Siegbedingungen schon
  benutzen; umgeschaltet in zeilen_anzeigen(), also auch beim Wechseln ohne
  Neuladen. Der alte Sammeltext bleibt als Rueckfall stehen.
- Am lokalen Testserver gerendert und geprueft: Reihenfolge stimmt, beide
  Texte kommen uebersetzt an.
- Nebenbei: der Kommentar nannte Datenbankversion 126, tatsaechlich ist es 122.
This commit is contained in:
svennickel
2026-09-08 16:08:44 +02:00
parent 84211e9f9e
commit 2c4b3e0908
3 changed files with 60 additions and 50 deletions
@@ -4742,7 +4742,8 @@ class HTML_sportsmanager_admin
var einheit = saetze ? 'saetze' : 'tore'; var einheit = saetze ? 'saetze' : 'tore';
var felder = ['punkte_sieg_einzel', 'punkte_sieg_doppel', var felder = ['punkte_sieg_einzel', 'punkte_sieg_doppel',
'punkte_vorsprung_einzel', 'punkte_vorsprung_doppel', 'punkte_vorsprung_einzel', 'punkte_vorsprung_doppel',
'punkte_deckel_einzel', 'punkte_deckel_doppel']; 'punkte_deckel_einzel', 'punkte_deckel_doppel',
'spielpunkte_wertung_einzel', 'spielpunkte_wertung_doppel'];
for (var f = 0; f < felder.length; f++) { for (var f = 0; f < felder.length; f++) {
var sel = document.adminForm[felder[f]]; var sel = document.adminForm[felder[f]];
if (sel == null) continue; if (sel == null) continue;
@@ -5093,54 +5094,6 @@ class HTML_sportsmanager_admin
</select> </select>
</td> </td>
</tr> </tr>
<tr id="row_spielpunkte_wertung_einzel"<?php if ($race_an) echo " style=\"display:none\""; ?>>
<td nowrap style="width: 20%; text-align: right">
<label
for="points_valuation_single"><?php echo Text::_('COM_SPORTSMANAGER_GAME_POINTS_GAME'); ?>
:
</td>
<td nowrap>
<select class="uk-select uk-form-width-large"
name="spielpunkte_wertung_einzel" id="points_valuation_single"
size="1">
<?php
// Die vierte Wertung hiess „Keine" und sagte damit das Gegenteil dessen, was
// sie tut: gewertet wird alles, nur ohne Umrechnung — das Ergebnis des
// Spiels IST sein Spielpunktestand (admin.php: $spiel_heim_spielpunkte =
// $spiel_heim_punkte). Welche Zahl das ist, sagt punktetyp: Tore bei
// „Einer", Saetze bei „Mehrere" (Sven 2026-09-01).
$typ = array(Text::_('COM_SPORTSMANAGER_WIN_1_POINT'), Text::_('COM_SPORTSMANAGER_WIN_2_POINTS'), Text::_('COM_SPORTSMANAGER_WIN_3_POINTS'), Text::_('COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS'));
$typ_wert = array(3, 0, 1, 2);
for ($i = 0; $i <= 3; $i++) {
echo "<option value=\"" . $typ_wert[$i] . "\"" . ($row != null ? ($row->spielpunkte_wertung_einzel == $typ_wert[$i] ? " selected" : "") : "") . ">" . htmlentities_utf8($typ[$i]) . "</option>";
}
?>
</select>
<input type="button"
value="<?php echo !empty($row) && $row->spielpunkte_wertung_einzel != $row->spielpunkte_wertung_doppel ? Text::_('COM_SPORTSMANAGER_GAME_DOUBLES_IDENTICAL') : Text::_('COM_SPORTSMANAGER_GAME_DOUBLES_SEPARATELY'); ?>"
class="button" onclick="spielpunkte_wertung_doppel_anzeigen();"
id="button_spielpunkte_wertung_doppel_separat"/>
</td>
</tr>
<tr id="row_spielpunkte_wertung_doppel"<?php if (empty($row) || $row->spielpunkte_wertung_einzel == $row->spielpunkte_wertung_doppel) echo " style=\"display:none\""; ?>>
<td nowrap style="width: 20%; text-align: right">
<label
for="points_valuation_double"><?php echo Text::_('COM_SPORTSMANAGER_GAME_DOUBLES2'); ?>
:</label>
</td>
<td nowrap>
<select class="uk-select uk-form-width-large"
name="spielpunkte_wertung_doppel" id="points_valuation_double"
size="1">
<?php
$typ = array(Text::_('COM_SPORTSMANAGER_WIN_1_POINT'), Text::_('COM_SPORTSMANAGER_WIN_2_POINTS'), Text::_('COM_SPORTSMANAGER_WIN_3_POINTS'), Text::_('COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS'));
for ($i = 0; $i <= 3; $i++) {
echo "<option value=\"" . $typ_wert[$i] . "\"" . ($row != null ? ($row->spielpunkte_wertung_doppel == $typ_wert[$i] ? " selected" : "") : "") . ">" . htmlentities_utf8($typ[$i]) . "</option>";
}
?>
</select>
</td>
</tr>
<tr id="row_spielpunkte_bedingung"<?php if ($race_an) echo " style=\"display:none\""; ?>> <tr id="row_spielpunkte_bedingung"<?php if ($race_an) echo " style=\"display:none\""; ?>>
<td nowrap style="width: 20%; text-align: right"> <td nowrap style="width: 20%; text-align: right">
<label <label
@@ -5183,7 +5136,7 @@ class HTML_sportsmanager_admin
// Angabe, dass die Saetze einzeln eingetragen werden. punktetyp // Angabe, dass die Saetze einzeln eingetragen werden. punktetyp
// behaelt seine beiden ueberlieferten Werte, damit eine fremde // behaelt seine beiden ueberlieferten Werte, damit eine fremde
// Anwendung weiter ablesen kann, ob die Punkte eines Spiels Tore // Anwendung weiter ablesen kann, ob die Punkte eines Spiels Tore
// oder gewonnene Saetze sind (Datenbankversion 126). // oder gewonnene Saetze sind (Datenbankversion 122).
$typ = array(Text::_('COM_SPORTSMANAGER_ONE'), Text::_('COM_SPORTSMANAGER_MULTIPLE'), Text::_('COM_SPORTSMANAGER_MULTIPLE_WITH_SETS')); $typ = array(Text::_('COM_SPORTSMANAGER_ONE'), Text::_('COM_SPORTSMANAGER_MULTIPLE'), Text::_('COM_SPORTSMANAGER_MULTIPLE_WITH_SETS'));
$gewaehlt = $row != null $gewaehlt = $row != null
? (!empty($row->satzergebnisse) ? 2 : (int)$row->punktetyp) ? (!empty($row->satzergebnisse) ? 2 : (int)$row->punktetyp)
@@ -5196,6 +5149,59 @@ class HTML_sportsmanager_admin
<br/><small class="sm_hinweis"><?php echo Text::_('COM_SPORTSMANAGER_SETS_PER_GAME_HELP'); ?></small> <br/><small class="sm_hinweis"><?php echo Text::_('COM_SPORTSMANAGER_SETS_PER_GAME_HELP'); ?></small>
</td> </td>
</tr> </tr>
<tr id="row_spielpunkte_wertung_einzel"<?php if ($race_an) echo " style=\"display:none\""; ?>>
<td nowrap style="width: 20%; text-align: right">
<label
for="points_valuation_single"><?php echo Text::_('COM_SPORTSMANAGER_GAME_POINTS_GAME'); ?>
:
</td>
<td nowrap>
<select class="uk-select uk-form-width-large"
name="spielpunkte_wertung_einzel" id="points_valuation_single"
size="1">
<?php
// Die vierte Wertung hiess „Keine" und sagte damit das Gegenteil dessen, was
// sie tut: gewertet wird alles, nur ohne Umrechnung — das Ergebnis des
// Spiels IST sein Spielpunktestand (admin.php: $spiel_heim_spielpunkte =
// $spiel_heim_punkte). Welche Zahl das ist, sagt punktetyp: Tore bei
// „Einer", Saetze bei „Mehrere" (Sven 2026-09-01).
$typ = array(Text::_('COM_SPORTSMANAGER_WIN_1_POINT'), Text::_('COM_SPORTSMANAGER_WIN_2_POINTS'), Text::_('COM_SPORTSMANAGER_WIN_3_POINTS'), Text::_('COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS'));
$typ_wert = array(3, 0, 1, 2);
// Die vierte Wertung heisst nach der Einheit, die sie uebernimmt: Tore bei
// „Einer", Saetze bei „Mehrere". Beide Texte haengen an der Option, das
// Umschalten macht zeilen_anzeigen() (Sven 2026-09-08).
$einheit_attr = ' data-tore="' . htmlspecialchars(Text::_('COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS_GOALS'), ENT_QUOTES) . '"'
. ' data-saetze="' . htmlspecialchars(Text::_('COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS_SETS'), ENT_QUOTES) . '"';
for ($i = 0; $i <= 3; $i++) {
echo "<option value=\"" . $typ_wert[$i] . "\"" . ($typ_wert[$i] == 2 ? $einheit_attr : "") . ($row != null ? ($row->spielpunkte_wertung_einzel == $typ_wert[$i] ? " selected" : "") : "") . ">" . htmlentities_utf8($typ[$i]) . "</option>";
}
?>
</select>
<input type="button"
value="<?php echo !empty($row) && $row->spielpunkte_wertung_einzel != $row->spielpunkte_wertung_doppel ? Text::_('COM_SPORTSMANAGER_GAME_DOUBLES_IDENTICAL') : Text::_('COM_SPORTSMANAGER_GAME_DOUBLES_SEPARATELY'); ?>"
class="button" onclick="spielpunkte_wertung_doppel_anzeigen();"
id="button_spielpunkte_wertung_doppel_separat"/>
</td>
</tr>
<tr id="row_spielpunkte_wertung_doppel"<?php if (empty($row) || $row->spielpunkte_wertung_einzel == $row->spielpunkte_wertung_doppel) echo " style=\"display:none\""; ?>>
<td nowrap style="width: 20%; text-align: right">
<label
for="points_valuation_double"><?php echo Text::_('COM_SPORTSMANAGER_GAME_DOUBLES2'); ?>
:</label>
</td>
<td nowrap>
<select class="uk-select uk-form-width-large"
name="spielpunkte_wertung_doppel" id="points_valuation_double"
size="1">
<?php
$typ = array(Text::_('COM_SPORTSMANAGER_WIN_1_POINT'), Text::_('COM_SPORTSMANAGER_WIN_2_POINTS'), Text::_('COM_SPORTSMANAGER_WIN_3_POINTS'), Text::_('COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS'));
for ($i = 0; $i <= 3; $i++) {
echo "<option value=\"" . $typ_wert[$i] . "\"" . ($typ_wert[$i] == 2 ? $einheit_attr : "") . ($row != null ? ($row->spielpunkte_wertung_doppel == $typ_wert[$i] ? " selected" : "") : "") . ">" . htmlentities_utf8($typ[$i]) . "</option>";
}
?>
</select>
</td>
</tr>
<tr> <tr>
<td nowrap style="width: 20%; text-align: right"> <td nowrap style="width: 20%; text-align: right">
<label <label
@@ -1150,6 +1150,8 @@ COM_SPORTSMANAGER_SETS_PER_GAME_HELP="Mit „Ergebnis je Satz" werden die Tore d
COM_SPORTSMANAGER_SET_COUNT_HELP="Die Angaben beschreiben den Wettbewerb; sie lehnen keine Eingabe ab. Auswertungen und Apps erkennen daran, ob ein Spiel noch läuft oder schon entschieden ist." COM_SPORTSMANAGER_SET_COUNT_HELP="Die Angaben beschreiben den Wettbewerb; sie lehnen keine Eingabe ab. Auswertungen und Apps erkennen daran, ob ein Spiel noch läuft oder schon entschieden ist."
COM_SPORTSMANAGER_MODE_GLOSSARY="Eine <strong>Begegnung</strong> ist die Partie zweier Mannschaften. Sie besteht aus mehreren <strong>Spielen</strong>: Einzel und Doppel, in der Reihenfolge der Spielfolge. Jedes Spiel bringt Spielpunkte für die Begegnung. Ein <strong>Spiel</strong> besteht aus einem Satz („Einer") oder aus mehreren. In einem <strong>Satz</strong> fallen <strong>Tore</strong>. Die Einstellungen unten sind in dieser Reihenfolge geordnet: von der Begegnung über das Spiel zum Satz." COM_SPORTSMANAGER_MODE_GLOSSARY="Eine <strong>Begegnung</strong> ist die Partie zweier Mannschaften. Sie besteht aus mehreren <strong>Spielen</strong>: Einzel und Doppel, in der Reihenfolge der Spielfolge. Jedes Spiel bringt Spielpunkte für die Begegnung. Ein <strong>Spiel</strong> besteht aus einem Satz („Einer") oder aus mehreren. In einem <strong>Satz</strong> fallen <strong>Tore</strong>. Die Einstellungen unten sind in dieser Reihenfolge geordnet: von der Begegnung über das Spiel zum Satz."
COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS="Ohne Umrechnung Tore bzw. Sätze sind die Spielpunkte" COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS="Ohne Umrechnung Tore bzw. Sätze sind die Spielpunkte"
COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS_GOALS="Ohne Umrechnung Tore sind die Spielpunkte"
COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS_SETS="Ohne Umrechnung Sätze sind die Spielpunkte"
COM_SPORTSMANAGER_COUNTING="Zählweise" COM_SPORTSMANAGER_COUNTING="Zählweise"
COM_SPORTSMANAGER_COUNTING_PER_GAME="Je Spiel jedes Spiel beginnt bei 0:0" COM_SPORTSMANAGER_COUNTING_PER_GAME="Je Spiel jedes Spiel beginnt bei 0:0"
COM_SPORTSMANAGER_COUNTING_RACE="Race-Modus die Tore addieren sich über alle Spiele" COM_SPORTSMANAGER_COUNTING_RACE="Race-Modus die Tore addieren sich über alle Spiele"
@@ -1150,6 +1150,8 @@ COM_SPORTSMANAGER_SETS_PER_GAME_HELP="With “each sets result” the goals o
COM_SPORTSMANAGER_SET_COUNT_HELP="These settings describe the competition; they never reject an entry. Evaluations and apps use them to tell a game still running from one already decided." COM_SPORTSMANAGER_SET_COUNT_HELP="These settings describe the competition; they never reject an entry. Evaluations and apps use them to tell a game still running from one already decided."
COM_SPORTSMANAGER_MODE_GLOSSARY="A <strong>match</strong> is the fixture between two teams. It consists of several <strong>games</strong> singles and doubles in the order of the game sequence and each game yields game points for the match. A <strong>game</strong> consists of one set (“One”) or of several. Within a <strong>set</strong>, <strong>goals</strong> are scored. The settings below follow that order: from the match through the game down to the set." COM_SPORTSMANAGER_MODE_GLOSSARY="A <strong>match</strong> is the fixture between two teams. It consists of several <strong>games</strong> singles and doubles in the order of the game sequence and each game yields game points for the match. A <strong>game</strong> consists of one set (“One”) or of several. Within a <strong>set</strong>, <strong>goals</strong> are scored. The settings below follow that order: from the match through the game down to the set."
COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS="Without conversion goals or sets are the game points" COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS="Without conversion goals or sets are the game points"
COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS_GOALS="Without conversion goals are the game points"
COM_SPORTSMANAGER_RESULT_AS_GAME_POINTS_SETS="Without conversion sets are the game points"
COM_SPORTSMANAGER_COUNTING="Counting" COM_SPORTSMANAGER_COUNTING="Counting"
COM_SPORTSMANAGER_COUNTING_PER_GAME="Per game every game starts at 0:0" COM_SPORTSMANAGER_COUNTING_PER_GAME="Per game every game starts at 0:0"
COM_SPORTSMANAGER_COUNTING_RACE="Race goals add up across all games" COM_SPORTSMANAGER_COUNTING_RACE="Race goals add up across all games"