Changeset View
Changeset View
Standalone View
Standalone View
src/applications/meta/query/PhabricatorAppSearchEngine.php
| Show First 20 Lines • Show All 220 Lines • ▼ Show 20 Lines | foreach ($groups as $group => $applications) { | ||||
| $icon_view = javelin_tag( | $icon_view = javelin_tag( | ||||
| 'span', | 'span', | ||||
| array( | array( | ||||
| 'class' => 'phui-icon-view phui-font-fa '.$icon, | 'class' => 'phui-icon-view phui-font-fa '.$icon, | ||||
| 'aural' => false, | 'aural' => false, | ||||
| ), | ), | ||||
| ''); | ''); | ||||
| $description = phutil_tag( | $description = $application->getShortDescription(); | ||||
| 'div', | |||||
| array( | $configure = id(new PHUIButtonView()) | ||||
| 'style' => 'white-space: nowrap; '. | ->setTag('a') | ||||
| 'overflow: hidden; '. | ->setHref('/applications/view/'.get_class($application).'/') | ||||
| 'text-overflow: ellipsis;', | ->setText(pht('Configure')) | ||||
epriestley: Maybe just call this "Configure"? The "Configure / Help" feels a touch weird. | |||||
| ), | ->setColor(PHUIButtonView::GREY); | ||||
| $application->getShortDescription()); | |||||
| $name = $application->getName(); | |||||
| if ($application->isPrototype()) { | |||||
| $name = $name.' '.pht('(Prototype)'); | |||||
| } | |||||
| $item = id(new PHUIObjectItemView()) | $item = id(new PHUIObjectItemView()) | ||||
| ->setHeader($application->getName()) | ->setHeader($name) | ||||
| ->setImageIcon($icon_view) | ->setImageIcon($icon_view) | ||||
| ->addAttribute($description) | ->setSubhead($description) | ||||
| ->addAction( | ->setLaunchButton($configure); | ||||
| id(new PHUIListItemView()) | |||||
| ->setName(pht('Help/Options')) | |||||
| ->setIcon('fa-cog') | |||||
| ->setHref('/applications/view/'.get_class($application).'/')); | |||||
| if ($application->getBaseURI() && $application->isInstalled()) { | if ($application->getBaseURI() && $application->isInstalled()) { | ||||
| $item->setHref($application->getBaseURI()); | $item->setHref($application->getBaseURI()); | ||||
| } | } | ||||
| if (!$application->isInstalled()) { | if (!$application->isInstalled()) { | ||||
| $item->addIcon('fa-times', pht('Uninstalled')); | $item->addAttribute(pht('Uninstalled')); | ||||
| } | $item->setDisabled(true); | ||||
| if ($application->isPrototype()) { | |||||
| $item->addIcon('fa-bomb grey', pht('Prototype')); | |||||
| } | } | ||||
| if (!$application->isFirstParty()) { | if (!$application->isFirstParty()) { | ||||
| $item->addIcon('fa-puzzle-piece', pht('Extension')); | $item->addAttribute(pht('Extension')); | ||||
| } | } | ||||
| $list->addItem($item); | $list->addItem($item); | ||||
| } | } | ||||
| $results[] = $list; | $results[] = $list; | ||||
| } | } | ||||
| $result = new PhabricatorApplicationSearchResultView(); | $result = new PhabricatorApplicationSearchResultView(); | ||||
| $result->setContent($results); | $result->setContent($results); | ||||
| return $result; | return $result; | ||||
| } | } | ||||
| } | } | ||||
Maybe just call this "Configure"? The "Configure / Help" feels a touch weird.