diff --git a/src/Module/Admin/Lib/UserlistEntry.php b/src/Module/Admin/Lib/UserlistEntry.php index 647da62a1..75716fb08 100644 --- a/src/Module/Admin/Lib/UserlistEntry.php +++ b/src/Module/Admin/Lib/UserlistEntry.php @@ -38,14 +38,4 @@ public function getUserStateColor(): string } return '#dddddd'; } - - public function isUserActive(): bool - { - return $this->user->getState() === UserEnum::USER_STATE_ACTIVE; - } - - public function isUserLocked(): bool - { - return $this->user->isLocked(); - } } diff --git a/src/Module/Admin/View/Map/ShowMapInfluenceAreas.php b/src/Module/Admin/View/Map/ShowMapInfluenceAreas.php index 229f69596..fd493c051 100644 --- a/src/Module/Admin/View/Map/ShowMapInfluenceAreas.php +++ b/src/Module/Admin/View/Map/ShowMapInfluenceAreas.php @@ -50,7 +50,7 @@ public function handle(GameControllerInterface $game): void ), _('Einflussgebiete') ); - $game->setTemplateFile('html/admin/influenceareas.xhtml'); + $game->setTemplateFile('html/admin/influenceareas.twig'); $game->setTemplateVar('GRAPH', $this->imageCreation->gdImageInSrc($this->buildImage($layer, $showAllyAreas !== 0))); } diff --git a/src/Module/Admin/View/MassMail/MassMail.php b/src/Module/Admin/View/MassMail/MassMail.php index 48c390ea6..07f99a7f5 100644 --- a/src/Module/Admin/View/MassMail/MassMail.php +++ b/src/Module/Admin/View/MassMail/MassMail.php @@ -20,7 +20,7 @@ public function handle(GameControllerInterface $game): void ), _('Massen-Mails') ); - $game->setTemplateFile('html/admin/massmail.xhtml'); + $game->setTemplateFile('html/admin/massMail.twig'); $game->setPageTitle(_('Massen-Mails')); } } diff --git a/src/Module/Admin/View/Playerlist/Playerlist.php b/src/Module/Admin/View/Playerlist/Playerlist.php index 36e427568..b4e336299 100644 --- a/src/Module/Admin/View/Playerlist/Playerlist.php +++ b/src/Module/Admin/View/Playerlist/Playerlist.php @@ -31,7 +31,7 @@ public function handle(GameControllerInterface $game): void ), _('Spielerliste') ); - $game->setTemplateFile('html/admin/playerlist.xhtml'); + $game->setTemplateFile('html/admin/playerList.twig'); $game->setPageTitle(_('Spielerliste')); $game->setTemplateVar( 'LIST', diff --git a/src/Module/Admin/View/ResearchTree/ShowResearchTree.php b/src/Module/Admin/View/ResearchTree/ShowResearchTree.php index 543c0848f..54553aef8 100644 --- a/src/Module/Admin/View/ResearchTree/ShowResearchTree.php +++ b/src/Module/Admin/View/ResearchTree/ShowResearchTree.php @@ -78,7 +78,7 @@ public function handle(GameControllerInterface $game): void ), _('Forschungsbaum') ); - $game->setTemplateFile('html/admin/tree.xhtml'); + $game->setTemplateFile('html/admin/researchTree.twig'); $game->setPageTitle(_('Forschungsbaum')); $game->setTemplateVar('TREE', $graphviz->createImageHtml($graph)); } diff --git a/src/Module/Admin/View/ShowSignatures/ShowSignatures.php b/src/Module/Admin/View/ShowSignatures/ShowSignatures.php index c8b063867..2a0515d31 100644 --- a/src/Module/Admin/View/ShowSignatures/ShowSignatures.php +++ b/src/Module/Admin/View/ShowSignatures/ShowSignatures.php @@ -55,7 +55,7 @@ public function handle(GameControllerInterface $game): void $game->setTemplateVar('DONOTHING', true); - $game->showMacro('html/admin/adminmacros.xhtml/signaturescan'); + $game->setTemplateFile('html/admin/signatureScan.twig'); $signatureRange = []; diff --git a/src/Module/Admin/View/ShowUserLock/ShowUserLock.php b/src/Module/Admin/View/ShowUserLock/ShowUserLock.php index 213908aee..38b9a6c18 100644 --- a/src/Module/Admin/View/ShowUserLock/ShowUserLock.php +++ b/src/Module/Admin/View/ShowUserLock/ShowUserLock.php @@ -26,7 +26,7 @@ public function handle(GameControllerInterface $game): void $userIdToLock = request::getIntFatal('uid'); $game->setPageTitle(_('User-Lock setzen')); - $game->setMacroInAjaxWindow('html/admin/adminmacros.xhtml/user_lock'); + $game->setMacroInAjaxWindow('html/admin/userLock.twig'); $game->setTemplateVar('USERID', $userIdToLock); $game->setTemplateVar('LOCK', $this->userLockRepository->getActiveByUser($userIdToLock)); diff --git a/src/Module/Admin/View/Ticks/ShowTicks.php b/src/Module/Admin/View/Ticks/ShowTicks.php index 7b55b10f7..503f08ac8 100644 --- a/src/Module/Admin/View/Ticks/ShowTicks.php +++ b/src/Module/Admin/View/Ticks/ShowTicks.php @@ -13,7 +13,7 @@ final class ShowTicks implements ViewControllerInterface public function handle(GameControllerInterface $game): void { - $game->setTemplateFile('html/admin/ticks.xhtml'); + $game->setTemplateFile('html/admin/ticks.twig'); $game->appendNavigationPart('/admin/?SHOW_TICKS=1', _('Ticks')); $game->setPageTitle(_('Ticks')); } diff --git a/src/Orm/Repository/UserRepositoryInterface.php b/src/Orm/Repository/UserRepositoryInterface.php index 2fc44501a..c064ab8c6 100644 --- a/src/Orm/Repository/UserRepositoryInterface.php +++ b/src/Orm/Repository/UserRepositoryInterface.php @@ -26,7 +26,7 @@ public function getByResetToken(string $resetToken): ?UserInterface; /** * @param array $ignoreIds * - * @return iterable + * @return array */ public function getDeleteable( int $idleTimeThreshold, @@ -35,7 +35,7 @@ public function getDeleteable( ): iterable; /** - * @return iterable + * @return array */ public function getIdleRegistrations( int $idleTimeThreshold @@ -50,7 +50,7 @@ public function getByLogin(string $loginName): ?UserInterface; /** * Returns all members of the given alliance * - * @return iterable + * @return array */ public function getByAlliance(AllianceInterface $alliance): iterable; @@ -65,12 +65,12 @@ public function getList( ): array; /** - * @return iterable + * @return array */ public function getFriendsByUserAndAlliance(UserInterface $user, ?AllianceInterface $alliance): iterable; /** - * @return iterable + * @return array */ public function getOrderedByLastaction(int $limit, int $ignoreUserId, int $lastActionThreshold): iterable; @@ -83,12 +83,12 @@ public function getVacationAmount(): int; public function getActiveAmountRecentlyOnline(int $threshold): int; /** - * @return iterable + * @return array */ public function getNpcList(): iterable; /** - * @return iterable + * @return array */ public function getNonNpcList(): iterable; diff --git a/src/html/admin/adminmacros.xhtml b/src/html/admin/adminmacros.xhtml deleted file mode 100644 index bd8fe0547..000000000 --- a/src/html/admin/adminmacros.xhtml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - -
- - - - - - - - - - - - - -
-   - . -
. - -
- -
- . -
-
-
-
-
-
-
- - -
- -
- - -
- - - - - - - - - - - - - - - - -
Anzahl Ticks
Begründung
- -
-
-
-
diff --git a/src/html/admin/influenceareas.twig b/src/html/admin/influenceareas.twig new file mode 100644 index 000000000..90042bbab --- /dev/null +++ b/src/html/admin/influenceareas.twig @@ -0,0 +1,12 @@ +{% extends "html/admindefaults.twig" %} + +{% block body %} +{% include 'html/breadcrumb.twig' %} +
+
+ {% autoescape false %} + {{ GRAPH }} + {% endautoescape %} +
+
+{% endblock %} diff --git a/src/html/admin/influenceareas.xhtml b/src/html/admin/influenceareas.xhtml deleted file mode 100644 index 60708fe5c..000000000 --- a/src/html/admin/influenceareas.xhtml +++ /dev/null @@ -1,11 +0,0 @@ - - - - -
-
GRAPH
-
-
-
- - diff --git a/src/html/admin/massMail.twig b/src/html/admin/massMail.twig new file mode 100644 index 000000000..91694e07a --- /dev/null +++ b/src/html/admin/massMail.twig @@ -0,0 +1,43 @@ +{% extends "html/admindefaults.twig" %} + +{% block body %} +{% include 'html/breadcrumb.twig' %} +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
Empfangsmedium
+ + +
Betreff
Text
+ +
+
+
+{% endblock %} diff --git a/src/html/admin/massmail.xhtml b/src/html/admin/massmail.xhtml deleted file mode 100644 index 9119561d5..000000000 --- a/src/html/admin/massmail.xhtml +++ /dev/null @@ -1,46 +0,0 @@ - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - -
Empfangsmedium
- - -
Betreff
Text
- -
-
-
-
-
- - diff --git a/src/html/admin/playerList.twig b/src/html/admin/playerList.twig new file mode 100644 index 000000000..fe7360bc4 --- /dev/null +++ b/src/html/admin/playerList.twig @@ -0,0 +1,62 @@ +{% from 'html/macros.twig' import userAvatar, userInfo, pmWindow, userProfile %} + +{% extends "html/admindefaults.twig" %} + +{% block body %} +{% include 'html/breadcrumb.twig' %} +
+ {% for listEntry in LIST %} + {% set user = listEntry.getUser %} + {% set userId = user.getId %} +
+
+ {{ userAvatar(user) }} +
+
+
+ {{ userInfo(user) }} +
+
+ {% set alliance = user.getAlliance %} + {% if alliance %} + {{ alliance.getName|bbcode }} + {% else %} + - + {% endif %} +
+
+ + {{ userProfile(userId) }} + {{ pmWindow(USER, userId) }} +
+
+
+ + {{ user.getLastAction|stuDateTime }} +
+
STATUS: + {{ listEntry.getUserStateDescription }} + {% if user.isLocked %} + + + {% else %} + + {% endif %} + +
+
+
+
+ {% endfor %} +
+{% endblock %} diff --git a/src/html/admin/playerlist.xhtml b/src/html/admin/playerlist.xhtml deleted file mode 100755 index 9244b43fd..000000000 --- a/src/html/admin/playerlist.xhtml +++ /dev/null @@ -1,55 +0,0 @@ - - - - -
- -
-
- -
-
-
- NAME -
-
- ALLIANCE - - -
-
- - - - ID: ID -
-
-
- DATE -
-
STATUS: ${user/getUserStateDescription} -
-
-
-
-
-
-
-
- - diff --git a/src/html/admin/researchTree.twig b/src/html/admin/researchTree.twig new file mode 100644 index 000000000..dcff4c2e4 --- /dev/null +++ b/src/html/admin/researchTree.twig @@ -0,0 +1,10 @@ +{% extends "html/admindefaults.twig" %} + +{% block body %} +{% include 'html/breadcrumb.twig' %} +
+ {% autoescape false %} + {{ TREE }} + {% endautoescape %} +
+{% endblock %} diff --git a/src/html/admin/signatureScan.twig b/src/html/admin/signatureScan.twig new file mode 100644 index 000000000..e6a6438b9 --- /dev/null +++ b/src/html/admin/signatureScan.twig @@ -0,0 +1,55 @@ +{% extends "html/admindefaults.twig" %} + +{% block body %} + +{% include 'html/breadcrumb.twig' %} + +{% if not DONOTHING %} +
+ {% set panel = SIGNATURE_PANEL %} + {% set viewportFont = panel.getViewportForFont %} + {% set viewportScale = panel.getViewportPerColumn %} + + + + + {% for row in panel.getHeadRow %} + + {% endfor %} + + {% for row in panel.getRows %} + + {% for entry in row.getEntries %} + {% if entry.isRowIndex %} + + {% else %} + {% set cellData = entry.getCellData %} + {% set code = cellData.getSubspaceCode %} + + {% endif %} + {% endfor %} + + {% endfor %} +
+   + {{ row.value }} +
{{ entry.getRow }} +
+ {% if code %} + + {% endif %} + {% if cellData.getDisplayCount %} +
+ {{ cellData.getDisplayCount }} +
+ {% endif %} +
+
+
+{% endif %} +{% endblock %} diff --git a/src/html/admin/ticks.twig b/src/html/admin/ticks.twig new file mode 100644 index 000000000..4f698dfa5 --- /dev/null +++ b/src/html/admin/ticks.twig @@ -0,0 +1,27 @@ +{% extends "html/admindefaults.twig" %} + +{% block body %} +{% include 'html/breadcrumb.twig' %} +
+
+ Colony-ID:, Group-ID: +
+
+
+ +
+
+
+ +
+
+
+ +
+
+{% endblock %} diff --git a/src/html/admin/ticks.xhtml b/src/html/admin/ticks.xhtml deleted file mode 100644 index 035e08aed..000000000 --- a/src/html/admin/ticks.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - -
-
- Colony-ID:, Group-ID: -
-
-
- -
-
-
- -
-
-
- -
-
-
-
- - diff --git a/src/html/admin/tree.xhtml b/src/html/admin/tree.xhtml deleted file mode 100644 index 0a402ef8f..000000000 --- a/src/html/admin/tree.xhtml +++ /dev/null @@ -1,9 +0,0 @@ - - - - -
TREE
-
-
- - diff --git a/src/html/admin/userLock.twig b/src/html/admin/userLock.twig new file mode 100644 index 000000000..eb8344b2d --- /dev/null +++ b/src/html/admin/userLock.twig @@ -0,0 +1,37 @@ +
+ + +
+ + + + + + + + + + + + + + + + +
Anzahl Ticks
+ {% if LOCK %} + + {% else %} + + {% endif %} +
Begründung
+ {% if LOCK %} + + {% else %} + + {% endif %} +
+ +
+
+
diff --git a/src/html/macros.twig b/src/html/macros.twig index 4fa029e60..7174843f9 100644 --- a/src/html/macros.twig +++ b/src/html/macros.twig @@ -29,6 +29,16 @@ {% endif %} {% endmacro %} +{% macro pmWindow(USER, id) %} +{% set handle = getUniqId() %} +{% if USER.getId != id %} + +{% endif %} +{% endmacro %} + {% macro navigation_item(title, viewValue, iconUrl) %} {% set linkid = 'nav_item_' ~ iconUrl %} {% set view = getView(viewValue) %} @@ -95,16 +105,6 @@ {% endmacro %} -{% macro pmWindow(USER, id) %} -{% set handle = getUniqId() %} -{% if USER.getId != id %} - -{% endif %} -{% endmacro %} - {% macro contactModeSwitcher(contact, div) %} {% if contact %} {% set mode = contact.getMode.value %} diff --git a/src/html/sitemacros.xhtml b/src/html/sitemacros.xhtml index 574f1924b..21f8d859f 100755 --- a/src/html/sitemacros.xhtml +++ b/src/html/sitemacros.xhtml @@ -163,118 +163,6 @@ - - - - - - - - - - - TITLE - - - - - - - - - - - -
...
-
-
-
-
-
-
- -
-
-
NAME
- ID: USERID, Prestige: PRESTIGE
- - - - - - - -
-
-
-
- -
-
RESEARCH
- - STATUSBAR -
-
- -
Keine Forschung
-
-
-
- -
Logout
-
-
-
-
- -
Wiki
-
-
-
-
- -
Einstellungen
-
-
-
-
-
- -
- - ... - - -
-
-
- - - -
-