From ff9e3598a205ab57ae13f4578222635834bb6462 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 21 May 2016 18:05:32 +0200 Subject: [PATCH] Overhauled page title management --- com.woltlab.wcf/page.xml | 230 +++++++- .../templates/accountManagement.tpl | 4 - com.woltlab.wcf/templates/avatarEdit.tpl | 4 - com.woltlab.wcf/templates/cms.tpl | 37 -- .../templates/deletedContentList.tpl | 18 +- com.woltlab.wcf/templates/disclaimer.tpl | 4 - com.woltlab.wcf/templates/emailActivation.tpl | 4 - .../templates/emailNewActivationCode.tpl | 4 - com.woltlab.wcf/templates/following.tpl | 4 - com.woltlab.wcf/templates/header.tpl | 58 +- com.woltlab.wcf/templates/ignoredUsers.tpl | 4 - com.woltlab.wcf/templates/login.tpl | 4 - com.woltlab.wcf/templates/lostPassword.tpl | 4 - com.woltlab.wcf/templates/mail.tpl | 4 - com.woltlab.wcf/templates/membersList.tpl | 4 +- .../templates/moderationActivation.tpl | 4 +- com.woltlab.wcf/templates/moderationList.tpl | 2 +- .../templates/moderationReport.tpl | 4 +- com.woltlab.wcf/templates/newPassword.tpl | 4 - .../templates/notificationList.tpl | 4 +- .../templates/paidSubscriptionList.tpl | 4 - .../templates/recentActivityList.tpl | 4 - com.woltlab.wcf/templates/register.tpl | 4 - .../templates/registerActivation.tpl | 4 - .../templates/registerNewActivationCode.tpl | 4 - com.woltlab.wcf/templates/search.tpl | 4 - com.woltlab.wcf/templates/searchResult.tpl | 4 +- com.woltlab.wcf/templates/signatureEdit.tpl | 4 - com.woltlab.wcf/templates/team.tpl | 4 - com.woltlab.wcf/templates/user.tpl | 2 + com.woltlab.wcf/templates/userSearch.tpl | 4 - com.woltlab.wcf/templates/usersOnlineList.tpl | 4 - .../install/files/acp/templates/pageAdd.tpl | 514 +++++++++--------- .../files/lib/acp/form/PageEditForm.class.php | 14 +- .../files/lib/data/page/PageCache.class.php | 2 +- .../PagePackageInstallationPlugin.class.php | 36 +- .../style/ui/scrollableCheckboxList.scss | 4 +- wcfsetup/install/lang/de.xml | 46 -- wcfsetup/install/lang/en.xml | 46 -- 39 files changed, 584 insertions(+), 529 deletions(-) diff --git a/com.woltlab.wcf/page.xml b/com.woltlab.wcf/page.xml index 8d1df4f863..81c60f48f0 100644 --- a/com.woltlab.wcf/page.xml +++ b/com.woltlab.wcf/page.xml @@ -9,6 +9,13 @@ user.profile.canViewMembersList module_members_list + + + Members + + + Mitglieder + system @@ -16,15 +23,29 @@ com.woltlab.wcf.MembersList + + + Recent Activities + + + Letzte Aktivitäten + system wcf\page\UsersOnlineListPage - + com.woltlab.wcf.MembersList user.profile.canViewUsersOnlineList module_users_online + + + Users Online + + + Benutzer online + system @@ -34,6 +55,13 @@ com.woltlab.wcf.MembersList user.profile.canViewMembersList module_team_page + + + Team + + + Team + system @@ -43,6 +71,13 @@ com.woltlab.wcf.MembersList user.profile.canViewMembersList module_members_list + + + Search Users + + + Benutzer suchen + @@ -50,90 +85,195 @@ wcf\form\AccountManagementForm + + + Account Management + + + Benutzerkonto-Verwaltung + system wcf\form\AvatarEditForm + + + Avatar Management + + + Avatar-Verwaltung + system wcf\form\DisclaimerForm + + + Disclaimer + + + Disclaimer + system wcf\form\EmailActivationForm + + + New Email Address Verification + + + Aktivierung neuer E-Mail-Adresse + system wcf\form\EmailNewActivationCodeForm + + + New Email Activation Code Request + + + E-Mail-Aktivierungscode-Anforderung + system wcf\form\LoginForm + + + Login + + + Anmeldung + system wcf\form\LostPasswordForm + + + Lost Password + + + Kennwort vergessen + system wcf\form\MailForm + + + Mail Form + + + E-Mail-Formular + system wcf\form\NewPasswordForm + + + New Password Request + + + Neues Kennwort + system wcf\form\NotificationSettingsForm + + + Notification Settings + + + Benachrichtigungseinstellungen + system wcf\form\RegisterActivationForm + + + Complete Registration + + + Registrierung abschließen + system wcf\form\RegisterForm + + + Registration + + + Registrierung + system wcf\form\RegisterNewActivationCodeForm + + + New Activation Code Request + + + Aktivierungscode-Anforderung + system wcf\form\SearchForm + + + Search + + + Suche + system wcf\form\SettingsForm + + + Settings + + + Einstellungen + system @@ -141,6 +281,13 @@ module_user_signature + + + Settings + + + Einstellungen + system @@ -148,26 +295,54 @@ mod.general.canUseModeration + + + Deleted Content + + + Gelöschte Inhalte + system wcf\page\EditHistoryPage - - + + module_edit_history 1 + + + Edit History + + + Edit History TODO + system wcf\page\FollowingPage + + + Followed Users + + + Benutzer, denen Sie folgen + system wcf\page\IgnoredUsersPage + + + Blocked Users + + + Blockierte Benutzer + system @@ -175,6 +350,13 @@ mod.general.canUseModeration + + + Moderation + + + Moderation + system @@ -184,6 +366,13 @@ com.woltlab.wcf.ModerationList mod.general.canUseModeration 1 + + + Content Approval + + + Inhaltsfreischaltung + system @@ -193,12 +382,26 @@ com.woltlab.wcf.ModerationList mod.general.canUseModeration 1 + + + Content Report + + + Inhaltsmeldung + system wcf\page\NotificationListPage + + + Notifications + + + Benachrichtigungen + system @@ -206,6 +409,13 @@ module_paid_subscription + + + Paid Subscriptions + + + Bezahlte Mitgliedschaften + system @@ -214,6 +424,13 @@ com.woltlab.wcf.Search 1 + + + Search Results + + + Suchergebnisse + system @@ -222,6 +439,13 @@ user.tag.canViewTag 1 + + + Content With Particular Tag + + + Inhalte mit bestimmtem Tag + system diff --git a/com.woltlab.wcf/templates/accountManagement.tpl b/com.woltlab.wcf/templates/accountManagement.tpl index aa02157a77..f59e151b55 100644 --- a/com.woltlab.wcf/templates/accountManagement.tpl +++ b/com.woltlab.wcf/templates/accountManagement.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.accountManagement{/lang} - {lang}wcf.user.usercp{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.accountManagement{/lang}{/capture} - {include file='userMenuSidebar'} {include file='header'} diff --git a/com.woltlab.wcf/templates/avatarEdit.tpl b/com.woltlab.wcf/templates/avatarEdit.tpl index 1f4a0fa109..eba0a80bdb 100644 --- a/com.woltlab.wcf/templates/avatarEdit.tpl +++ b/com.woltlab.wcf/templates/avatarEdit.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.avatar.edit{/lang} - {lang}wcf.user.usercp{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.avatar.edit{/lang}{/capture} - {include file='userMenuSidebar'} {include file='header'} diff --git a/com.woltlab.wcf/templates/cms.tpl b/com.woltlab.wcf/templates/cms.tpl index a5a7d030a9..6d9651ea4e 100644 --- a/com.woltlab.wcf/templates/cms.tpl +++ b/com.woltlab.wcf/templates/cms.tpl @@ -1,44 +1,7 @@ -{if !$__wcf->isLandingPage()} - {capture assign='pageTitle'}{$content[title]}{/capture} -{/if} - {capture assign='headContent'} {/capture} -{capture assign='contentHeader'} - {if $__wcf->isLandingPage()} -
-
-

{PAGE_TITLE|language}

- {hascontent}

{content}{PAGE_DESCRIPTION|language}{/content}

{/hascontent} -
- - {hascontent} - - {/hascontent} -
- {elseif $content[title]} -
-
-

{$content[title]}

-
- - {hascontent} - - {/hascontent} -
- {/if} -{/capture} - {include file='header'} {if $content[content]} diff --git a/com.woltlab.wcf/templates/deletedContentList.tpl b/com.woltlab.wcf/templates/deletedContentList.tpl index 4bdf605799..faee7ebb50 100644 --- a/com.woltlab.wcf/templates/deletedContentList.tpl +++ b/com.woltlab.wcf/templates/deletedContentList.tpl @@ -1,4 +1,4 @@ -{capture assign='pageTitle'}{lang}wcf.moderation.deletedContent.objectType.{@$objectType}{/lang}{/capture} +{capture assign='pageTitle'}{lang}wcf.moderation.deletedContent.{@$objectType}{/lang}{/capture} {capture assign='sidebarLeft'}
@@ -16,21 +16,7 @@
{/capture} -{capture assign='contentHeader'} -
-
-

{lang}wcf.moderation.deletedContent.{@$objectType}{/lang}

-
- - {hascontent} - - {/hascontent} -
-{/capture} +{capture assign='contentTitle'}{lang}wcf.moderation.deletedContent.{@$objectType}{/lang}{/capture} {include file='header'} diff --git a/com.woltlab.wcf/templates/disclaimer.tpl b/com.woltlab.wcf/templates/disclaimer.tpl index 79b011bf4a..431668686c 100644 --- a/com.woltlab.wcf/templates/disclaimer.tpl +++ b/com.woltlab.wcf/templates/disclaimer.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.register.disclaimer{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.register.disclaimer{/lang}{/capture} - {include file='header' __disableAds=true} {include file='formError'} diff --git a/com.woltlab.wcf/templates/emailActivation.tpl b/com.woltlab.wcf/templates/emailActivation.tpl index 37e6890967..aba48404f5 100644 --- a/com.woltlab.wcf/templates/emailActivation.tpl +++ b/com.woltlab.wcf/templates/emailActivation.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.emailActivation{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.emailActivation{/lang}{/capture} - {include file='header'} {include file='formError'} diff --git a/com.woltlab.wcf/templates/emailNewActivationCode.tpl b/com.woltlab.wcf/templates/emailNewActivationCode.tpl index 0758a09827..fa8dae3257 100644 --- a/com.woltlab.wcf/templates/emailNewActivationCode.tpl +++ b/com.woltlab.wcf/templates/emailNewActivationCode.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.newActivationCode{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.newActivationCode{/lang}{/capture} - {include file='header'} {include file='formError'} diff --git a/com.woltlab.wcf/templates/following.tpl b/com.woltlab.wcf/templates/following.tpl index 81860292da..d470183f19 100644 --- a/com.woltlab.wcf/templates/following.tpl +++ b/com.woltlab.wcf/templates/following.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.following{/lang} - {lang}wcf.user.usercp{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.following{/lang} {#$items}{/capture} - {include file='userMenuSidebar'} {include file='header'} diff --git a/com.woltlab.wcf/templates/header.tpl b/com.woltlab.wcf/templates/header.tpl index 630517eeef..0f4ab999aa 100644 --- a/com.woltlab.wcf/templates/header.tpl +++ b/com.woltlab.wcf/templates/header.tpl @@ -1,7 +1,14 @@ {include file='documentHeader'} - {if $pageTitle|isset}{@$pageTitle} - {/if}{PAGE_TITLE|language} + {if !$pageTitle|isset} + {assign var='pageTitle' value=''} + {if !$__wcf->isLandingPage() && $__wcf->getActivePage() != null && $__wcf->getActivePage()->getTitle()} + {capture assign='pageTitle'}{$__wcf->getActivePage()->getTitle()}{/capture} + {/if} + {/if} + + {if $pageTitle}{@$pageTitle} - {/if}{PAGE_TITLE|language} {include file='headInclude'} @@ -91,25 +98,36 @@ {if !$contentHeader|empty} {@$contentHeader} - {elseif !$contentTitle|empty} -
-
-

{@$contentTitle}

- {if !$contentDescription|empty}

{@$contentDescription}

{/if} -
- - {hascontent} - - {/hascontent} -
+ {else} + {if $contentTitle|empty} + {if $__wcf->isLandingPage()} + {capture assign='contentTitle'}{PAGE_TITLE|language}{/capture} + {capture assign='contentDescription'}{PAGE_DESCRIPTION|language}{/capture} + {elseif $__wcf->getActivePage() != null && $__wcf->getActivePage()->getTitle()} + {capture assign='contentTitle'}{$__wcf->getActivePage()->getTitle()}{/capture} + {/if} + {/if} + + {if !$contentTitle|empty} +
+
+

{@$contentTitle}

+ {if !$contentDescription|empty}

{@$contentDescription}

{/if} +
+ + {hascontent} + + {/hascontent} +
+ {/if} {/if} {include file='userNotice'} diff --git a/com.woltlab.wcf/templates/ignoredUsers.tpl b/com.woltlab.wcf/templates/ignoredUsers.tpl index cf43c03b55..890c6e2ef0 100644 --- a/com.woltlab.wcf/templates/ignoredUsers.tpl +++ b/com.woltlab.wcf/templates/ignoredUsers.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.ignoredUsers{/lang} - {lang}wcf.user.usercp{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.ignoredUsers{/lang} {#$items}{/capture} - {include file='userMenuSidebar'} {include file='header'} diff --git a/com.woltlab.wcf/templates/login.tpl b/com.woltlab.wcf/templates/login.tpl index d063a44db5..8f2bdffb0e 100644 --- a/com.woltlab.wcf/templates/login.tpl +++ b/com.woltlab.wcf/templates/login.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.login{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.login{/lang}{/capture} - {include file='header' __disableLoginLink=true __disableAds=true} {if !$errorField|empty && $errorField == 'cookie'} diff --git a/com.woltlab.wcf/templates/lostPassword.tpl b/com.woltlab.wcf/templates/lostPassword.tpl index 4069e6480c..b46e4d9651 100644 --- a/com.woltlab.wcf/templates/lostPassword.tpl +++ b/com.woltlab.wcf/templates/lostPassword.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.lostPassword{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.lostPassword{/lang}{/capture} - {include file='header'}

{lang}wcf.user.lostPassword.description{/lang}

diff --git a/com.woltlab.wcf/templates/mail.tpl b/com.woltlab.wcf/templates/mail.tpl index 64a11a3d1e..35eb937c97 100644 --- a/com.woltlab.wcf/templates/mail.tpl +++ b/com.woltlab.wcf/templates/mail.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.mail.title{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.mail.title{/lang}{/capture} - {include file='header'} {include file='formError'} diff --git a/com.woltlab.wcf/templates/membersList.tpl b/com.woltlab.wcf/templates/membersList.tpl index 9627ffdb31..f59c6ada6a 100644 --- a/com.woltlab.wcf/templates/membersList.tpl +++ b/com.woltlab.wcf/templates/membersList.tpl @@ -1,6 +1,6 @@ -{capture assign='pageTitle'}{if $searchID}{lang}wcf.user.search.results{/lang}{else}{lang}wcf.user.members{/lang}{/if}{if $pageNo > 1} - {lang}wcf.page.pageNo{/lang}{/if}{/capture} +{capture assign='pageTitle'}{if $searchID}{lang}wcf.user.search.results{/lang}{else}{$__wcf->getActivePage()->getTitle()}{/if}{if $pageNo > 1} - {lang}wcf.page.pageNo{/lang}{/if}{/capture} -{capture assign='contentTitle'}{if $searchID}{lang}wcf.user.search.results{/lang}{else}{lang}wcf.user.members{/lang}{/if} {#$items}{/capture} +{capture assign='contentTitle'}{if $searchID}{lang}wcf.user.search.results{/lang}{else}{$__wcf->getActivePage()->getTitle()}{/if} {#$items}{/capture} {capture assign='canonicalURLParameters'}sortField={@$sortField}&sortOrder={@$sortOrder}{if $letter}&letter={@$letter|rawurlencode}{/if}{/capture} diff --git a/com.woltlab.wcf/templates/moderationActivation.tpl b/com.woltlab.wcf/templates/moderationActivation.tpl index 050b7a658e..b626faa313 100644 --- a/com.woltlab.wcf/templates/moderationActivation.tpl +++ b/com.woltlab.wcf/templates/moderationActivation.tpl @@ -1,9 +1,9 @@ -{capture assign='pageTitle'}{lang}wcf.moderation.activation{/lang}: {$queue->getTitle()}{/capture} +{capture assign='pageTitle'}{$__wcf->getActivePage()->getTitle()}: {$queue->getTitle()}{/capture} {capture assign='contentHeader'}
-

{lang}wcf.moderation.activation{/lang}

+

{$__wcf->getActivePage()->getTitle()}

{if $queue->lastChangeTime}
diff --git a/com.woltlab.wcf/templates/moderationList.tpl b/com.woltlab.wcf/templates/moderationList.tpl index 83aa2708f9..673fd91e3d 100644 --- a/com.woltlab.wcf/templates/moderationList.tpl +++ b/com.woltlab.wcf/templates/moderationList.tpl @@ -1,4 +1,4 @@ -{capture assign='pageTitle'}{lang}wcf.moderation.moderation{/lang}{if $pageNo > 1} - {lang}wcf.page.pageNo{/lang}{/if}{/capture} +{capture assign='pageTitle'}{if $status == 2}{lang}wcf.moderation.doneItems{/lang}{else}{lang}wcf.moderation.outstandingItems{/lang}{/if}{if $pageNo > 1} - {lang}wcf.page.pageNo{/lang}{/if}{/capture} {capture assign='contentTitle'}{if $status == 2}{lang}wcf.moderation.doneItems{/lang}{else}{lang}wcf.moderation.outstandingItems{/lang}{/if} {#$items}{/capture} diff --git a/com.woltlab.wcf/templates/moderationReport.tpl b/com.woltlab.wcf/templates/moderationReport.tpl index 2fe86cd73e..b008d52025 100644 --- a/com.woltlab.wcf/templates/moderationReport.tpl +++ b/com.woltlab.wcf/templates/moderationReport.tpl @@ -1,9 +1,9 @@ -{capture assign='pageTitle'}{lang}wcf.moderation.report{/lang}: {$queue->getTitle()}{/capture} +{capture assign='pageTitle'}{$__wcf->getActivePage()->getTitle()}: {$queue->getTitle()}{/capture} {capture assign='contentHeader'}
-

{lang}wcf.moderation.report{/lang}

+

{$__wcf->getActivePage()->getTitle()}

{if $queue->lastChangeTime}
diff --git a/com.woltlab.wcf/templates/newPassword.tpl b/com.woltlab.wcf/templates/newPassword.tpl index 4995bc5727..770d83ddea 100644 --- a/com.woltlab.wcf/templates/newPassword.tpl +++ b/com.woltlab.wcf/templates/newPassword.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.newPassword{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.newPassword{/lang}{/capture} - {include file='header'} {include file='formError'} diff --git a/com.woltlab.wcf/templates/notificationList.tpl b/com.woltlab.wcf/templates/notificationList.tpl index d342195906..e96652fcd3 100644 --- a/com.woltlab.wcf/templates/notificationList.tpl +++ b/com.woltlab.wcf/templates/notificationList.tpl @@ -1,9 +1,7 @@ -{capture assign='pageTitle'}{lang}wcf.user.notification.notifications{/lang} - {lang}wcf.user.usercp{/lang}{/capture} - {capture assign='contentHeader'}
-

{lang}wcf.user.notification.notifications{/lang} {#$__wcf->getUserNotificationHandler()->countAllNotifications()}

+

{$__wcf->getActivePage()->getTitle()} {#$__wcf->getUserNotificationHandler()->countAllNotifications()}

{hascontent} diff --git a/com.woltlab.wcf/templates/paidSubscriptionList.tpl b/com.woltlab.wcf/templates/paidSubscriptionList.tpl index b26a8a017f..962d1b9f90 100644 --- a/com.woltlab.wcf/templates/paidSubscriptionList.tpl +++ b/com.woltlab.wcf/templates/paidSubscriptionList.tpl @@ -1,7 +1,3 @@ -{capture assign='pageTitle'}{lang}wcf.user.menu.settings.paidSubscription{/lang} - {lang}wcf.user.menu.settings{/lang}{/capture} - -{capture assign='contentTitle'}{lang}wcf.user.menu.settings.paidSubscription{/lang}{/capture} - {capture assign='headContent'} {if PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}