2013-09-05 21:29:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DivinerSectionView extends AphrontTagView {
|
|
|
|
|
|
|
|
private $header;
|
|
|
|
private $content;
|
|
|
|
|
|
|
|
public function addContent($content) {
|
|
|
|
$this->content[] = $content;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setHeader($text) {
|
|
|
|
$this->header = $text;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2015-01-13 20:54:39 +01:00
|
|
|
protected function getTagName() {
|
2013-09-05 21:29:07 +02:00
|
|
|
return 'div';
|
|
|
|
}
|
|
|
|
|
2015-01-13 20:54:39 +01:00
|
|
|
protected function getTagAttributes() {
|
2013-09-05 21:29:07 +02:00
|
|
|
return array(
|
|
|
|
'class' => 'diviner-document-section',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-01-13 20:54:39 +01:00
|
|
|
protected function getTagContent() {
|
2013-09-05 21:29:07 +02:00
|
|
|
require_celerity_resource('diviner-shared-css');
|
|
|
|
|
2013-09-17 18:12:37 +02:00
|
|
|
$header = id(new PHUIHeaderView())
|
2013-09-05 21:29:07 +02:00
|
|
|
->setBleedHeader(true)
|
Redesign Diviner
Summary:
This implements `PHUIDocumentViewPro` which should move to be the base for all documents (Phame, Phriction, Legalpad, Diviner). Overall this feels really good to me, but I'd like to roll it out into Diviner specifically first to work through the issues and then move into other apps and drop `PHUIDocumentView` once everything is converted. Some features are:
- White Background, no border on page
- Table of Contents is move to hidden menu (more space for documentation)
- Property List sits under the document
Some design decisions above are in anticipation of Phriction v3 and Unbeta Phame, specifically commenting and maybe some cool new Remarkup text layout options for Phame.
Test Plan:
Went through tons of pages on Diviner on Desktop, Tablet, Mobile. Bounce back to Phriction to make sure DocumentView CSS changes actually look better there.
{F930518}
{F930519}
{F930520}
{F930521}
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: tycho.tatitscheff, joshuaspence, Korvin
Differential Revision: https://secure.phabricator.com/D14374
2015-11-01 17:56:46 +01:00
|
|
|
->addClass('diviner-section-header')
|
2013-09-05 21:29:07 +02:00
|
|
|
->setHeader($this->header);
|
|
|
|
|
Redesign Diviner
Summary:
This implements `PHUIDocumentViewPro` which should move to be the base for all documents (Phame, Phriction, Legalpad, Diviner). Overall this feels really good to me, but I'd like to roll it out into Diviner specifically first to work through the issues and then move into other apps and drop `PHUIDocumentView` once everything is converted. Some features are:
- White Background, no border on page
- Table of Contents is move to hidden menu (more space for documentation)
- Property List sits under the document
Some design decisions above are in anticipation of Phriction v3 and Unbeta Phame, specifically commenting and maybe some cool new Remarkup text layout options for Phame.
Test Plan:
Went through tons of pages on Diviner on Desktop, Tablet, Mobile. Bounce back to Phriction to make sure DocumentView CSS changes actually look better there.
{F930518}
{F930519}
{F930520}
{F930521}
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: tycho.tatitscheff, joshuaspence, Korvin
Differential Revision: https://secure.phabricator.com/D14374
2015-11-01 17:56:46 +01:00
|
|
|
$content = phutil_tag_div('diviner-section-content', $this->content);
|
2013-09-05 21:29:07 +02:00
|
|
|
|
|
|
|
return array($header, $content);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|