{include file='header'}
+{if !$article->isPublished()}
+ <p class="info">{lang publicationDate=$article->publicationDate}wcf.article.publicationStatus.{@$article->publicationStatus}{/lang}</p>
+{/if}
+
<div class="section">
{if $articleContent->teaser}
<div class="section articleTeaserContainer">
<div class="contentItemBadges">
{content}
{if $article->isDeleted}<span class="badge label red contentItemBadge contentItemBadgeIsDeleted">{lang}wcf.message.status.deleted{/lang}</span>{/if}
+ {if !$article->isPublished()}<span class="badge label green contentItemBadge contentItemBadgeIsDisabled">{lang}wcf.message.status.disabled{/lang}</span>{/if}
{if ARTICLE_ENABLE_VISIT_TRACKING && $article->isNew()}<span class="badge label contentItemBadge contentItemBadgeNew">{lang}wcf.message.new{/lang}</span>{/if}
{event name='contentItemBadges'}
}
else {
$this->getConditionBuilder()->add('article.categoryID IN (?)', [$accessibleCategoryIDs]);
- $this->getConditionBuilder()->add('article.publicationStatus = ?', [Article::PUBLISHED]);
if (!WCF::getSession()->getPermission('admin.content.article.canManageArticle')) {
- $this->getConditionBuilder()->add('article.isDeleted = ?', [0]);
+ if (WCF::getSession()->getPermission('admin.content.article.canManageOwnArticles')) {
+ $this->getConditionBuilder()->add('(article.userID = ? OR (article.isDeleted = ? AND article.publicationStatus = ?))', [WCF::getUser()->userID, 0, Article::PUBLISHED]);
+ }
+ else {
+ $this->getConditionBuilder()->add('article.isDeleted = ?', [0]);
+ $this->getConditionBuilder()->add('article.publicationStatus = ?', [Article::PUBLISHED]);
+ }
}
}
}
return !empty($this->labels);
}
+ /**
+ * @return bool
+ * @since 5.2
+ */
+ public function isPublished() {
+ return $this->publicationStatus == Article::PUBLISHED;
+ }
+
/**
* Returns the number of unread articles.
*
<item name="wcf.article.search.error.tooShort"><![CDATA[Der Suchbegriff ist zu kurz.]]></item>
<item name="wcf.article.search.name"><![CDATA[Titel durchsuchen]]></item>
<item name="wcf.article.search.results"><![CDATA[Suchergebnisse]]></item>
+ <item name="wcf.article.publicationStatus.0"><![CDATA[Dieser Artikel wurde noch nicht veröffentlicht.]]></item>
+ <item name="wcf.article.publicationStatus.2"><![CDATA[Dieser Artikel wird am {@$publicationDate|plainTime} veröffentlicht.]]></item>
</category>
<category name="wcf.attachment">
<item name="wcf.attachment.file.info"><![CDATA[({@$attachment->filesize|filesize}, <b>{#$attachment->downloads}</b> Mal heruntergeladen{if $attachment->downloads > 0}, zuletzt: {@$attachment->lastDownloadTime|time}{/if})]]></item>
<item name="wcf.article.search.error.tooShort"><![CDATA[The entered keyword is too short.]]></item>
<item name="wcf.article.search.name"><![CDATA[Search Titles]]></item>
<item name="wcf.article.search.results"><![CDATA[Search Results]]></item>
+ <item name="wcf.article.publicationStatus.0"><![CDATA[This article has not been published yet.]]></item>
+ <item name="wcf.article.publicationStatus.2"><![CDATA[This article will be published on {@$publicationDate|plainTime}.]]></item>
</category>
<category name="wcf.attachment">
<item name="wcf.attachment.file.info"><![CDATA[({@$attachment->filesize|filesize}, downloaded <b>{#$attachment->downloads}</b> times{if $attachment->downloads > 0}, last: {@$attachment->lastDownloadTime|time}{/if})]]></item>