Page MenuHomePhabricator

D14399.id34785.diff
No OneTemporary

D14399.id34785.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => 'a79276eb',
+ 'core.pkg.css' => '5bb64897',
'core.pkg.js' => '47dc9ebb',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '2de124c9',
@@ -104,7 +104,7 @@
'rsrc/css/application/tokens/tokens.css' => '3d0f239e',
'rsrc/css/application/uiexample/example.css' => '528b19de',
'rsrc/css/core/core.css' => '78e8d7ea',
- 'rsrc/css/core/remarkup.css' => '82f4e4c5',
+ 'rsrc/css/core/remarkup.css' => '8f6bd845',
'rsrc/css/core/syntax.css' => '9fd11da8',
'rsrc/css/core/z-index.css' => '57ddcaa2',
'rsrc/css/diviner/diviner-shared.css' => 'aa3656aa',
@@ -129,7 +129,7 @@
'rsrc/css/phui/phui-document-pro.css' => '61d70f8e',
'rsrc/css/phui/phui-document.css' => '9fa715d2',
'rsrc/css/phui/phui-feed-story.css' => 'b7b26d23',
- 'rsrc/css/phui/phui-fontkit.css' => 'c9d63950',
+ 'rsrc/css/phui/phui-fontkit.css' => '9cda225e',
'rsrc/css/phui/phui-form-view.css' => '621b21c5',
'rsrc/css/phui/phui-form.css' => 'afdb2c6e',
'rsrc/css/phui/phui-header-view.css' => '55bb32dd',
@@ -740,7 +740,7 @@
'phabricator-object-selector-css' => '85ee8ce6',
'phabricator-phtize' => 'd254d646',
'phabricator-prefab' => '6920d200',
- 'phabricator-remarkup-css' => '82f4e4c5',
+ 'phabricator-remarkup-css' => '8f6bd845',
'phabricator-search-results-css' => '7dea472c',
'phabricator-shaped-request' => '7cbe244b',
'phabricator-side-menu-view-css' => 'bec2458e',
@@ -784,7 +784,7 @@
'phui-document-view-pro-css' => '61d70f8e',
'phui-feed-story-css' => 'b7b26d23',
'phui-font-icon-base-css' => 'ecbbb4c2',
- 'phui-fontkit-css' => 'c9d63950',
+ 'phui-fontkit-css' => '9cda225e',
'phui-form-css' => 'afdb2c6e',
'phui-form-view-css' => '621b21c5',
'phui-header-view-css' => '55bb32dd',
diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php
--- a/src/applications/phriction/controller/PhrictionDocumentController.php
+++ b/src/applications/phriction/controller/PhrictionDocumentController.php
@@ -212,11 +212,12 @@
$prop_list->addPropertyList($properties);
}
- $page_content = id(new PHUIDocumentView())
+ $page_content = id(new PHUIDocumentViewPro())
->setHeader($header)
+ ->setPropertyList($prop_list)
+ ->setToc($this->getToc())
->appendChild(
array(
- $prop_list,
$version_note,
$move_notice,
$core_content,
@@ -230,7 +231,8 @@
),
array(
'pageObjects' => array($document->getPHID()),
- 'title' => $page_title,
+ 'title' => $page_title,
+ 'class' => 'pro-white-background',
));
}
@@ -278,6 +280,7 @@
$action_view->addAction(
id(new PhabricatorActionView())
->setName(pht('Edit Document'))
+ ->setDisabled($can_edit)
->setIcon('fa-pencil')
->setHref('/phriction/edit/'.$document->getID().'/'));
@@ -285,6 +288,7 @@
$action_view->addAction(
id(new PhabricatorActionView())
->setName(pht('Move Document'))
+ ->setDisabled($can_edit)
->setIcon('fa-arrows')
->setHref('/phriction/move/'.$document->getID().'/')
->setWorkflow(true));
@@ -292,6 +296,7 @@
$action_view->addAction(
id(new PhabricatorActionView())
->setName(pht('Delete Document'))
+ ->setDisabled($can_edit)
->setIcon('fa-times')
->setHref('/phriction/delete/'.$document->getID().'/')
->setWorkflow(true));
@@ -431,7 +436,7 @@
),
$list)));
- return phutil_tag_div('phui-document-box', $box);
+ return phutil_tag_div('phui-document-view-pro-box', $box);
}
private function renderChildDocumentLink(array $info) {
@@ -454,4 +459,19 @@
return $this->slug;
}
+ protected function getToc() {
+ $engine = new PhutilRemarkupEngine();
+ $toc = PhutilRemarkupHeaderBlockRule::renderTableOfContents($engine);
+ print_r($toc);
+ if ($toc) {
+ $toc = phutil_tag_div('phabricator-remarkup-toc', array(
+ phutil_tag_div(
+ 'phabricator-remarkup-toc-header',
+ pht('Contents')),
+ $toc,
+ ));
+ }
+ return $toc;
+ }
+
}
diff --git a/src/applications/phriction/storage/PhrictionContent.php b/src/applications/phriction/storage/PhrictionContent.php
--- a/src/applications/phriction/storage/PhrictionContent.php
+++ b/src/applications/phriction/storage/PhrictionContent.php
@@ -98,27 +98,12 @@
$output,
PhutilMarkupEngine $engine) {
- $classes = array();
- $classes[] = 'phabricator-remarkup';
- $toc = PhutilRemarkupHeaderBlockRule::renderTableOfContents(
- $engine);
-
- if ($toc) {
- $classes[] = 'remarkup-has-toc';
- $toc = phutil_tag_div('phabricator-remarkup-toc', array(
- phutil_tag_div(
- 'phabricator-remarkup-toc-header',
- pht('Table of Contents')),
- $toc,
- ));
- }
-
return phutil_tag(
'div',
array(
- 'class' => implode(' ', $classes),
+ 'class' => 'phabricator-remarkup',
),
- array($toc, $output));
+ $output);
}
diff --git a/src/view/phui/PHUIDocumentViewPro.php b/src/view/phui/PHUIDocumentViewPro.php
--- a/src/view/phui/PHUIDocumentViewPro.php
+++ b/src/view/phui/PHUIDocumentViewPro.php
@@ -31,7 +31,7 @@
return $this;
}
- public function setToc(PHUIListView $toc) {
+ public function setToc($toc) {
$this->toc = $toc;
return $this;
}
diff --git a/webroot/rsrc/css/core/remarkup.css b/webroot/rsrc/css/core/remarkup.css
--- a/webroot/rsrc/css/core/remarkup.css
+++ b/webroot/rsrc/css/core/remarkup.css
@@ -155,8 +155,11 @@
margin: 4px 0;
}
-.phabricator-remarkup .remarkup-header + .remarkup-header {
- margin-top: 0px;
+.phabricator-remarkup h3.remarkup-header + h4.remarkup-header {
+ color: {$bluetext};
+ font-weight: normal;
+ margin-bottom: 16px;
+ margin-top: -4px;
}
.phabricator-remarkup blockquote {
@@ -363,12 +366,12 @@
padding-top: 0;
}
-body .phabricator-remarkup *:first-child,
-body .phabricator-remarkup .remarkup-header + * {
+body .phabricator-standard-page div.phabricator-remarkup *:first-child,
+body .phabricator-standard-page div.phabricator-remarkup .remarkup-header + * {
margin-top: 0;
}
-body .phabricator-remarkup *:last-child {
+body div.phabricator-remarkup *:last-child {
margin-bottom: 0;
}
diff --git a/webroot/rsrc/css/phui/phui-fontkit.css b/webroot/rsrc/css/phui/phui-fontkit.css
--- a/webroot/rsrc/css/phui/phui-fontkit.css
+++ b/webroot/rsrc/css/phui/phui-fontkit.css
@@ -26,8 +26,11 @@
font-family: 'Aleo', {$fontfamily};
}
+.phui-document-view .phabricator-remarkup .remarkup-header {
+ margin-bottom: 8px;
+}
+
.phui-document-view .phabricator-remarkup h2.remarkup-header {
padding: 0 24px 8px 0;
- border-bottom: 1px solid {$thinblueborder};
- margin: 32px 0 16px;
+ margin: 32px 0 4px;
}

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 10:01 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716877
Default Alt Text
D14399.id34785.diff (7 KB)

Event Timeline