Differential D16524 Diff 39770 src/applications/phriction/controller/PhrictionDocumentController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/controller/PhrictionDocumentController.php
Show First 20 Lines • Show All 300 Lines • ▼ Show 20 Lines | if ($document->getStatus() == PhrictionDocumentStatus::STATUS_EXISTS) { | ||||
id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
->setName(pht('Delete Document')) | ->setName(pht('Delete Document')) | ||||
->setDisabled(!$can_edit) | ->setDisabled(!$can_edit) | ||||
->setIcon('fa-times') | ->setIcon('fa-times') | ||||
->setHref('/phriction/delete/'.$document->getID().'/') | ->setHref('/phriction/delete/'.$document->getID().'/') | ||||
->setWorkflow(true)); | ->setWorkflow(true)); | ||||
} | } | ||||
return | |||||
$action_view->addAction( | $action_view->addAction( | ||||
id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
->setName(pht('View History')) | ->setName(pht('View History')) | ||||
->setIcon('fa-list') | ->setIcon('fa-list') | ||||
->setHref(PhrictionDocument::getSlugURI($slug, 'history'))); | ->setHref(PhrictionDocument::getSlugURI($slug, 'history'))); | ||||
$print_uri = PhrictionDocument::getSlugURI($slug).'?__print__=1'; | |||||
$action_view->addAction( | |||||
id(new PhabricatorActionView()) | |||||
->setName(pht('Printable Page')) | |||||
->setIcon('fa-print') | |||||
->setOpenInNewWindow(true) | |||||
->setHref($print_uri)); | |||||
return $action_view; | |||||
} | } | ||||
private function renderDocumentChildren($slug) { | private function renderDocumentChildren($slug) { | ||||
$d_child = PhabricatorSlug::getDepth($slug) + 1; | $d_child = PhabricatorSlug::getDepth($slug) + 1; | ||||
$d_grandchild = PhabricatorSlug::getDepth($slug) + 2; | $d_grandchild = PhabricatorSlug::getDepth($slug) + 2; | ||||
$limit = 250; | $limit = 250; | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |