Add the license page to the menu
authorAlexander Ebert <ebert@woltlab.com>
Tue, 5 Sep 2023 10:16:50 +0000 (12:16 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 5 Sep 2023 10:16:50 +0000 (12:16 +0200)
com.woltlab.wcf/acpMenu.xml
wcfsetup/install/files/acp/templates/license.tpl
wcfsetup/install/files/acp/templates/packageList.tpl
wcfsetup/install/files/lib/acp/page/LicensePage.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 4aecd4dac227ca5596caa22bb0b9c896933c3f50..01712a32bd10bcf26883947d542ce29412f37f92 100644 (file)
                        <parent>wcf.acp.menu.link.package</parent>
                        <permissions>admin.configuration.package.canUpdatePackage,admin.configuration.package.canUninstallPackage</permissions>
                </acpmenuitem>
+               <acpmenuitem name="wcf.acp.menu.link.package.license">
+                       <controller>wcf\acp\page\LicensePage</controller>
+                       <parent>wcf.acp.menu.link.package.list</parent>
+                       <permissions>admin.configuration.package.canEditServer</permissions>
+                       <icon>cart-arrow-down</icon>
+               </acpmenuitem>
                <acpmenuitem name="wcf.acp.menu.link.package.install">
                        <controller>wcf\acp\form\PackageStartInstallForm</controller>
                        <parent>wcf.acp.menu.link.package.list</parent>
index 5294e69cb4e2f861bdc44c1b347114536acbdffc..cb7c41a6dc5b900928515c6e96e2604d7e00098f 100644 (file)
                <nav class="contentHeaderNavigation">
                        <ul>
                                {content}
+                    {if $__wcf->session->getPermission('admin.configuration.package.canEditServer')}
+                                               <li>
+                                                       <a href="{link controller='LicenseEdit'}{/link}" class="button">
+                                                               {icon name='pencil'}
+                                                               <span>{lang}wcf.acp.license.edit{/lang}</span>
+                                                       </a>
+                                               </li>
+                                       {/if}
+
                                        {event name='contentHeaderNavigation'}
                                {/content}
                        </ul>
index 7663b1186e98eb68c8096891d2163ae546625fc6..07b14cb151bc6f22a218e90532b7b84a7e5b530a 100644 (file)
                <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}
+
                                        {if $__wcf->session->getPermission('admin.configuration.package.canUpdatePackage')}
-                                               <li><a href="#" class="button jsButtonSearchForUpdates">{icon name='arrows-rotate'} <span>{lang}wcf.acp.package.searchForUpdates{/lang}</span></a></li>
+                                               <li><button type="button" class="button jsButtonSearchForUpdates">{icon name='arrows-rotate'} <span>{lang}wcf.acp.package.searchForUpdates{/lang}</span></button></li>
                                        {/if}
 
                                        {if $__wcf->session->getPermission('admin.configuration.package.canInstallPackage')}
index ffb68179b2130a64859cd82bd63ddb12154cd4ce..12518e02e8608a1fd26c65a7e2ffe356a22f5845 100644 (file)
@@ -27,8 +27,9 @@ use wcf\system\WCF;
  */
 final class LicensePage extends AbstractPage
 {
-    // TODO: This should be the actual menu item.
-    public $activeMenuItem = 'wcf.acp.menu.link.package';
+    public $activeMenuItem = 'wcf.acp.menu.link.package.license';
+
+    public $neededPermissions = ['admin.configuration.package.canInstallPackage'];
 
     private array $licenseData;
 
index f4d4b9a40583bc3950f4e87bdaed1d514329274e..f3f143abcef356b3bea83efc45b0f5a84331627e 100644 (file)
@@ -1105,6 +1105,7 @@ Die Entwickler-Lizenz gestattet ausschließlich den Einsatz während der Entwick
                <item name="wcf.acp.menu.link.option"><![CDATA[Optionen]]></item>
                <item name="wcf.acp.menu.link.package"><![CDATA[Pakete]]></item>
                <item name="wcf.acp.menu.link.package.install"><![CDATA[Paket installieren]]></item>
+               <item name="wcf.acp.menu.link.package.license"><![CDATA[Lizensierte Produkte]]></item>
                <item name="wcf.acp.menu.link.package.server.list"><![CDATA[Paket-Server]]></item>
                <item name="wcf.acp.menu.link.package.server.add"><![CDATA[Server hinzufügen]]></item>
                <item name="wcf.acp.menu.link.package.list"><![CDATA[Pakete]]></item>
index 0d2b4e629e2537a2bf5b12f765271f77e9836c8c..dd4750688a59ed4f6d7eb2cf62c0c83dc919617f 100644 (file)
@@ -1083,6 +1083,7 @@ The developer license permits exclusively the use during the development as well
                <item name="wcf.acp.menu.link.option"><![CDATA[Options]]></item>
                <item name="wcf.acp.menu.link.package"><![CDATA[Packages]]></item>
                <item name="wcf.acp.menu.link.package.install"><![CDATA[Install Package]]></item>
+               <item name="wcf.acp.menu.link.package.license"><![CDATA[Licensed Products]]></item>
                <item name="wcf.acp.menu.link.package.server.list"><![CDATA[Package Servers]]></item>
                <item name="wcf.acp.menu.link.package.server.add"><![CDATA[Add Server]]></item>
                <item name="wcf.acp.menu.link.package.list"><![CDATA[Packages]]></item>