Merge pull request #17 from Gravatronics/bug/contentNavigationButtonsPermissions
authorAlexander Ebert <ebert@woltlab.com>
Sun, 9 Dec 2012 16:28:22 +0000 (08:28 -0800)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 9 Dec 2012 16:28:22 +0000 (08:28 -0800)
Adds missing permission checks for content navigation buttons

1  2 
acptemplates/languageAdd.tpl
acptemplates/languageExport.tpl
acptemplates/languageServerAdd.tpl
acptemplates/languageServerList.tpl

Simple merge
index 5ee2e053eb7b158de79940835778282bfa54ea7b,f4072d4497ffad4284a9101d488bfed2c0b09516..0766eaa5d4f9d553a205567c8fdd5630a2723a9b
  {/if}
  
  {if $success|isset}
 -      <p class="success">{lang}wcf.acp.language.add.success{/lang}</p>        
 +      <p class="success">{lang}wcf.acp.language.add.success{/lang}</p>
  {/if}
  
- <div class="contentNavigation">
-       <nav>
-               <ul>
-                       <li><a href="{link controller='LanguageList'}{/link}" title="{lang}wcf.acp.menu.link.language.list{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/list.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.menu.link.language.list{/lang}</span></a></li>
-               </ul>
-       </nav>
- </div>
+ {hascontent}
+       <div class="contentNavigation">
+               <nav>
+                       <ul>
+                               {content}
+                                       {if $__wcf->session->getPermission('admin.language.canDeleteLanguage') || $__wcf->session->getPermission('admin.language.canEditLanguage')}
+                                               <li><a href="{link controller='LanguageList'}{/link}" title="{lang}wcf.acp.menu.link.language.list{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/list.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.menu.link.language.list{/lang}</span></a></li>
+                                       {/if}
+                                       
+                                       {event name='contentNavigationButtons'}
+                               {/content}
+                       </ul>
+               </nav>
+       </div>
+ {/hascontent}
  
  <form enctype="multipart/form-data" method="post" action="{link controller='LanguageExport' id=$languageID}{/link}">
        <div class="container containerPadding marginTop shadow">
Simple merge
Simple merge