Improved page/cms management
authorMarcel Werk <burntime@woltlab.com>
Thu, 30 Jun 2016 14:26:59 +0000 (16:26 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 30 Jun 2016 14:26:59 +0000 (16:26 +0200)
wcfsetup/install/files/acp/templates/pageAdd.tpl
wcfsetup/install/files/acp/templates/pageList.tpl
wcfsetup/install/files/lib/acp/page/ArticleListPage.class.php
wcfsetup/install/files/lib/acp/page/BoxListPage.class.php
wcfsetup/install/files/lib/acp/page/MenuListPage.class.php
wcfsetup/install/files/lib/acp/page/PageListPage.class.php
wcfsetup/install/files/lib/data/page/Page.class.php

index cd42beea0a934d498fa9e2fc95a2f8439a87fbc8..72fb01709953c74dad2078d2656e01b01a5e5e29 100644 (file)
                                        <dd>
                                                <select name="applicationPackageID" id="applicationPackageID"{if $action == 'edit' && $page->originIsSystem} disabled{/if}>
                                                        {foreach from=$availableApplications item=availableApplication}
-                                                               <option value="{@$availableApplication->packageID}"{if $availableApplication->packageID == $applicationPackageID} selected{/if}>{$availableApplication->getAbbreviation()}: {$availableApplication->domainName}{$availableApplication->domainPath}</option>
+                                                               <option value="{@$availableApplication->packageID}"{if $availableApplication->packageID == $applicationPackageID} selected{/if}>{$availableApplication->domainName}{$availableApplication->domainPath}</option>
                                                        {/foreach}
                                                </select>
                                                {if $errorField == 'applicationPackageID'}
index 13a4d7cbf149f42cd87850c407cf6e9eae78a44b..5bc2fb81de461a043dc9d9b94d65d05d334b1793 100644 (file)
@@ -56,7 +56,7 @@
                                                <select name="applicationPackageID" id="applicationPackageID">
                                                        <option value="0">{lang}wcf.acp.page.application{/lang}</option>
                                                        {foreach from=$availableApplications item=availableApplication}
-                                                               <option value="{@$availableApplication->packageID}"{if $availableApplication->packageID == $applicationPackageID} selected{/if}>{$availableApplication->getAbbreviation()}: {$availableApplication->domainName}{$availableApplication->domainPath}</option>
+                                                               <option value="{@$availableApplication->packageID}"{if $availableApplication->packageID == $applicationPackageID} selected{/if}>{$availableApplication->domainName}{$availableApplication->domainPath}</option>
                                                        {/foreach}
                                                </select>
                                        </label>
                                <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}{@$linkParameters}{/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}{@$linkParameters}{/link}">{lang}wcf.global.name{/lang}</a></th>
-                                       <th class="columnText columnURL" colspan="2">{lang}wcf.acp.page.url{/lang}</th>
+                                       <th class="columnText columnURL">{lang}wcf.acp.page.url{/lang}</th>
                                        <th class="columnText columnPageType{if $sortField == 'pageType'} active {@$sortOrder}{/if}"><a href="{link controller='PageList'}pageNo={@$pageNo}&sortField=pageType&sortOrder={if $sortField == 'pageType' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.acp.page.type{/lang}</a></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}{@$linkParameters}{/link}">{lang}wcf.acp.page.lastUpdateTime{/lang}</a></th>
                                        
                                        <tr class="jsPageRow">
                                                <td class="columnIcon">
                                                        {if $page->canDisable()}
-                                                               <span class="icon icon16 fa-{if !$page->isDisabled}check-{/if}square-o jsToggleButton jsTooltip pointer" title="{lang}wcf.global.button.{if !$page->isDisabled}disable{else}enable{/if}{/lang}" data-object-id="{@$page->pageID}"></span>
+                                                               <span class="icon icon24 fa-{if !$page->isDisabled}check-{/if}square-o jsToggleButton jsTooltip pointer" title="{lang}wcf.global.button.{if !$page->isDisabled}disable{else}enable{/if}{/lang}" data-object-id="{@$page->pageID}"></span>
                                                        {else}
-                                                               <span class="icon icon16 fa-{if !$page->isDisabled}check-{/if}square-o disabled" title="{lang}wcf.global.button.{if !$page->isDisabled}disable{else}enable{/if}{/lang}"></span>
+                                                               <span class="icon icon24 fa-{if !$page->isDisabled}check-{/if}square-o disabled" title="{lang}wcf.global.button.{if !$page->isDisabled}disable{else}enable{/if}{/lang}"></span>
                                                        {/if}
-                                                       <a href="{link controller='PageEdit' id=$page->pageID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
+                                                       <a href="{link controller='PageEdit' id=$page->pageID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon24 fa-pencil"></span></a>
                                                        {if $page->canDelete()}
-                                                               <span class="icon icon16 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$page->pageID}" data-confirm-message-html="{lang __encode=true}wcf.acp.page.delete.confirmMessage{/lang}"></span>
+                                                               <span class="icon icon24 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$page->pageID}" data-confirm-message-html="{lang __encode=true}wcf.acp.page.delete.confirmMessage{/lang}"></span>
                                                        {else}
-                                                               <span class="icon icon16 fa-times disabled" title="{lang}wcf.global.button.delete{/lang}"></span>
+                                                               <span class="icon icon24 fa-times disabled" title="{lang}wcf.global.button.delete{/lang}"></span>
                                                        {/if}
                                                        {if !$page->requireObjectID}
-                                                               <a href="{$page->getLink()}" title="{lang}wcf.acp.page.button.viewPage{/lang}" class="jsTooltip"><span class="icon icon16 fa-search"></span></a>
+                                                               <a href="{$page->getLink()}" title="{lang}wcf.acp.page.button.viewPage{/lang}" class="jsTooltip"><span class="icon icon24 fa-search"></span></a>
                                                        {else}
-                                                               <span class="icon icon16 fa-search disabled" title="{lang}wcf.acp.page.button.viewPage{/lang}"></span>
+                                                               <span class="icon icon24 fa-search disabled" title="{lang}wcf.acp.page.button.viewPage{/lang}"></span>
                                                        {/if}
                                                        
                                                        {event name='rowButtons'}
                                                </td>
                                                <td class="columnID columnPageID">{@$page->pageID}</td>
                                                <td class="columnTitle columnName">{if $page->isLandingPage}<span class="icon icon16 fa-home jsTooltip" title="{lang}wcf.acp.page.isLandingPage{/lang}"></span> {/if}<a href="{link controller='PageEdit' id=$page->pageID}{/link}">{$page->name}</a></td>
-                                               <td class="columnIcon"><span class="badge label">{$page->getApplication()->getAbbreviation()}</span></td>
                                                <td class="columnText columnURL">
                                                        {$page->getDisplayLink()}
                                                </td>
index 6b87c84baf1136b4a1781ad17c18d3e74359a687..e5f1dc51b6661cd18ee495e44d61e7d3793a7f57 100644 (file)
@@ -55,6 +55,11 @@ class ArticleListPage extends SortablePage {
         */
        public $validSortFields = ['articleID', 'title', 'time', 'views', 'comments'];
        
+       /**
+        * @inheritDoc
+        */
+       public $itemsPerPage = 50;
+       
        /**
         * category id
         * @var integer
index 9b83c9d8fd29c7df5de353152e383aad570dacfc..b578766453812c43a7b77b954fb055d71831a362 100644 (file)
@@ -43,6 +43,11 @@ class BoxListPage extends SortablePage {
         */
        public $validSortFields = ['boxID', 'name', 'boxType', 'position', 'showOrder'];
        
+       /**
+        * @inheritDoc
+        */
+       public $itemsPerPage = 50;
+       
        /**
         * name
         * @var string
index 5ddc70e1808dd53848db7478ef18f51a18d8e8e5..22e82254cc8a5066186d2e1c5a8f453d086647de 100644 (file)
@@ -40,6 +40,11 @@ class MenuListPage extends SortablePage {
         */
        public $validSortFields = ['menuID', 'title', 'position', 'items'];
        
+       /**
+        * @inheritDoc
+        */
+       public $itemsPerPage = 50;
+       
        /**
         * @inheritDoc
         */
index 6d6f1d5da5bc6add6096497f86a1da3b5cd7f711..03e5318e4e9a2b961c228ec994469966374d78a9 100644 (file)
@@ -44,6 +44,11 @@ class PageListPage extends SortablePage {
         */
        public $validSortFields = ['pageID', 'name', 'lastUpdateTime', 'pageType'];
        
+       /**
+        * @inheritDoc
+        */
+       public $itemsPerPage = 50;
+       
        /**
         * name
         * @var string
index 82011ef131a09f160401ef91d75fa727e19c37b4..3e7c2d31b1a823947204a7ead712235fec7fab5d 100644 (file)
@@ -185,7 +185,7 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject {
         * @return      string
         */
        public function getDisplayLink() {
-               return str_replace($this->getApplication()->getPageURL(), '', $this->getLink());
+               return preg_replace('~^https?://~', '', $this->getLink());
        }
        
        /**