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

Partially modernize UI for Slowvote

Summary: Move some UI stuff to modern kit.

Test Plan: {F50024}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

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

+25 -14
+6 -9
src/applications/slowvote/controller/PhabricatorSlowvoteCreateController.php
··· 74 74 75 75 $form = id(new AphrontFormView()) 76 76 ->setUser($user) 77 + ->setFlexible(true) 77 78 ->appendChild($instructions) 78 79 ->appendChild( 79 - id(new AphrontFormTextControl()) 80 + id(new AphrontFormTextAreaControl()) 81 + ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT) 80 82 ->setLabel(pht('Question')) 81 83 ->setName('question') 82 84 ->setValue($poll->getQuestion()) ··· 131 133 ->addCheckbox( 132 134 'shuffle', 133 135 1, 134 - pht('Show choices in random order'), 136 + pht('Show choices in random order.'), 135 137 $poll->getShuffle())) 136 138 ->appendChild( 137 139 id(new AphrontFormSubmitControl()) 138 140 ->setValue(pht('Create Slowvote')) 139 141 ->addCancelButton('/vote/')); 140 142 141 - $panel = new AphrontPanelView(); 142 - $panel->setWidth(AphrontPanelView::WIDTH_FORM); 143 - $panel->setHeader(pht('Create Slowvote')); 144 - $panel->setNoBackground(); 145 - $panel->appendChild($form); 146 - 147 143 $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView()); 148 144 $crumbs->addCrumb( 149 145 id(new PhabricatorCrumbView()) ··· 154 150 array( 155 151 $crumbs, 156 152 $error_view, 157 - $panel, 153 + $form, 158 154 ), 159 155 array( 160 156 'title' => pht('Create Slowvote'), 161 157 'device' => true, 158 + 'dust' => true, 162 159 )); 163 160 } 164 161
+19 -5
src/applications/slowvote/controller/PhabricatorSlowvotePollController.php
··· 130 130 131 131 $form = id(new AphrontFormView()) 132 132 ->setUser($user) 133 + ->setFlexible(true) 133 134 ->setAction(sprintf('/vote/%d/', $poll->getID())) 134 135 ->appendChild(hsprintf( 135 136 '<p class="aphront-form-instructions">%s</p>', ··· 148 149 id(new AphrontFormSubmitControl()) 149 150 ->setValue(pht('Engage in Deliberations'))); 150 151 152 + $header = id(new PhabricatorHeaderView()) 153 + ->setHeader($poll->getQuestion()); 154 + 155 + $crumbs = $this->buildApplicationCrumbs(); 156 + $crumbs->addCrumb( 157 + id(new PhabricatorCrumbView()) 158 + ->setName('V'.$poll->getID())); 151 159 152 160 $panel = new AphrontPanelView(); 153 - $panel->setHeader($poll->getQuestion()); 154 161 $panel->setWidth(AphrontPanelView::WIDTH_WIDE); 155 - $panel->setNoBackground(); 156 - $panel->appendChild($form); 157 - $panel->appendChild(hsprintf('<br /><br />')); 158 162 $panel->appendChild($result_markup); 159 163 164 + $content = array( 165 + $form, 166 + hsprintf('<br /><br />'), 167 + $panel); 168 + 160 169 return $this->buildApplicationPage( 161 - $panel, 170 + array( 171 + $crumbs, 172 + $header, 173 + $content, 174 + ), 162 175 array( 163 176 'title' => 'V'.$poll->getID().' '.$poll->getQuestion(), 164 177 'device' => true, 178 + 'dust' => true, 165 179 )); 166 180 } 167 181