From 2452063057a32075bf45085b58203aa83eb3cb1f Mon Sep 17 00:00:00 2001
From: JackDandy <JackDandy@users.noreply.github.com>
Date: Wed, 5 Nov 2014 15:53:01 +0000
Subject: [PATCH] Fix Coming Episodes/Layout Calender/View Paused and tweak its
 UI text.

---
 CHANGES.md                                       | 1 +
 gui/slick/interfaces/default/comingEpisodes.tmpl | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index d4b36d95..5ebe1efa 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -39,6 +39,7 @@
 * Fixes changing root dirs on the mass edit page
 * Add the ability to use trash (or Recycle Bin) for selected actions on General Config/Misc/Send to trash
 * Add handling for when deleting a show and the show folder no longer exists
+* Fix Coming Episodes/Layout Calender/View Paused and tweak its UI text
 
 [develop changelog]
 * Improve display of progress bars in the Downloads columns of the show list page
diff --git a/gui/slick/interfaces/default/comingEpisodes.tmpl b/gui/slick/interfaces/default/comingEpisodes.tmpl
index edbe66a9..956066d7 100644
--- a/gui/slick/interfaces/default/comingEpisodes.tmpl
+++ b/gui/slick/interfaces/default/comingEpisodes.tmpl
@@ -46,8 +46,8 @@
 	
 	<span> View Paused:
 		<select name="viewpaused" class="form-control form-control-inline input-sm" onchange="location = this.options[this.selectedIndex].value;">
-			<option value="$sbRoot/toggleComingEpsDisplayPaused" #if $sickbeard.COMING_EPS_DISPLAY_PAUSED == "0" then "selected=\"selected\"" else ""#>Hide</option>
-			<option value="$sbRoot/toggleComingEpsDisplayPaused" #if $sickbeard.COMING_EPS_DISPLAY_PAUSED == "1" then "selected=\"selected\"" else ""#>Show</option>
+			<option value="$sbRoot/toggleComingEpsDisplayPaused"<%= (' selected="selected"', '')[True == sickbeard.COMING_EPS_DISPLAY_PAUSED] %>>Hidden</option>
+			<option value="$sbRoot/toggleComingEpsDisplayPaused"<%= ('', ' selected="selected"')[True == sickbeard.COMING_EPS_DISPLAY_PAUSED] %>>Shown</option>
 		</select>
 	</span>
 </div>
@@ -487,6 +487,10 @@
         <tbody>
         #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()
-- 
GitLab