Overhauled page title management
authorMarcel Werk <burntime@woltlab.com>
Sun, 22 May 2016 09:24:04 +0000 (11:24 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 22 May 2016 09:24:08 +0000 (11:24 +0200)
language/de.xml
language/en.xml
objectType.xml
page.xml
templates/conversationAdd.tpl
templates/conversationList.tpl
templates/conversationMessageAdd.tpl
templates/conversationMessageEdit.tpl

index 3348bf47b8f6833601cb1ea1da4d03af6c01986d..1eca9ee2a7076a5f59bcbd86f95641106a84ae51 100644 (file)
        </category>
        
        <category name="wcf.page">
-               <item name="wcf.page.com.woltlab.wcf.conversation.Conversation"><![CDATA[Konversation]]></item>
-               <item name="wcf.page.com.woltlab.wcf.conversation.ConversationAdd"><![CDATA[Konversation starten]]></item>
-               <item name="wcf.page.com.woltlab.wcf.conversation.ConversationList"><![CDATA[Konversationenliste]]></item>
-               <item name="wcf.page.com.woltlab.wcf.conversation.ConversationMessageAdd"><![CDATA[Antwort auf Konversation erstellen]]></item>
-               <item name="wcf.page.com.woltlab.wcf.conversation.ConversationMessageEdit"><![CDATA[Antwort auf Konversation bearbeiten]]></item>
-               
-               <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.ConversationAdd"><![CDATA[Neue Konversation]]></item>
-               <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.ConversationList"><![CDATA[Konversationenliste]]></item>
                <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.ConversationMessageAdd"><![CDATA[Antwort erstellen in Konversation <a href="{link controller='Conversation' object=$conversation}{/link}" class="conversationLink" data-conversation-id="{@$conversation->conversationID}">{$conversation->subject}</a>]]></item>
                <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.ConversationMessageEdit"><![CDATA[Nachricht bearbeiten in Konversation <a href="{link controller='Conversation' object=$conversation}{/link}" class="conversationLink" data-conversation-id="{@$conversation->conversationID}">{$conversation->subject}</a>]]></item>
                <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.Conversation"><![CDATA[Konversation <a href="{link controller='Conversation' object=$conversation}{/link}" class="conversationLink" data-conversation-id="{@$conversation->conversationID}">{$conversation->subject}</a>]]></item>
index 02a7dc10741c0b5657757f077e0cc728409f9937..e732e8bae2efdbd25b059ddd3a3bd07863658cff 100644 (file)
        </category>
        
        <category name="wcf.page">
-               <item name="wcf.page.com.woltlab.wcf.conversation.Conversation"><![CDATA[Conversation]]></item>
-               <item name="wcf.page.com.woltlab.wcf.conversation.ConversationAdd"><![CDATA[New Conversation]]></item>
-               <item name="wcf.page.com.woltlab.wcf.conversation.ConversationList"><![CDATA[Conversation List]]></item>
-               <item name="wcf.page.com.woltlab.wcf.conversation.ConversationMessageAdd"><![CDATA[Reply to Conversation]]></item>
-               <item name="wcf.page.com.woltlab.wcf.conversation.ConversationMessageEdit"><![CDATA[Edit Reply to Conversation]]></item>
-               
-               <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.ConversationAdd"><![CDATA[Create Conversation]]></item>
-               <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.ConversationList"><![CDATA[Conversation List]]></item>
                <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.ConversationMessageAdd"><![CDATA[Reply to conversation <a href="{link controller='Conversation' object=$conversation}{/link}" class="conversationLink" data-conversation-id="{@$conversation->conversationID}">{$conversation->subject}</a>]]></item>
                <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.ConversationMessageEdit"><![CDATA[Edit message in conversation <a href="{link controller='Conversation' object=$conversation}{/link}" class="conversationLink" data-conversation-id="{@$conversation->conversationID}">{$conversation->subject}</a>]]></item>
                <item name="wcf.page.onlineLocation.com.woltlab.wcf.conversation.Conversation"><![CDATA[Conversation <a href="{link controller='Conversation' object=$conversation}{/link}" class="conversationLink" data-conversation-id="{@$conversation->conversationID}">{$conversation->subject}</a>]]></item>
index 2c3e2018384fc4df6bc623c7ae2165d4a4c3b686..9bf86133e5f3dc71a6638a7e1d776c135e6829f1 100644 (file)
                </type>
                <!-- /rebuild data workers -->
                
-               <!-- pages -->
-               <type>
-                       <name>com.woltlab.wcf.conversation.ConversationAddForm</name>
-                       <definitionname>com.woltlab.wcf.page</definitionname>
-                       <classname><![CDATA[wcf\form\ConversationAddForm]]></classname>
-                       <options>module_conversation</options>
-                       <categoryname>com.woltlab.wcf.conversation</categoryname>
-               </type>
-               <type>
-                       <name>com.woltlab.wcf.conversation.ConversationMessageAddForm</name>
-                       <definitionname>com.woltlab.wcf.page</definitionname>
-                       <classname><![CDATA[wcf\form\ConversationMessageAddForm]]></classname>
-                       <options>module_conversation</options>
-                       <categoryname>com.woltlab.wcf.conversation</categoryname>
-               </type>
-               <type>
-                       <name>com.woltlab.wcf.conversation.ConversationMessageEditForm</name>
-                       <definitionname>com.woltlab.wcf.page</definitionname>
-                       <classname><![CDATA[wcf\form\ConversationMessageEditForm]]></classname>
-                       <options>module_conversation</options>
-                       <categoryname>com.woltlab.wcf.conversation</categoryname>
-               </type>
-               <type>
-                       <name>com.woltlab.wcf.conversation.ConversationListPage</name>
-                       <definitionname>com.woltlab.wcf.page</definitionname>
-                       <classname><![CDATA[wcf\page\ConversationListPage]]></classname>
-                       <options>module_conversation</options>
-                       <categoryname>com.woltlab.wcf.conversation</categoryname>
-               </type>
-               <type>
-                       <name>com.woltlab.wcf.conversation.ConversationPage</name>
-                       <definitionname>com.woltlab.wcf.page</definitionname>
-                       <classname><![CDATA[wcf\page\ConversationPage]]></classname>
-                       <options>module_conversation</options>
-                       <categoryname>com.woltlab.wcf.conversation</categoryname>
-               </type>
-               <!-- /pages -->
-               
                <!-- stat handlers -->
                <type>
                        <name>com.woltlab.wcf.conversation</name>
index ea4378c58c5cbc1b31480ed08710cba1f861802b..51bc287cc0bc8954d299e5c8274ca3cdb45c86c0 100644 (file)
--- a/page.xml
+++ b/page.xml
@@ -3,9 +3,17 @@
        <import>
                <page identifier="com.woltlab.wcf.conversation.ConversationList">
                        <controller>wcf\page\ConversationListPage</controller>
+                       <handler>wcf\system\page\handler\ConversationListPageHandler</handler>
                        <name language="de"><![CDATA[Konversationenliste]]></name>
                        <name language="en"><![CDATA[Conversation List]]></name>
                        <pageType>system</pageType>
+                       
+                       <content language="en">
+                               <title>Conversations</title>
+                       </content>
+                       <content language="de">
+                               <title>Konversationen</title>
+                       </content>
                </page>
                <page identifier="com.woltlab.wcf.conversation.Conversation">
                        <controller>wcf\page\ConversationPage</controller>
                        <name language="de"><![CDATA[Konversation]]></name>
                        <name language="en"><![CDATA[Conversation]]></name>
                        <pageType>system</pageType>
+                       <requireObjectID>1</requireObjectID>
                        <parent>com.woltlab.wcf.conversation.ConversationList</parent>
                </page>
                <page identifier="com.woltlab.wcf.conversation.ConversationAdd">
                        <controller>wcf\form\ConversationAddForm</controller>
-                       <handler>wcf\system\page\handler\DefaultConversationRelatedPageHandler</handler>
                        <name language="de"><![CDATA[Konversation starten]]></name>
                        <name language="en"><![CDATA[New Conversation]]></name>
                        <pageType>system</pageType>
                        <parent>com.woltlab.wcf.conversation.ConversationList</parent>
+                       
+                       <content language="en">
+                               <title>New Conversation</title>
+                       </content>
+                       <content language="de">
+                               <title>Konversation starten</title>
+                       </content>
                </page>
                <page identifier="com.woltlab.wcf.conversation.ConversationMessageAdd">
                        <controller>wcf\form\ConversationMessageAddForm</controller>
                        <pageType>system</pageType>
                        <requireObjectID>1</requireObjectID>
                        <parent>com.woltlab.wcf.conversation.Conversation</parent>
+                       
+                       <content language="en">
+                               <title>Reply to Conversation</title>
+                       </content>
+                       <content language="de">
+                               <title>Antwort auf Konversation erstellen</title>
+                       </content>
                </page>
                <page identifier="com.woltlab.wcf.conversation.ConversationMessageEdit">
                        <controller>wcf\form\ConversationMessageEditForm</controller>
                        <pageType>system</pageType>
                        <requireObjectID>1</requireObjectID>
                        <parent>com.woltlab.wcf.conversation.Conversation</parent>
+                       
+                       <content language="en">
+                               <title>Edit Reply to Conversation</title>
+                       </content>
+                       <content language="de">
+                               <title>Antwort auf Konversation bearbeiten</title>
+                       </content>
                </page>
        </import>
 </data>
index 7cea399c86f75199d28e0cf6b33cc8a30efe5dfa..c44e8c049115febd547607a1998d979e24ab5929 100644 (file)
@@ -1,7 +1,3 @@
-{capture assign='pageTitle'}{lang}wcf.conversation.add{/lang}{/capture}
-
-{capture assign='contentTitle'}{lang}wcf.conversation.add{/lang}{/capture}
-
 {include file='header'}
 
 {include file='formError'}
index 3463fc53338139e69feeae9aa234e2face1c45e4..ef03d45e4e8afdb073968bda0b3705c6e58f6951 100644 (file)
@@ -1,9 +1,9 @@
-{capture assign='pageTitle'}{lang}wcf.conversation.conversations{/lang}{if $pageNo > 1} - {lang}wcf.page.pageNo{/lang}{/if}{/capture}
+{capture assign='pageTitle'}{if $filter}{lang}wcf.conversation.folder.{$filter}{/lang}{else}{$__wcf->getActivePage()->getTitle()}{/if}{if $pageNo > 1} - {lang}wcf.page.pageNo{/lang}{/if}{/capture}
 
 {capture assign='contentHeader'}
        <header class="contentHeader">
                <div class="contentHeaderTitle">
-                       <h1 class="contentTitle">{if $filter}{lang}wcf.conversation.folder.{$filter}{/lang}{else}{lang}wcf.conversation.conversations{/lang}{/if}</h1>
+                       <h1 class="contentTitle">{if $filter}{lang}wcf.conversation.folder.{$filter}{/lang}{else}{$__wcf->getActivePage()->getTitle()}{/if}</h1>
                </div>
                
                <nav class="contentHeaderNavigation">
index b0efe1cd1a355e477c9216b589dcd34b2c24e093..51f7ee0c79c9f0a09476b793f5cb0b66ad9386e4 100644 (file)
@@ -1,6 +1,4 @@
-{capture assign='pageTitle'}{lang}wcf.conversation.message.add{/lang} - {$conversation->subject}{/capture}
-
-{capture assign='contentTitle'}{lang}wcf.conversation.message.add{/lang}{/capture}
+{capture assign='pageTitle'}{$__wcf->getActivePage()->getTitle()} - {$conversation->subject}{/capture}
 
 {include file='header'}
 
index d629b69d6826d311e3cc048d3c0c05cbf78e9d78..2c87f8cd06d80eb076efee4acc984c132e2da42a 100644 (file)
@@ -1,6 +1,4 @@
-{capture assign='pageTitle'}{lang}wcf.conversation.message.edit{/lang} - {$conversation->subject}{/capture}
-
-{capture assign='contentTitle'}{lang}wcf.conversation.message.edit{/lang}{/capture}
+{capture assign='pageTitle'}{$__wcf->getActivePage()->getTitle()} - {$conversation->subject}{/capture}
 
 {include file='header'}