diff --git a/deluge/ui/webui/config_tabs_webui.py b/deluge/ui/webui/config_tabs_webui.py index 508b7a932..3e8793339 100644 --- a/deluge/ui/webui/config_tabs_webui.py +++ b/deluge/ui/webui/config_tabs_webui.py @@ -91,6 +91,7 @@ class Password(forms.Form): class Sidebar(config_forms.WebCfgForm): title = _("Sidebar") + show_sidebar = forms.CheckBox(_("Show sidebar")) sidebar_show_zero = forms.CheckBox(_("Show zero hits")) sidebar_show_trackers = forms.CheckBox(_("Show trackers")) show_keyword_search = forms.CheckBox(_("Show keyword search")) diff --git a/deluge/ui/webui/pages.py b/deluge/ui/webui/pages.py index 51d0af74e..c4102f0a0 100644 --- a/deluge/ui/webui/pages.py +++ b/deluge/ui/webui/pages.py @@ -114,7 +114,10 @@ class index: if not config["sidebar_show_trackers"]: hide_cat = ["tracker_host"] - label_filters = proxy.get_filter_tree(config["sidebar_show_zero"], hide_cat) + if config["show_sidebar"]: + label_filters = proxy.get_filter_tree(config["sidebar_show_zero"], hide_cat) + else: + label_filters = {} torrent_list = utils.get_enhanced_torrent_list(torrents) diff --git a/deluge/ui/webui/static/simple_site_style.css b/deluge/ui/webui/static/simple_site_style.css index 87d6c2f74..5140fcc87 100755 --- a/deluge/ui/webui/static/simple_site_style.css +++ b/deluge/ui/webui/static/simple_site_style.css @@ -1,5 +1,5 @@ /* ----------------------------------------------------------- Theme Name: Simple Theme URI: http://deluge-torrent.org Description: Deluge Theme Version: 1.0 ----------------------------------------------------------- */ BODY { background: #304663 url(images/simple_bg.jpg) repeat-x; font-family: trebuchet ms; font-size: 10pt; margin: 0; } /* GENERIC STYLES */ a img {border: 0px} hr {color: #627082; margin: 15px 0 15px 0;} /* STRUCTURE */ #page { min-width: 800px; margin-left: auto; margin-right: auto; } #main_content { background:url(images/simple_line.jpg) repeat-x; } #simple_logo { background:url(images/simple_logo.jpg) no-repeat; } #main { padding-top: 20px; padding-left: 20px; color: #fff; } #main form table { border: #2a425c 1px solid; } #main form table tr { border: 0px; } #main form table tr { background: #1f3044; font-size: 16px; border: 0px; - white-space: nowrap; } #main form table tr td{ border: 0px; color: #fff; font-size: 12px; white-space: nowrap; } #main form table tr a { color: #8fa6c3; font-size: 16px; white-space: nowrap; } #main form table tr a, a:active, a:visited { color: #8fa6c3; text-decoration: none; } #main form table tr a:hover {color: #fff; text-decoration: underline;} #main form table tr td a { color: #fff; font-size: 12px; white-space: nowrap; } #main form table tr td a, a:active, a:visited { color: #fff; text-decoration: none;} #main form table tr td a:hover {color: #fff; text-decoration: underline;} #main a { color: #fff; font-size: 12px; } #main a, a:active, a:visited { color: #fff; text-decoration: none;} #main a:hover {color: #fff; text-decoration: underline;} .info { text-align: right; padding: 0 50px 0 0; color: #8fa6c3; font-size: 16px; letter-spacing: 4px; font-weight: bold; } .title { color: #dce4ee; font-size: 32px; padding: 10px 50px 0 0; text-align: right; } .title a, a:active, a:visited { color: #dce4ee; text-decoration: none;} .title a:hover {color: #fff; text-decoration: underline;} #button { border:1px solid #23344b; background: #99acc3; color: #000; font-family:verdana, arial, helvetica, sans-serif; font-size:10px; margin-top:5px; } INPUT{ border:1px solid #23344b; background: #99acc3; color: #000; } TEXTAREA{ border:1px solid #23344b; background: #99acc3; width:480px; } .footertext a { color: #c0c0c0; text-decoration:none;} .footertext a:visited { color: #c0c0c0; text-decoration:none;} .footertext a:active { color: #c0c0c0; text-decoration:none;} .footertext a:hover {color: #fff; text-decoration: underline;} .footertext { text-align: center; padding: 60px 0 0 0; font-size: 8pt; left: -100px; font-family: trebuchet MS; color: #fff; position: relative; } .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } div.progress_bar{ background-color:#4573a5; /*color:blue;*/ -moz-border-radius:5px; /*ff only setting*/ } + white-space: nowrap; } #main form table tr td{ border: 0px; color: #fff; font-size: 12px; white-space: nowrap; } #main form table tr a { color: #8fa6c3; font-size: 16px; white-space: nowrap; } #main form table tr a, a:active, a:visited { color: #8fa6c3; text-decoration: none; } #main form table tr a:hover {color: #fff; text-decoration: underline;} #main form table tr td a { color: #fff; font-size: 12px; white-space: nowrap; } #main form table tr td a, a:active, a:visited { color: #fff; text-decoration: none;} #main form table tr td a:hover {color: #fff; text-decoration: underline;} #main a { color: #fff; font-size: 12px; } #main a, a:active, a:visited { color: #fff; text-decoration: none;} #main a:hover {color: #fff; text-decoration: underline;} /*info { text-align: right; padding: 0 50px 0 0; color: #8fa6c3; font-size: 16px; letter-spacing: 4px; font-weight: bold; }*/ .title { color: #8fa6c3; font-size: 16px; letter-spacing: 2px; font-weight: bold; } .title a, a:active, a:visited { color: #dce4ee; text-decoration: none;} .title a:hover {color: #fff; text-decoration: underline;} #button { border:1px solid #23344b; background: #99acc3; color: #000; font-family:verdana, arial, helvetica, sans-serif; font-size:10px; margin-top:5px; } INPUT{ border:1px solid #23344b; background: #99acc3; color: #000; } TEXTAREA{ border:1px solid #23344b; background: #99acc3; width:480px; } .footertext a { color: #c0c0c0; text-decoration:none;} .footertext a:visited { color: #c0c0c0; text-decoration:none;} .footertext a:active { color: #c0c0c0; text-decoration:none;} .footertext a:hover {color: #fff; text-decoration: underline;} .footertext { text-align: center; padding: 60px 0 0 0; font-size: 8pt; left: -100px; font-family: trebuchet MS; color: #fff; position: relative; } .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } div.progress_bar{ background-color:#4573a5; /*color:blue;*/ -moz-border-radius:5px; /*ff only setting*/ } div.progress_bar_outer { /*used in table-view*/ width:150px; diff --git a/deluge/ui/webui/templates/classic/admin_toolbar.html b/deluge/ui/webui/templates/classic/admin_toolbar.html index b2d1f732d..808ff5e21 100644 --- a/deluge/ui/webui/templates/classic/admin_toolbar.html +++ b/deluge/ui/webui/templates/classic/admin_toolbar.html @@ -1,10 +1 @@ $def with (active_tab) -
-$for id, title, url in admin_pages: - $title -
diff --git a/deluge/ui/webui/templates/classic/header.html b/deluge/ui/webui/templates/classic/header.html index f11ecc861..3ed682314 100644 --- a/deluge/ui/webui/templates/classic/header.html +++ b/deluge/ui/webui/templates/classic/header.html @@ -8,12 +8,37 @@ $def with (title, active_tab="NONE")
+ + +       +    + +
+ Deluge + Home + + +$for id, title, url in admin_pages: + $title +Faq + +
diff --git a/deluge/ui/webui/templates/classic/index.html b/deluge/ui/webui/templates/classic/index.html index 92f98e330..c0001446f 100644 --- a/deluge/ui/webui/templates/classic/index.html +++ b/deluge/ui/webui/templates/classic/index.html @@ -1,9 +1,7 @@ -$def with (torrent_list, organize_filters) +$def with (torrent_list, label_filters) $:render.header(_('Torrent list'), 'home') -$if organize_filters: - $:render.part_organize(organize_filters) @@ -59,6 +57,10 @@ $:render.part_button('POST', '/resume_all', _('Resume all'), 'tango/start.png') +$if label_filters: + $:render.part_label_filters(label_filters) + + $:part_stats() $:render.footer() diff --git a/deluge/ui/webui/templates/classic/part_label_filters.html b/deluge/ui/webui/templates/classic/part_label_filters.html new file mode 100644 index 000000000..cfffeac3a --- /dev/null +++ b/deluge/ui/webui/templates/classic/part_label_filters.html @@ -0,0 +1,36 @@ +$def with (filter_items) + +
+$for cat in filter_items.keys(): + $if cat != "state": +
+ $id_to_label(cat): + $for value, count in filter_items[cat]: +
  • + + $if cat == "state": + + $if cat == "tracker_host": + + $if not value: + $if cat == "label": + $_("No Label") ($count) + $else: + $_("None") ($count) + $else: + $value ($count) +
  • +
    + + diff --git a/deluge/ui/webui/templates/classic/part_stats.html b/deluge/ui/webui/templates/classic/part_stats.html index 04be706c6..5e1c40eff 100644 --- a/deluge/ui/webui/templates/classic/part_stats.html +++ b/deluge/ui/webui/templates/classic/part_stats.html @@ -1,32 +1,24 @@ $def with (stats) +
    -
    -$_('Auto refresh:') -$if getcookie('auto_refresh') == '1': - ($getcookie('auto_refresh_secs')) $_('seconds')   - $:render.part_button('GET', '/refresh/set', _('Set'), 'tango/preferences-system.png') - $:render.part_button('POST', '/refresh/off', _('Disable'), 'tango/process-stop.png') +$stats.num_connections ($deluge_int(stats.max_num_connections)) + +$stats.download_rate ($deluge_int(stats.max_download)) + +$stats.upload_rate ($deluge_int(stats.max_upload)) + +$stats.dht_nodes + +$fsize(stats.free_space) + +$if stats.has_incoming_connections: $else: - $_('Off')   - $:render.part_button('POST', '/refresh/on', _('Enable'), 'tango/view-refresh.png') -$#end + -$:render.part_button('POST', '/logout', _('Logout'), 'tango/system-log-out.png') - -
    - -
    - - $_('Connections') : $stats.num_connections ($stats.max_num_connections) - - $_('Down Speed') : $stats.download_rate ($stats.max_download) - - $_('Up Speed') : $stats.upload_rate ($stats.max_upload) - - $:render.part_button('GET', '/config/', _('Settings'), 'tango/preferences-system.png')
    + diff --git a/deluge/ui/webui/webserver_common.py b/deluge/ui/webui/webserver_common.py index cb5024224..34dec379a 100644 --- a/deluge/ui/webui/webserver_common.py +++ b/deluge/ui/webui/webserver_common.py @@ -64,5 +64,6 @@ CONFIG_DEFAULTS = { "sessions":[], "sidebar_show_zero":False, "sidebar_show_trackers":False, - "show_keyword_search":False + "show_keyword_search":False, + "show_sidebar":True }