diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2007-11-09 19:01:49 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2007-11-09 19:01:49 +0000 |
| commit | 4d83d0fe84b865d4f944a8faab268917fff312d2 (patch) | |
| tree | 63cd1ea313d3f4459184e7cbe5c6bcff1131e295 | |
| parent | 06c32cc1dfcc7f49373cb9aa28e416dad86d7181 (diff) | |
| download | xxv-4d83d0fe84b865d4f944a8faab268917fff312d2.tar.gz xxv-4d83d0fe84b865d4f944a8faab268917fff312d2.tar.bz2 | |
tlist: show free recording capacity
| -rw-r--r-- | skins/deltab/tlist.tmpl | 54 | ||||
| -rw-r--r-- | skins/stone/rlist.tmpl | 4 | ||||
| -rw-r--r-- | skins/stone/tlist.tmpl | 41 | ||||
| -rw-r--r-- | skins/stone_flat/rlist.tmpl | 4 | ||||
| -rw-r--r-- | skins/stone_flat/tlist.tmpl | 41 |
5 files changed, 116 insertions, 28 deletions
diff --git a/skins/deltab/tlist.tmpl b/skins/deltab/tlist.tmpl index 4b1aebe..a59aaaf 100644 --- a/skins/deltab/tlist.tmpl +++ b/skins/deltab/tlist.tmpl @@ -6,12 +6,46 @@ <?% an = gettext('On') %?> <?% enableform = ( allow('ttoggle') || allow('tdelete') ) %?> <?% ######################################################################## %?> +<?% total = 0 %?> <?% BLOCK summe %?> <?% IF aktiv == 1; # Errechnen der Differenzen - minuten = minuten + (duration div 60); + total = total + duration; END %?> <?% END %?> <?% ######################################################################## %?> +<?% BLOCK printsumme %?> +<p class="description" style="padding: 0; margin-right: 10px; text-align:right;"> +<?% IF total > 0; + sec = total mod 60; + min = total div 60 mod 60; + hour = total div 3600; +%?> +<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?> +<?% END %?> +</p> +<?% END %?> +<?% ######################################################################## %?> +<?% BLOCK totalsumme %?> +<p class="description" style="padding: 0; margin-right: 10px; text-align:right;"> +<?% IF total > 0; + sec = total mod 60; + min = total div 60 mod 60; + hour = total div 3600; +%?> +<?% gettext("total time") %?> : +<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?><br /> +<?% END %?> +<?% IF param.capacity; + secf = param.capacity mod 60; + minf = param.capacity div 60 mod 60; + hourf = param.capacity div 3600; +%?> +<?% gettext("available capacity") %?> : +<?% IF hourf > 0 %?><?% hourf FILTER format('%02d') %?>:<?% END %?><?% minf FILTER format('%02d') %?> +<?% END %?> +</p> +<?% END %?> +<?% ######################################################################## %?> <?% BLOCK SetState %?> <?% state = '' %?> <?% UNLESS aktiv %?> @@ -25,7 +59,7 @@ <?% ######################################################################## %?> <?% BLOCK StateImage %?> <?% IF aktiv %?> - <?% IF param.capacity && param.capacity div 60 <= minuten %?> + <?% IF param.capacity && param.capacity <= total %?> <img src="images/warning.<?% global.imagetyp %?>" alt="" title="<?% gettext("Not enough space to record this timer!") %?>" /> <?% ELSE %?> <img src="images/on.<?% global.imagetyp %?>" alt="" title="<?% an %?>" /> @@ -107,7 +141,6 @@ <th></th> <th width="64" align="right"></th> </tr> - <?% minuten = 0 %?> <?% FOREACH zeile = data %?> <?% IF debug;"<!-- Item: ";FOREACH x = zeile;loop.count - 1;":";x.replace("-"," ");"|";END;"-->";END %?> <?%- id=zeile.0; @@ -129,9 +162,10 @@ day = date.format(zeile.9, "%A, %x", locale) %?> <?% IF old.defined && day != old %?> <tr> - <?% IF minuten > 0 %?> - <td colspan="12" align="right"> - <small><?% minuten div 60%?>:<?% minuten mod 60 FILTER format('%02d')%?></small><br /> + <?% IF total > 0 %?> + <td colspan="12"> + <?% PROCESS printsumme %?> + <br /> </td> </tr> <tr> @@ -147,11 +181,11 @@ <?% old = day %?> </tr> <?% END %?> - <?% IF minuten > 0 %?> + <?% IF total > 0 %?> <tr> - <td colspan="12" align="right"> - <small><?% minuten div 60%?>:<?% minuten mod 60 FILTER format('%02d')%?></small> - <br /> + <td colspan="12"> + <?% PROCESS totalsumme %?> + <br /> </td> </tr> <?% END %?> diff --git a/skins/stone/rlist.tmpl b/skins/stone/rlist.tmpl index 33001f2..615c15e 100644 --- a/skins/stone/rlist.tmpl +++ b/skins/stone/rlist.tmpl @@ -40,14 +40,14 @@ hour = total div 3600; %?> <?% gettext("total time") %?> : -<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?>:<?% sec FILTER format('%02d')%?> +<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?>:<?% sec FILTER format('%02d')%?><br /> <?% END %?> <?% IF param.free; secf = param.free mod 60; minf = param.free div 60 mod 60; hourf = param.free div 3600; %?> -<br /><?% gettext("available capacity") %?> : +<?% gettext("available capacity") %?> : <?% IF hourf > 0 %?><?% hourf FILTER format('%02d') %?>:<?% END %?><?% minf FILTER format('%02d') %?>:<?% secf FILTER format('%02d')%?> <?% END %?> </p> diff --git a/skins/stone/tlist.tmpl b/skins/stone/tlist.tmpl index 8e5afb4..780f516 100644 --- a/skins/stone/tlist.tmpl +++ b/skins/stone/tlist.tmpl @@ -7,16 +7,44 @@ <?% an = gettext('On') %?> <?% enableform = ( allow('ttoggle') || allow('tdelete') ) && data.size > 1 %?> <?% ######################################################################## %?> +<?% total = 0 %?> <?% BLOCK summe %?> <?% IF aktiv == 1; # Errechnen der Differenzen - minuten = minuten + (duration div 60); + total = total + duration; END %?> <?% END %?> <?% ######################################################################## %?> <?% BLOCK printsumme %?> - <?% IF minuten > 0 %?> - <p class="description" style="padding: 0; margin-right: 10px; text-align:right;"><?% minuten div 60 %?>:<?% minuten mod 60 FILTER format('%02d')%?></p> - <?% END %?> +<p class="description" style="padding: 0; margin-right: 10px; text-align:right;"> +<?% IF total > 0; + sec = total mod 60; + min = total div 60 mod 60; + hour = total div 3600; +%?> +<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?> +<?% END %?> +</p> +<?% END %?> +<?% ######################################################################## %?> +<?% BLOCK totalsumme %?> +<p class="description" style="padding: 0; margin-right: 10px; text-align:right;"> +<?% IF total > 0; + sec = total mod 60; + min = total div 60 mod 60; + hour = total div 3600; +%?> +<?% gettext("total time") %?> : +<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?><br /> +<?% END %?> +<?% IF param.capacity; + secf = param.capacity mod 60; + minf = param.capacity div 60 mod 60; + hourf = param.capacity div 3600; +%?> +<?% gettext("available capacity") %?> : +<?% IF hourf > 0 %?><?% hourf FILTER format('%02d') %?>:<?% END %?><?% minf FILTER format('%02d') %?> +<?% END %?> +</p> <?% END %?> <?% ######################################################################## %?> <?% BLOCK RowButtons %?> @@ -48,7 +76,7 @@ <?% ######################################################################## %?> <?% BLOCK StateImage %?> <?% IF aktiv %?> - <?% IF param.capacity && param.capacity div 60 <= minuten %?> + <?% IF param.capacity && param.capacity <= total %?> <img id="toggle<?% id %?>" src="images/warning.<?% global.imagetyp %?>" alt="" title="<?% gettext("Not enough space to record this timer!") %?>" /> <?% ELSE %?> <img id="toggle<?% id %?>" src="images/on.<?% global.imagetyp %?>" alt="" title="<?% an %?>" /> @@ -132,7 +160,6 @@ <?% fields = data.shift %?> <h1><?% gettext("Planned recordings") %?> - <?% date.format(data.first.9, "%A, %x", locale) %?></h1> <form name="tlist" action=""> - <?% minuten = 0 %?> <?% FOREACH zeile = data %?> <?% IF debug;"<!-- Item: ";FOREACH x = zeile;loop.count - 1;":";x.replace("-"," ");"|";END;"-->";END %?> <?%- id=zeile.0; @@ -162,7 +189,7 @@ <?% old = day %?> <?% END %?> <div class="areaclose"></div> - <?% PROCESS printsumme %?> + <?% PROCESS totalsumme %?> </form> <?% END %?> </div> diff --git a/skins/stone_flat/rlist.tmpl b/skins/stone_flat/rlist.tmpl index 1653f6f..9d6fb31 100644 --- a/skins/stone_flat/rlist.tmpl +++ b/skins/stone_flat/rlist.tmpl @@ -42,14 +42,14 @@ hour = total div 3600; %?> <?% gettext("total time") %?> : -<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?>:<?% sec FILTER format('%02d')%?> +<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?>:<?% sec FILTER format('%02d')%?><br /> <?% END %?> <?% IF param.free; secf = param.free mod 60; minf = param.free div 60 mod 60; hourf = param.free div 3600; %?> -<br /><?% gettext("available capacity") %?> : +<?% gettext("available capacity") %?> : <?% IF hourf > 0 %?><?% hourf FILTER format('%02d') %?>:<?% END %?><?% minf FILTER format('%02d') %?>:<?% secf FILTER format('%02d')%?> <?% END %?> </p> diff --git a/skins/stone_flat/tlist.tmpl b/skins/stone_flat/tlist.tmpl index 5ac5112..359993f 100644 --- a/skins/stone_flat/tlist.tmpl +++ b/skins/stone_flat/tlist.tmpl @@ -7,17 +7,44 @@ <?% an = gettext('On') %?> <?% enableform = ( allow('ttoggle') || allow('tdelete') ) && data.size > 1 %?> <?% ######################################################################## %?> -<?% minuten = 0 %?> +<?% total = 0 %?> <?% BLOCK summe %?> <?% IF aktiv == 1; # Errechnen der Differenzen - minuten = minuten + (duration div 60); + total = total + duration; END %?> <?% END %?> <?% ######################################################################## %?> <?% BLOCK printsumme %?> - <?% IF minuten > 0 %?> - <p class="description" style="padding: 0; margin-left: <?% width %?>px;"><?% minuten div 60 %?>:<?% minuten mod 60 FILTER format('%02d')%?></p> - <?% END %?> +<p class="description" style="padding: 0; width:<?% width %?>px; text-align:right;"> +<?% IF total > 0; + sec = total mod 60; + min = total div 60 mod 60; + hour = total div 3600; +%?> +<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?> +<?% END %?> +</p> +<?% END %?> +<?% ######################################################################## %?> +<?% BLOCK totalsumme %?> +<p class="description" style="padding: 0; width:<?% width %?>px; text-align:right;"> +<?% IF total > 0; + sec = total mod 60; + min = total div 60 mod 60; + hour = total div 3600; +%?> +<?% gettext("total time") %?> : +<?% IF hour > 0 %?><?% hour FILTER format('%02d') %?>:<?% END %?><?% min FILTER format('%02d') %?><br /> +<?% END %?> +<?% IF param.capacity; + secf = param.capacity mod 60; + minf = param.capacity div 60 mod 60; + hourf = param.capacity div 3600; +%?> +<?% gettext("available capacity") %?> : +<?% IF hourf > 0 %?><?% hourf FILTER format('%02d') %?>:<?% END %?><?% minf FILTER format('%02d') %?> +<?% END %?> +</p> <?% END %?> <?% ######################################################################## %?> <?% BLOCK RowButtons %?> @@ -49,7 +76,7 @@ <?% ######################################################################## %?> <?% BLOCK StateImage %?> <?% IF aktiv %?> - <?% IF param.capacity && param.capacity div 60 <= minuten %?> + <?% IF param.capacity && param.capacity <= total %?> <img id='toggle<?% id %?>' src="images/warning.<?% global.imagetyp %?>" alt="" title="<?% gettext("Not enough space to record this timer!") %?>" /> <?% ELSE %?> <img id='toggle<?% id %?>' src="images/on.<?% global.imagetyp %?>" alt="" title="<?% an %?>" /> @@ -161,7 +188,7 @@ </tr> <tr><td class="largebottom"></td></tr> </table> - <?% PROCESS printsumme width=780 %?> + <?% PROCESS totalsumme width=780 %?> </form> <?% END %?> </div> |
