Page MenuHomePhabricator

D14709.id35577.diff
No OneTemporary

D14709.id35577.diff

diff --git a/src/applications/phame/controller/blog/PhameBlogArchiveController.php b/src/applications/phame/controller/blog/PhameBlogArchiveController.php
--- a/src/applications/phame/controller/blog/PhameBlogArchiveController.php
+++ b/src/applications/phame/controller/blog/PhameBlogArchiveController.php
@@ -20,7 +20,7 @@
return new Aphront404Response();
}
- $view_uri = $this->getApplicationURI('blog/view/'.$blog->getID().'/');
+ $view_uri = $this->getApplicationURI('blog/manage/'.$blog->getID().'/');
if ($request->isFormPost()) {
if ($blog->isArchived()) {
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
@@ -82,12 +82,12 @@
$skin = $blog->getSkin();
if (!$skin) {
- $skin = pht('(No external skin)');
+ $skin = phutil_tag('em', array(), pht('No external skin'));
}
$domain = $blog->getDomain();
if (!$domain) {
- $domain = pht('(No external domain)');
+ $domain = phutil_tag('em', array(), pht('No external domain'));
}
$properties->addProperty(pht('Skin'), $skin);
@@ -150,21 +150,6 @@
$actions->addAction(
id(new PhabricatorActionView())
- ->setIcon('fa-plus')
- ->setHref($this->getApplicationURI('post/edit/?blog='.$blog->getID()))
- ->setName(pht('Write Post'))
- ->setDisabled(!$can_edit)
- ->setWorkflow(!$can_edit));
-
- $actions->addAction(
- id(new PhabricatorActionView())
- ->setUser($viewer)
- ->setIcon('fa-globe')
- ->setHref($blog->getLiveURI())
- ->setName(pht('View Live')));
-
- $actions->addAction(
- id(new PhabricatorActionView())
->setIcon('fa-pencil')
->setHref($this->getApplicationURI('blog/edit/'.$blog->getID().'/'))
->setName(pht('Edit Blog'))
diff --git a/src/applications/phame/storage/PhameBlogTransaction.php b/src/applications/phame/storage/PhameBlogTransaction.php
--- a/src/applications/phame/storage/PhameBlogTransaction.php
+++ b/src/applications/phame/storage/PhameBlogTransaction.php
@@ -32,6 +32,7 @@
public function getIcon() {
$old = $this->getOldValue();
+ $new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_NAME:
if ($old === null) {
@@ -44,11 +45,33 @@
case self::TYPE_DOMAIN:
case self::TYPE_SKIN:
return 'fa-pencil';
+ case self::TYPE_STATUS:
+ if ($new == PhameBlog::STATUS_ARCHIVED) {
+ return 'fa-ban';
+ } else {
+ return 'fa-check';
+ }
break;
}
return parent::getIcon();
}
+ public function getColor() {
+
+ $old = $this->getOldValue();
+ $new = $this->getNewValue();
+
+ switch ($this->getTransactionType()) {
+ case self::TYPE_STATUS:
+ if ($new == PhameBlog::STATUS_ARCHIVED) {
+ return 'red';
+ } else {
+ return 'green';
+ }
+ }
+ return parent::getColor();
+ }
+
public function getMailTags() {
$tags = parent::getMailTags();
@@ -184,21 +207,6 @@
return parent::getTitleForFeed();
}
- public function getColor() {
- $old = $this->getOldValue();
-
- switch ($this->getTransactionType()) {
- case self::TYPE_NAME:
- if ($old === null) {
- return PhabricatorTransactions::COLOR_GREEN;
- }
- break;
- }
-
- return parent::getColor();
- }
-
-
public function hasChangeDetails() {
switch ($this->getTransactionType()) {
case self::TYPE_DESCRIPTION:

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 3, 1:49 AM (2 d, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7593885
Default Alt Text
D14709.id35577.diff (3 KB)

Event Timeline