mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 11:22:40 +01:00
9a0ae6376f
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
37 lines
868 B
PHP
37 lines
868 B
PHP
<?php
|
|
|
|
final class PhabricatorPinboardView extends AphrontView {
|
|
|
|
private $items = array();
|
|
private $noDataString;
|
|
|
|
public function setNoDataString($no_data_string) {
|
|
$this->noDataString = $no_data_string;
|
|
return $this;
|
|
}
|
|
|
|
public function addItem(PhabricatorPinboardItemView $item) {
|
|
$this->items[] = $item;
|
|
return $this;
|
|
}
|
|
|
|
public function render() {
|
|
require_celerity_resource('phabricator-pinboard-view-css');
|
|
|
|
if (!$this->items) {
|
|
$string = nonempty($this->noDataString, pht('No data.'));
|
|
return id(new AphrontErrorView())
|
|
->setSeverity(AphrontErrorView::SEVERITY_NODATA)
|
|
->appendChild(phutil_escape_html($string))
|
|
->render();
|
|
}
|
|
|
|
return phutil_tag(
|
|
'div',
|
|
array(
|
|
'class' => 'phabricator-pinboard-view',
|
|
),
|
|
$this->renderHTMLView($this->items));
|
|
}
|
|
|
|
}
|