mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
render_tag -> tag: misc views
Summary: See inlines. Test Plan: See inlines. Reviewers: vrana Reviewed By: vrana CC: aran Maniphest Tasks: T2432 Differential Revision: https://secure.phabricator.com/D4768
This commit is contained in:
parent
41e0f97c19
commit
87dc464159
7 changed files with 52 additions and 29 deletions
|
@ -139,6 +139,14 @@ final class ConpherenceMenuItemView extends AphrontTagView {
|
|||
(int)$this->unreadCount);
|
||||
}
|
||||
|
||||
return $image.$title.$subtitle.$message.$epoch.$unread_count;
|
||||
return $this->renderHTMLView(
|
||||
array(
|
||||
$image,
|
||||
$title,
|
||||
$subtitle,
|
||||
$message,
|
||||
$epoch,
|
||||
$unread_count,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,9 +96,9 @@ abstract class PhabricatorDirectoryController extends PhabricatorController {
|
|||
|
||||
$nav->addMenuItem($show_item);
|
||||
$nav->addCustomBlock(
|
||||
'<div '.
|
||||
'id="'.phutil_escape_html($show_tiles_id).'"'.
|
||||
'style="display: none;">');
|
||||
hsprintf(
|
||||
'<div id="%s" style="display: none;">',
|
||||
$show_tiles_id));
|
||||
|
||||
Javelin::initBehavior('phabricator-home-reveal-tiles', array(
|
||||
'tilesID' => $show_tiles_id,
|
||||
|
@ -128,19 +128,20 @@ abstract class PhabricatorDirectoryController extends PhabricatorController {
|
|||
}
|
||||
$nav->addLabel($groups[$group]);
|
||||
}
|
||||
|
||||
$nav->addCustomBlock(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'application-tile-group',
|
||||
),
|
||||
id(new AphrontNullView())->appendChild($tiles)->render()));
|
||||
mpull($tiles, 'render')));
|
||||
}
|
||||
|
||||
$is_hide = ($tile_display == PhabricatorApplication::TILE_HIDE);
|
||||
if ($is_hide) {
|
||||
$nav->addMenuItem($hide_item);
|
||||
$nav->addCustomBlock('</div>');
|
||||
$nav->addCustomBlock(hsprintf('</div>'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ abstract class AphrontTagView extends AphrontView {
|
|||
}
|
||||
|
||||
protected function getTagContent() {
|
||||
return $this->renderChildren();
|
||||
return $this->renderHTMLChildren();
|
||||
}
|
||||
|
||||
protected function willRender() {
|
||||
|
@ -150,7 +150,7 @@ abstract class AphrontTagView extends AphrontView {
|
|||
}
|
||||
}
|
||||
|
||||
return javelin_render_tag(
|
||||
return javelin_tag(
|
||||
$this->getTagName(),
|
||||
$attributes,
|
||||
$this->getTagContent());
|
||||
|
|
|
@ -26,27 +26,34 @@ final class PhabricatorObjectListView extends AphrontView {
|
|||
foreach ($handles as $handle) {
|
||||
$buttons = idx($this->buttons, $handle->getPHID(), array());
|
||||
if ($buttons) {
|
||||
$buttons =
|
||||
'<div class="phabricator-object-list-view-buttons">'.
|
||||
implode('', $buttons).
|
||||
'</div>';
|
||||
$buttons = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-object-list-view-buttons',
|
||||
),
|
||||
$buttons);
|
||||
} else {
|
||||
$buttons = null;
|
||||
}
|
||||
|
||||
$out[] = javelin_render_tag(
|
||||
$out[] = javelin_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-object-list-view-item',
|
||||
'style' => 'background-image: url('.$handle->getImageURI().');',
|
||||
),
|
||||
$handle->renderLink().$buttons);
|
||||
array(
|
||||
$handle->renderLink(),
|
||||
$buttons,
|
||||
));
|
||||
}
|
||||
|
||||
return
|
||||
'<div class="phabricator-object-list-view">'.
|
||||
implode("\n", $out).
|
||||
'</div>';
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-object-list-view',
|
||||
),
|
||||
$out);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -220,14 +220,17 @@ final class AphrontSideNavFilterView extends AphrontView {
|
|||
),
|
||||
'');
|
||||
|
||||
$local_menu = $menu_background.phutil_render_tag(
|
||||
'div',
|
||||
$local_menu = $this->renderHTMLView(
|
||||
array(
|
||||
'class' => 'phabricator-nav-local phabricator-side-menu',
|
||||
'id' => $local_id,
|
||||
),
|
||||
self::renderSingleView($this->menu->setID($this->getMenuID()))
|
||||
);
|
||||
$menu_background,
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-nav-local phabricator-side-menu',
|
||||
'id' => $local_id,
|
||||
),
|
||||
self::renderSingleView($this->menu->setID($this->getMenuID()))),
|
||||
));
|
||||
}
|
||||
|
||||
$crumbs = null;
|
||||
|
|
|
@ -126,7 +126,11 @@ final class PhabricatorMenuItemView extends AphrontTagView {
|
|||
$this->name.$external);
|
||||
}
|
||||
|
||||
return $this->renderChildren().$name;
|
||||
return $this->renderHTMLView(
|
||||
array(
|
||||
$this->renderHTMLChildren(),
|
||||
$name,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,12 +28,12 @@ final class PhabricatorMainMenuGroupView extends AphrontView {
|
|||
$classes = array_merge($classes, $this->classes);
|
||||
}
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => implode(' ', $classes),
|
||||
),
|
||||
$this->renderChildren());
|
||||
$this->renderHTMLChildren());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue