Countdown tweaks
Summary: A few tweaks to hsb's Countdown implementation: - Allow the page to be rendered "chromeless", suitable for display on one of the dozens of monitors everyone has laying around. - Show title of countdown in deletion dialog. - When creating a new countdown default to time(), not Dec 31, 1969. - Add extra "/" after editing to avoid needless redirect. - Tweak some page titles. - Show countdown author in list view. - Highlight tab in list view. - Tweak menu copy. - Link countdown title in list view, separate buttons into different columns so they pick up padding. Test Plan: Created, edited and deleted a timer. Viewed a timer and toggled chrome mode. Viewed timer list. Reviewed By: hsb Reviewers: hsb, aran, jungejason, tuomaspelkonen CC: aran, hsb, epriestley Differential Revision: 454
This commit is contained in:
@@ -37,6 +37,15 @@ class PhabricatorCountdownViewController
|
||||
|
||||
require_celerity_resource('phabricator-countdown-css');
|
||||
|
||||
$chrome_visible = $request->getBool('chrome', true);
|
||||
$chrome_link = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $request->getRequestURI()->alter('chrome', !$chrome_visible),
|
||||
'class' => 'phabricator-timer-chrome-link',
|
||||
),
|
||||
$chrome_visible ? 'Disable Chrome' : 'Enable Chrome');
|
||||
|
||||
$content =
|
||||
'<div class="phabricator-timer">
|
||||
<h1 class="phabricator-timer-header">'.
|
||||
@@ -56,8 +65,9 @@ class PhabricatorCountdownViewController
|
||||
<td id="phabricator-timer-minutes"></td>
|
||||
<td id="phabricator-timer-seconds"></td>
|
||||
</table>
|
||||
</div>
|
||||
</div>';
|
||||
</div>'.
|
||||
$chrome_link.
|
||||
'</div>';
|
||||
|
||||
Javelin::initBehavior('countdown-timer', array(
|
||||
'timestamp' => $timer->getDatepoint()
|
||||
@@ -65,10 +75,12 @@ class PhabricatorCountdownViewController
|
||||
|
||||
$panel = $content;
|
||||
|
||||
return $this->buildStandardPageResponse($panel,
|
||||
return $this->buildStandardPageResponse(
|
||||
$panel,
|
||||
array(
|
||||
'title' => 'T-minus..',
|
||||
'title' => 'Countdown: '.$timer->getTitle(),
|
||||
'tab' => 'view',
|
||||
'chrome' => $chrome_visible
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user