1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

add renderValue() in transactions

Summary: fix T11290.

Test Plan: Paste language type, view in web and in emails (It uses quotes in HTML emails, which I think is something else).

Reviewers: epriestley, chad, #blessed_reviewers

Reviewed By: chad, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T11290

Differential Revision: https://secure.phabricator.com/D16252
This commit is contained in:
Aviv Eyal 2016-07-08 16:01:42 -07:00
parent c56a4fce66
commit f790dd5235
4 changed files with 30 additions and 7 deletions

View file

@ -7,7 +7,7 @@
*/
return array(
'names' => array(
'core.pkg.css' => '2fbe65a2',
'core.pkg.css' => '4e7e9bde',
'core.pkg.js' => '1bcca0f3',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '3e81ae60',
@ -155,7 +155,7 @@ return array(
'rsrc/css/phui/phui-spacing.css' => '042804d6',
'rsrc/css/phui/phui-status.css' => 'd5263e49',
'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2',
'rsrc/css/phui/phui-timeline-view.css' => 'c3782437',
'rsrc/css/phui/phui-timeline-view.css' => 'bc523970',
'rsrc/css/phui/phui-two-column-view.css' => '9fb86c85',
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7',
'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647',
@ -863,7 +863,7 @@ return array(
'phui-status-list-view-css' => 'd5263e49',
'phui-tag-view-css' => '6bbd83e2',
'phui-theme-css' => '027ba77e',
'phui-timeline-view-css' => 'c3782437',
'phui-timeline-view-css' => 'bc523970',
'phui-two-column-view-css' => '9fb86c85',
'phui-workboard-color-css' => 'ac6fe6a7',
'phui-workboard-view-css' => 'e6d89647',

View file

@ -15,15 +15,19 @@ final class PhabricatorPasteLanguageTransaction
public function getTitle() {
return pht(
"%s updated the paste's language.",
$this->renderAuthor());
"%s updated the paste's language from %s to %s.",
$this->renderAuthor(),
$this->renderValue($this->getOldValue()),
$this->renderValue($this->getNewValue()));
}
public function getTitleForFeed() {
return pht(
'%s updated the language for %s.',
'%s updated the language for %s from %s to %s.',
$this->renderAuthor(),
$this->renderObject());
$this->renderObject(),
$this->renderValue($this->getOldValue()),
$this->renderValue($this->getNewValue()));
}
}

View file

@ -141,6 +141,20 @@ abstract class PhabricatorModularTransactionType
return $display;
}
final protected function renderValue($value) {
$rendering_target = $this->getStorage()->getRenderingTarget();
if ($rendering_target == PhabricatorApplicationTransaction::TARGET_TEXT) {
return sprintf('"%s"', $value);
}
return phutil_tag(
'span',
array(
'class' => 'phui-timeline-value',
),
$value);
}
final protected function newError($title, $message, $xaction = null) {
return new PhabricatorApplicationTransactionValidationError(
$this->getTransactionTypeConstant(),

View file

@ -256,6 +256,11 @@
color: {$lightgreytext};
}
.phui-timeline-title .phui-timeline-value {
font-style: italic;
color: black;
}
.device-desktop .phui-timeline-extra {
float: right;
}