Improve the navigation between `License` and `LicenseEdit`
authorAlexander Ebert <ebert@woltlab.com>
Fri, 8 Sep 2023 11:20:44 +0000 (13:20 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 8 Sep 2023 11:20:44 +0000 (13:20 +0200)
wcfsetup/install/files/acp/templates/licenseEdit.tpl
wcfsetup/install/files/lib/acp/form/LicenseEditForm.class.php

index 335f2a5ad1f5420814c405bce833a78d4cdcba5b..11721289ab5f1e3b2e460b28c40c4a73e551e612 100644 (file)
@@ -4,6 +4,25 @@
        <div class="contentHeaderTitle">
                <h1 class="contentTitle">{lang}wcf.acp.license.edit{/lang}</h1>
        </div>
+
+       {hascontent}
+               <nav class="contentHeaderNavigation">
+                       <ul>
+                               {content}
+                                       {if $__wcf->session->getPermission('admin.configuration.package.canInstallPackage')}
+                                               <li>
+                                                       <a href="{link controller='License'}{/link}" class="button">
+                                                               {icon name='cart-arrow-down'}
+                                                               <span>{lang}wcf.acp.license{/lang}</span>
+                                                       </a>
+                                               </li>
+                                       {/if}
+
+                                       {event name='contentHeaderNavigation'}
+                               {/content}
+                       </ul>
+               </nav>
+       {/hascontent}
 </header>
 
 {@$form->getHtml()}
index 02f1a376da2328bfe5719a2aac9ba5d424e4172e..987f7fa7c9e51083e7ccc551432687039ed62cf1 100644 (file)
@@ -258,16 +258,4 @@ final class LicenseEditForm extends AbstractFormBuilderForm
             return new RedirectResponse($this->url);
         }
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function assignVariables()
-    {
-        parent::assignVariables();
-
-        WCF::getTPL()->assign([
-            'url' => $this->url,
-        ]);
-    }
 }