mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-03 19:31:02 +01:00
render_tag -> tag: pinboards
Summary: Fix pinboard callsites. Test Plan: Looked at Pholio and Macro. Reviewers: vrana Reviewed By: vrana CC: aran Maniphest Tasks: T2432 Differential Revision: https://secure.phabricator.com/D4690
This commit is contained in:
parent
edfcd7bd2d
commit
9a0ae6376f
3 changed files with 12 additions and 8 deletions
|
@ -125,7 +125,7 @@ final class PhabricatorMacroListController
|
||||||
if ($file->getAuthorPHID()) {
|
if ($file->getAuthorPHID()) {
|
||||||
$author_handle = $this->getHandle($file->getAuthorPHID());
|
$author_handle = $this->getHandle($file->getAuthorPHID());
|
||||||
$item->appendChild(
|
$item->appendChild(
|
||||||
'Created by '.$author_handle->renderLink());
|
pht('Created by %s', $author_handle->renderLink()));
|
||||||
}
|
}
|
||||||
$datetime = phabricator_date($file->getDateCreated(), $viewer);
|
$datetime = phabricator_date($file->getDateCreated(), $viewer);
|
||||||
$item->appendChild(
|
$item->appendChild(
|
||||||
|
|
|
@ -33,13 +33,12 @@ final class PhabricatorPinboardItemView extends AphrontView {
|
||||||
public function render() {
|
public function render() {
|
||||||
$header = null;
|
$header = null;
|
||||||
if ($this->header) {
|
if ($this->header) {
|
||||||
$header = hsprintf('<a href="%s">%s</a>', $this->uri, $this->header);
|
|
||||||
$header = phutil_tag(
|
$header = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-pinboard-item-header',
|
'class' => 'phabricator-pinboard-item-header',
|
||||||
),
|
),
|
||||||
$header);
|
phutil_tag('a', array('href' => $this->uri), $this->header));
|
||||||
}
|
}
|
||||||
|
|
||||||
$image = phutil_tag(
|
$image = phutil_tag(
|
||||||
|
@ -56,9 +55,9 @@ final class PhabricatorPinboardItemView extends AphrontView {
|
||||||
'height' => $this->imageHeight,
|
'height' => $this->imageHeight,
|
||||||
)));
|
)));
|
||||||
|
|
||||||
$content = $this->renderChildren();
|
$content = $this->renderHTMLChildren();
|
||||||
if ($content) {
|
if ($content) {
|
||||||
$content = phutil_render_tag(
|
$content = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-pinboard-item-content',
|
'class' => 'phabricator-pinboard-item-content',
|
||||||
|
@ -71,7 +70,12 @@ final class PhabricatorPinboardItemView extends AphrontView {
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-pinboard-item-view',
|
'class' => 'phabricator-pinboard-item-view',
|
||||||
),
|
),
|
||||||
array($header, $image, $content));
|
$this->renderHTMLView(
|
||||||
|
array(
|
||||||
|
$header,
|
||||||
|
$image,
|
||||||
|
$content,
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,12 +26,12 @@ final class PhabricatorPinboardView extends AphrontView {
|
||||||
->render();
|
->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
return phutil_render_tag(
|
return phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-pinboard-view',
|
'class' => 'phabricator-pinboard-view',
|
||||||
),
|
),
|
||||||
$this->renderSingleView($this->items));
|
$this->renderHTMLView($this->items));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue