diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/epginfo.ecpp | 3 | ||||
-rw-r--r-- | pages/pageelems.ecpp | 117 | ||||
-rw-r--r-- | pages/recordings.ecpp | 8 | ||||
-rw-r--r-- | pages/schedule.ecpp | 2 | ||||
-rw-r--r-- | pages/vlc.ecpp | 6 |
5 files changed, 78 insertions, 58 deletions
diff --git a/pages/epginfo.ecpp b/pages/epginfo.ecpp index 4f49f0f..743dcb2 100644 --- a/pages/epginfo.ecpp +++ b/pages/epginfo.ecpp @@ -145,7 +145,8 @@ using namespace std; <%def epgTools> <%args> string id; +string title; int detail; </%args> -<& pageelems.epg_tool_box detail=(detail) epgid=(id) title=(epgEvent->Title()) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) &> +<& pageelems.epg_tool_box detail=(detail) epgid=(id) title=(title) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) &> </%def> diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 2fcb5cb..de828e4 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -59,46 +59,6 @@ int update_status(1); <# ---------------------------------------------------------------------- #> -<%def infobox> -<div id="infobox"> - <div class="statuscontent"> - <div class="st_header"> - <div id="infobox_caption" class="caption"><$ tr("retrieving status ...") $></div> - <div id="infobox_timenow" class="now">--:--</div> - </div> - <div class="st_content"> - <div id="infobox_name" class="name"></div> - <div id="infobox_duration" class="duration">--:--</div> - </div> - <div class="st_controls"> - <div class="st_update"> - <a href="javascript:InfoBox.toggleUpdate()" <& tooltip.hint text=(tr("Toggle updates on/off.")) &>><img id="statusReloadBtn" src="<$ LiveSetup().GetThemedLink("img", "stop_update.png") $>" alt="" /></a> - </div> - <div id="infobox_recording_buttons" style="display: none"> - <& ajax_action_href action=("stop_recording") id=("infobox_stop") image=("stop.png") tip=(tr("stop playback")) &> - <& ajax_action_href action=("play_recording") id=("infobox_play") image=("play.png") tip=(tr("resume playback")) &> - <& ajax_action_href action=("pause_recording") id=("infobox_pause") image=("pause.png") tip=(tr("pause playback")) &> - <& ajax_action_href action=("rwd_recording") id=("infobox_rwd") image=("rwd.png") tip=(tr("fast rewind")) &> - <& ajax_action_href action=("ffw_recording") id=("infobox_ffw") image=("ffw.png") tip=(tr("fast forward")) &> - </div> - <div id="infobox_channel_buttons"> - <& ajax_action_href action=("switch_channel") id=("infobox_prevchan") image=("one_downarrow.png") tip=(tr("previous channel")) &> - <& ajax_action_href action=("switch_channel") id=("infobox_nextchan") image=("one_uparrow.png") tip=(tr("next channel")) &> - </div> - <div class="st_pbar"> - <& progressbar id=("infobox_elapsed") &> - </div> - </div> - </div> - <div style="display: none;"> - <span id="__infobox_request_err"><$ tr("No server response!") $></span> - <span id="__infobox_update_err"><$ tr("Failed to update infobox!") $></span> - </div> -</div> -</%def> - -<# ---------------------------------------------------------------------- #> - <%def hide_element> <%args> bool hide = true; @@ -118,6 +78,29 @@ int update_status(1); <# ---------------------------------------------------------------------- #> +<%def ajax_action_href> +<%args> + string action; + string tip; + string param; + string image; + string alt; + string id; +</%args> +<%cpp> { </%cpp> <a <%cpp> if (!id.empty()) { </%cpp> id="<$ id $>" <%cpp> } </%cpp><& hide_element hide=(!id.empty()) &> href="vdr_request/<$ action $>?param=<$ param $>" <%cpp>if (!tip.empty()) { </%cpp><& tooltip.hint text=(tip) &> <%cpp> } </%cpp>><img src="<$ LiveSetup().GetThemedLink("img", image) $>" alt="<$ alt $>"></img></a> <%cpp> } </%cpp> +</%def> + +<# ---------------------------------------------------------------------- #> + +<%def imdb_info_href> +<%args> + string title; +</%args> +<%cpp> { </%cpp> <a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>" target="_blank"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a> <%cpp> } </%cpp> +</%def> + +<# ---------------------------------------------------------------------- #> + <%def event_timer> <%args> string epgid; @@ -188,16 +171,42 @@ int update_status(1); <# ---------------------------------------------------------------------- #> -<%def ajax_action_href> -<%args> - string action; - string tip; - string param; - string image; - string alt; - string id; -</%args> -<%cpp> { </%cpp> <a <%cpp> if (!id.empty()) { </%cpp> id="<$ id $>" <%cpp> } </%cpp><& hide_element hide=(!id.empty()) &> href="vdr_request/<$ action $>?param=<$ param $>" <%cpp>if (!tip.empty()) { </%cpp><& tooltip.hint text=(tip) &> <%cpp> } </%cpp>><img src="<$ LiveSetup().GetThemedLink("img", image) $>" alt="<$ alt $>"></img></a> <%cpp> } </%cpp> +<%def infobox> +<div id="infobox"> + <div class="statuscontent"> + <div class="st_header"> + <div id="infobox_caption" class="caption"><$ tr("retrieving status ...") $></div> + <div id="infobox_timenow" class="now">--:--</div> + </div> + <div class="st_content"> + <div id="infobox_name" class="name"></div> + <div id="infobox_duration" class="duration">--:--</div> + </div> + <div class="st_controls"> + <div class="st_update"> + <a href="javascript:InfoBox.toggleUpdate()" <& tooltip.hint text=(tr("Toggle updates on/off.")) &>><img id="statusReloadBtn" src="<$ LiveSetup().GetThemedLink("img", "stop_update.png") $>" alt="" /></a> + </div> + <div id="infobox_recording_buttons" style="display: none"> + <& ajax_action_href action=("stop_recording") id=("infobox_stop") image=("stop.png") tip=(tr("stop playback")) &> + <& ajax_action_href action=("play_recording") id=("infobox_play") image=("play.png") tip=(tr("resume playback")) &> + <& ajax_action_href action=("pause_recording") id=("infobox_pause") image=("pause.png") tip=(tr("pause playback")) &> + <& ajax_action_href action=("rwd_recording") id=("infobox_rwd") image=("rwd.png") tip=(tr("fast rewind")) &> + <& ajax_action_href action=("ffw_recording") id=("infobox_ffw") image=("ffw.png") tip=(tr("fast forward")) &> + </div> + <div id="infobox_channel_buttons"> + <& ajax_action_href action=("switch_channel") id=("infobox_prevchan") image=("one_downarrow.png") tip=(tr("previous channel")) &> + <& ajax_action_href action=("switch_channel") id=("infobox_nextchan") image=("one_uparrow.png") tip=(tr("next channel")) &> + </div> + <div class="st_pbar"> + <& progressbar id=("infobox_elapsed") &> + </div> + </div> + </div> + <div style="display: none;"> + <span id="__infobox_request_err"><$ tr("No server response!") $></span> + <span id="__infobox_update_err"><$ tr("Failed to update infobox!") $></span> + </div> +</div> </%def> <# ---------------------------------------------------------------------- #> @@ -237,7 +246,7 @@ int update_status(1); <%cpp> } </%cpp> - <a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a> + <& pageelems.imdb_info_href title=(title) &> <%cpp> } else { // table output @@ -246,7 +255,7 @@ int update_status(1); <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (elapsed > 0) { </%cpp><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &><%cpp> } </%cpp></td> <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent()) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td> <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveSetup().GetUseStreamdev() && elapsed > 0 && LiveFeatures<features::streamdev_server>().Loaded()) { </%cpp><a href="vlc.html?channel=<$ channelId $>"><img src="<$ LiveSetup().GetThemedLink("img", "play.png") $>" alt="" <& tooltip.hint text=(tr("Stream this channel into browser.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td> - <td class="action <? lastCurrentChanel ? "bottomrow"?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td> + <td class="action <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.imdb_info_href title=(title) &></td> <%cpp> } </%cpp> @@ -272,7 +281,7 @@ int update_status(1); </div> <div class="epg_content"> <div class="epg_tools"> - <& (tools_comp) id=(boxId) archived=(archived) detail=(1) &> + <& (tools_comp) id=(boxId) archived=(archived) detail=(1) title=(title) &> </div> <div class="epg_info"> <div class="info"><%cpp> if (!archived.empty()) { </%cpp><span class="bold"><$ (archived + " ") $></span><%cpp> } </%cpp><$ (time) $></div> @@ -303,6 +312,8 @@ int update_status(1); </div> </%def> +<# ---------------------------------------------------------------------- #> + <%def about_tt_box> <div class="epg_description" id="aboutBox"> <div class="station"> diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 26a4e52..67f9e01 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -114,8 +114,10 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { <%def rec_tools> <%args> string id; + string title; </%args> <& pageelems.ajax_action_href action="play_recording" param=(id) tip=(tr("play this recording.")) image="play.png" alt="" &> +<& pageelems.imdb_info_href title=(title) &> </%def> <# ---------------------------------------------------------------------- #> @@ -123,8 +125,10 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { <%def archived_disc> <%args> string archived; + string title; </%args> <img src="<$ LiveSetup().GetThemedLink("img", "on_dvd.png") $>" alt="on_dvd" <& tooltip.hint text=(archived) &> /> +<& pageelems.imdb_info_href title=(title) &> </%def> <# ---------------------------------------------------------------------- #> @@ -171,7 +175,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { <%cpp> if (archived.empty()) { </%cpp> - <& pageelems.ajax_action_href action="play_recording" param=(id) tip=(tr("play this recording.")) image="play.png" alt="" &> + <& recordings.rec_tools id=(id) title=(name)&> <%cpp> } else { @@ -180,8 +184,10 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { <%cpp> } </%cpp> + <!-- not supported yet ... <img src="<$ LiveSetup().GetThemedLink("img", "edit.png") $>" alt="" /> <img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="" /> + --> </div> <%cpp> if (! archived.empty()) { diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp index aadc723..7896f6f 100644 --- a/pages/schedule.ecpp +++ b/pages/schedule.ecpp @@ -128,7 +128,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <tr> <td class="action leftcol <? lastEventCurrentDay ? "bottomrow" ?>"><& pageelems.event_timer epgid=(epgid) &></td> <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent() ) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td> - <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td> + <td class="action <? lastEventCurrentDay ? "bottomrow" ?>"><& pageelems.imdb_info_href title=(title) &></td> <td class="topaligned <? lastEventCurrentDay ? "bottomrow" ?>"><div class="withmargin"><$ start $> - <$ end $></div></td> <td class="<? (Event == PresentEvent) ? "current" ?> topaligned rightcol <? lastEventCurrentDay ? "bottomrow" ?>"><div class="more withmargin"><a <& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(description, 300, truncated)) + "<br />" + tr("Click to view details.")) &><& tooltip.display domId=(epgEvent->Id()) &>><span class="title"><$ title $></span><br /><span class="short"><%cpp>if (short_description.empty()) { </%cpp> <%cpp> } </%cpp><$ short_description $></span></a></div></td> </tr> diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp index 51c4338..b8cea6f 100644 --- a/pages/vlc.ecpp +++ b/pages/vlc.ecpp @@ -41,10 +41,10 @@ using namespace vdrlive; <html> <head> <title>VDR-Live - <$ pageTitle $></title> + <& pageelems.stylesheets &> <%cpp> if (!asyncReq) { </%cpp> - <& pageelems.stylesheets &> <& pageelems.ajax_js &> <%cpp> } @@ -63,10 +63,12 @@ using namespace vdrlive; <%cpp> if ( Channel != 0 ) { int streamdevPort = LiveSetup().GetStreamdevPort(); - string videourl = string("http://") + request.getServerIp() + ":" + lexical_cast<string,int>(streamdevPort) + "/" + *Channel->GetChannelID().ToString(); + // string videourl = string("http://") + "192.168.96.30" + ":" + lexical_cast<string,int>(streamdevPort) + "/TS/" + *Channel->GetChannelID().ToString(); + string videourl = string("http://") + request.getServerIp() + ":" + lexical_cast<string,int>(streamdevPort) + "/TS/" + *Channel->GetChannelID().ToString(); </%cpp> <embed type="application/x-vlc-plugin" name="video1" autoplay="yes" loop="yes" width="720" height="576" target="<$ videourl $>" /> <& vlc.channel_selection &> + <!-- <p><$ videourl $></p> --> <%cpp> } </%cpp> |