Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/storage/PhamePostTransaction.php
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | public function getIcon() { | ||||
| $new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
| switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
| case PhabricatorTransactions::TYPE_CREATE: | case PhabricatorTransactions::TYPE_CREATE: | ||||
| return 'fa-plus'; | return 'fa-plus'; | ||||
| break; | break; | ||||
| case self::TYPE_VISIBILITY: | case self::TYPE_VISIBILITY: | ||||
| if ($new == PhameConstants::VISIBILITY_PUBLISHED) { | if ($new == PhameConstants::VISIBILITY_PUBLISHED) { | ||||
| return 'fa-globe'; | return 'fa-globe'; | ||||
| } else if ($new == PhameConstants::VISIBILITY_ARCHIVED) { | |||||
| return 'fa-ban'; | |||||
| } else { | } else { | ||||
| return 'fa-eye-slash'; | return 'fa-eye-slash'; | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| return parent::getIcon(); | return parent::getIcon(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | switch ($type) { | ||||
| '%s updated the blog post.', | '%s updated the blog post.', | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| break; | break; | ||||
| case self::TYPE_VISIBILITY: | case self::TYPE_VISIBILITY: | ||||
| if ($new == PhameConstants::VISIBILITY_DRAFT) { | if ($new == PhameConstants::VISIBILITY_DRAFT) { | ||||
| return pht( | return pht( | ||||
| '%s marked this post as a draft.', | '%s marked this post as a draft.', | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| } else if ($new == PhameConstants::VISIBILITY_ARCHIVED) { | |||||
| return pht( | |||||
| '%s archived this post.', | |||||
| $this->renderHandleLink($author_phid)); | |||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s published this post.', | '%s published this post.', | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | switch ($type) { | ||||
| $this->renderHandleLink($object_phid)); | $this->renderHandleLink($object_phid)); | ||||
| break; | break; | ||||
| case self::TYPE_VISIBILITY: | case self::TYPE_VISIBILITY: | ||||
| if ($new == PhameConstants::VISIBILITY_DRAFT) { | if ($new == PhameConstants::VISIBILITY_DRAFT) { | ||||
| return pht( | return pht( | ||||
| '%s marked %s as a draft.', | '%s marked %s as a draft.', | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| $this->renderHandleLink($object_phid)); | $this->renderHandleLink($object_phid)); | ||||
| } else if ($new == PhameConstants::VISIBILITY_ARCHIVED) { | |||||
| return pht( | |||||
| '%s marked %s as archived.', | |||||
| $this->renderHandleLink($author_phid), | |||||
| $this->renderHandleLink($object_phid)); | |||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s published %s.', | '%s published %s.', | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| $this->renderHandleLink($object_phid)); | $this->renderHandleLink($object_phid)); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines | |||||