Differential D12806 Diff 30846 src/applications/project/storage/PhabricatorProjectColumnTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProjectColumnTransaction.php
| Show All 15 Lines | final class PhabricatorProjectColumnTransaction | ||||
| } | } | ||||
| public function getTitle() { | public function getTitle() { | ||||
| $old = $this->getOldValue(); | $old = $this->getOldValue(); | ||||
| $new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
| $author_handle = $this->renderHandleLink($this->getAuthorPHID()); | $author_handle = $this->renderHandleLink($this->getAuthorPHID()); | ||||
| switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
| case PhabricatorProjectColumnTransaction::TYPE_NAME: | case self::TYPE_NAME: | ||||
| if ($old === null) { | if ($old === null) { | ||||
| return pht( | return pht( | ||||
| '%s created this column.', | '%s created this column.', | ||||
| $author_handle); | $author_handle); | ||||
| } else { | } else { | ||||
| if (!strlen($old)) { | if (!strlen($old)) { | ||||
| return pht( | return pht( | ||||
| '%s named this column "%s".', | '%s named this column "%s".', | ||||
| $author_handle, | $author_handle, | ||||
| $new); | $new); | ||||
| } else if (strlen($new)) { | } else if (strlen($new)) { | ||||
| return pht( | return pht( | ||||
| '%s renamed this column from "%s" to "%s".', | '%s renamed this column from "%s" to "%s".', | ||||
| $author_handle, | $author_handle, | ||||
| $old, | $old, | ||||
| $new); | $new); | ||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s removed the custom name of this column.', | '%s removed the custom name of this column.', | ||||
| $author_handle); | $author_handle); | ||||
| } | } | ||||
| } | } | ||||
| case PhabricatorProjectColumnTransaction::TYPE_LIMIT: | case self::TYPE_LIMIT: | ||||
| if (!$old) { | if (!$old) { | ||||
| return pht( | return pht( | ||||
| '%s set the point limit for this column to %s.', | '%s set the point limit for this column to %s.', | ||||
| $author_handle, | $author_handle, | ||||
| $new); | $new); | ||||
| } else if (!$new) { | } else if (!$new) { | ||||
| return pht( | return pht( | ||||
| '%s removed the point limit for this column.', | '%s removed the point limit for this column.', | ||||
| $author_handle); | $author_handle); | ||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s changed point limit for this column from %s to %s.', | '%s changed point limit for this column from %s to %s.', | ||||
| $author_handle, | $author_handle, | ||||
| $old, | $old, | ||||
| $new); | $new); | ||||
| } | } | ||||
| case PhabricatorProjectColumnTransaction::TYPE_STATUS: | case self::TYPE_STATUS: | ||||
| switch ($new) { | switch ($new) { | ||||
| case PhabricatorProjectColumn::STATUS_ACTIVE: | case PhabricatorProjectColumn::STATUS_ACTIVE: | ||||
| return pht( | return pht( | ||||
| '%s marked this column visible.', | '%s marked this column visible.', | ||||
| $author_handle); | $author_handle); | ||||
| case PhabricatorProjectColumn::STATUS_HIDDEN: | case PhabricatorProjectColumn::STATUS_HIDDEN: | ||||
| return pht( | return pht( | ||||
| '%s marked this column hidden.', | '%s marked this column hidden.', | ||||
| Show All 9 Lines | |||||