render_tag -> tag: fix more callsites (more view, misc)

Summary: Fixes even more callsites.

Test Plan: See inlines.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4749
This commit is contained in:
epriestley
2013-01-31 09:08:02 -08:00
parent 95d37af5d9
commit 7f43826854
8 changed files with 78 additions and 40 deletions

View File

@@ -271,6 +271,10 @@ final class DiffusionBrowseFileController extends DiffusionController {
'sigil' => 'diffusion-source',
),
implode("\n", $rows));
// TODO: [HTML] Major cheating here.
$corpus_table = phutil_safe_html($corpus_table);
$corpus = phutil_tag(
'div',
array(
@@ -723,18 +727,29 @@ final class DiffusionBrowseFileController extends DiffusionController {
array(
'target' => 'scroll_target',
));
$anchor_text = '<a id="scroll_target"></a>';
$anchor_text = phutil_tag(
'a',
array(
'id' => 'scroll_target',
),
'');
} else {
$anchor_text = null;
}
$blame[] = phutil_render_tag(
$blame[] = phutil_tag(
'td',
array(
),
$anchor_text.
"\xE2\x80\x8B". // NOTE: See phabricator-oncopy behavior.
$line['data']);
array(
$anchor_text,
// NOTE: See phabricator-oncopy behavior.
"\xE2\x80\x8B",
// TODO: [HTML] Not ideal.
phutil_safe_html($line['data']),
));
$rows[] = phutil_tag(
'tr',

View File

@@ -442,13 +442,25 @@ final class DiffusionCommitController extends DiffusionController {
foreach ($parents as $parent) {
$parent_links[] = $handles[$parent->getPHID()]->renderLink();
}
$props['Parents'] = implode(' &middot; ', $parent_links);
$props['Parents'] = array_interleave(
" \xC2\xB7 ",
$parent_links);
}
$request = $this->getDiffusionRequest();
$props['Branches'] = '<span id="commit-branches">Unknown</span>';
$props['Tags'] = '<span id="commit-tags">Unknown</span>';
$props['Branches'] = phutil_tag(
'span',
array(
'id' => 'commit-branches',
),
'Unknown');
$props['Tags'] = phutil_tag(
'span',
array(
'id' => 'commit-tags',
),
'Unknown');
$callsign = $request->getRepository()->getCallsign();
$root = '/diffusion/'.$callsign.'/commit/'.$commit->getCommitIdentifier();
@@ -906,8 +918,8 @@ final class DiffusionCommitController extends DiffusionController {
),
$ref);
}
$ref_links = implode(', ', $ref_links);
return $ref_links;
return array_interleave(', ', $ref_links);
}
private function buildRawDiffResponse(DiffusionRequest $drequest) {