From 97ade1d6213bef69c469425d18006f1e712f649b Mon Sep 17 00:00:00 2001 From: Supremicus Date: Tue, 2 Dec 2014 17:12:56 +1000 Subject: [PATCH 1/2] Change Calendar layout on the Coming Episodes page. Change view to a fluid layout. Change episode layout design. Add day and month to column headers. Add isotope plug-in to enable sort columns by Date, Network, and Show name. Add imagesLoaded plug-in to prevent layout breakage by calling isotope to update content after a page auto-refresh. --- CHANGES.md | 3 + gui/slick/css/dark.css | 25 ++- gui/slick/css/light.css | 29 +++- gui/slick/css/style.css | 99 ++++++++---- .../interfaces/default/comingEpisodes.tmpl | 153 +++++++++++++----- gui/slick/interfaces/default/inc_top.tmpl | 1 + gui/slick/js/lib/imagesloaded.pkgd.min.js | 7 + 7 files changed, 238 insertions(+), 79 deletions(-) create mode 100644 gui/slick/js/lib/imagesloaded.pkgd.min.js diff --git a/CHANGES.md b/CHANGES.md index dc4fa000..ebe7c185 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -20,6 +20,9 @@ * Fix anime searches on BTN provider * Change replace "Daily-Search" with "Recent-Search" * Add daily search to recent search renaming to config migration code +* Change Coming Episodes calendar view to a fluid layout, change episode layout design, and add day and month in column headers. +* Add isotope plug-in to Coming Episodes calendar view to enable sort columns by Date, Network, and Show name. +* Add imagesLoaded plug-in to prevent layout breakage by calling isotope to update content after a page auto-refresh. [develop changelog] diff --git a/gui/slick/css/dark.css b/gui/slick/css/dark.css index 01402916..3a7d45dc 100644 --- a/gui/slick/css/dark.css +++ b/gui/slick/css/dark.css @@ -1325,17 +1325,30 @@ h2.day, h2.network { color: #09A2FF; } -table.cal-odd { +.calendar-row .day-number { + background-color: #15528F; + color: #fff; +} + +.today .day-number .number, .today .day-number .month, .today .day-number .day { + color: #8dbeee; +} + +.odd .calendar-show { background-color: #333; } -table.cal-even { + +.even .calendar-show { background-color: #3d3d3d; } -.calendarShow .text .airtime { - color:#fff + +.calendar-row .poster img { + border: 1px solid #111; } -.calendarShow .text .episode-title { - color:#aaa + +.calendar-row .text .airtime, +.calendar-row .text .episode-title { + color: #fff; } /* ======================================================================= diff --git a/gui/slick/css/light.css b/gui/slick/css/light.css index b5b79722..fc2dd64d 100644 --- a/gui/slick/css/light.css +++ b/gui/slick/css/light.css @@ -1307,17 +1307,30 @@ h2.day, h2.network { vertical-align: middle; } -table.cal-odd { - background-color: #ddd; +.calendar-row .day-number { + background-color: #333; + color: #fff; } -table.cal-even { - background-color: #d2d2d2; + +.today .day-number .number, .today .day-number .month, .today .day-number .day { + color: #c7db40; } -.calendarShow .text .airtime { - color:#000 + +.odd .calendar-show { + background-color: #F5F1E4; } -.calendarShow .text .episode-title { - color:#888 + +.even .calendar-show { + background-color: #DFDACF; +} + +.calendar-row .poster img { + border: 1px solid #CCC; +} + +.calendar-row .text .airtime, +.calendar-row .text .episode-title { + color: #000; } /* ======================================================================= diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index bd02c682..53dbb1c9 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -1498,45 +1498,90 @@ h2.day, h2.network { } .calendarWrapper { - width:1000px; - margin:0 auto; - padding:0 3px + max-width: 1400px; + margin: 0 auto; + padding: 0 3px } -.calendarTable { - float:left; - width:142px !important; - white-space:nowrap; - table-layout:fixed !important; +.calendar-row { + float: left; + width: 14.28%; + padding: 0px 2px; } -.calendarShow { - padding:0 !important +.calendar-row .day-number { + position: relative; + height: 40px; + background-color: #333; + color: #fff; } -.calendarShow .poster { - padding-bottom:2px -} -.calendarShow .poster img { - width:142px; - height:auto +.calendar-row .day-number .number { + position: absolute; + right: 5px; + font-weight: bold; + font-size: 32px; + line-height: 38px; } -.calendarShow .text { - padding:0 5px 10px 5px +.calendar-row .day-number .day { + position: absolute; + left: 5px; + top: 3px; + text-transform: uppercase; + font-weight: bold; } -.calendarShow .text .airtime, -.calendarShow .text .episode-title { - overflow:hidden; - text-overflow:ellipsis; - display:block; - font-size:11px +.calendar-row .day-number .month { + position: absolute; + left: 5px; + bottom: 3px; + text-transform: uppercase; } -.calendarShow .show-status { - padding:5px 10px 10px; - text-align:center +.today .day-number .number, .today .day-number .month, .today .day-number .day { + color: #c7db40; +} + +.calendar-show { + margin-top: 4px; + padding: 4px; + width: 100% +} + +.odd .calendar-show { + background-color: #F5F1E4; +} + +.even .calendar-show { + background-color: #DFDACF; +} + +.calendar-row .poster img { + border: 1px solid #CCC; + border-radius: 5px; + margin-bottom: 2px; + display: block; + margin-left: auto; + margin-right: auto; +} + +.calendar-row .text .airtime, +.calendar-row .text .episode-title { + overflow: hidden; + text-overflow: ellipsis; + display: block; + font-size: 12px; +} + +.calendar-row .episode-blank { + width: 250px; + height: 32px; + text-align: center; + font-style: italic; + display: table-cell; + vertical-align: middle; + font-size: 12px; } /* ======================================================================= diff --git a/gui/slick/interfaces/default/comingEpisodes.tmpl b/gui/slick/interfaces/default/comingEpisodes.tmpl index 9e012219..f10003b4 100644 --- a/gui/slick/interfaces/default/comingEpisodes.tmpl +++ b/gui/slick/interfaces/default/comingEpisodes.tmpl @@ -20,6 +20,54 @@

$title

#end if + + - -
- Layout: - - -   -#if 'calendar' != $layout: - Sort By: - - -   -#else - Sort By: - - -   -#end if - View Paused: - - -
- -
-#if 'calendar' != $layout: - Key: - Missed - Current - Future - Distant -#end if - - Subscribe -
- -
- -#if 'list' == $layout: - - - - - -#set $show_div = 'listing-default' - - - - - - - - - - - - - - - - - - - - -#for $cur_result in $sql_results: - #set $cur_indexer = int($cur_result['indexer']) - #set $runtime = $cur_result['runtime'] - - #if int($cur_result['paused']) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: - #continue - #end if - - #set $cur_ep_airdate = $cur_result['localtime'].date() - - #if $runtime: - #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) - #if $cur_ep_enddate < $today: - #set $show_div = 'listing-overdue' - #elif $cur_ep_airdate >= $next_week.date(): - #set $show_div = 'listing-toofar' - #elif $cur_ep_airdate >= $today.date() and $cur_ep_airdate < $next_week.date(): - #if $cur_ep_airdate == $today.date(): - #set $show_div = 'listing-current' - #else: - #set $show_div = 'listing-default' - #end if - #end if - #end if - - - - ## forced to use a div to wrap airdate, the column sort went crazy with a span - - - - - - - - - - - - - - - - - -#end for - - - - - - - - -
AirdateShowNext EpNext Ep NameNetworkQualityIndexersSearch
-
$sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)
$time.mktime($cur_result['localtime'].timetuple()) -
$cur_result['show_name'] -#if int($cur_result['paused']): - [paused] -#end if - - <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - -#if $cur_result['description']: - -#else: - -#end if - $cur_result['name'] - - $cur_result['network'] - -#if int($cur_result['quality']) in $qualityPresets: - $qualityPresetStrings[int($cur_result['quality'])] -#else: - Custom -#end if - -#if $cur_result['imdb_id']: - [imdb] -#end if - $sickbeard.indexerApi($cur_indexer).name - - [search] -
 
- - - -#else if $layout in ['banner', 'poster']: - - - - - -#set $cur_segment = None -#set $too_late_header = False -#set $missed_header = False -#set $today_header = False -#set $show_div = 'ep_listing listing-default' - -#if 'show' == $sort: -

-#end if - -#for $cur_result in $sql_results: - #set $cur_indexer = int($cur_result['indexer']) - - - - #if int($cur_result['paused']) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: - #continue - #end if - - #set $runtime = $cur_result['runtime'] - - #if 'network' == $sort: - #set $show_network = $cur_result['network'] if $cur_result['network'] else 'no network' - #if $cur_segment != $show_network: -
-

$show_network

- #set $cur_segment = $cur_result['network'] - #end if - #set $cur_ep_airdate = $cur_result['localtime'].date() - - #if $runtime: - #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) - #if $cur_ep_enddate < $today: - #set $show_div = 'ep_listing listing-overdue' - #elif $cur_ep_airdate >= $next_week.date(): - #set $show_div = 'ep_listing listing-toofar' - #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): - #if $cur_ep_airdate == $today.date(): - #set $show_div = 'ep_listing listing-current' - #else: - #set $show_div = 'ep_listing listing-default' - #end if - #end if - #end if - - #elif 'date' == $sort: - #set $cur_ep_airdate = $cur_result['localtime'].date() - - #if $cur_segment != $cur_ep_airdate: - #if $runtime: - #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) - #if $cur_ep_enddate < $today and $cur_ep_airdate != $today.date() and not $missed_header: -

Missed

- #set $missed_header = True - #elif $cur_ep_airdate >= $next_week.date() and not $too_late_header: -

Later

- #set $too_late_header = True - #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): - #if $cur_ep_airdate == $today.date(): -

$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize() [Today]

- #set $today_header = True - #else: -

$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize()

- #end if - #end if - #end if - #set $cur_segment = $cur_ep_airdate - #end if - - #if $cur_ep_airdate == $today.date() and not $today_header: -
-

$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize() [Today]

- #set $today_header = True - #end if - #if $runtime: - #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) - #if $cur_ep_enddate < $today: - #set $show_div = 'ep_listing listing-overdue' - #elif $cur_ep_airdate >= $next_week.date(): - #set $show_div = 'ep_listing listing-toofar' - #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): - #if $cur_ep_airdate == $today.date(): - #set $show_div = 'ep_listing listing-current' - #else: - #set $show_div = 'ep_listing listing-default' - #end if - #end if - #end if - - #elif 'show' == $sort: - #set $cur_ep_airdate = $cur_result['localtime'].date() - - #if $runtime: - #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) - #if $cur_ep_enddate < $today: - #set $show_div = 'ep_listing listing-overdue listingradius' - #elif $cur_ep_airdate >= $next_week.date(): - #set $show_div = 'ep_listing listing-toofar listingradius' - #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): - #if $cur_ep_airdate == $today.date(): - #set $show_div = 'ep_listing listing-current listingradius' - #else: - #set $show_div = 'ep_listing listing-default listingradius' - #end if - #end if - #end if - #end if - -
-
- - - -#if 'banner' == $layout: - - -#end if - - - - - - -
- -
- - - Next Episode: <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - $cur_result['name'] - -
- - Airs: $sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)<%= ('', ' on %s' % str(cur_result['network']))[None is not cur_result['network']] %> -
- -
- Quality: - #if int($cur_result['quality']) in $qualityPresets: - $qualityPresetStrings[int($cur_result['quality'])] - #else: - Custom - #end if -
-
-
-#if $cur_result['description']: - Plot: -
$cur_result['description']
-#else: - Plot: - -#end if -
-
-
-
- - -#end for - - -#end if - -#if 'calendar' == $layout: - -#set $today = datetime.date.today() -#set $dates = [$today + datetime.timedelta(days = $i) for $i in range(7)] -#set $tbl_day = 0 -
-
-
- - #for $day in $dates - #set $tbl_day += 1 - - #if $tbl_day == 1 - #set $showtoday = 'today' - #else - #set $showtoday = '' - #end if - -
-
-
$sbdatetime.sbdatetime.sbfdate($day, ' %d').decode($sickbeard.SYS_ENCODING).replace(' 0', ' ')
-
- $sbdatetime.sbdatetime.sbfdate($day, '%A').decode($sickbeard.SYS_ENCODING).capitalize() - -
-
- $sbdatetime.sbdatetime.sbfdate($day, '%B').decode($sickbeard.SYS_ENCODING).capitalize() - -
-
-
- - #set $day_has_show = False - #for $cur_result in $sql_results: - #if int($cur_result['paused']) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: - #continue - #end if - - #set $cur_indexer = int($cur_result['indexer']) - #set $runtime = $cur_result['runtime'] - #set $airday = $cur_result['localtime'].date() - - #if $airday == $day: - #set $day_has_show = True - #set $airtime = $sbdatetime.sbdatetime.sbftime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING) - - #if $sickbeard.TRIM_ZERO: - #set $airtime = re.sub(r'0(\d:\d\d)', r'\1', $airtime, 0, re.IGNORECASE | re.MULTILINE) - #end if - -
-
- -
-
-
- <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - $cur_result['name'] -
-
- ${airtime} on $cur_result["network"] -
-
-
- - #end if - - #end for - #if not $day_has_show: - -
- No shows for this day -
- #end if -
-
- #end for - - -#end if - -
- - - -#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index 410410c1..b375636c 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -570,7 +570,7 @@

-
All non-absolute folder locations are relative to $sickbeard.DATA_DIR
+
All non-absolute folder locations are relative to $sickbeard.DATA_DIR
diff --git a/gui/slick/interfaces/default/episodeView.tmpl b/gui/slick/interfaces/default/episodeView.tmpl new file mode 100644 index 00000000..f3d8fe7f --- /dev/null +++ b/gui/slick/interfaces/default/episodeView.tmpl @@ -0,0 +1,695 @@ +#import sickbeard +#import datetime +#from sickbeard.common import * +#from sickbeard import sbdatetime +#from sickbeard.helpers import anon_url + +#set global $title = 'Episode View' +#set global $header = 'Episode View' + +#set global $sbPath = '..' + +#set global $topmenu = 'episodeView' +#import os.path +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') + +#set $sort = $sickbeard.EPISODE_VIEW_SORT +#set $table_sort_header_codes = {'time': 0, 'show': 1, 'network': 4} +#if $sort not in $table_sort_header_codes: + #set $sort = 'time' +#end if + +#if 'daybyday' != $layout: + +#end if + +#if $varExists('header') +

$header

+#else +

$title

+#end if + +#if 'daybyday' == $layout: + + +#end if + + + +
+ Layout: + + +   + Sort +#if 'daybyday' == $layout: +   +#end if + By +#if 'daybyday' == $layout: + + + + +#end if + + +   + View Paused: + + +
+ +
+#if 'daybyday' != $layout: + Key: + Missed + Current + Future + Distant +#end if + + Subscribe +
+ +
+ + + +#if 'list' == $layout: + + + + + + #set $show_div = 'listing-default' + + + + + + + + + + + + + + + + + + + + + #for $cur_result in $sql_results: + #set $cur_indexer = int($cur_result['indexer']) + #set $runtime = $cur_result['runtime'] + + #if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED: + #continue + #end if + + #set $cur_ep_airdate = $cur_result['localtime'].date() + + #if $runtime: + #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) + #if $cur_ep_enddate < $today: + #set $show_div = 'listing-overdue' + #elif $cur_ep_airdate >= $next_week.date(): + #set $show_div = 'listing-toofar' + #elif $cur_ep_airdate >= $today.date() and $cur_ep_airdate < $next_week.date(): + #if $cur_ep_airdate == $today.date(): + #set $show_div = 'listing-current' + #else: + #set $show_div = 'listing-default' + #end if + #end if + #end if + + + + ## forced to use a div to wrap airdate, the column sort went crazy with a span + + + + + + + + + + + + + + + + + + + #end for + + + + + + + + + +
AirdateShowNext EpNext Ep NameNetworkQualityIndexersSearch
+
$sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)
$time.mktime($cur_result['localtime'].timetuple()) +
$cur_result['show_name'] + #if int($cur_result['paused']): + [paused] + #end if + + <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> + + #if $cur_result['description']: + + #else: + + #end if + $cur_result['name'] + + $cur_result['network'] + + #if int($cur_result['quality']) in $qualityPresets: + $qualityPresetStrings[int($cur_result['quality'])] + #else: + Custom + #end if + + #if $cur_result['imdb_id']: + [imdb] + #end if + $sickbeard.indexerApi($cur_indexer).name + + [search] +
 
+ + + + +#else if $layout in ['banner', 'poster']: + + + + + #set $cur_segment = None + #set $too_late_header = False + #set $missed_header = False + #set $today_header = False + #set $show_div = 'ep_listing listing-default' + + #if 'show' == $sort: +

+ #end if + + #for $cur_result in $sql_results: + #set $cur_indexer = int($cur_result['indexer']) + + #if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED: + #continue + #end if + + #set $runtime = $cur_result['runtime'] + + #if 'network' == $sort: + + #set $show_network = $cur_result['network'] if $cur_result['network'] else 'no network' + #if $cur_segment != $show_network: +
+

$show_network

+ #set $cur_segment = $cur_result['network'] + #end if + #set $cur_ep_airdate = $cur_result['localtime'].date() + + #if $runtime: + #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) + #if $cur_ep_enddate < $today: + #set $show_div = 'ep_listing listing-overdue' + #elif $cur_ep_airdate >= $next_week.date(): + #set $show_div = 'ep_listing listing-toofar' + #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): + #if $cur_ep_airdate == $today.date(): + #set $show_div = 'ep_listing listing-current' + #else: + #set $show_div = 'ep_listing listing-default' + #end if + #end if + #end if + + #elif 'time' == $sort: + + #set $cur_ep_airdate = $cur_result['localtime'].date() + + #if $cur_segment != $cur_ep_airdate: + #if $runtime: + #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) + #if $cur_ep_enddate < $today and $cur_ep_airdate != $today.date() and not $missed_header: +

Missed

+ #set $missed_header = True + #elif $cur_ep_airdate >= $next_week.date() and not $too_late_header: +

Later

+ #set $too_late_header = True + #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): + #if $cur_ep_airdate == $today.date(): +

$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize() [Today]

+ #set $today_header = True + #else: +

$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize()

+ #end if + #end if + #end if + #set $cur_segment = $cur_ep_airdate + #end if + + #if $cur_ep_airdate == $today.date() and not $today_header: +
+

$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize() [Today]

+ #set $today_header = True + #end if + + #if $runtime: + #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) + #if $cur_ep_enddate < $today: + #set $show_div = 'ep_listing listing-overdue' + #elif $cur_ep_airdate >= $next_week.date(): + #set $show_div = 'ep_listing listing-toofar' + #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): + #if $cur_ep_airdate == $today.date(): + #set $show_div = 'ep_listing listing-current' + #else: + #set $show_div = 'ep_listing listing-default' + #end if + #end if + #end if + + #elif 'show' == $sort: + #set $cur_ep_airdate = $cur_result['localtime'].date() + + #if $runtime: + #set $cur_ep_enddate = $cur_result['localtime'] + datetime.timedelta(minutes = $runtime) + #if $cur_ep_enddate < $today: + #set $show_div = 'ep_listing listing-overdue listingradius' + #elif $cur_ep_airdate >= $next_week.date(): + #set $show_div = 'ep_listing listing-toofar listingradius' + #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): + #if $cur_ep_airdate == $today.date(): + #set $show_div = 'ep_listing listing-current listingradius' + #else: + #set $show_div = 'ep_listing listing-default listingradius' + #end if + #end if + #end if + #end if + + +
+
+ + + + + #if 'banner' == $layout: + + + #end if + + + + + + +
+ +
+ + + Next Episode: <%= 'S%02iE%02i' % (int(cur_result['season']), int(cur_result['episode'])) %> - $cur_result['name'] + +
+ + Airdate: $sbdatetime.sbdatetime.sbfdatetime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)<%= ('', ' on %s' % str(cur_result['network']))[None is not cur_result['network']] %> +
+ +
+ Quality: + #if int($cur_result['quality']) in $qualityPresets: + $qualityPresetStrings[int($cur_result['quality'])] + #else: + Custom + #end if +
+
+
+ #if $cur_result['description']: + Plot: +
$cur_result['description']
+ #else: + Plot: + + #end if +
+
+
+
+ + #end for + +#end if + + + +#if 'daybyday' == $layout: + + #set $today = datetime.date.today() + #set $dates = [$today + datetime.timedelta(days = $i) for $i in range(7)] + #set $tbl_day = 0 + + + +
+
+
+ #for $day in $dates + #set $tbl_day += 1 + + #set $col_class = '' + #if 1 == $tbl_day + #set $col_class = 'today' + #end if + #set $col_class = '%s %s' % ($col_class, ('even', 'odd')[1 == tbl_day % 2]) + +
+
+
$sbdatetime.sbdatetime.sbfdate($day, ' %d').decode($sickbeard.SYS_ENCODING).replace(' 0', ' ')
+
+ $sbdatetime.sbdatetime.sbfdate($day, '%A').decode($sickbeard.SYS_ENCODING).capitalize() + +
+
+ $sbdatetime.sbdatetime.sbfdate($day, '%B').decode($sickbeard.SYS_ENCODING).capitalize() + +
+
+
+ + #set $day_has_show = False + #for $cur_result in $sql_results: + #if int($cur_result['paused']) and not $sickbeard.EPISODE_VIEW_DISPLAY_PAUSED: + #continue + #end if + + #set $cur_indexer = int($cur_result['indexer']) + #set $runtime = $cur_result['runtime'] + #set $airday = $cur_result['localtime'].date() + + #if $airday == $day: + #set $day_has_show = True + #set $airtime = $sbdatetime.sbdatetime.sbftime($cur_result['localtime'], markup=True).decode($sickbeard.SYS_ENCODING) + #set $img_tag = ' + +
+
+ ${airtime} $cur_result['network'] +
+
+ <%= '%i' % int(cur_result['season']) %>x<%= '%02i' % int(cur_result['episode']) %> + $cur_result['name'] + #if int($cur_result['paused']): + [paused] + #end if +
+
+
+ + #end if + + #end for + #if not $day_has_show: +
+ No shows for this day +
+ #end if +
+
+ #end for +
+ + +#end if + +
+ + + +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') diff --git a/gui/slick/interfaces/default/home_trendingShows.tmpl b/gui/slick/interfaces/default/home_trendingShows.tmpl index 3197db5b..bef8709b 100644 --- a/gui/slick/interfaces/default/home_trendingShows.tmpl +++ b/gui/slick/interfaces/default/home_trendingShows.tmpl @@ -11,7 +11,7 @@ #set global $sbPath='..' -#set global $topmenu='comingEpisodes' +#set global $topmenu='episodeView' #import os.path #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') diff --git a/gui/slick/interfaces/default/inc_top.tmpl b/gui/slick/interfaces/default/inc_top.tmpl index e854d60f..d29591be 100644 --- a/gui/slick/interfaces/default/inc_top.tmpl +++ b/gui/slick/interfaces/default/inc_top.tmpl @@ -150,8 +150,8 @@ -