Adds missing permission checks for content navigation buttons
authorMatthias Schmidt <gravatronics@live.com>
Sun, 9 Dec 2012 16:08:33 +0000 (17:08 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 9 Dec 2012 16:08:33 +0000 (17:08 +0100)
acptemplates/languageAdd.tpl
acptemplates/languageExport.tpl
acptemplates/languageList.tpl
acptemplates/languageServerAdd.tpl
acptemplates/languageServerList.tpl

index 5f42107f4682389ff7683754bd20d836911405fc..724e21e7e317eb44fdf73390b8a1ebde72a4b6ad 100644 (file)
        <p class="success">{lang}wcf.global.form.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='LanguageAdd'}{/link}">
        <div class="container containerPadding marginTop shadow">
index 3be4301a900d1c659ee3800e16739d4576b9e24e..f4072d4497ffad4284a9101d488bfed2c0b09516 100644 (file)
        <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">
index 3e26eca1814d9ed0b217cce61440faedb5a2e94b..0804d8da5c90495e655d7cb4ecf9af95a3a4fbc9 100644 (file)
 <div class="contentNavigation">
        {pages print=true assign=pagesLinks controller='LanguageList' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"}
        
-       {if $__wcf->getSession()->getPermission('admin.language.canAddLanguage')}
+       {hascontent}
                <nav>
                        <ul>
-                               <li><a href="{link controller='LanguageAdd'}{/link}" title="{lang}wcf.acp.language.add{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/add.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.language.add{/lang}</span></a></li>
-                               
-                               {event name='largeButtons'}
+                               {content}
+                                       {if $__wcf->getSession()->getPermission('admin.language.canAddLanguage')}
+                                               <li><a href="{link controller='LanguageAdd'}{/link}" title="{lang}wcf.acp.language.add{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/add.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.language.add{/lang}</span></a></li>
+                                       {/if}
+                                       
+                                       {event name='contentNavigationButtonsTop'}
+                               {/content}
                        </ul>
                </nav>
-       {/if}
+       {/hascontent}
 </div>
 
 {if $objects|count}
        <div class="contentNavigation">
                {@$pagesLinks}
                
-               {if $__wcf->getSession()->getPermission('admin.language.canAddLanguage')}
+               {hascontent}
                        <nav>
                                <ul>
-                                       <li><a href="{link controller='LanguageAdd'}{/link}" title="{lang}wcf.acp.language.add{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/add.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.language.add{/lang}</span></a></li>
-                                       
-                                       {event name='largeButtons'}
+                                       {content}
+                                               {if $__wcf->getSession()->getPermission('admin.language.canAddLanguage')}
+                                                       <li><a href="{link controller='LanguageAdd'}{/link}" title="{lang}wcf.acp.language.add{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/add.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.language.add{/lang}</span></a></li>
+                                               {/if}
+                                               
+                                               {event name='contentNavigationButtonsBottom'}
+                                       {/content}
                                </ul>
                        </nav>
-               {/if}
+               {/hascontent}
        </div>
 {/if}
 
index 64404eafa8dd5bb140a7bf2361bf0e5b6bf116b8..35faf852bcb02033885dd0f4ee66b1229828c411 100644 (file)
        <p class="success">{lang}wcf.acp.languageServer.{$action}.success{/lang}</p>    
 {/if}
 
-<div class="contentNavigation">
-       <nav>
-               <ul>
-                       <li><a href="{link controller='LanguageServerList'}{/link}" title="{lang}wcf.acp.menu.link.package.server.view{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/list.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.menu.link.package.server.view{/lang}</span></a></li>
-               </ul>
-       </nav>
-</div>
+{hascontent}
+       <div class="contentNavigation">
+               <nav>
+                       <ul>
+                               {content}
+                                       {if $__wcf->session->getPermission('admin.language.canDeleteServer') || $__wcf->session->getPermission('admin.language.canEditServer')}
+                                               <li><a href="{link controller='LanguageServerList'}{/link}" title="{lang}wcf.acp.menu.link.language.server.list{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/list.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.menu.link.language.server.list{/lang}</span></a></li>
+                                       {/if}
+                                       
+                                       {event name='contentNavigationButtons'}
+                               {/content}
+                       </ul>
+               </nav>
+       </div>
+{/hascontent}
 
 <form method="post" action="{if $action == 'add'}{link controller='LanguageServerAdd'}{/link}{else}{link controller='LanguageServerEdit' id=$languageServerID}{/link}{/if}">
        <div class="container containerPadding marginTop shadow">
index 59cea2f681c752738390e9a06dbf768292d7dd27..6186ad2bc65f3611c924261d9afe0d1cf0405934 100644 (file)
 <div class="contentNavigation">
        {pages print=true assign=pagesLinks controller='LanguageServerList' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"}
        
-       {if $__wcf->getSession()->getPermission('admin.language.canAddServer')}
+       {hascontent}
                <nav>
                        <ul>
-                               <li><a href="{link controller='LanguageServerAdd'}{/link}" title="{lang}wcf.acp.languageServer.add{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/add.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.languageServer.add{/lang}</span></a></li>
-                               
-                               {event name='largeButtons'}
+                               {content}
+                                       {if $__wcf->getSession()->getPermission('admin.language.canAddServer')}
+                                               <li><a href="{link controller='LanguageServerAdd'}{/link}" title="{lang}wcf.acp.languageServer.add{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/add.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.languageServer.add{/lang}</span></a></li>
+                                       {/if}
+                                       
+                                       {event name='contentNavigationButtonsTop'}
+                               {/content}
                        </ul>
                </nav>
-       {/if}
+       {/hascontent}
 </div>
 
 {if !$languageServers|count}
        <div class="contentNavigation">
                {@$pagesLinks}
                
-               {if $__wcf->getSession()->getPermission('admin.language.canAddServer')}
+               {hascontent}
                        <nav>
                                <ul>
-                                       <li><a href="{link controller='LanguageServerAdd'}{/link}" title="{lang}wcf.acp.languageServer.add{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/add.svg" alt="" class="icon16" /> <span>{lang}wcf.acp.languageServer.add{/lang}</span></a></li>
-                                       
-                                       {event name='largeButtons'}
+                                       {content}
+                                               {if $__wcf->getSession()->getPermission('admin.language.canAddServer')}
+                                                       <li><a href="{link controller='LanguageServerAdd'}{/link}" title="{lang}wcf.acp.languageServer.add{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/add.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.languageServer.add{/lang}</span></a></li>
+                                               {/if}
+                                               
+                                               {event name='contentNavigationButtonsBottom'}
+                                       {/content}
                                </ul>
                        </nav>
-               {/if}
+               {/hascontent}
        </div>
 {/if}