summaryrefslogtreecommitdiff
path: root/tdd/tdd-bootstrap.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-11-15 12:27:10 +0100
committeremkael <emkael@tlen.pl>2018-11-15 12:27:10 +0100
commitdcf84144af87c17bf221bf350830919cad309183 (patch)
tree89f281b77e098cb115300655a449c06637a1289b /tdd/tdd-bootstrap.php
parent7f878ef4721e8508eceabaef3d1dad710bf40059 (diff)
Shortening multiple table numbersdev
Diffstat (limited to 'tdd/tdd-bootstrap.php')
-rw-r--r--tdd/tdd-bootstrap.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tdd/tdd-bootstrap.php b/tdd/tdd-bootstrap.php
index 04bbb0b..7259958 100644
--- a/tdd/tdd-bootstrap.php
+++ b/tdd/tdd-bootstrap.php
@@ -146,7 +146,12 @@ class Protocol {
sort($tables);
// compile header with tables numbers
$insert = '<a href="#table-' . $tables[0] . '"><h4 id="table-' . $tables[0] . '">';
- $insert .= static::__("Stół") . ' ' . implode(', ', $tables) . ' &ndash; ';
+ if (count($tables) <= 5) {
+ $insert .= static::__("Stół") . ' ' . implode(', ', $tables);
+ } else {
+ $insert .= count($tables) . ' ' . static::__("stołów");
+ }
+ $insert .= ' &ndash; ';
$insert .= static::__("Rozdanie") . ' ' . $deal->deal_num . '</h4></a>';
// if the board has been played on all tables
if ($this->areBoardsPlayed($groupedBoard)) {