1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 13:22:42 +01:00

Minor quality of life updates to Phurl

Summary: Default to "All" (maybe "Active" in the future). Adds more info to results.

Test Plan: visit /phurl/, see additional information about URL

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15713
This commit is contained in:
Chad Little 2016-04-14 18:25:22 +00:00 committed by chad
parent 07fc8f17cc
commit eae82c51f5
2 changed files with 9 additions and 3 deletions

View file

@ -114,7 +114,7 @@ final class PhabricatorPhurlURLViewController
$curtain
->addAction(
id(new PhabricatorActionView())
->setName(pht('Edit'))
->setName(pht('Edit Phurl'))
->setIcon('fa-pencil')
->setHref($this->getApplicationURI("url/edit/{$id}/"))
->setDisabled(!$can_edit)

View file

@ -44,8 +44,8 @@ final class PhabricatorPhurlURLSearchEngine
protected function getBuiltinQueryNames() {
$names = array(
'authored' => pht('Authored'),
'all' => pht('All URLs'),
'authored' => pht('Authored'),
);
return $names;
@ -77,10 +77,16 @@ final class PhabricatorPhurlURLSearchEngine
$handles = $viewer->loadHandles(mpull($urls, 'getAuthorPHID'));
foreach ($urls as $url) {
$name = $url->getName();
$item = id(new PHUIObjectItemView())
->setUser($viewer)
->setObject($url)
->setHeader($viewer->renderHandle($url->getPHID()));
->setObjectName('U'.$url->getID())
->setHeader($name)
->setHref('/U'.$url->getID())
->addAttribute($url->getAlias())
->addAttribute($url->getLongURL());
$list->addItem($item);
}