X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/9faa7a88b7419b2d6151ac2c3fa52261c876ee8d..57f55a15626f0b4089f8659336831d2707ef811e:/templates/playing.tmpl diff --git a/templates/playing.tmpl b/templates/playing.tmpl index b45d975..147333c 100644 --- a/templates/playing.tmpl +++ b/templates/playing.tmpl @@ -18,247 +18,165 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --> +@discard{ + + @# 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@ - @if{@isplaying@}{@playing{@part:title@}@}{@label:playing.title@}@ +@quiethead + @if{@isplaying} + {@playing{@part{@id}{title}}} + {@label{playing.title}} -@include{topbar}@ -

@label:playing.title@

+@stdmenu{@ifmanage{manage}{playing}} +

@label{playing.title}

- @#{extra control buttons for the management page}@ - @if{@arg:mgmt@}{ +@# Extra control buttons for the management page + @ifmanage{
-

- @if{@paused@}{ - - @label:playing.pause@ - - - }{ - - @label:playing.pause@ - - - }@ - @if{@random-enabled@}{ - - @label:playing.random@ - - - }{ - - @label:playing.random@ - - - }@ - @if{@enabled@}{ - - @label:playing.playing@ - - - }{ - - @label:playing.playing@ - - - }@ -

- - @label:playing.volume@ - @right{volume}{ - @label:volume.reduce@ - }{}@ - @label:volume.left@ - @label:volume.right@ - - @right{volume}{}@ - @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}{-} + +
+

- }@ + }{} -@#{only display the table if there is something to put in it}@ -@if{@or{@isplaying@}{@isqueue@}@}{ +@# Only display the table if there is something to put in it +@if{@or{@isplaying}{@isqueue}}{ - - - - - - + + + + + + - @if{@arg:mgmt@}{ - - - - - }@ - - @if{@isplaying@}{ - - + @ifmanage{ + + + + + }{} + @if{@isplaying}{ + + + + } @playing{ - - - - - - - - - @if{@arg:mgmt@}{ - - - - - }@ - - }@}@ - @if{@isqueue@}{ - - - + + + + + + + + + @ifmanage{ + + + + + }{} + + } + @if{@isqueue}{ + + + + } @queue{ - - - - - - - - - - @if{@arg:mgmt@}{ - @if{@or{@isfirst@} - {@not{@movable@}@}@}{ - - - }@}@ + + + + + + + + + @ifmanage{ + + + + + }{} + + }
@label:heading.when@@label:heading.who@@label:heading.artist@@label:heading.album@@label:heading.title@@label:heading.length@@label{heading.when}@label{heading.who}@label{heading.artist}@label{heading.album}@label{heading.title}@label{heading.length}      
@label:playing.now@    
@label{playing.now}
@when@@if{@eq{@who@}{}@}{@if{@eq{@state@}{random}@}{@label:playing.randomtrack@}{ }@}{@who@}@@right{play}{@part{short}{artist}@}{@part{short}{artist}@}@@right{play}{@part{short}{album}@}{@part{short}{album}@}@@part{short}{title}@@length@@if{@scratchable@}{@label:playing.scratch@}{@label:playing.scratch@}@    
@label:playing.next@
@mwhen{playing}{@id}@mwho{playing}{@id}@martist{playing}{@track}@malbum{playing}{@track}@mtitle{playing}{@track}@length{@id}@mremove{playing}{@id}    
@label{playing.next}
@when@@if{@eq{@who@}{}@}{@if{@eq{@state@}{random}@}{@label:queue.randomtrack@}{ }@}{@who@}@@right{play}{@part{short}{artist}@}{@part{short}{artist}@}@@right{play}{@part{short}{album}@}{@part{short}{album}@}@@part{short}{title}@@length@@if{@removable@}{@label:playing.remove@}{@label:playing.remove@}@ - - - - }{ - - - @label:playing.upall@ - - @label:playing.up@ - }@ - - @if{@or{@islast@} - {@not{@movable@}@}@}{ - - - - - - }{ - - - @label:playing.downall@ - - @label:playing.down@ - }@ - - }@ -
@mwhen{queue}{@id}@mwho{queue}{@id}@martist{queue}{@track}@malbum{queue}{@track}@mtitle{queue}{@track}@length{@id}@mremove{queue}{@id}@mmove{@id}{upall}{2147483647}@mmove{@id}{up}{1}@mmove{@id}{down}{-1}@mmove{@id}{downall}{-2147483647}
-}@ +} -@include{topbarend}@ +@credits -@@ - +}@#