Small optimizations
authorMarcel Werk <burntime@woltlab.com>
Wed, 12 Jun 2013 13:44:34 +0000 (15:44 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 12 Jun 2013 13:44:34 +0000 (15:44 +0200)
wcfsetup/install/files/acp/templates/tagAdd.tpl
wcfsetup/install/files/acp/templates/tagList.tpl
wcfsetup/install/files/lib/acp/form/TagEditForm.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index cc34816c99222ae82a33b3f72640f7c3bd388d63..c3b312e913dae90bd46a98928f89c7f03f9e8ef4 100644 (file)
 {/if}
 
 <div class="contentNavigation">
-       {hascontent}
-               <nav>
-                       <ul>
-                               {content}
-                                       {if $__wcf->session->getPermission('admin.tag.canDeleteTag') || $__wcf->session->getPermission('admin.tag.canEditTag')}
-                                               <li><a href="{link controller='TagList'}{/link}" class="button"><span class="icon icon16 icon-list"></span> <span>{lang}wcf.acp.menu.link.tag.list{/lang}</span></a></li>
-                                       {/if}
-                                       
-                                       {event name='contentNavigationButtons'}
-                               {/content}
-                       </ul>
-               </nav>
-       {/hascontent}
+       <nav>
+               <ul>
+                       <li><a href="{link controller='TagList'}{/link}" class="button"><span class="icon icon16 icon-list"></span> <span>{lang}wcf.acp.menu.link.tag.list{/lang}</span></a></li>
+                               
+                       {event name='contentNavigationButtons'}
+               </ul>
+       </nav>
 </div>
 
 <form method="post" action="{if $action == 'add'}{link controller='TagAdd'}{/link}{else}{link controller='TagEdit' object=$tagObj}{/link}{/if}">
@@ -99,9 +93,9 @@
                                </script>
                        {elseif $tagObj|isset}
                                <dl>
-                                       <dt><label for="synonyms">{lang}wcf.acp.tag.synonyms{/lang}</label></dt>
+                                       <dt><label for="synonyms">{lang}wcf.acp.tag.synonymFor{/lang}</label></dt>
                                        <dd>
-                                               <a href="{link controller='TagEdit' id=$tagObj->synonymFor}{/link}">{lang}wcf.acp.tag.synonyms.isSynonym{/lang}</a>
+                                               <a href="{link controller='TagEdit' id=$tagObj->synonymFor}{/link}" class="badge tag">{$synonym->name}</a>
                                        </dd>
                                </dl>
                        {/if}
index 513b413b20eb32955b987b190d4d2ff912f3e32f..11ad852106f26481c462b5bc2de32d6e1d836deb 100644 (file)
 {if $items}
        <form action="{link controller='TagList'}{/link}">
                <div class="container containerPadding marginTop">
-                       <fieldset><legend>{lang}wcf.acp.tag.list.search{/lang}</legend>
+                       <fieldset>
+                               <legend>{lang}wcf.acp.tag.list.search{/lang}</legend>
+                               
                                <dl>
-                                       <dt><label for="search">{lang}wcf.acp.tag.list.search.query{/lang}</label></dt>
+                                       <dt><label for="tagSearch">{lang}wcf.acp.tag.list.search.query{/lang}</label></dt>
                                        <dd>
-                                               <input type="search" id="search" name="search" value="{$search}" autofocus="autofocus" class="medium" />
+                                               <input type="text" id="tagSearch" name="search" value="{$search}" autofocus="autofocus" class="medium" />
                                        </dd>
                                </dl>
                        </fieldset>
-                       
-                       <div class="formSubmit">
-                               <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
-                               {@SID_INPUT_TAG}
-                       </div>
+               </div>
+               
+               <div class="formSubmit">
+                       <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
+                       {@SID_INPUT_TAG}
                </div>
        </form>
 {/if}
@@ -55,8 +57,8 @@
                                <tr>
                                        <th class="columnID columnTagID{if $sortField == 'tagID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=tagID&sortOrder={if $sortField == 'tagID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
                                        <th class="columnTitle columnName{if $sortField == 'name'} active {@$sortOrder}{/if}"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=name&sortOrder={if $sortField == 'name' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.acp.tag.name{/lang}</a></th>
-                                       <th class="columnNumber columnUsageCount{if $sortField == 'usageCount'} active {@$sortOrder}{/if}"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=usageCount&sortOrder={if $sortField == 'usageCount' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.acp.tag.usageCount{/lang}</a></th>
-                                       <th class="columnText columnLanguage{if $sortField == 'language'} active {@$sortOrder}{/if}"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=language&sortOrder={if $sortField == 'language' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.acp.tag.languageID{/lang}</a></th>
+                                       <th class="columnDigits columnUsageCount{if $sortField == 'usageCount'} active {@$sortOrder}{/if}"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=usageCount&sortOrder={if $sortField == 'usageCount' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.acp.tag.usageCount{/lang}</a></th>
+                                       <th class="columnText columnLanguage{if $sortField == 'languageID'} active {@$sortOrder}{/if}"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=languageID&sortOrder={if $sortField == 'languageID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.acp.tag.languageID{/lang}</a></th>
                                        <th class="columnText columnSynonymFor">{lang}wcf.acp.tag.synonymFor{/lang}</th>
                                        
                                        {event name='columnHeads'}
                                                        {event name='rowButtons'}
                                                </td>
                                                <td class="columnID">{#$tag->tagID}</td>
-                                               <td class="columnTitle columnName"><a href="{link controller='TagEdit' object=$tag}{/link}" class="badge">{$tag->name}</a></td>
-                                               <td class="columnNumber columnUsageCount">{if $tag->synonymFor === null}{#$tag->usageCount}{/if}</td>
+                                               <td class="columnTitle columnName"><a href="{link controller='TagEdit' object=$tag}{/link}" class="badge tag">{$tag->name}</a></td>
+                                               <td class="columnDigits columnUsageCount">{if $tag->synonymFor === null}{#$tag->usageCount}{/if}</td>
                                                <td class="columnText columnLanguage">{if $tag->languageName !== null}{$tag->languageName} ({$tag->languageCode}){/if}</td>
-                                               <td class="columnText columnSynonymFor">{if $tag->synonymFor !== null}<a href="{link controller='TagList'}search={@$tag->synonymName|rawurlencode}{/link}" class="badge">{$tag->synonymName}</a>{/if}</td>
+                                               <td class="columnText columnSynonymFor">{if $tag->synonymFor !== null}<a href="{link controller='TagList'}search={@$tag->synonymName|rawurlencode}{/link}" class="badge tag">{$tag->synonymName}</a>{/if}</td>
                                                
                                                {event name='columns'}
                                        </tr>
index 6d6323635e048819035224d51234042c85ea5888..d592a3b2db9dbaf075c6241c89701c2b1a58be37 100644 (file)
@@ -134,7 +134,8 @@ class TagEditForm extends TagAddForm {
                
                WCF::getTPL()->assign(array(
                        'tagObj' => $this->tagObj,
-                       'action' => 'edit'
+                       'action' => 'edit',
+                       'synonym' => (($this->tagObj !== null && $this->tagObj->synonymFor) ? new Tag($this->tagObj->synonymFor) : null)
                ));
        }
 }
index 7dbc9a8469f96666d5f899237a70959d6eecc573..5e0817a5e5ca5776e2b7e87cca8e88dc4cdc7cfa 100644 (file)
                <item name="wcf.acp.tag.delete.sure"><![CDATA[Wollen Sie den Tag „{$tag}“ wirklich löschen?]]></item>
                <item name="wcf.acp.tag.error.languageID.notFound"><![CDATA[Die gewählte Sprache ist ungültig]]></item>
                <item name="wcf.acp.tag.languageID"><![CDATA[Sprache]]></item>
-               <item name="wcf.acp.tag.list"><![CDATA[Tags auflisten]]></item>
+               <item name="wcf.acp.tag.list"><![CDATA[Tags]]></item>
                <item name="wcf.acp.tag.list.search"><![CDATA[Tags suchen]]></item>
                <item name="wcf.acp.tag.list.search.query"><![CDATA[Suchbegriff]]></item>
                <item name="wcf.acp.tag.name"><![CDATA[Name]]></item>
index ac47898dda91cc6a7f9e776bca81ad5077255055..63f4099e16c91a08cbc08ccb3a76f5e9d6024e2f 100644 (file)
@@ -1060,7 +1060,7 @@ Examples for medium ID detection:
                <item name="wcf.acp.tag.delete.sure"><![CDATA[Do you really want to delete the tag “{$tag}”?]]></item>
                <item name="wcf.acp.tag.error.languageID.notFound"><![CDATA[Selected language is invalid]]></item>
                <item name="wcf.acp.tag.languageID"><![CDATA[Language]]></item>
-               <item name="wcf.acp.tag.list"><![CDATA[List Tags]]></item>
+               <item name="wcf.acp.tag.list"><![CDATA[Tags]]></item>
                <item name="wcf.acp.tag.list.search"><![CDATA[Search Tags]]></item>
                <item name="wcf.acp.tag.list.search.query"><![CDATA[Search Term]]></item>
                <item name="wcf.acp.tag.name"><![CDATA[Name]]></item>