Improved page list
authorMarcel Werk <burntime@woltlab.com>
Tue, 1 Dec 2015 16:00:18 +0000 (17:00 +0100)
committerMarcel Werk <burntime@woltlab.com>
Tue, 1 Dec 2015 16:00:18 +0000 (17:00 +0100)
wcfsetup/install/files/acp/templates/pageList.tpl
wcfsetup/install/files/lib/acp/page/PageListPage.class.php
wcfsetup/install/files/lib/data/page/Page.class.php

index 81d1a9f1e82dfa009ac30b66245083d201f1bedf..8e4afc77069f0040316927ca65fb9f869f53809e 100644 (file)
@@ -18,8 +18,8 @@
        
        <nav>
                <ul>
-                       <li><a href="{link controller='PageAdd'}{/link}" class="button"><span class="icon icon16 icon-plus"></span> <span>{lang}wcf.acp.page.add{/lang}</span></a></li>
-                       <li><a href="{link controller='PageAdd'}isMultilingual=1{/link}" class="button"><span class="icon icon16 icon-plus"></span> <span>{lang}wcf.acp.page.addMultilingual{/lang}</span></a></li>
+                       <li><a href="{link controller='PageAdd'}{/link}" class="button"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.page.add{/lang}</span></a></li>
+                       <li><a href="{link controller='PageAdd'}isMultilingual=1{/link}" class="button"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.page.addMultilingual{/lang}</span></a></li>
                
                        {event name='contentNavigationButtonsTop'}
                </ul>
@@ -37,7 +37,7 @@
                                <tr>
                                        <th class="columnPageID{if $sortField == 'pageID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='PageList'}pageNo={@$pageNo}&sortField=pageID&sortOrder={if $sortField == 'pageID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
                                        <th class="columnTitle columnName{if $sortField == 'name'} active {@$sortOrder}{/if}"><a href="{link controller='PageList'}pageNo={@$pageNo}&sortField=name&sortOrder={if $sortField == 'name' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.name{/lang}</a></th>
-                                       <th class="columnText columnCustomURL{if $sortField == 'customURL'} active {@$sortOrder}{/if}"><a href="{link controller='PageList'}pageNo={@$pageNo}&sortField=customURL&sortOrder={if $sortField == 'customURL' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.page.customURL{/lang}</a></th>
+                                       <th class="columnText columnURL">{lang}wcf.acp.page.url{/lang}</th>
                                        <th class="columnDate columnLastUpdateTime{if $sortField == 'lastUpdateTime'} active {@$sortOrder}{/if}"><a href="{link controller='PageList'}pageNo={@$pageNo}&sortField=lastUpdateTime&sortOrder={if $sortField == 'lastUpdateTime' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.page.lastUpdateTime{/lang}</a></th>
                                        
                                        {event name='columnHeads'}
@@ -64,7 +64,7 @@
                                                </td>
                                                <td class="columnID columnPageID">{@$page->pageID}</td>
                                                <td class="columnTitle columnName"><a href="{link controller='PageEdit' id=$page->pageID}{/link}">{$page->name}</a></td>
-                                               <td class="columnText columnCustomURL">{$page->controllerCustomURL}</td>
+                                               <td class="columnText columnURL">{$page->getURL()}</td>
                                                <td class="columnDate columnLastUpdateTime">{@$page->lastUpdateTime|time}</td>
                                                
                                                {event name='columns'}
@@ -80,8 +80,8 @@
                
                <nav>
                        <ul>
-                               <li><a href="{link controller='PageAdd'}{/link}" class="button"><span class="icon icon16 icon-plus"></span> <span>{lang}wcf.acp.page.add{/lang}</span></a></li>
-                               <li><a href="{link controller='PageAdd'}isMultilingual=1{/link}" class="button"><span class="icon icon16 icon-plus"></span> <span>{lang}wcf.acp.page.addMultilingual{/lang}</span></a></li>
+                               <li><a href="{link controller='PageAdd'}{/link}" class="button"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.page.add{/lang}</span></a></li>
+                               <li><a href="{link controller='PageAdd'}isMultilingual=1{/link}" class="button"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.page.addMultilingual{/lang}</span></a></li>
                
                                {event name='contentNavigationButtonsBottom'}
                        </ul>
index a67c846a1c1db2a1f990225404334fe535966608..4b15e9ea2d914274bf852d357ff1929074b1b5b8 100644 (file)
@@ -36,5 +36,5 @@ class PageListPage extends SortablePage {
        /**
         * @see \wcf\page\SortablePage::$validSortFields
         */
-       public $validSortFields = array('pageID', 'name', 'customURL', 'lastUpdateTime');
+       public $validSortFields = array('pageID', 'name', 'lastUpdateTime');
 }
index 62588921b90cf5562fd9a95d3c0f7aa6d7e3a6d4..d0f8a834914a276684798db9368b9ae0ddc6e9ae 100644 (file)
@@ -75,6 +75,15 @@ class Page extends DatabaseObject {
                return $content;
        }
        
+       /**
+        * Returns the page URL.
+        * 
+        * @return string
+        */
+       public function getURL() {
+               // @todo
+       }
+       
        /**
         * Returns the page with the given name.
         *