</dd>
</dl>
+ <dl class="col-xs-12 col-md-4">
+ <dt></dt>
+ <dd>
+ <select name="publicationStatus" id="publicationStatus">
+ <option value="-1">{lang}wcf.acp.article.publicationStatus{/lang}</option>
+
+ <option value="0"{if $publicationStatus == 0} selected{/if}>{lang}wcf.acp.article.publicationStatus.unpublished{/lang}</option>
+ <option value="1"{if $publicationStatus == 1} selected{/if}>{lang}wcf.acp.article.publicationStatus.published{/lang}</option>
+ <option value="2"{if $publicationStatus == 2} selected{/if}>{lang}wcf.acp.article.publicationStatus.delayed{/lang}</option>
+ </select>
+ </dd>
+ </dl>
+
{event name='filterFields'}
</div>
{if $title}{capture append=linkParameters}&title={@$title|rawurlencode}{/capture}{/if}
{if $content}{capture append=linkParameters}&content={@$content|rawurlencode}{/capture}{/if}
{if $username}{capture append=linkParameters}&username={@$username|rawurlencode}{/capture}{/if}
+ {if $publicationStatus != -1}{capture append=linkParameters}&publicationStatus={@$publicationStatus}{/capture}{/if}
{pages print=true assign=pagesLinks controller="ArticleList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$linkParameters"}
{/content}
</span>
<div class="containerHeadline">
- <h3><a href="{link controller='ArticleEdit' id=$article->articleID}{/link}" title="{lang}wcf.acp.article.edit{/lang}" class="jsTooltip">{$article->title}</a></h3>
+ <h3>
+ {if $article->publicationStatus == 0}<span class="badge">{lang}wcf.acp.article.publicationStatus.unpublished{/lang}</span>{/if}
+ {if $article->publicationStatus == 2}<span class="badge" title="{$article->publicationDate|plainTime}">{lang}wcf.acp.article.publicationStatus.delayed{/lang}</span>{/if}
+ <a href="{link controller='ArticleEdit' id=$article->articleID}{/link}" title="{lang}wcf.acp.article.edit{/lang}" class="jsTooltip">{$article->title}</a>
+ </h3>
<ul class="inlineList dotSeparated">
{if $article->categoryID}
<li>{$article->getCategory()->getTitle()}</li>
*/
public $showArticleAddDialog = 0;
+ /**
+ * publication status filter
+ * @var integer
+ */
+ public $publicationStatus = -1;
+
/**
* @inheritDoc
*/
if (!empty($_REQUEST['title'])) $this->title = StringUtil::trim($_REQUEST['title']);
if (!empty($_REQUEST['content'])) $this->content = StringUtil::trim($_REQUEST['content']);
if (!empty($_REQUEST['showArticleAddDialog'])) $this->showArticleAddDialog = 1;
+ if (isset($_REQUEST['publicationStatus'])) $this->publicationStatus = intval($_REQUEST['publicationStatus']);
}
/**
}
$this->objectList->sqlSelects = "(SELECT title FROM wcf".WCF_N."_article_content WHERE articleID = article.articleID AND (languageID IS NULL OR languageID = ".WCF::getLanguage()->languageID.") LIMIT 1) AS title";
+
+ if ($this->publicationStatus != -1) {
+ $this->objectList->getConditionBuilder()->add('article.publicationStatus = ?', [$this->publicationStatus]);
+ }
}
/**
'content' => $this->content,
'showArticleAddDialog' => $this->showArticleAddDialog,
'availableLanguages' => LanguageFactory::getInstance()->getLanguages(),
- 'categoryNodeList' => (new CategoryNodeTree('com.woltlab.wcf.article.category'))->getIterator()
+ 'categoryNodeList' => (new CategoryNodeTree('com.woltlab.wcf.article.category'))->getIterator(),
+ 'publicationStatus' => $this->publicationStatus
]);
}
}