mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 23:31:03 +01:00
render_tag -> tag: fix some more callsites
Summary: - Crumbs is straightforward. - Maniphest does a lot of string construction which isn't i18n or safehtml aware. I cheated under the theory that we'll resolve this properly in {T2217}. Test Plan: Looked at crumbs and Maniphest. Reviewers: vrana Reviewed By: vrana CC: aran Maniphest Tasks: T2432 Differential Revision: https://secure.phabricator.com/D4748
This commit is contained in:
parent
f705c978b5
commit
95d37af5d9
2 changed files with 24 additions and 7 deletions
|
@ -164,12 +164,18 @@ final class ManiphestTransactionDetailView extends ManiphestView {
|
||||||
if ($this->getRenderFullSummary()) {
|
if ($this->getRenderFullSummary()) {
|
||||||
$full_summary = $this->renderFullSummary($transaction);
|
$full_summary = $this->renderFullSummary($transaction);
|
||||||
}
|
}
|
||||||
$descs[] = javelin_render_tag(
|
$descs[] = javelin_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'sigil' => 'maniphest-transaction-description',
|
'sigil' => 'maniphest-transaction-description',
|
||||||
),
|
),
|
||||||
$author->renderLink().' '.$desc.'.'.$full_summary);
|
array(
|
||||||
|
$author->renderLink(),
|
||||||
|
' ',
|
||||||
|
$desc,
|
||||||
|
'.',
|
||||||
|
$full_summary,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getRenderSummaryOnly()) {
|
if ($this->getRenderSummaryOnly()) {
|
||||||
|
@ -551,6 +557,11 @@ final class ManiphestTransactionDetailView extends ManiphestView {
|
||||||
return array($type, ' brazenly '.$type."'d", $classes);
|
return array($type, ' brazenly '.$type."'d", $classes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: [HTML] This code will all be rewritten when we switch to using
|
||||||
|
// ApplicationTransactions. It does not handle HTML or translations
|
||||||
|
// correctly right now.
|
||||||
|
$desc = phutil_safe_html($desc);
|
||||||
|
|
||||||
return array($verb, $desc, $classes);
|
return array($verb, $desc, $classes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -579,6 +590,9 @@ final class ManiphestTransactionDetailView extends ManiphestView {
|
||||||
DifferentialChangesetParser::parseRangeSpecification($spec);
|
DifferentialChangesetParser::parseRangeSpecification($spec);
|
||||||
$output = $parser->render($range_s, $range_e, $mask);
|
$output = $parser->render($range_s, $range_e, $mask);
|
||||||
|
|
||||||
|
// TODO: [HTML] DifferentialChangesetParser needs cleanup.
|
||||||
|
$output = phutil_safe_html($output);
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,26 +50,29 @@ final class PhabricatorCrumbsView extends AphrontView {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$action_view = phutil_render_tag(
|
$action_view = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-crumbs-actions',
|
'class' => 'phabricator-crumbs-actions',
|
||||||
),
|
),
|
||||||
self::renderSingleView($actions));
|
$this->renderHTMLView($actions));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->crumbs) {
|
if ($this->crumbs) {
|
||||||
last($this->crumbs)->setIsLastCrumb(true);
|
last($this->crumbs)->setIsLastCrumb(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return phutil_render_tag(
|
return phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-crumbs-view '.
|
'class' => 'phabricator-crumbs-view '.
|
||||||
'sprite-gradient gradient-breadcrumbs',
|
'sprite-gradient gradient-breadcrumbs',
|
||||||
),
|
),
|
||||||
$action_view.
|
$this->renderHTMLView(
|
||||||
self::renderSingleView($this->crumbs));
|
array(
|
||||||
|
$action_view,
|
||||||
|
$this->crumbs,
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue