From 5444baecdccae01742cb153c8a365df5b1e53948 Mon Sep 17 00:00:00 2001 From: Dario Date: Sun, 22 May 2016 23:03:20 +0200 Subject: [PATCH] Hide History table if there is no history in manual search --- gui/slick/views/snatchSelection.mako | 99 ++++++++++++++-------------- 1 file changed, 49 insertions(+), 50 deletions(-) diff --git a/gui/slick/views/snatchSelection.mako b/gui/slick/views/snatchSelection.mako index d89dc51d0f..9cb4a0b5dc 100644 --- a/gui/slick/views/snatchSelection.mako +++ b/gui/slick/views/snatchSelection.mako @@ -190,62 +190,61 @@
- + % if episode_history: +
+ + + + + + - - - + + + + + + - - - - - - - - - - - % if episode_history: - % for item in episode_history: - <% status, quality = Quality.splitCompositeStatus(item['action']) %> - % if status == DOWNLOADED: - - % elif status in (SNATCHED, SNATCHED_PROPER, SNATCHED_BEST): - - % elif status == FAILED: - - % endif - - - - + % for item in episode_history: + <% status, quality = Quality.splitCompositeStatus(item['action']) %> + % if status == DOWNLOADED: + + % elif status in (SNATCHED, SNATCHED_PROPER, SNATCHED_BEST): + + % elif status == FAILED: + % endif - - - - % endfor - % endif - -
+

.History

+ +
-

.History

- -
DateStatusProvider/GroupRelease
DateStatusProvider/GroupRelease
- <% action_date = sbdatetime.sbfdatetime(datetime.datetime.strptime(str(item['date']), History.date_format), show_seconds=True) %> - ${action_date} - - ${statusStrings[status]} ${renderQualityPill(quality)} - - <% provider = providers.getProviderClass(GenericProvider.make_id(item["provider"])) %> - % if provider is not None: - ${provider.name} ${item["provider"]} - % else: - ${item['provider'] if item['provider'] != "-1" else 'Unknown'} +
- ${os.path.basename(item['resource'])} -
+ + <% action_date = sbdatetime.sbfdatetime(datetime.datetime.strptime(str(item['date']), History.date_format), show_seconds=True) %> + ${action_date} + + + ${statusStrings[status]} ${renderQualityPill(quality)} + + + <% provider = providers.getProviderClass(GenericProvider.make_id(item["provider"])) %> + % if provider is not None: + ${provider.name} ${item["provider"]} + % else: + ${item['provider'] if item['provider'] != "-1" else 'Unknown'} + % endif + + + ${os.path.basename(item['resource'])} + + + % endfor + + + % endif