Added showOrder column in box list
authorMarcel Werk <burntime@woltlab.com>
Mon, 26 Sep 2016 14:02:22 +0000 (16:02 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 26 Sep 2016 14:02:22 +0000 (16:02 +0200)
wcfsetup/install/files/acp/templates/boxList.tpl
wcfsetup/install/files/acp/templates/menuList.tpl
wcfsetup/install/files/lib/acp/page/MenuListPage.class.php

index 42bc2c8393ba1c8486c26828c3119d6e1de4bbe8..96a2a9ed6f9708891d6cdaac50915e53ad70ee33 100644 (file)
                                        <th class="columnTitle columnName{if $sortField == 'name'} active {@$sortOrder}{/if}"><a href="{link controller='BoxList'}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 columnBoxType{if $sortField == 'boxType'} active {@$sortOrder}{/if}"><a href="{link controller='BoxList'}pageNo={@$pageNo}&sortField=boxType&sortOrder={if $sortField == 'boxType' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.acp.box.type{/lang}</a></th>
                                        <th class="columnText columnPosition{if $sortField == 'position'} active {@$sortOrder}{/if}"><a href="{link controller='BoxList'}pageNo={@$pageNo}&sortField=position&sortOrder={if $sortField == 'position' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.acp.box.position{/lang}</a></th>
+                                       <th class="columnDigits columnShowOrder{if $sortField == 'showOrder'} active {@$sortOrder}{/if}"><a href="{link controller='BoxList'}pageNo={@$pageNo}&sortField=showOrder&sortOrder={if $sortField == 'showOrder' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.global.showOrder{/lang}</a></th>
                                        
                                        {event name='columnHeads'}
                                </tr>
                                                <td class="columnTitle columnName"><a href="{link controller='BoxEdit' id=$box->boxID}{/link}">{$box->name}</a></td>
                                                <td class="columnText columnBoxType">{$box->boxType}</td>
                                                <td class="columnText columnPosition">{lang}wcf.acp.box.position.{@$box->position}{/lang}</td>
+                                               <td class="columnDigits columnShowOrder">{#$box->showOrder}</td>
                                                
                                                {event name='columns'}
                                        </tr>
index 72ac21dae738b1c05c07232a057de4e66f96b7fd..3d748e8acdb8858216ee4784367708824ebc28cc 100644 (file)
@@ -33,8 +33,9 @@
                                <tr>
                                        <th class="columnPageID{if $sortField == 'menuID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='MenuList'}pageNo={@$pageNo}&sortField=menuID&sortOrder={if $sortField == 'menuID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
                                        <th class="columnTitle{if $sortField == 'title'} active {@$sortOrder}{/if}"><a href="{link controller='MenuList'}pageNo={@$pageNo}&sortField=title&sortOrder={if $sortField == 'title' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.name{/lang}</a></th>
-                                       <th class="columnText columnPosition{if $sortField == 'position'} active {@$sortOrder}{/if}"><a href="{link controller='MenuList'}pageNo={@$pageNo}&sortField=position&sortOrder={if $sortField == 'position' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.box.position{/lang}</a></th>
                                        <th class="columnDigits columnItems{if $sortField == 'items'} active {@$sortOrder}{/if}"><a href="{link controller='MenuList'}pageNo={@$pageNo}&sortField=items&sortOrder={if $sortField == 'items' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.menu.item.list{/lang}</a></th>
+                                       <th class="columnText columnPosition{if $sortField == 'position'} active {@$sortOrder}{/if}"><a href="{link controller='MenuList'}pageNo={@$pageNo}&sortField=position&sortOrder={if $sortField == 'position' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.box.position{/lang}</a></th>
+                                       <th class="columnDigits columnShowOrder{if $sortField == 'showOrder'} active {@$sortOrder}{/if}"><a href="{link controller='MenuList'}pageNo={@$pageNo}&sortField=showOrder&sortOrder={if $sortField == 'showOrder' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.showOrder{/lang}</a></th>
                                        
                                        {event name='columnHeads'}
                                </tr>
                                                        {event name='rowButtons'}
                                                </td>
                                                <td class="columnID columnPageID">{@$menu->menuID}</td>
-                                               <td class="columnTitle"><a href="{link controller='MenuItemList' id=$menu->menuID}{/link}">{lang}{$menu->title}{/lang}</a></td>
+                                               <td class="columnTitle"><a href="{link controller='MenuEdit' id=$menu->menuID}{/link}">{lang}{$menu->title}{/lang}</a></td>
+                                               <td class="columnDigits columnItems"><a href="{link controller='MenuItemList' id=$menu->menuID}{/link}">{#$menu->items}</a></td>
                                                <td class="columnText columnPosition">{$menu->position}</td>
-                                               <td class="columnDigits columnItems">{#$menu->items}</td>
+                                               <td class="columnDigits columnShowOrder">{#$menu->showOrder}</td>
                                                
                                                {event name='columns'}
                                        </tr>
index 22e82254cc8a5066186d2e1c5a8f453d086647de..cff32ddec38d7ea5e9f9fdaec3c799c8d705f5db 100644 (file)
@@ -38,7 +38,7 @@ class MenuListPage extends SortablePage {
        /**
         * @inheritDoc
         */
-       public $validSortFields = ['menuID', 'title', 'position', 'items'];
+       public $validSortFields = ['menuID', 'title', 'position', 'items', 'showOrder'];
        
        /**
         * @inheritDoc
@@ -51,6 +51,6 @@ class MenuListPage extends SortablePage {
        protected function initObjectList() {
                parent::initObjectList();
                
-               $this->objectList->sqlSelects .= '(SELECT COUNT(*) FROM wcf'.WCF_N.'_menu_item WHERE menuID = menu.menuID) AS items, (SELECT position FROM wcf'.WCF_N.'_box WHERE menuID = menu.menuID) AS position';
+               $this->objectList->sqlSelects .= '(SELECT COUNT(*) FROM wcf'.WCF_N.'_menu_item WHERE menuID = menu.menuID) AS items, (SELECT position FROM wcf'.WCF_N.'_box WHERE menuID = menu.menuID) AS position, (SELECT showOrder FROM wcf'.WCF_N.'_box WHERE menuID = menu.menuID) AS showOrder';
        }
 }