<interfacename><![CDATA[wcf\system\tagging\ITaggable]]></interfacename>
</definition>
+ <definition>
+ <name>com.woltlab.wcf.deletedContent</name>
+ <interfacename><![CDATA[wcf\system\moderation\IDeletedContentProvider]]></interfacename>
+ </definition>
+
<definition>
<name>com.woltlab.wcf.searchableObjectType</name>
<interfacename><![CDATA[wcf\system\search\ISearchableObjectType]]></interfacename>
--- /dev/null
+{include file='documentHeader'}
+
+<head>
+ <title>{lang}wcf.moderation.deletedContent.objectType.{@$objectType}{/lang} - {PAGE_TITLE|language}</title>
+
+ {include file='headInclude'}
+</head>
+
+<body id="tpl{$templateName|ucfirst}">
+
+{capture assign='sidebar'}
+ <fieldset>
+ <legend>{lang}wcf.moderation.deletedContent.objectTypes{/lang}</legend>
+
+ <nav>
+ <ul>
+ {foreach from=$availableObjectTypes item=availableObjectType}
+ <li{if $objectType == $availableObjectType->objectType} class="active"{/if}><a href="{link controller='DeletedContentList'}objectType={@$availableObjectType->objectType}{/link}">{lang}wcf.moderation.deletedContent.objectType.{@$availableObjectType->objectType}{/lang}</a></li>
+ {/foreach}
+ </ul>
+ </nav>
+ </fieldset>
+{/capture}
+
+{include file='header' sidebarOrientation='left'}
+
+<header class="boxHeadline">
+ <h1>{lang}wcf.moderation.deletedContent.{@$objectType}{/lang}</h1>
+</header>
+
+{include file='userNotice'}
+
+<div class="contentNavigation">
+ {pages print=true assign=pagesLinks controller='DeletedContentList' link="objectType=$objectType&pageNo=%d"}
+
+ {hascontent}
+ <nav>
+ <ul>
+ {content}
+ {event name='contentNavigationButtonsTop'}
+ {/content}
+ </ul>
+ </nav>
+ {/hascontent}
+</div>
+
+{if $items}
+ {include file=$resultListTemplateName application=$resultListApplication}
+{else}
+ <p class="info">{lang}wcf.global.noItems{/lang}</p>
+{/if}
+
+<div class="contentNavigation">
+ {@$pagesLinks}
+
+ {hascontent}
+ <nav>
+ <ul>
+ {content}
+ {event name='contentNavigationButtonsBottom'}
+ {/content}
+ </ul>
+ </nav>
+ {/hascontent}
+</div>
+
+{include file='footer'}
+
+</body>
+</html>
\ No newline at end of file
$(function() {
WCF.Language.addObject({
'wcf.moderation.noMoreItems': '{lang}wcf.moderation.noMoreItems{/lang}',
- 'wcf.moderation.showAll': '{lang}wcf.moderation.showAll{/lang}'
+ 'wcf.moderation.showAll': '{lang}wcf.moderation.showAll{/lang}',
+ 'wcf.moderation.showDeletedContent': '{lang}wcf.moderation.showDeletedContent{/lang}'
});
- new WCF.Moderation.UserPanel('{link controller='ModerationList'}{/link}');
+ new WCF.Moderation.UserPanel('{link controller='ModerationList'}{/link}', '{link controller='DeletedContentList'}{/link}');
});
//]]>
</script>
*/
_showAllLink: '',
+ /**
+ * link to deleted content list
+ * @var string
+ */
+ _deletedContentLink: '',
+
/**
* @see WCF.UserPanel.init()
*/
- init: function(showAllLink) {
+ init: function(showAllLink, deletedContentLink) {
this._noItems = 'wcf.moderation.noMoreItems';
this._showAllLink = showAllLink;
+ this._deletedContentLink = deletedContentLink;
this._super('outstandingModeration');
},
_addDefaultItems: function(dropdownMenu) {
this._addDivider(dropdownMenu);
$('<li><a href="' + this._showAllLink + '">' + WCF.Language.get('wcf.moderation.showAll') + '</a></li>').appendTo(dropdownMenu);
+ this._addDivider(dropdownMenu);
+ $('<li><a href="' + this._deletedContentLink + '">' + WCF.Language.get('wcf.moderation.showDeletedContent') + '</a></li>').appendTo(dropdownMenu);
},
/**
--- /dev/null
+<?php
+namespace wcf\page;
+use wcf\data\object\type\ObjectTypeCache;
+use wcf\system\exception\IllegalLinkException;
+use wcf\system\WCF;
+
+/**
+ * List of deleted content.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2013 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage page
+ * @category Community Framework
+ */
+class DeletedContentListPage extends MultipleLinkPage {
+ /**
+ * @see wcf\page\AbstractPage::$loginRequired
+ */
+ public $loginRequired = true;
+
+ /**
+ * @see wcf\page\AbstractPage::$neededPermissions
+ */
+ public $neededPermissions = array('mod.general.canUseModeration');
+
+ /**
+ * object type object
+ * @var wcf\data\object\type\ObjectType
+ */
+ public $objectType = null;
+
+ /**
+ * @see wcf\page\IPage::readParameters()
+ */
+ public function readParameters() {
+ parent::readParameters();
+
+ // get object type
+ if (isset($_REQUEST['objectType'])) {
+ $this->objectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.deletedContent', $_REQUEST['objectType']);
+ if ($this->objectType === null) {
+ throw new IllegalLinkException();
+ }
+ }
+ else {
+ // use first object type
+ $objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.deletedContent');
+ $this->objectType = reset($objectTypes);
+ }
+ }
+
+ /**
+ * @see wcf\page\MultipleLinkPage::readParameters()
+ */
+ protected function initObjectList() {
+ $this->objectList = $this->objectType->getProcessor()->getObjectList();
+ }
+
+ /**
+ * @see wcf\page\IPage::assignVariables()
+ */
+ public function assignVariables() {
+ parent::assignVariables();
+
+ WCF::getTPL()->assign(array(
+ 'availableObjectTypes' => ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.deletedContent'),
+ 'objectType' => $this->objectType->objectType,
+ 'resultListTemplateName' => $this->objectType->getProcessor()->getTemplateName(),
+ 'resultListApplication' => $this->objectType->getProcessor()->getApplication()
+ ));
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\moderation;
+
+/**
+ * Interface for deleted content provider.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2013 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.moderation
+ * @category Community Framework
+ */
+interface IDeletedContentProvider {
+ /**
+ * Returns a list of deleted content.
+ *
+ * @return wcf\data\DatabaseObjectList
+ */
+ public function getObjectList();
+
+ /**
+ * Returns the template name for the result output.
+ *
+ * @return string
+ */
+ public function getTemplateName();
+
+ /**
+ * Returns the application of the result template.
+ *
+ * @return string
+ */
+ public function getApplication();
+}
<item name="wcf.moderation.type.com.woltlab.wcf.comment.comment"><![CDATA[Kommentar]]></item>
<item name="wcf.moderation.type.com.woltlab.wcf.comment.response"><![CDATA[Antwort auf Kommentar]]></item>
<item name="wcf.moderation.showAll"><![CDATA[Alle Einträge anzeigen]]></item>
+ <item name="wcf.moderation.showDeletedContent"><![CDATA[Gelöschte Inhalte anzeigen]]></item>
+ <item name="wcf.moderation.deletedContent.objectTypes"><![CDATA[Gelöschte Inhalte]]></item>
</category>
<category name="wcf.moderation.activation">
<item name="wcf.moderation.type.com.woltlab.wcf.comment.comment"><![CDATA[Comment]]></item>
<item name="wcf.moderation.type.com.woltlab.wcf.comment.response"><![CDATA[Comment Reply]]></item>
<item name="wcf.moderation.showAll"><![CDATA[Show All Items]]></item>
+ <item name="wcf.moderation.showDeletedContent"><![CDATA[TODO: Gelöschte Inhalte anzeigen]]></item>
+ <item name="wcf.moderation.deletedContent.objectTypes"><![CDATA[TODO: Gelöschte Inhalte]]></item>
</category>
<category name="wcf.moderation.activation">