padding: 0;
}
+.acpDashboardBox[data-name="com.woltlab.wcf.expiringLicenses"] {
+ border-color: var(--wcfStatusErrorBorder);
+
+ .acpDashboardBox__title {
+ background-color: var(--wcfStatusErrorBackground);
+ border-color: var(--wcfStatusErrorBorder);
+ color: var(--wcfStatusErrorText);
+ }
+}
+
.woltlabNewsfeed {
border-radius: 0 0 var(--wcfBorderRadius) var(--wcfBorderRadius);
height: 400px;
display: flex;
flex-direction: column;
}
+
+.acpDashboardBox__explanation {
+ @include wcfFontSmall;
+
+ &.acpDashboardBox__explanation--cta {
+ font-weight: 600;
+ text-align: center;
+ }
+}
+
+.acpDashboardBox__cta {
+ margin-top: 20px;
+ text-align: center;
+}
{hascontent}
<div class="acpDashboardBox__keyValueGroup">
- <h2 class="acpDashboardBox__keyValueGroup_title">{lang}wcf.acp.dashboard.box.expiringLicenses{/lang}</h2>
+ <p class="acpDashboardBox__explanation">
+ {lang}wcf.acp.dashboard.box.expiringLicenses.expiringSoon{/lang}
+ </p>
+ <p class="acpDashboardBox__explanation acpDashboardBox__explanation--cta">
+ {lang}wcf.acp.dashboard.box.expiringLicenses.expiringSoon.cta{/lang}
+ </p>
{content}
{foreach from=$expiringLicenses item=date key=packageName}
<dl class="plain acpDashboardBox__keyValue">
<dd class="acpDashboardBox__keyValue__key">{$packages[$packageName]}</dd>
- <dt class="acpDashboardBox__keyValue__value">{dateInterval end=$date}</dt>
+ <dt class="acpDashboardBox__keyValue__value" title="{$date|plainTime}">{dateInterval end=$date}</dt>
</dl>
{/foreach}
{/content}
{/hascontent}
{hascontent}
<div class="acpDashboardBox__keyValueGroup">
- <h2 class="acpDashboardBox__keyValueGroup_title">{lang}wcf.acp.dashboard.box.expiredLicenses{/lang}</h2>
+ <p class="acpDashboardBox__explanation">
+ {lang}wcf.acp.dashboard.box.expiringLicenses.expired{/lang}
+ </p>
{content}
{foreach from=$expiredLicenses item=date key=packageName}
<dl class="plain acpDashboardBox__keyValue">
{/content}
</div>
{/hascontent}
+
+<div class="acpDashboardBox__cta">
+ <a href="{$ctaLink}" class="button buttonPrimary" rel="nofollow noopener">{lang}wcf.acp.dashboard.box.expiringLicenses.cta{/lang}</a>
+</div>
$eventHandler->register(AcpDashboardCollecting::class, static function (AcpDashboardCollecting $event) {
$event->register(new \wcf\system\acp\dashboard\box\NewsAcpDashboardBox());
$event->register(new \wcf\system\acp\dashboard\box\StatusMessageAcpDashboardBox());
+ $event->register(new \wcf\system\acp\dashboard\box\ExpiringLicensesAcpDashboardBox());
$event->register(new \wcf\system\acp\dashboard\box\UsersAwaitingApprovalAcpDashboardBox());
$event->register(new \wcf\system\acp\dashboard\box\SystemInfoAcpDashboardBox());
$event->register(new \wcf\system\acp\dashboard\box\CreditsAcpDashboardBox());
- $event->register(new \wcf\system\acp\dashboard\box\ExpiringLicensesAcpDashboardBox());
});
try {
*/
abstract class AbstractAcpDashboardBox implements IAcpDashboardBox
{
+ #[\Override]
public function isAccessible(): bool
{
return true;
}
+ #[\Override]
public function hasContent(): bool
{
return true;
*/
final class CreditsAcpDashboardBox extends AbstractAcpDashboardBox
{
+ #[\Override]
public function getTitle(): string
{
return WCF::getLanguage()->get('wcf.acp.dashboard.box.credits');
}
+ #[\Override]
public function getContent(): string
{
return WCF::getTPL()->fetch('creditsAcpDashboardBox');
}
+ #[\Override]
public function getName(): string
{
return 'com.woltlab.wcf.credits';
* ACP dashboard box listing expired and expiring licenses.
*
* @author Olaf Braun
- * @copyright 2001-2023 WoltLab GmbH
+ * @copyright 2001-2024 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @since 6.1
*/
return $this->licenseData;
}
+ #[\Override]
public function getTitle(): string
{
- return WCF::getLanguage()->get('wcf.acp.dashboard.box.expiredLicenses.title');
+ return WCF::getLanguage()->get('wcf.acp.dashboard.box.expiringLicenses');
}
+ #[\Override]
public function getContent(): string
{
$packages = [];
foreach (\array_keys($this->getExpiredLicenses()) as $packageName) {
$packages[$packageName] = PackageCache::getInstance()->getPackageByIdentifier($packageName);
}
+
+ $licenseNo = $this->getLicenseData()->getLicenseNumber();
+ if ($licenseNo === null) {
+ $ctaLink = 'https://www.woltlab.com/license-list/';
+ } else {
+ $ctaLink = \sprintf(
+ 'https://www.woltlab.com/license-extend/%s/',
+ $licenseNo,
+ );
+ }
+
return WCF::getTPL()->fetch('expiringLicensesAcpDashboardBox', 'wcf', [
'packages' => $packages,
'expiredLicenses' => \array_filter($this->getExpiredLicenses(), fn($date) => $date < \TIME_NOW),
'expiringLicenses' => \array_filter($this->getExpiredLicenses(), fn($date) => $date >= \TIME_NOW),
- ]);
+ 'ctaLink' => $ctaLink,
+ ], true);
}
+ #[\Override]
public function getName(): string
{
return 'com.woltlab.wcf.expiringLicenses';
*/
final class NewsAcpDashboardBox extends AbstractAcpDashboardBox
{
+ #[\Override]
public function getTitle(): string
{
return WCF::getLanguage()->get('wcf.acp.dashboard.box.news');
}
+ #[\Override]
public function getContent(): string
{
return WCF::getTPL()->fetch('newsAcpDashboardBox');
}
+ #[\Override]
public function getName(): string
{
return 'com.woltlab.wcf.news';
*/
final class SystemInfoAcpDashboardBox extends AbstractAcpDashboardBox
{
+ #[\Override]
public function getTitle(): string
{
return WCF::getLanguage()->get('wcf.acp.dashboard.box.systemInfo');
}
+ #[\Override]
public function getContent(): string
{
- return WCF::getTPL()->fetch('systemInfoAcpDashboardBox', 'wcf', $this->getVariables());
+ return WCF::getTPL()->fetch('systemInfoAcpDashboardBox', 'wcf', $this->getVariables(), true);
}
+ #[\Override]
public function getName(): string
{
return 'com.woltlab.wcf.systemInfo';
return $this->getUsersAwaitingApproval() !== 0;
}
+ #[\Override]
public function getTitle(): string
{
return WCF::getLanguage()->getDynamicVariable('wcf.acp.dashboard.box.usersAwaitingApproval', [
]);
}
+ #[\Override]
public function getContent(): string
{
$userList = $this->getUserList();
]);
}
+ #[\Override]
public function getName(): string
{
return 'com.woltlab.wcf.usersAwaitingApproval';
<item name="wcf.acp.dashboard.box.statusMessage"><![CDATA[Status]]></item>
<item name="wcf.acp.dashboard.box.missing.extensions"><![CDATA[Die {plural value=$missingExtensions|count one='PHP-Erweiterung' other='PHP-Erweiterungen'} {implode from=$missingExtensions item=extension}<strong>{$extension}</strong>{/implode} {plural value=$missingExtensions|count one='fehlt' other='fehlen'}.]]></item>
<item name="wcf.acp.dashboard.configure"><![CDATA[Dashboard konfigurieren]]></item>
- <item name="wcf.acp.dashboard.box.expiredLicenses.title"><![CDATA[Zugang zu Updates und Support]]></item>
- <item name="wcf.acp.dashboard.box.expiredLicenses"><![CDATA[Nicht mehr berechtigt]]></item>
- <item name="wcf.acp.dashboard.box.expiringLicenses"><![CDATA[Endet demnächst]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses"><![CDATA[Zugang zu Updates und Support]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses.expiringSoon"><![CDATA[Die Lizenzen für die folgenden Produkte laufen demnächst aus, damit {if LANGUAGE_USE_INFORMAL_VARIANT}verlierst du{else}verlieren Sie{/if} den Anspruch auf Updates und den Zugang zum Ticket-Support.]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses.expiringSoon.cta"><![CDATA[Jetzt verlängern und 10% Rabatt sichern!]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses.expired"><![CDATA[Die Lizenzen für die folgenden Produkte sind ausgelaufen und berechtigen nicht länger zum Zugriff auf neue Versionen sowie den Ticket-Support.]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses.cta"><![CDATA[Jetzt Lizenzen verlängern ↗]]></item>
</category>
<category name="wcf.acp.index">
<item name="wcf.acp.index.inRescueMode"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Du rufst{else}Sie rufen{/if} diese Installation über eine abweichende Domain auf, etwa aufgrund eines Umzuges. Bitte {if LANGUAGE_USE_INFORMAL_VARIANT}korrigiere{else}korrigieren Sie{/if} die Einstellungen unter <a href="{link controller='ApplicationManagement'}{/link}">Apps verwalten</a>.]]></item>
<item name="wcf.acp.dashboard.box.statusMessage"><![CDATA[Status]]></item>
<item name="wcf.acp.dashboard.box.missing.extensions"><![CDATA[The PHP {plural value=$missingExtensions|count one='extension' other='extensions'} {implode from=$missingExtensions item=extension}<strong>{$extension}</strong>{/implode} {plural value=$missingExtensions|count one='is' other='are'} missing.]]></item>
<item name="wcf.acp.dashboard.configure"><![CDATA[Configure Dashboard]]></item>
- <item name="wcf.acp.dashboard.box.expiredLicenses.title"><![CDATA[Access to updates and support]]></item>
- <item name="wcf.acp.dashboard.box.expiredLicenses"><![CDATA[No longer authorised]]></item>
- <item name="wcf.acp.dashboard.box.expiringLicenses"><![CDATA[Ends soon]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses"><![CDATA[Access to Updates and Support]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses.expiringSoon"><![CDATA[The licenses for the following products are about to expire and you will lose your entitlement to updates and access to ticket support.]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses.expiringSoon.cta"><![CDATA[Renew now and get a 10% discount!]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses.expired"><![CDATA[The licenses for the following products have expired and no longer entitle you to access new versions and ticket support.]]></item>
+ <item name="wcf.acp.dashboard.box.expiringLicenses.cta"><![CDATA[Renew Licenses Now ↗]]></item>
</category>
<category name="wcf.acp.index">
<item name="wcf.acp.index.inRescueMode"><![CDATA[You are accessing this installation from an unknown domain, possibly caused by moving to a new host. Please update the settings on <a href="{link controller='ApplicationManagement'}{/link}">Manage Apps</a>.]]></item>