Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | public function render() { | ||||
if ($this->editable && !$is_preview) { | if ($this->editable && !$is_preview) { | ||||
$menu_items[] = array( | $menu_items[] = array( | ||||
'label' => pht('Edit Comment'), | 'label' => pht('Edit Comment'), | ||||
'icon' => 'fa-pencil', | 'icon' => 'fa-pencil', | ||||
'action' => 'edit', | 'action' => 'edit', | ||||
'key' => 'e', | 'key' => 'e', | ||||
); | ); | ||||
$menu_items[] = array( | |||||
'label' => pht('Delete Comment'), | |||||
'icon' => 'fa-trash-o', | |||||
'action' => 'delete', | |||||
); | |||||
} else if ($is_preview) { | } else if ($is_preview) { | ||||
$links[] = javelin_tag( | $links[] = javelin_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'class' => 'inline-button-divider pml msl', | 'class' => 'inline-button-divider pml msl', | ||||
'meta' => array( | 'meta' => array( | ||||
'inlineCommentID' => $inline->getID(), | 'inlineCommentID' => $inline->getID(), | ||||
), | ), | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | if ($can_reply) { | ||||
$menu_items[] = array( | $menu_items[] = array( | ||||
'label' => pht('Quote Comment'), | 'label' => pht('Quote Comment'), | ||||
'icon' => 'fa-quote-left', | 'icon' => 'fa-quote-left', | ||||
'action' => 'quote', | 'action' => 'quote', | ||||
'key' => 'R', | 'key' => 'R', | ||||
); | ); | ||||
} | } | ||||
if (!$is_preview) { | |||||
$xaction_phid = $inline->getTransactionPHID(); | |||||
$storage = $inline->getStorageObject(); | |||||
if ($xaction_phid) { | |||||
$menu_items[] = array( | |||||
'label' => pht('View Raw Remarkup'), | |||||
'icon' => 'fa-code', | |||||
'action' => 'raw', | |||||
'uri' => $storage->getRawRemarkupURI(), | |||||
); | |||||
} | |||||
} | |||||
if ($this->editable && !$is_preview) { | |||||
$menu_items[] = array( | |||||
'label' => pht('Delete Comment'), | |||||
'icon' => 'fa-trash-o', | |||||
'action' => 'delete', | |||||
); | |||||
} | |||||
$done_button = null; | $done_button = null; | ||||
$mark_done = $this->getCanMarkDone(); | $mark_done = $this->getCanMarkDone(); | ||||
// Allow users to mark their own draft inlines as "Done". | // Allow users to mark their own draft inlines as "Done". | ||||
if ($viewer_phid == $inline->getAuthorPHID()) { | if ($viewer_phid == $inline->getAuthorPHID()) { | ||||
if ($inline->isDraft()) { | if ($inline->isDraft()) { | ||||
$mark_done = true; | $mark_done = true; | ||||
▲ Show 20 Lines • Show All 233 Lines • Show Last 20 Lines |