X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/af106f2dee658f1605891b4c69ca1036946c5147..10a6c925566711afc44db711fb10d6a4a0c70a91:/templates/playing.tmpl diff --git a/templates/playing.tmpl b/templates/playing.tmpl index c910120..b8c80bd 100644 --- a/templates/playing.tmpl +++ b/templates/playing.tmpl @@ -3,129 +3,101 @@ This file is part of DisOrder. Copyright (C) 2004-2008 Richard Kettlewell -This program is free software; you can redistribute it and/or modify +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or +the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -USA +along with this program. If not, see . --> @discard{ - @include{macros.tmpl} + + @# On/off button for pause etc + @# @class should be the class: pause, random, playing + @# @action should be the action to switch to the opposite state + @# @state should be the current state + @define {onoff} {class action state} + {@actbutton{@label{playing.@class}} + {@label{playing.@q{@action}verbose}} + {@action} + } + + @# Volume up/down buttons + @# @dir is the direction: up or down + @# @sign is the sign: + or - + @define {vbutton}{dir sign} + {@right{volume} + { + @label{volume.@dir} + } + {}} + + @# Expand to @yes for the Manage page and @no for the playing page + @define {ifmanage} {yes no} + {@if {@eq {@arg{action}}{manage}} + {@yes} + {@no}} + + @ifmanage{ + @define {back} {} {&back=manage} + @define {formback} {} {} + }{} }@# -@include{stdhead.tmpl}@# +@quiethead @if{@isplaying} {@playing{@part{@id}{title}}} {@label{playing.title}} -@include{topbar.tmpl} +@stdmenu{@ifmanage{manage}{playing}}

@label{playing.title}

@# Extra control buttons for the management page @ifmanage{
-

- @if{@paused}{ -@# Paused - @label{playing.pause} - - - }{ -@# Not paused - @label{playing.pause} - - - } - @if{@random-enabled}{ -@# Random play enabled - @label{playing.random} - - - }{ -@# Random play disabled - @label{playing.random} - - - } - @if{@enabled}{ -@# Play enabled - @label{playing.playing} - - - }{ -@# Play disabled - @label{playing.playing} - - - } -@# Volume form -

- - @label{playing.volume} -@# Volume up button - @right{volume}{ - - @label{volume.reduce} - - }{ - - } -@# Volume value widgets - @label{volume.left} - @label{volume.right} - -@# Volume set button - @right{volume}{ - - - } -@# Volume down button - @right{volume}{ - - @label{volume.increase} - - }{ - - } - -
-

+

+ @if{@paused} + {@onoff{pause}{resume}{enabled}} + {@onoff{pause}{pause}{disabled}} + @if{@random-enabled} + {@onoff{random}{randomdisable}{enabled}} + {@onoff{random}{randomenable}{disabled}} + @if{@enabled} + {@onoff{playing}{disable}{enabled}} + {@onoff{playing}{enable}{disabled}} +

+ + @label{playing.volume} + @vbutton{up}{+} + @label{volume.left} + + @label{volume.right} + + + @right{volume}{ + @submit{@label{volume.set}} + + } + @vbutton{down}{-} + +
+

}{} @@ -141,60 +113,60 @@ USA @label{heading.length}   @ifmanage{ -   -   -   -   +   +   +   +   }{} @if{@isplaying}{ - @label{playing.now} + @label{playing.now} } @playing{ - @mwhen{playing}{@id} - @mwho{playing}{@id} - @martist{playing}{@track} - @malbum{playing}{@track} - @mtitle{playing}{@track} - @length{@id} - @mremove{playing}{@id} - @ifmanage{ -   -   -   -   - }{} + @mwhen{playing}{@id} + @mwho{playing}{@id} + @martist{playing}{@track} + @malbum{playing}{@track} + @mtitle{playing}{@track} + @length{@id} + @mremove{playing}{@id} + @ifmanage{ +   +   +   +   + }{} } - @if{@isqueue@}{ - - @label{playing.next} - + @if{@isqueue}{ + + @label{playing.next} + } @queue{ - - @mwhen{queue}{@id} - @mwho{queue}{@id} - @martist{queue}{@track} - @malbum{queue}{@track} - @mtitle{queue}{@track} - @length - @mremove{queue}{@id} - @ifmanage{ - @mmove{@id}{upall}{2147483647} - @mmove{@id}{up}{1} - @mmove{@id}{down}{-1} - @mmove{@id}{downall}{-2147483647} - } - - } + + @mwhen{queue}{@id} + @mwho{queue}{@id} + @martist{queue}{@track} + @malbum{queue}{@track} + @mtitle{queue}{@track} + @length{@id} + @mremove{queue}{@id} + @ifmanage{ + @mmove{@id}{upall}{2147483647} + @mmove{@id}{up}{1} + @mmove{@id}{down}{-1} + @mmove{@id}{downall}{-2147483647} + }{} + + } } -@include{topbarend.tmpl}@# +@credits @discard{ @@ -203,5 +175,6 @@ mode:sgml sgml-always-quote-attributes:nil sgml-indent-step:1 sgml-indent-data:t +indent-tabs-mode:nil End: -}@ +}@#