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

Make Legalpad documents have a little document icon in typeaheads

Summary: Ref T3116.

Test Plan: See screenshot.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T3116

Differential Revision: https://secure.phabricator.com/D9773
This commit is contained in:
epriestley 2014-06-28 21:44:09 -07:00
parent 88d9366701
commit bd9584d663

View file

@ -264,11 +264,11 @@ final class PhabricatorTypeaheadCommonDatasourceController
$documents = id(new LegalpadDocumentQuery()) $documents = id(new LegalpadDocumentQuery())
->setViewer($viewer) ->setViewer($viewer)
->execute(); ->execute();
$documents = mpull($documents, 'getTitle', 'getPHID'); foreach ($documents as $document) {
foreach ($documents as $phid => $title) {
$results[] = id(new PhabricatorTypeaheadResult()) $results[] = id(new PhabricatorTypeaheadResult())
->setPHID($phid) ->setPHID($document->getPHID())
->setName($title); ->setIcon('fa-file-text-o')
->setName($document->getMonogram().' '.$document->getTitle());
} }
} }