<th class="columnDate columnStartDom{if $sortField == 'startDom'} active {@$sortOrder}{/if}" title="{lang}wcf.acp.cronjob.startDom{/lang}"><a href="{link controller='CronjobList'}pageNo={@$pageNo}&sortField=startDom&sortOrder={if $sortField == 'startDom' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.cronjob.startDomShort{/lang}</a></th>
<th class="columnDate columnStartMonth{if $sortField == 'startMonth'} active {@$sortOrder}{/if}" title="{lang}wcf.acp.cronjob.startMonth{/lang}"><a href="{link controller='CronjobList'}pageNo={@$pageNo}&sortField=startMonth&sortOrder={if $sortField == 'startMonth' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.cronjob.startMonthShort{/lang}</a></th>
<th class="columnDate columnStartDow{if $sortField == 'startDow'} active {@$sortOrder}{/if}" title="{lang}wcf.acp.cronjob.startDow{/lang}"><a href="{link controller='CronjobList'}pageNo={@$pageNo}&sortField=startDow&sortOrder={if $sortField == 'startDow' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.cronjob.startDowShort{/lang}</a></th>
- <th class="columnText columnDescription">{lang}wcf.acp.cronjob.description{/lang}</th>
+ <th class="columnText columnDescription{if $sortField == 'descriptionI18n'} active {@$sortOrder}{/if}"><a href="{link controller='CronjobList'}pageNo={@$pageNo}&sortField=descriptionI18n&sortOrder={if $sortField == 'descriptionI18n' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.cronjob.description{/lang}</a></th>
<th class="columnDate columnNextExec{if $sortField == 'nextExec'} active {@$sortOrder}{/if}"><a href="{link controller='CronjobList'}pageNo={@$pageNo}&sortField=nextExec&sortOrder={if $sortField == 'nextExec' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.cronjob.nextExec{/lang}</a></th>
{event name='columnHeads'}
<?php
namespace wcf\acp\page;
-use wcf\data\cronjob\CronjobList;
+use wcf\data\cronjob\I18nCronjobList;
use wcf\page\SortablePage;
/**
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Acp\Page
*
- * @property CronjobList $objectList
+ * @property I18nCronjobList $objectList
*/
class CronjobListPage extends SortablePage {
/**
/**
* @inheritDoc
*/
- public $defaultSortField = 'cronjobID';
+ public $defaultSortField = 'descriptionI18n';
/**
* @inheritDoc
/**
* @inheritDoc
*/
- public $validSortFields = ['cronjobID', 'nextExec', 'startMinute', 'startHour', 'startDom', 'startMonth', 'startDow'];
+ public $validSortFields = ['cronjobID', 'nextExec', 'startMinute', 'startHour', 'startDom', 'startMonth', 'startDow', 'descriptionI18n'];
/**
* @inheritDoc
*/
- public $objectListClassName = CronjobList::class;
+ public $objectListClassName = I18nCronjobList::class;
/**
* @inheritDoc
<?php
namespace wcf\acp\page;
use wcf\data\cronjob\CronjobList;
+use wcf\data\cronjob\I18nCronjobList;
use wcf\data\cronjob\log\CronjobLogList;
use wcf\page\SortablePage;
use wcf\system\WCF;
public function readData() {
parent::readData();
- $this->availableCronjobs = new CronjobList();
- $this->availableCronjobs->sqlOrderBy = 'cronjobID';
+ $this->availableCronjobs = new I18nCronjobList();
+ $this->availableCronjobs->sqlOrderBy = 'descriptionI18n';
$this->availableCronjobs->readObjects();
}
--- /dev/null
+<?php
+namespace wcf\data\cronjob;
+use wcf\data\I18nDatabaseObjectList;
+
+/**
+ * I18n implementation of cronjob list.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2020 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\Data\Cronjob
+ * @since 5.3
+ *
+ * @method Cronjob current()
+ * @method Cronjob[] getObjects()
+ * @method Cronjob|null search($objectID)
+ * @property Cronjob[] $objects
+ */
+class I18nCronjobList extends I18nDatabaseObjectList {
+ /**
+ * @inheritDoc
+ */
+ public $i18nFields = ['description' => 'descriptionI18n'];
+
+ /**
+ * @inheritDoc
+ */
+ public $className = Cronjob::class;
+}