@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.

Provide a 'no dashboards' fallback state if you can't add any

Summary: Ref T10390. Catch if the user doesn't have any dashboards they can edit and give them a helpful message instead.

Test Plan: Clean install, no dashboards, Click "Add to Dashboard" on ApplicationSearch results, see no dashboards message

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10390

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

+14
+14
src/applications/dashboard/controller/PhabricatorDashboardQueryPanelInstallController.php
··· 149 149 150 150 $redirect_uri = $engine->getQueryResultsPageURI($v_query); 151 151 152 + if (!$options) { 153 + $notice = id(new PHUIInfoView()) 154 + ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 155 + ->appendChild(pht('You do not have access to any dashboards. To '. 156 + 'continue, please create a dashboard first.')); 157 + 158 + return $this->newDialog() 159 + ->setTitle(pht('No Dashboards')) 160 + ->setWidth(AphrontDialogView::WIDTH_FORM) 161 + ->appendChild($notice) 162 + ->addCancelButton($redirect_uri); 163 + } 164 + 152 165 $form = id(new AphrontFormView()) 153 166 ->setUser($viewer) 154 167 ->addHiddenInput('engine', $v_engine) ··· 175 188 ->appendChild($form->buildLayoutView()) 176 189 ->addCancelButton($redirect_uri) 177 190 ->addSubmitButton(pht('Add Panel')); 191 + 178 192 } 179 193 180 194 }