1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01:00

Add edit-pencil to ApplicationSearch for PhamePosts

Summary: Adds a quick edit link to PhamePosts in ApplicationSearch

Test Plan: Review a few searches, click on pencil.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16109
This commit is contained in:
Chad Little 2016-06-13 12:00:14 -07:00
parent 63d413e201
commit 74682d46ae

View file

@ -104,15 +104,19 @@ final class PhamePostSearchEngine
if ($post->isDraft()) { if ($post->isDraft()) {
$item->setStatusIcon('fa-star-o grey'); $item->setStatusIcon('fa-star-o grey');
$item->setDisabled(true); $item->setDisabled(true);
$item->addIcon('none', pht('Draft Post')); $item->addIcon('fa-star-o', pht('Draft Post'));
} else if ($post->isArchived()) { } else if ($post->isArchived()) {
$item->setStatusIcon('fa-ban grey'); $item->setStatusIcon('fa-ban grey');
$item->setDisabled(true); $item->setDisabled(true);
$item->addIcon('none', pht('Archived Post')); $item->addIcon('fa-ban', pht('Archived Post'));
} else { } else {
$date = $post->getDatePublished(); $date = $post->getDatePublished();
$item->setEpoch($date); $item->setEpoch($date);
} }
$item->addAction(
id(new PHUIListItemView())
->setIcon('fa-pencil')
->setHref($post->getEditURI()));
$list->addItem($item); $list->addItem($item);
} }