@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Normalize 'Archived' states in object headers

Summary: Quick pass at cleaning up language, icons, colors for 'Archive' and 'Activate' on various objects.

Test Plan:
Tested archiving and activating each object changed.

{F262694}

{F262697}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11256

+41 -30
+10 -3
src/applications/dashboard/controller/PhabricatorDashboardPanelViewController.php
··· 72 72 private function buildHeaderView(PhabricatorDashboardPanel $panel) { 73 73 $viewer = $this->getRequest()->getUser(); 74 74 75 - return id(new PHUIHeaderView()) 75 + $header = id(new PHUIHeaderView()) 76 76 ->setUser($viewer) 77 77 ->setHeader($panel->getName()) 78 78 ->setPolicyObject($panel); 79 + 80 + if (!$panel->getIsArchived()) { 81 + $header->setStatus('fa-check', 'bluegrey', pht('Active')); 82 + } else { 83 + $header->setStatus('fa-ban', 'red', pht('Archived')); 84 + } 85 + return $header; 79 86 } 80 87 81 88 private function buildActionView(PhabricatorDashboardPanel $panel) { ··· 101 108 102 109 if (!$panel->getIsArchived()) { 103 110 $archive_text = pht('Archive Panel'); 104 - $archive_icon = 'fa-times'; 111 + $archive_icon = 'fa-ban'; 105 112 } else { 106 113 $archive_text = pht('Activate Panel'); 107 - $archive_icon = 'fa-plus'; 114 + $archive_icon = 'fa-check'; 108 115 } 109 116 110 117 $actions->addAction(
+4 -4
src/applications/herald/controller/HeraldDisableController.php
··· 52 52 } 53 53 54 54 if ($is_disable) { 55 - $title = pht('Really disable this rule?'); 55 + $title = pht('Really archive this rule?'); 56 56 $body = pht('This rule will no longer activate.'); 57 - $button = pht('Disable Rule'); 57 + $button = pht('Archive Rule'); 58 58 } else { 59 - $title = pht('Really enable this rule?'); 59 + $title = pht('Really activate this rule?'); 60 60 $body = pht('This rule will become active again.'); 61 - $button = pht('Enable Rule'); 61 + $button = pht('Activate Rule'); 62 62 } 63 63 64 64 $dialog = id(new AphrontDialogView())
+5 -5
src/applications/herald/controller/HeraldRuleViewController.php
··· 29 29 if ($rule->getIsDisabled()) { 30 30 $header->setStatus( 31 31 'fa-ban', 32 - 'dark', 33 - pht('Disabled')); 32 + 'red', 33 + pht('Archived')); 34 34 } else { 35 35 $header->setStatus( 36 36 'fa-check', ··· 90 90 91 91 if ($rule->getIsDisabled()) { 92 92 $disable_uri = "disable/{$id}/enable/"; 93 - $disable_icon = 'fa-check-circle-o'; 94 - $disable_name = pht('Enable Rule'); 93 + $disable_icon = 'fa-check'; 94 + $disable_name = pht('Activate Rule'); 95 95 } else { 96 96 $disable_uri = "disable/{$id}/disable/"; 97 97 $disable_icon = 'fa-ban'; 98 - $disable_name = pht('Disable Rule'); 98 + $disable_name = pht('Archive Rule'); 99 99 } 100 100 101 101 $view->addAction(
+2 -2
src/applications/herald/storage/HeraldRuleTransaction.php
··· 57 57 switch ($this->getTransactionType()) { 58 58 case self::TYPE_DISABLE: 59 59 if ($new) { 60 - return 'fa-pause'; 60 + return 'fa-ban'; 61 61 } else { 62 - return 'fa-play'; 62 + return 'fa-check'; 63 63 } 64 64 } 65 65
+7 -9
src/applications/macro/controller/PhabricatorMacroViewController.php
··· 60 60 ->setPolicyObject($macro) 61 61 ->setHeader($title_long); 62 62 63 - if ($macro->getIsDisabled()) { 64 - $header->addTag( 65 - id(new PHUITagView()) 66 - ->setType(PHUITagView::TYPE_STATE) 67 - ->setName(pht('Macro Disabled')) 68 - ->setBackgroundColor(PHUITagView::COLOR_BLACK)); 63 + if (!$macro->getIsDisabled()) { 64 + $header->setStatus('fa-check', 'bluegrey', pht('Active')); 65 + } else { 66 + $header->setStatus('fa-ban', 'red', pht('Archived')); 69 67 } 70 68 71 69 $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); ··· 132 130 if ($macro->getIsDisabled()) { 133 131 $view->addAction( 134 132 id(new PhabricatorActionView()) 135 - ->setName(pht('Restore Macro')) 133 + ->setName(pht('Activate Macro')) 136 134 ->setHref($this->getApplicationURI('/disable/'.$macro->getID().'/')) 137 135 ->setWorkflow(true) 138 136 ->setDisabled(!$can_manage) 139 - ->setIcon('fa-check-circle-o')); 137 + ->setIcon('fa-check')); 140 138 } else { 141 139 $view->addAction( 142 140 id(new PhabricatorActionView()) 143 - ->setName(pht('Disable Macro')) 141 + ->setName(pht('Archive Macro')) 144 142 ->setHref($this->getApplicationURI('/disable/'.$macro->getID().'/')) 145 143 ->setWorkflow(true) 146 144 ->setDisabled(!$can_manage)
+8 -2
src/applications/ponder/controller/PonderQuestionViewController.php
··· 47 47 $header = id(new PHUIHeaderView()) 48 48 ->setHeader($question->getTitle()); 49 49 50 + if ($question->getStatus() == PonderQuestionStatus::STATUS_OPEN) { 51 + $header->setStatus('fa-square-o', 'bluegrey', pht('Open')); 52 + } else { 53 + $header->setStatus('fa-check-square-o', 'dark', pht('Closed')); 54 + } 55 + 50 56 $actions = $this->buildActionListView($question); 51 57 $properties = $this->buildPropertyListView($question, $actions); 52 58 ··· 100 106 101 107 if ($question->getStatus() == PonderQuestionStatus::STATUS_OPEN) { 102 108 $name = pht('Close Question'); 103 - $icon = 'fa-times'; 109 + $icon = 'fa-check-square-o'; 104 110 $href = 'close'; 105 111 } else { 106 112 $name = pht('Reopen Question'); 107 - $icon = 'fa-check-circle-o'; 113 + $icon = 'fa-square-o'; 108 114 $href = 'open'; 109 115 } 110 116
+2 -2
src/applications/project/controller/PhabricatorProjectArchiveController.php
··· 52 52 } 53 53 54 54 if ($project->isArchived()) { 55 - $title = pht('Really unarchive project?'); 55 + $title = pht('Really activate project?'); 56 56 $body = pht('This project will become active again.'); 57 - $button = pht('Unarchive Project'); 57 + $button = pht('Activate Project'); 58 58 } else { 59 59 $title = pht('Really archive project?'); 60 60 $body = pht('This project will be moved to the archive.');
+2 -2
src/applications/project/controller/PhabricatorProjectEditMainController.php
··· 37 37 if ($project->getStatus() == PhabricatorProjectStatus::STATUS_ACTIVE) { 38 38 $header->setStatus('fa-check', 'bluegrey', pht('Active')); 39 39 } else { 40 - $header->setStatus('fa-ban', 'dark', pht('Archived')); 40 + $header->setStatus('fa-ban', 'red', pht('Archived')); 41 41 } 42 42 43 43 $actions = $this->buildActionListView($project); ··· 104 104 if ($project->isArchived()) { 105 105 $view->addAction( 106 106 id(new PhabricatorActionView()) 107 - ->setName(pht('Unarchive Project')) 107 + ->setName(pht('Activate Project')) 108 108 ->setIcon('fa-check') 109 109 ->setHref($this->getApplicationURI("archive/{$id}/")) 110 110 ->setDisabled(!$can_edit)
+1 -1
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 80 80 if ($project->getStatus() == PhabricatorProjectStatus::STATUS_ACTIVE) { 81 81 $header->setStatus('fa-check', 'bluegrey', pht('Active')); 82 82 } else { 83 - $header->setStatus('fa-ban', 'dark', pht('Archived')); 83 + $header->setStatus('fa-ban', 'red', pht('Archived')); 84 84 } 85 85 86 86 $actions = $this->buildActionListView($project);