From: Marcel Werk Date: Sat, 25 Jun 2016 16:36:25 +0000 (+0200) Subject: Overhauled language item list X-Git-Tag: 3.0.0_Beta_1~1353 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e74a4de3deeb9d3c4158c8d862116934e0e38f8b;p=GitHub%2FWoltLab%2FWCF.git Overhauled language item list --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.Language.js b/wcfsetup/install/files/acp/js/WCF.ACP.Language.js index 5c50d83084..4a1c2dfdee 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.Language.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.Language.js @@ -34,11 +34,8 @@ WCF.ACP.Language.ItemList = Class.extend({ /** * Initializes the WCF.ACP.Style.List class. - * - * @param integer count - * @param integer pageNo */ - init: function(count, pageNo) { + init: function() { this._proxy = new WCF.Action.Proxy({ success: $.proxy(this._success, this) }); @@ -50,40 +47,6 @@ WCF.ACP.Language.ItemList = Class.extend({ var self = this; $button.click(function() { self._click($languageItemID); }); }, this)); - - count = ~~count; - if (count > 100) { - this._createPagination(count, pageNo); - } - }, - - /** - * Creates a pagination for current search result. - * - * @param integer count - * @param integer pageNo - */ - _createPagination: function(count, pageNo) { - var navs = []; - - // pagination top - var contentNavigation = $('
').insertBefore($('.section.sectionContainerList')); - navs.push(contentNavigation[0].children[0]); - - // pagination bottom - contentNavigation = $('
').prependTo($('.contentFooter')); - navs.push(contentNavigation[0].children[0]); - - navs.forEach(function(nav) { - $(nav).wcfPages({ - activePage: parseInt(pageNo) || 1, - maxPage: Math.ceil(count / 100) - }).on('wcfpagesswitched', function(event, data) { - var $form = $('#languageItemSearchForm'); - $('').appendTo($form); - $form.submit(); - }); - }); }, /** diff --git a/wcfsetup/install/files/acp/templates/languageItemList.tpl b/wcfsetup/install/files/acp/templates/languageItemList.tpl index 4158f9c028..8330ac814d 100644 --- a/wcfsetup/install/files/acp/templates/languageItemList.tpl +++ b/wcfsetup/install/files/acp/templates/languageItemList.tpl @@ -4,7 +4,7 @@ @@ -33,7 +33,7 @@
- {foreach from=$availableLanguages item=availableLanguage} @@ -66,6 +66,7 @@
+
@@ -79,33 +80,60 @@ +{hascontent} +
+ {content} + {assign var='linkParameters' value=''} + {if $languageID}{capture append=linkParameters}&languageID={@$languageID}{/capture}{/if} + {if $languageCategoryID}{capture append=linkParameters}&languageCategoryID={@$languageCategoryID}{/capture}{/if} + {if $languageItem}{capture append=linkParameters}&languageItem={@$languageItem|rawurlencode}{/capture}{/if} + {if $languageItemValue}{capture append=linkParameters}&languageItemValue={@$languageItemValue|rawurlencode}{/capture}{/if} + {if $hasCustomValue}{capture append=linkParameters}&hasCustomValue=1{/capture}{/if} + + {pages print=true assign=pagesLinks controller="LanguageItemList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$linkParameters"} + {/content} +
+{/hascontent} + {if $objects|count} -
-
    - {foreach from=$objects item=item} -
  1. -
    -
    -
    -

    {$item->languageItem}{if $item->languageCustomItemValue !== null} {/if}

    -
    - -

    {if $item->languageUseCustomValue}{$item->languageCustomItemValue|truncate:255}{else}{$item->languageItemValue|truncate:255}{/if}

    -
    -
    -
  2. - {/foreach} -
+
+ + + + + + + + {event name='columnHeads'} + + + + + {foreach from=$objects item=item} + + + + + + {event name='columns'} + + {/foreach} + +
{lang}wcf.global.name{/lang}{lang}wcf.acp.language.item.value{/lang}{lang}wcf.acp.language.item.customValue{/lang}
{$item->languageItem}{$item->languageItemValue|truncate:255}{if !$item->languageUseCustomValue}{/if}{$item->languageCustomItemValue|truncate:255}{if !$item->languageUseCustomValue}{/if}