1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-22 12:41:19 +01:00

T6895, Comment edit history should not provide action dropdown for transactions.

Summary: Fixes T6895, When viewing comment edit history, user should not see a dropdown for each comment edit transaction.

Test Plan: Edit task comment, view comment edit history, comment transactions should not provide a dropdown with action items.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6895

Differential Revision: https://secure.phabricator.com/D11355
This commit is contained in:
lkassianik 2015-01-12 14:14:36 -08:00 committed by epriestley
parent fa47c26907
commit 98ec225c9c
3 changed files with 25 additions and 3 deletions

View file

@ -68,7 +68,8 @@ final class PhabricatorApplicationTransactionCommentHistoryController
->setUser($user)
->setObjectPHID($obj_phid)
->setTransactions($xactions)
->setShowEditActions(false);
->setShowEditActions(false)
->setHideCommentOptions(true);
$dialog = id(new AphrontDialogView())
->setUser($user)

View file

@ -16,6 +16,7 @@ class PhabricatorApplicationTransactionView extends AphrontView {
private $pager;
private $renderAsFeed;
private $renderData = array();
private $hideCommentOptions = false;
public function setRenderAsFeed($feed) {
$this->renderAsFeed = $feed;
@ -107,6 +108,15 @@ class PhabricatorApplicationTransactionView extends AphrontView {
return $this->renderData;
}
public function setHideCommentOptions($hide_comment_options) {
$this->hideCommentOptions = $hide_comment_options;
return $this;
}
public function getHideCommentOptions() {
return $this->hideCommentOptions;
}
public function buildEvents($with_hiding = false) {
$user = $this->getUser();
@ -388,7 +398,8 @@ class PhabricatorApplicationTransactionView extends AphrontView {
->setTransactionPHID($xaction->getPHID())
->setUserHandle($xaction->getHandle($xaction->getAuthorPHID()))
->setIcon($xaction->getIcon())
->setColor($xaction->getColor());
->setColor($xaction->getColor())
->setHideCommentOptions($this->getHideCommentOptions());
list($token, $token_removed) = $xaction->getToken();
if ($token) {

View file

@ -25,6 +25,7 @@ final class PHUITimelineEventView extends AphrontView {
private $isNormalComment;
private $quoteRef;
private $reallyMajorEvent;
private $hideCommentOptions = false;
public function setQuoteRef($quote_ref) {
$this->quoteRef = $quote_ref;
@ -164,6 +165,15 @@ final class PHUITimelineEventView extends AphrontView {
return $this;
}
public function setHideCommentOptions($hide_comment_options) {
$this->hideCommentOptions = $hide_comment_options;
return $this;
}
public function getHideCommentOptions() {
return $this->hideCommentOptions;
}
public function setToken($token, $removed = false) {
$this->token = $token;
$this->tokenRemoved = $removed;
@ -259,7 +269,7 @@ final class PHUITimelineEventView extends AphrontView {
$menu = null;
$items = array();
$has_menu = false;
if (!$this->getIsPreview()) {
if (!$this->getIsPreview() && !$this->getHideCommentOptions()) {
foreach ($this->getEventGroup() as $event) {
$items[] = $event->getMenuItems($this->anchor);
if ($event->hasChildren()) {