Restore merge of phutil_tag.

This commit is contained in:
epriestley
2013-02-13 14:50:15 -08:00
parent 73cce6e131
commit ef7f16180c
264 changed files with 1690 additions and 1716 deletions

View File

@@ -71,7 +71,7 @@ abstract class PhabricatorInlineCommentController
$dialog->setTitle('Really delete this comment?');
$dialog->addHiddenInput('id', $this->getCommentID());
$dialog->addHiddenInput('op', 'delete');
$dialog->appendChild('<p>Delete this inline comment?</p>');
$dialog->appendChild(hsprintf('<p>Delete this inline comment?</p>'));
$dialog->addCancelButton('#');
$dialog->addSubmitButton('Delete');

View File

@@ -34,7 +34,7 @@ abstract class PhabricatorInlineCommentPreviewController
$view->setPreview(true);
$views[] = $view->render();
}
$views = implode("\n", $views);
$views = phutil_implode_html("\n", $views);
return id(new AphrontAjaxResponse())
->setContent($views);

View File

@@ -15,7 +15,7 @@ final class PhabricatorInlineSummaryView extends AphrontView {
public function render() {
require_celerity_resource('inline-comment-summary-css');
return $this->renderHeader().$this->renderTable();
return hsprintf('%s%s', $this->renderHeader(), $this->renderTable());
}
private function renderHeader() {
@@ -79,19 +79,26 @@ final class PhabricatorInlineSummaryView extends AphrontView {
$where = idx($item, 'where');
$colspan = ($has_where ? '' : ' colspan="2"');
$rows[] =
$colspan = ($has_where ? null : 2);
$rows[] = hsprintf(
'<tr>'.
'<td class="inline-line-number">'.$lines.'</td>'.
($has_where
? hsprintf('<td class="inline-which-diff">%s</td>', $where)
: null).
'<td class="inline-summary-content"'.$colspan.'>'.
'<div class="phabricator-remarkup">'.
$item['content'].
'</div>'.
'</td>'.
'</tr>';
'<td class="inline-line-number">%s</td>'.
'%s'.
'%s'.
'</tr>',
$lines,
($has_where
? hsprintf('<td class="inline-which-diff">%s</td>', $where)
: null),
phutil_tag(
'td',
array(
'class' => 'inline-summary-content',
'colspan' => $colspan,
),
hsprintf(
'<div class="phabricator-remarkup">%s</div>',
$item['content'])));
}
}
@@ -100,7 +107,7 @@ final class PhabricatorInlineSummaryView extends AphrontView {
array(
'class' => 'phabricator-inline-summary-table',
),
new PhutilSafeHTML(implode("\n", $rows)));
phutil_implode_html("\n", $rows));
}
}