Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15382710
D16126.id38798.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D16126.id38798.diff
View Options
diff --git a/src/applications/phame/controller/blog/PhameBlogManageController.php b/src/applications/phame/controller/blog/PhameBlogManageController.php
--- a/src/applications/phame/controller/blog/PhameBlogManageController.php
+++ b/src/applications/phame/controller/blog/PhameBlogManageController.php
@@ -38,8 +38,8 @@
->setImage($picture)
->setStatus($header_icon, $header_color, $header_name);
- $actions = $this->renderActions($blog, $viewer);
- $properties = $this->renderProperties($blog, $viewer, $actions);
+ $curtain = $this->buildCurtain($blog);
+ $properties = $this->buildPropertyView($blog);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(
@@ -47,6 +47,7 @@
$this->getApplicationURI('blog/'));
$crumbs->addTextCrumb(
$blog->getName());
+ $crumbs->setBorder(true);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
@@ -57,28 +58,33 @@
new PhameBlogTransactionQuery());
$timeline->setShouldTerminate(true);
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setCurtain($curtain)
+ ->addPropertySection(pht('Details'), $properties)
+ ->setMainColumn(
+ array(
+ $timeline,
+ ));
+
return $this->newPage()
->setTitle($blog->getName())
->setCrumbs($crumbs)
->appendChild(
array(
- $object_box,
- $timeline,
+ $view,
));
}
- private function renderProperties(
- PhameBlog $blog,
- PhabricatorUser $viewer,
- PhabricatorActionListView $actions) {
+ private function buildPropertyView(PhameBlog $blog) {
+ $viewer = $this->getViewer();
require_celerity_resource('aphront-tooltip-css');
Javelin::initBehavior('phabricator-tooltips');
$properties = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($blog)
- ->setActionList($actions);
+ ->setObject($blog);
$domain = $blog->getDomain();
if (!$domain) {
@@ -129,7 +135,11 @@
return $properties;
}
- private function renderActions(PhameBlog $blog, PhabricatorUser $viewer) {
+ private function buildCurtain(PhameBlog $blog) {
+ $viewer = $this->getViewer();
+
+ $curtain = $this->newCurtainView($viewer);
+
$actions = id(new PhabricatorActionListView())
->setObject($blog)
->setUser($viewer);
@@ -139,7 +149,7 @@
$blog,
PhabricatorPolicyCapability::CAN_EDIT);
- $actions->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setIcon('fa-pencil')
->setHref($this->getApplicationURI('blog/edit/'.$blog->getID().'/'))
@@ -147,7 +157,7 @@
->setDisabled(!$can_edit)
->setWorkflow(!$can_edit));
- $actions->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setIcon('fa-picture-o')
->setHref($this->getApplicationURI('blog/picture/'.$blog->getID().'/'))
@@ -156,7 +166,7 @@
->setWorkflow(!$can_edit));
if ($blog->isArchived()) {
- $actions->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Activate Blog'))
->setIcon('fa-check')
@@ -165,7 +175,7 @@
->setDisabled(!$can_edit)
->setWorkflow(true));
} else {
- $actions->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Archive Blog'))
->setIcon('fa-ban')
@@ -175,7 +185,7 @@
->setWorkflow(true));
}
- return $actions;
+ return $curtain;
}
}
diff --git a/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php b/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php
--- a/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php
+++ b/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php
@@ -175,6 +175,7 @@
$form_box = id(new PHUIObjectBoxView())
->setHeaderText($title)
->setFormErrors($errors)
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setForm($form);
$upload_form = id(new AphrontFormView())
@@ -194,6 +195,7 @@
$upload_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Upload New Picture'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setForm($upload_form);
$crumbs = $this->buildApplicationCrumbs();
@@ -204,14 +206,25 @@
$blog->getName(),
$this->getApplicationURI('blog/view/'.$id));
$crumbs->addTextCrumb(pht('Blog Picture'));
+ $crumbs->setBorder(true);
+
+ $header = id(new PHUIHeaderView())
+ ->setHeader(pht('Edit Blog Picture'))
+ ->setHeaderIcon('fa-camera');
+
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setFooter(array(
+ $form_box,
+ $upload_box,
+ ));
return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild(
array(
- $form_box,
- $upload_box,
+ $view,
));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 2:01 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7620313
Default Alt Text
D16126.id38798.diff (5 KB)
Attached To
Mode
D16126: Use modern layout in Phame Blog management
Attached
Detach File
Event Timeline
Log In to Comment