mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
9c999e3548
Summary: Tightens up the CSS to display more items (4 wide on 15") and fixes some mobile CSS issues with appseach. Fixes T3614 Test Plan: Tested Pholio, Macros, mobile layouts Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T3614 Differential Revision: https://secure.phabricator.com/D6694
37 lines
797 B
PHP
37 lines
797 B
PHP
<?php
|
|
|
|
final class PHUIPinboardView extends AphrontView {
|
|
|
|
private $items = array();
|
|
private $noDataString;
|
|
|
|
public function setNoDataString($no_data_string) {
|
|
$this->noDataString = $no_data_string;
|
|
return $this;
|
|
}
|
|
|
|
public function addItem(PHUIPinboardItemView $item) {
|
|
$this->items[] = $item;
|
|
return $this;
|
|
}
|
|
|
|
public function render() {
|
|
require_celerity_resource('phui-pinboard-view-css');
|
|
|
|
if (!$this->items) {
|
|
$string = nonempty($this->noDataString, pht('No data.'));
|
|
return id(new AphrontErrorView())
|
|
->setSeverity(AphrontErrorView::SEVERITY_NODATA)
|
|
->appendChild($string)
|
|
->render();
|
|
}
|
|
|
|
return phutil_tag(
|
|
'div',
|
|
array(
|
|
'class' => 'phui-pinboard-view',
|
|
),
|
|
$this->items);
|
|
}
|
|
|
|
}
|