public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case PhabricatorTransactions::TYPE_CREATE:
             return 'fa-plus';
             break;
         case self::TYPE_HEADERIMAGE:
             return 'fa-camera-retro';
             break;
         case self::TYPE_VISIBILITY:
             if ($new == PhameConstants::VISIBILITY_PUBLISHED) {
                 return 'fa-globe';
             } else {
                 if ($new == PhameConstants::VISIBILITY_ARCHIVED) {
                     return 'fa-ban';
                 } else {
                     return 'fa-eye-slash';
                 }
             }
             break;
     }
     return parent::getIcon();
 }
Ejemplo n.º 2
0
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             if ($old === null) {
                 return 'fa-plus';
             } else {
                 return 'fa-pencil';
             }
             break;
         case self::TYPE_DESCRIPTION:
         case self::TYPE_DOMAIN:
             return 'fa-pencil';
         case self::TYPE_STATUS:
             if ($new == PhameBlog::STATUS_ARCHIVED) {
                 return 'fa-ban';
             } else {
                 return 'fa-check';
             }
             break;
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_STATUS:
             if ($old == 0) {
                 return 'fa-ban';
             } else {
                 return 'fa-check';
             }
         case self::TYPE_LOCKED:
             if ($new) {
                 return 'fa-lock';
             } else {
                 return 'fa-unlock';
             }
         case self::TYPE_ICON:
             return $new;
         case self::TYPE_IMAGE:
             return 'fa-photo';
         case self::TYPE_MEMBERS:
             return 'fa-user';
         case self::TYPE_SLUGS:
             return 'fa-tag';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_DIFF_CREATE:
             return 'fa-refresh';
     }
     return parent::getIcon();
 }
 public final function getIcon()
 {
     $icon = $this->getTransactionImplementation()->getIcon();
     if ($icon !== null) {
         return $icon;
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_EDIT:
             return 'fa-pencil';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             return 'fa-pencil';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
         case self::TYPE_URL:
         case self::TYPE_DESCRIPTION:
             return 'fa-pencil';
             break;
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_CREATE:
             return 'fa-plus';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_CONTENT:
             return 'fa-plus';
             break;
         case self::TYPE_TITLE:
         case self::TYPE_LANGUAGE:
             return 'fa-pencil';
             break;
     }
     return parent::getIcon();
 }
 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             if ($old === null) {
                 return 'green';
             }
             break;
     }
     return parent::getIcon();
 }
Ejemplo n.º 12
0
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_DISABLE:
             if ($new) {
                 return 'fa-pause';
             } else {
                 return 'fa-play';
             }
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_ACTIVE:
             if ($new) {
                 return 'fa-pencil';
             } else {
                 return 'fa-times';
             }
             break;
     }
     return parent::getIcon();
 }
Ejemplo n.º 14
0
 public function getIcon()
 {
     switch ($this->getTransactionType()) {
         case PholioTransactionType::TYPE_INLINE:
             return 'fa-comment';
         case PholioTransactionType::TYPE_NAME:
         case PholioTransactionType::TYPE_DESCRIPTION:
         case PholioTransactionType::TYPE_STATUS:
         case PholioTransactionType::TYPE_IMAGE_NAME:
         case PholioTransactionType::TYPE_IMAGE_DESCRIPTION:
         case PholioTransactionType::TYPE_IMAGE_SEQUENCE:
             return 'fa-pencil';
         case PholioTransactionType::TYPE_IMAGE_FILE:
         case PholioTransactionType::TYPE_IMAGE_REPLACE:
             return 'fa-picture-o';
     }
     return parent::getIcon();
 }
Ejemplo n.º 15
0
 public function getIcon()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_TITLE:
             if ($old === null) {
                 return 'fa-plus';
             } else {
                 return 'fa-pencil';
             }
             break;
         case self::TYPE_PHAME_TITLE:
         case self::TYPE_BODY:
         case self::TYPE_VISIBILITY:
             return 'fa-pencil';
             break;
     }
     return parent::getIcon();
 }
Ejemplo n.º 16
0
 public function getIcon()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             if ($old === null) {
                 return 'fa-plus';
             } else {
                 return 'fa-pencil';
             }
             break;
         case self::TYPE_DESCRIPTION:
         case self::TYPE_DOMAIN:
         case self::TYPE_SKIN:
             return 'fa-pencil';
             break;
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_CREATE:
             return 'fa-plus';
         case self::TYPE_COMMAND:
             switch ($new) {
                 case HarbormasterBuildCommand::COMMAND_RESTART:
                     return 'fa-backward';
                 case HarbormasterBuildCommand::COMMAND_RESUME:
                     return 'fa-play';
                 case HarbormasterBuildCommand::COMMAND_STOP:
                     return 'fa-stop';
             }
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_TITLE:
         case self::TYPE_CONTENT:
             return 'fa-pencil';
         case self::TYPE_STATUS:
             switch ($new) {
                 case PonderQuestionStatus::STATUS_OPEN:
                     return 'fa-check-circle';
                 case PonderQuestionStatus::STATUS_CLOSED:
                     return 'fa-minus-circle';
             }
         case self::TYPE_ANSWERS:
             return 'fa-plus';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_CONTENT:
             return 'fa-plus';
             break;
         case self::TYPE_TITLE:
         case self::TYPE_LANGUAGE:
             return 'fa-pencil';
             break;
         case self::TYPE_STATUS:
             $new = $this->getNewValue();
             switch ($new) {
                 case PhabricatorPaste::STATUS_ACTIVE:
                     return 'fa-check';
                 case PhabricatorPaste::STATUS_ARCHIVED:
                     return 'fa-ban';
             }
             break;
     }
     return parent::getIcon();
 }
Ejemplo n.º 20
0
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_TITLE:
         case self::TYPE_CONTENT:
             return 'fa-pencil';
         case self::TYPE_DELETE:
             return 'fa-times';
         case self::TYPE_MOVE_TO:
         case self::TYPE_MOVE_AWAY:
             return 'fa-arrows';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_QUESTION:
             if ($old === null) {
                 return 'fa-plus';
             } else {
                 return 'fa-pencil';
             }
         case self::TYPE_DESCRIPTION:
         case self::TYPE_RESPONSES:
             return 'fa-pencil';
         case self::TYPE_SHUFFLE:
             return 'fa-refresh';
         case self::TYPE_CLOSE:
             if ($new) {
                 return 'fa-ban';
             } else {
                 return 'fa-pencil';
             }
     }
     return parent::getIcon();
 }
 public function getColor()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_VCS:
             return 'green';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_TITLE:
         case self::TYPE_CONTENT:
         case self::TYPE_ANSWERWIKI:
             return 'fa-pencil';
         case self::TYPE_STATUS:
             return PonderQuestionStatus::getQuestionStatusIcon($new);
         case self::TYPE_ANSWERS:
             return 'fa-plus';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             return 'fa-pencil';
             break;
         case self::TYPE_STATUS:
             if ($new == PhabricatorDashboard::STATUS_ACTIVE) {
                 return 'fa-check';
             } else {
                 return 'fa-ban';
             }
             break;
         case self::TYPE_LAYOUT_MODE:
             return 'fa-columns';
             break;
     }
     return parent::getIcon();
 }
Ejemplo n.º 25
0
 public function getIcon()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_INLINE:
             return 'fa-comment';
         case self::TYPE_UPDATE:
             return 'fa-refresh';
         case self::TYPE_STATUS:
             switch ($this->getNewValue()) {
                 case ArcanistDifferentialRevisionStatus::ACCEPTED:
                     return 'fa-check';
                 case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
                     return 'fa-times';
                 case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
                     return 'fa-undo';
             }
             break;
         case self::TYPE_ACTION:
             switch ($this->getNewValue()) {
                 case DifferentialAction::ACTION_CLOSE:
                     return 'fa-check';
                 case DifferentialAction::ACTION_ACCEPT:
                     return 'fa-check-circle-o';
                 case DifferentialAction::ACTION_REJECT:
                     return 'fa-times-circle-o';
                 case DifferentialAction::ACTION_ABANDON:
                     return 'fa-plane';
                 case DifferentialAction::ACTION_RETHINK:
                     return 'fa-headphones';
                 case DifferentialAction::ACTION_REQUEST:
                     return 'fa-refresh';
                 case DifferentialAction::ACTION_RECLAIM:
                 case DifferentialAction::ACTION_REOPEN:
                     return 'fa-bullhorn';
                 case DifferentialAction::ACTION_RESIGN:
                     return 'fa-flag';
                 case DifferentialAction::ACTION_CLAIM:
                     return 'fa-flag';
             }
         case PhabricatorTransactions::TYPE_EDGE:
             switch ($this->getMetadataValue('edge:type')) {
                 case DifferentialRevisionHasReviewerEdgeType::EDGECONST:
                     return 'fa-user';
             }
     }
     return parent::getIcon();
 }
Ejemplo n.º 26
0
 public function getIcon()
 {
     $new = $this->getNewValue();
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_INLINE:
             return 'fa-comment';
         case self::TYPE_NAME:
         case self::TYPE_DESCRIPTION:
         case self::TYPE_STATUS:
             if ($new == PholioMock::STATUS_CLOSED) {
                 return 'fa-ban';
             } else {
                 return 'fa-check';
             }
         case self::TYPE_IMAGE_NAME:
         case self::TYPE_IMAGE_DESCRIPTION:
         case self::TYPE_IMAGE_SEQUENCE:
             return 'fa-pencil';
         case self::TYPE_IMAGE_FILE:
         case self::TYPE_IMAGE_REPLACE:
             return 'fa-picture-o';
     }
     return parent::getIcon();
 }
 private function renderEvent(PhabricatorApplicationTransaction $xaction, array $group)
 {
     $viewer = $this->getUser();
     $event = id(new PHUITimelineEventView())->setUser($viewer)->setAuthorPHID($xaction->getAuthorPHID())->setTransactionPHID($xaction->getPHID())->setUserHandle($xaction->getHandle($xaction->getAuthorPHID()))->setIcon($xaction->getIcon())->setColor($xaction->getColor())->setHideCommentOptions($this->getHideCommentOptions());
     list($token, $token_removed) = $xaction->getToken();
     if ($token) {
         $event->setToken($token, $token_removed);
     }
     if (!$this->shouldSuppressTitle($xaction, $group)) {
         if ($this->renderAsFeed) {
             $title = $xaction->getTitleForFeed();
         } else {
             $title = $xaction->getTitle();
         }
         if ($xaction->hasChangeDetails()) {
             if (!$this->isPreview) {
                 $details = $this->buildChangeDetailsLink($xaction);
                 $title = array($title, ' ', $details);
             }
         }
         if (!$this->isPreview) {
             $more = $this->buildExtraInformationLink($xaction);
             if ($more) {
                 $title = array($title, ' ', $more);
             }
         }
         $event->setTitle($title);
     }
     if ($this->isPreview) {
         $event->setIsPreview(true);
     } else {
         $event->setDateCreated($xaction->getDateCreated())->setContentSource($xaction->getContentSource())->setAnchor($xaction->getID());
     }
     $transaction_type = $xaction->getTransactionType();
     $comment_type = PhabricatorTransactions::TYPE_COMMENT;
     $is_normal_comment = $transaction_type == $comment_type;
     if ($this->getShowEditActions() && !$this->isPreview && $is_normal_comment) {
         $has_deleted_comment = $xaction->getComment() && $xaction->getComment()->getIsDeleted();
         $has_removed_comment = $xaction->getComment() && $xaction->getComment()->getIsRemoved();
         if ($xaction->getCommentVersion() > 1 && !$has_removed_comment) {
             $event->setIsEdited(true);
         }
         if (!$has_removed_comment) {
             $event->setIsNormalComment(true);
         }
         // If we have a place for quoted text to go and this is a quotable
         // comment, pass the quote target ID to the event view.
         if ($this->getQuoteTargetID()) {
             if ($xaction->hasComment()) {
                 if (!$has_removed_comment && !$has_deleted_comment) {
                     $event->setQuoteTargetID($this->getQuoteTargetID());
                     $event->setQuoteRef($this->getQuoteRef());
                 }
             }
         }
         $can_edit = PhabricatorPolicyCapability::CAN_EDIT;
         if ($xaction->hasComment() || $has_deleted_comment) {
             $has_edit_capability = PhabricatorPolicyFilter::hasCapability($viewer, $xaction, $can_edit);
             if ($has_edit_capability && !$has_removed_comment) {
                 $event->setIsEditable(true);
             }
             if ($has_edit_capability || $viewer->getIsAdmin()) {
                 if (!$has_removed_comment) {
                     $event->setIsRemovable(true);
                 }
             }
         }
     }
     $comment = $this->renderTransactionContent($xaction);
     if ($comment) {
         $event->appendChild($comment);
     }
     return $event;
 }
Ejemplo n.º 28
0
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_OWNER:
             return 'fa-user';
         case self::TYPE_CCS:
             return 'fa-envelope';
         case self::TYPE_TITLE:
             if ($old === null) {
                 return 'fa-pencil';
             }
             return 'fa-pencil';
         case self::TYPE_STATUS:
             $action = ManiphestTaskStatus::getStatusIcon($new);
             if ($action !== null) {
                 return $action;
             }
             if (ManiphestTaskStatus::isClosedStatus($new)) {
                 return 'fa-check';
             } else {
                 return 'fa-pencil';
             }
         case self::TYPE_DESCRIPTION:
             return 'fa-pencil';
         case self::TYPE_PROJECTS:
             return 'fa-briefcase';
         case self::TYPE_PROJECT_COLUMN:
             return 'fa-columns';
         case self::TYPE_MERGED_INTO:
         case self::TYPE_MERGED_FROM:
             return 'fa-compress';
         case self::TYPE_PRIORITY:
             if ($old == ManiphestTaskPriority::getDefaultPriority()) {
                 return 'fa-arrow-right';
             } else {
                 if ($old > $new) {
                     return 'fa-arrow-down';
                 } else {
                     return 'fa-arrow-up';
                 }
             }
         case self::TYPE_EDGE:
         case self::TYPE_ATTACH:
             return 'fa-thumb-tack';
         case self::TYPE_UNBLOCK:
             return 'fa-shield';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case PhabricatorMacroTransactionType::TYPE_NAME:
             return 'fa-pencil';
         case PhabricatorMacroTransactionType::TYPE_FILE:
             if ($old === null) {
                 return 'fa-plus';
             } else {
                 return 'fa-pencil';
             }
         case PhabricatorMacroTransactionType::TYPE_DISABLED:
             if ($new) {
                 return 'fa-times';
             } else {
                 return 'fa-undo';
             }
         case PhabricatorMacroTransactionType::TYPE_AUDIO:
             return 'fa-headphones';
     }
     return parent::getIcon();
 }
 public function getIcon()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     $type = $this->getTransactionType();
     switch ($type) {
         case PhabricatorTransactions::TYPE_CREATE:
             return 'fa-plus';
         case self::TYPE_DISABLE:
             if ($new) {
                 return 'fa-ban';
             } else {
                 return 'fa-check';
             }
     }
     return parent::getIcon();
 }