mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 04:20:55 +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:
parent
07fc8f17cc
commit
eae82c51f5
2 changed files with 9 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue