1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 11:22:40 +01:00
phorge-phorge/src/view/phui/PHUIDocumentSummaryView.php
Chad Little 9a19309345 Update PhameBlogView UI
Summary: Creates a new PhameBlogView which is more of a blog landing page with the latest posts. Management has moved to PhameManageController with a new timeline.

Test Plan:
Edit Blog, Publish, Subscribe, view posts.

{F1008400}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9360

Differential Revision: https://secure.phabricator.com/D14608
2015-11-30 08:56:32 -08:00

86 lines
1.6 KiB
PHP

<?php
final class PHUIDocumentSummaryView extends AphrontTagView {
private $title;
private $image;
private $imageHref;
private $subtitle;
private $href;
private $summary;
public function setTitle($title) {
$this->title = $title;
return $this;
}
public function setSubtitle($subtitle) {
$this->subtitle = $subtitle;
return $this;
}
public function setImage($image) {
$this->image = $image;
return $this;
}
public function setImageHref($image_href) {
$this->imageHref = $image_href;
return $this;
}
public function setHref($href) {
$this->href = $href;
return $this;
}
public function setSummary($summary) {
$this->summary = $summary;
return $this;
}
protected function getTagAttributes() {
$classes = array();
$classes[] = 'phui-document-summary-view';
$classes[] = 'phabricator-remarkup';
return array(
'class' => implode(' ', $classes),
);
}
protected function getTagContent() {
require_celerity_resource('phui-document-summary-view-css');
$title = phutil_tag(
'a',
array(
'href' => $this->href,
),
$this->title);
$header = phutil_tag(
'h2',
array(
'class' => 'remarkup-header',
),
$title);
$subtitle = phutil_tag(
'div',
array(
'class' => 'phui-document-summary-subtitle',
),
$this->subtitle);
$body = phutil_tag(
'div',
array(
'class' => 'phui-document-summary-body',
),
$this->summary);
return array($header, $subtitle, $body);
}
}