diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a7a796..ef1d42e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
Changes
-------
+v1.11.3 (??.12.2023)
+ * Add video assists to fixtures
+ * Add option for sort order in match table view
+
v1.11.2 (09.12.2023)
* Fix statistics view
* Fix rendering of empty profile lists
diff --git a/Classes/Filter/MatchFilter.php b/Classes/Filter/MatchFilter.php
index f9ddd88..051d511 100644
--- a/Classes/Filter/MatchFilter.php
+++ b/Classes/Filter/MatchFilter.php
@@ -6,6 +6,7 @@
use Sys25\RnBase\Frontend\Marker\Templates;
use Sys25\RnBase\Frontend\Request\RequestInterface;
use Sys25\RnBase\Utility\Misc;
+use Sys25\RnBase\Utility\Strings;
use System25\T3sports\Model\Profile;
use System25\T3sports\Utility\MatchTableBuilder;
use System25\T3sports\Utility\ScopeController;
@@ -59,6 +60,10 @@ protected function initFilter(&$fields, &$options, RequestInterface $request)
$teamId = $parameters->get('teamId');
}
+ if (!is_array($options['orderby'] ?? null) && $orderby = $options['orderby']) {
+ list($key, $value) = Strings::trimExplode('=', $orderby);
+ $options['orderby'] = [$key => $value];
+ }
$matchtable = new MatchTableBuilder();
$matchtable->setScope($scopeArr);
$matchtable->setTeams($teamId);
diff --git a/Classes/Frontend/Action/MatchTable.php b/Classes/Frontend/Action/MatchTable.php
index f248bb6..fee7908 100644
--- a/Classes/Frontend/Action/MatchTable.php
+++ b/Classes/Frontend/Action/MatchTable.php
@@ -14,7 +14,7 @@
/***************************************************************
* Copyright notice
*
- * (c) 2007-2017 Rene Nitzsche (rene@system25.de)
+ * (c) 2007-2023 Rene Nitzsche (rene@system25.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
diff --git a/Classes/Frontend/Marker/MatchMarker.php b/Classes/Frontend/Marker/MatchMarker.php
index 7882ef8..b830e5a 100644
--- a/Classes/Frontend/Marker/MatchMarker.php
+++ b/Classes/Frontend/Marker/MatchMarker.php
@@ -233,7 +233,7 @@ private function prepareFields($match, $formatter, $confId)
$match->setProperty('pictures', $match->getProperty('dam_images'));
$match->setProperty('firstpicture', $match->getProperty('dam_images'));
- /* @var $report MatchReport */
+ /** @var MatchReport $report */
$report = $match->getMatchReport();
if (!is_object($report)) {
return;
@@ -258,6 +258,8 @@ private function prepareFields($match, $formatter, $confId)
$match->setProperty('coachnames_guest', $report->getCoachNameGuest('matchreport.coachnames.'));
$match->setProperty('refereenames', $report->getRefereeName('matchreport.refereenames.'));
$match->setProperty('assistsnames', $report->getAssistNames('matchreport.assistsnames.'));
+ $match->setProperty('videorefereename', $report->getVideoRefereeName('matchreport.videorefereename.'));
+ $match->setProperty('videoassistsnames', $report->getVideoAssistNames('matchreport.videoassistsnames.'));
}
/**
diff --git a/Classes/Model/MatchReportModel.php b/Classes/Model/MatchReportModel.php
index e246295..edd0ad4 100644
--- a/Classes/Model/MatchReportModel.php
+++ b/Classes/Model/MatchReportModel.php
@@ -3,6 +3,7 @@
namespace System25\T3sports\Model;
use Sys25\RnBase\Configuration\ConfigurationInterface;
+use Sys25\RnBase\Domain\Model\DataInterface;
use Sys25\RnBase\Utility\Strings;
use Sys25\RnBase\Utility\T3General;
use System25\T3sports\Decorator\MatchNoteDecorator;
@@ -284,6 +285,23 @@ public function getAssistNames($confId = 'matchreport.assists.')
return $this->_getNames2($this->matchProfileProvider->getProfiles($this->match, $this->match->getAssists()), $confId);
}
+ /**
+ * Liefert den Namen des Schiedsrichters.
+ */
+ public function getVideoRefereeName($confId = 'matchreport.videoreferee.')
+ {
+ // der Schiedsrichter wird schon als Instanz geliefert.
+ return $this->_getNames2($this->match->getVideoReferee(), $confId);
+ }
+
+ /**
+ * Liefert die Namen der Linienrichters.
+ */
+ public function getVideoAssistNames($confId = 'matchreport.videoassists.')
+ {
+ return $this->_getNames2($this->matchProfileProvider->getVideoAssists($this->match), $confId);
+ }
+
/**
* Liefert den Namen des Heimtrainers.
*/
@@ -514,7 +532,7 @@ protected function _getNames2($profiles, $confIdAll)
protected function _wrapProfiles($profiles, $confId)
{
$ret = [];
- if (!is_array($profiles)) {
+ if ($profiles instanceof DataInterface || !is_iterable($profiles)) {
if (!is_object($profiles)) {
return [];
}
diff --git a/Classes/Table/Volleyball/Comparator.php b/Classes/Table/Volleyball/Comparator.php
index 29195bf..084e613 100644
--- a/Classes/Table/Volleyball/Comparator.php
+++ b/Classes/Table/Volleyball/Comparator.php
@@ -7,7 +7,11 @@
/***************************************************************
* Copyright notice
*
+<<<<<<< HEAD
* (c) 2011-2024 Rene Nitzsche (rene@system25.de)
+=======
+ * (c) 2011-2023 Rene Nitzsche (rene@system25.de)
+>>>>>>> master
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
diff --git a/Classes/Table/Volleyball/Comparator3Point.php b/Classes/Table/Volleyball/Comparator3Point.php
index 666d339..4b57241 100644
--- a/Classes/Table/Volleyball/Comparator3Point.php
+++ b/Classes/Table/Volleyball/Comparator3Point.php
@@ -8,7 +8,7 @@
/***************************************************************
* Copyright notice
*
- * (c) 2013-2020 Rene Nitzsche (rene@system25.de)
+ * (c) 2013-2023 Rene Nitzsche (rene@system25.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
diff --git a/Classes/Utility/MatchProfileProvider.php b/Classes/Utility/MatchProfileProvider.php
index 680e168..06ad29e 100644
--- a/Classes/Utility/MatchProfileProvider.php
+++ b/Classes/Utility/MatchProfileProvider.php
@@ -44,6 +44,11 @@ public function __construct(ProfileRepository $profileRepo = null)
$this->profileRepo = $profileRepo ?: new ProfileRepository();
}
+ public function getVideoAssists(Fixture $match)
+ {
+ return $this->profileRepo->findByFixtureRelation($match->getUid(), 'videoassists');
+ }
+
/**
* Liefert die Spieler eines Spiels.
*
diff --git a/Configuration/Flexform/plugin_competition.xml b/Configuration/Flexform/plugin_competition.xml
index 9bbac51..6b698b3 100644
--- a/Configuration/Flexform/plugin_competition.xml
+++ b/Configuration/Flexform/plugin_competition.xml
@@ -362,6 +362,38 @@
+
+
+ 1
+
+
+ select
+ selectSingle
+
+
+ LLL:EXT:cfc_league_fe/Resources/Private/Language/locallang_db.xlf:plugin.competition.flexform.matchtable.orderby.typoscript
+
+
+
+ LLL:EXT:cfc_league_fe/Resources/Private/Language/locallang_db.xlf:plugin.competition.flexform.matchtable.orderby.date.desc
+ MATCH.DATE=desc
+
+
+ LLL:EXT:cfc_league_fe/Resources/Private/Language/locallang_db.xlf:plugin.competition.flexform.matchtable.orderby.date.asc
+ MATCH.DATE=asc
+
+
+ LLL:EXT:cfc_league_fe/Resources/Private/Language/locallang_db.xlf:plugin.competition.flexform.matchtable.orderby.number.asc
+ MATCH.MATCH_NO=asc
+
+
+ 0
+ 1
+ 1
+
+
+
diff --git a/Resources/Private/Language/de.locallang_db.xlf b/Resources/Private/Language/de.locallang_db.xlf
index 92801fe..6a5a1a4 100644
--- a/Resources/Private/Language/de.locallang_db.xlf
+++ b/Resources/Private/Language/de.locallang_db.xlf
@@ -179,6 +179,26 @@
Max. Anzahl Spiele
+
+
+ Sortierung der Spiele
+
+
+
+ Per Typoscript konfiguriert
+
+
+
+ Spielbeginn ansteigend
+
+
+
+ Spielbeginn absteigend
+
+
+
+ Spielnummer ansteigend
+
Seite für Spielbericht
diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf
index 9617134..a5f96fc 100644
--- a/Resources/Private/Language/locallang_db.xlf
+++ b/Resources/Private/Language/locallang_db.xlf
@@ -135,6 +135,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Resources/Private/Templates/Html/matchreport.html b/Resources/Private/Templates/Html/matchreport.html
index eb46dfb..ecc1b59 100644
--- a/Resources/Private/Templates/Html/matchreport.html
+++ b/Resources/Private/Templates/Html/matchreport.html
@@ -20,6 +20,8 @@ Der Spielbericht ###MATCH_COMPETITION_NAME### ###MATCH_ROUND_NAME###
Datum: ###MATCH_DATE###
Schiedsrichter: ###MATCH_REFEREENAMES###
SRA: ###MATCH_ASSISTSNAMES###
+ VAR: ###MATCH_VIDEOREFEREENAME###
+ VAR-Assists: ###MATCH_VIDEOASSISTSNAMES###
Zuschauer: ###MATCH_VISITORS###
###MATCH_GUEST_NAME### |
diff --git a/Tests/Unit/PHP/Table/Volleyball/TableTest.php b/Tests/Unit/PHP/Table/Volleyball/TableTest.php
index 78925ec..6b5074d 100644
--- a/Tests/Unit/PHP/Table/Volleyball/TableTest.php
+++ b/Tests/Unit/PHP/Table/Volleyball/TableTest.php
@@ -13,7 +13,7 @@
* *************************************************************
* Copyright notice.
*
- * (c) 2013-2022 Rene Nitzsche (rene@system25.de)
+ * (c) 2013-2023 Rene Nitzsche (rene@system25.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
@@ -50,6 +50,7 @@ public function testLeagueTableWithTwoPointSystem()
], 'cfc_league_fe');
$confId = '';
+ $confId = '';
$leagueTable = Builder::buildByCompetitionAndMatches($league, $matches, $config, $confId);
$leagueTable->getMatchProvider()->setTeams($league->getTeams(), false);
diff --git a/static/setup.txt b/static/setup.txt
index e403115..afa83e8 100644
--- a/static/setup.txt
+++ b/static/setup.txt
@@ -1776,10 +1776,24 @@ plugin.tx_cfcleaguefe_report {
}
}
+ videorefereename =< lib.t3sports.matchreport.profiles
+ videorefereename.profile {
+ # Heimatstadt des Schiedsrichters anzeigen
+ home_town {
+ s_weight = 10
+ wrap = (|)
+ required = 1
+ }
+ }
+
assistsnames =< lib.t3sports.matchreport.profiles
assistsnames{
seperator = | und |
}
+ videoassistsnames =< lib.t3sports.matchreport.profiles
+ videoassistsnames{
+ seperator = |, |
+ }
}
stadiumview {