1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Convert more render_tag -> tag

Summary: Mostly straightforward.

Test Plan: Browsed most of the affected interfaces.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4687
This commit is contained in:
epriestley 2013-01-28 18:41:43 -08:00
parent 08bcb8c30a
commit fb6dbd7d3a
9 changed files with 46 additions and 40 deletions

View file

@ -237,14 +237,13 @@ final class ConpherenceViewController extends
foreach ($files as $file) {
$thumb = $file->getThumb60x45URI();
$table_data[] = array(
phutil_render_tag(
phutil_tag(
'img',
array(
'src' => $thumb
),
''
),
$file->getName()
''),
phutil_escape_html($file->getName()),
);
}
$header = id(new PhabricatorHeaderView())
@ -274,13 +273,12 @@ final class ConpherenceViewController extends
foreach ($actual_tasks as $task) {
$data[] = array(
idx($priority_map, $task->getPriority(), pht('???')),
phutil_render_tag(
phutil_tag(
'a',
array(
'href' => '/T'.$task->getID()
),
phutil_escape_html($task->getTitle())
)
$task->getTitle()),
);
}
$table = id(new AphrontTableView($data))

View file

@ -111,8 +111,7 @@ abstract class DiffusionBrowseQuery {
$readme_content = $content_query->getRawData();
if (preg_match('/\\.txt$/', $readme->getPath())) {
$readme_content = phutil_escape_html($readme_content);
$readme_content = nl2br($readme_content);
$readme_content = phutil_escape_html_newlines($readme_content);
$class = null;
} else if (preg_match('/\\.rainbow$/', $readme->getPath())) {
@ -121,6 +120,7 @@ abstract class DiffusionBrowseQuery {
->getHighlightFuture($readme_content)
->resolve();
$readme_content = nl2br($readme_content);
$readme_content = phutil_safe_html($readme_content);
require_celerity_resource('syntax-highlighting-css');
$class = 'remarkup-code';
@ -132,7 +132,7 @@ abstract class DiffusionBrowseQuery {
$class = 'phabricator-remarkup';
}
$readme_content = phutil_render_tag(
$readme_content = phutil_tag(
'div',
array(
'class' => $class,

View file

@ -61,8 +61,7 @@ final class DiffusionBranchTableView extends DiffusionView {
$drequest->getRepository(),
$branch->getHeadCommitIdentifier()),
$datetime,
AphrontTableView::renderSingleDisplayLine(
phutil_escape_html($details))
AphrontTableView::renderSingleDisplayLine($details),
// TODO: etc etc
);
if ($branch->getName() == $current_branch) {

View file

@ -59,8 +59,7 @@ final class DiffusionBrowseTableView extends DiffusionView {
}
}
$details = AphrontTableView::renderSingleDisplayLine(
phutil_escape_html($data->getSummary()));
$details = AphrontTableView::renderSingleDisplayLine($data->getSummary());
} else {
$author = '';
$details = '';

View file

@ -138,8 +138,7 @@ final class DiffusionHistoryTableView extends DiffusionView {
$date,
$time,
$author,
AphrontTableView::renderSingleDisplayLine(
phutil_escape_html($history->getSummary())),
AphrontTableView::renderSingleDisplayLine($history->getSummary()),
// TODO: etc etc
);
}

View file

@ -338,11 +338,14 @@ final class PhabricatorDirectoryMainController
private function renderMiniPanel($title, $body) {
$panel = new AphrontMiniPanelView();
$panel->appendChild(
phutil_render_tag(
phutil_tag(
'p',
array(
),
'<strong>'.$title.':</strong> '.$body));
array(
phutil_tag('strong', array(), $title.':'),
$body
)));
$this->minipanels[] = $panel;
}

View file

@ -73,18 +73,20 @@ final class PonderVotableView extends AphrontView {
'vote' => (int)$this->vote,
),
),
javelin_render_tag(
'div',
array(
'class' => 'ponder-votebox',
),
$up.$count.$down).
phutil_render_tag(
'div',
array(
'class' => 'ponder-votebox-content',
),
$this->renderChildren()));
array(
javelin_tag(
'div',
array(
'class' => 'ponder-votebox',
),
array($up, $count, $down)),
phutil_render_tag(
'div',
array(
'class' => 'ponder-votebox-content',
),
$this->renderChildren()),
));
}
}

View file

@ -1,11 +1,14 @@
<?php
final class JavelinViewExampleServerView extends AphrontView {
public function render() {
return phutil_render_tag(
return phutil_tag(
'div',
array('class' => 'server-view'),
$this->renderChildren()
);
array(
'class' => 'server-view',
),
$this->renderChildren());
}
}

View file

@ -311,12 +311,15 @@ final class AphrontTableView extends AphrontView {
array(
'class' => 'single-display-line-bounds',
),
phutil_render_tag(
'span',
array(
'class' => 'single-display-line-content',
),
$line).'&nbsp;');
array(
phutil_tag(
'span',
array(
'class' => 'single-display-line-content',
),
$line),
"\xC2\xA0",
));
}