summaryrefslogtreecommitdiff
path: root/pages/channels_widget.ecpp
diff options
context:
space:
mode:
Diffstat (limited to 'pages/channels_widget.ecpp')
-rw-r--r--pages/channels_widget.ecpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp
index bdc526c..df9219f 100644
--- a/pages/channels_widget.ecpp
+++ b/pages/channels_widget.ecpp
@@ -8,25 +8,26 @@ using namespace vdrlive;
</%pre>
<%args>
-name = "channel";
-int lastChannel = LiveSetup().GetLastChannel();
-selected;
-onchange;
-bool channelId = false;
+ name = "channel";
+ selected;
+ onchange;
+ bool channelid = false;
</%args>
<%cpp>
-ReadLock channelsLock( Channels );
-if ( !channelsLock )
- throw HtmlError( tr("Channels"), tr("Couldn't aquire access to channels, please try again later.") );
+ ReadLock channelsLock( Channels );
+ if ( !channelsLock )
+ throw HtmlError( tr("Couldn't aquire access to channels, please try again later.") );
+
+ int lastChannel = LiveSetup().GetLastChannel();
</%cpp>
- <select name="<$ name $>" <{ reply.out() << ( !onchange.empty() ? "onchange=\""+onchange+"\"" : "" ); }>>
-% for ( cChannel *listChannel = Channels.First(); listChannel && listChannel->Number() <= lastChannel;
-% listChannel = Channels.Next( listChannel ) ) {
-% if ( listChannel->GroupSep() || *listChannel->Name() == '\0' )
-% continue;
+<select name="<$ name $>" <{ reply.out() << ( !onchange.empty() ? "onchange=\""+onchange+"\"" : "" ); }>>
+% for ( cChannel *listChannel = Channels.First(); listChannel && listChannel->Number() <= lastChannel;
+% listChannel = Channels.Next( listChannel ) ) {
+% if ( listChannel->GroupSep() || *listChannel->Name() == '\0' )
+% continue;
%
-% std::string listChannelId = *listChannel->GetChannelID().ToString();
- <option value="<? channelId ? *listChannel->GetChannelID().ToString() ?><? !channelId ? listChannel->Number() ?>"
- <{ reply.out() << ( listChannelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Name() $></option>
-% }
- </select>
+% std::string listChannelId = *listChannel->GetChannelID().ToString();
+ <option value="<? channelid ? *listChannel->GetChannelID().ToString() ?><? !channelid ? listChannel->Number() ?>"
+ <{ reply.out() << ( listChannelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Name() $></option>
+% }
+</select>