From 9a0ae6376fe40f940eeea671d5b334a0cefbcc33 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 28 Jan 2013 18:44:54 -0800 Subject: [PATCH] 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 --- .../controller/PhabricatorMacroListController.php | 2 +- src/view/layout/PhabricatorPinboardItemView.php | 14 +++++++++----- src/view/layout/PhabricatorPinboardView.php | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/applications/macro/controller/PhabricatorMacroListController.php b/src/applications/macro/controller/PhabricatorMacroListController.php index 0ed1bebc77..68d395ecfe 100644 --- a/src/applications/macro/controller/PhabricatorMacroListController.php +++ b/src/applications/macro/controller/PhabricatorMacroListController.php @@ -125,7 +125,7 @@ final class PhabricatorMacroListController if ($file->getAuthorPHID()) { $author_handle = $this->getHandle($file->getAuthorPHID()); $item->appendChild( - 'Created by '.$author_handle->renderLink()); + pht('Created by %s', $author_handle->renderLink())); } $datetime = phabricator_date($file->getDateCreated(), $viewer); $item->appendChild( diff --git a/src/view/layout/PhabricatorPinboardItemView.php b/src/view/layout/PhabricatorPinboardItemView.php index 76cf5104ba..683a6cf4dd 100644 --- a/src/view/layout/PhabricatorPinboardItemView.php +++ b/src/view/layout/PhabricatorPinboardItemView.php @@ -33,13 +33,12 @@ final class PhabricatorPinboardItemView extends AphrontView { public function render() { $header = null; if ($this->header) { - $header = hsprintf('%s', $this->uri, $this->header); $header = phutil_tag( 'div', array( 'class' => 'phabricator-pinboard-item-header', ), - $header); + phutil_tag('a', array('href' => $this->uri), $this->header)); } $image = phutil_tag( @@ -56,9 +55,9 @@ final class PhabricatorPinboardItemView extends AphrontView { 'height' => $this->imageHeight, ))); - $content = $this->renderChildren(); + $content = $this->renderHTMLChildren(); if ($content) { - $content = phutil_render_tag( + $content = phutil_tag( 'div', array( 'class' => 'phabricator-pinboard-item-content', @@ -71,7 +70,12 @@ final class PhabricatorPinboardItemView extends AphrontView { array( 'class' => 'phabricator-pinboard-item-view', ), - array($header, $image, $content)); + $this->renderHTMLView( + array( + $header, + $image, + $content, + ))); } } diff --git a/src/view/layout/PhabricatorPinboardView.php b/src/view/layout/PhabricatorPinboardView.php index 1fa98fe14a..a776025c20 100644 --- a/src/view/layout/PhabricatorPinboardView.php +++ b/src/view/layout/PhabricatorPinboardView.php @@ -26,12 +26,12 @@ final class PhabricatorPinboardView extends AphrontView { ->render(); } - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'phabricator-pinboard-view', ), - $this->renderSingleView($this->items)); + $this->renderHTMLView($this->items)); } }