sync classic template to white

This commit is contained in:
Martijn Voncken 2008-10-15 19:23:57 +00:00
parent db736c9075
commit aa66b8624e
9 changed files with 90 additions and 39 deletions

View File

@ -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"))

View File

@ -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)

View File

@ -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; } .info { .info { .info { .info { text-align: right; .info { padding: 0 50px 0 0; .info { color: #8fa6c3; ; } .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 { font-size: 16px; .info { letter-spacing: 4px; .info { font-weight: bold; .info { } .info { text-align: right; text-align: right; .info { text-align: right; text-align: right; .info { color: #8fa6c3; font-size: 16px; text-align: right; padding: 0 50px 0 0; text-align: right; color: #8fa6c3; ; } .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;

View File

@ -1,10 +1 @@
$def with (active_tab)
<div id="admin_toolbar" class="panel" style="width:98%;text-align:left">
$for id, title, url in admin_pages:
<a
$if id == active_tab:
class="tab_button_active"
$else:
class="tab_button"
href='$base$url'>$title</a>
</div>

View File

@ -8,12 +8,37 @@ $def with (title, active_tab="NONE")
</head>
<body>
<div id="page">
<!---
<a href='$base/home'>
<div id="simple_logo">
<div class="title">Deluge</div>
<div class="info">$title</div>
</div>
</a>
-->
<img src="$base/static/images/deluge32.png" style="position:absolute;top:5px;"\>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
<div style="padding-left:50px">
<span class="title">Deluge</span>
<a
$if 'home' == active_tab:
class="tab_button_active"
$else:
class="tab_button"
href='$base/home'>Home</a>
<!--ADMIN-TABS-->
$for id, title, url in admin_pages:
<a
$if id == active_tab:
class="tab_button_active"
$else:
class="tab_button"
href='$base$url'>$title</a>
<a href="http://dev.deluge-torrent.org/wiki/Faq">Faq</a>
</div>
<div id="main_content">
<div id="main">
<center>

View File

@ -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)
<table class="torrent_list" border=0 id='torrent_table'>
<tr>
@ -59,6 +57,10 @@ $:render.part_button('POST', '/resume_all', _('Resume all'), 'tango/start.png')
<!--$:render.part_button('POST', '/logout', _('Logout'), 'tango/system-log-out.png')-->
</div>
$if label_filters:
$:render.part_label_filters(label_filters)
$:part_stats()
$:render.footer()

View File

@ -0,0 +1,36 @@
$def with (filter_items)
<div class="panel" style="text-align:left;">
$for cat in filter_items.keys():
$if cat != "state":
<br/>
<span class="title">$id_to_label(cat):</span>
$for value, count in filter_items[cat]:
<li style="display:inline"
$if cat == get('filter_cat'):
$if value == get('filter_value'):
class="selected"
$# I hate this, special case for All
$# templetor sucks with multiple conditions in 1 if-statement, i need to find a better way,
$if cat == "state":
$if value == "All":
$if not get('filter_value'):
$if not get('filter_cat'):
class="selected"
>
<a href="$self_url(filter_cat=cat, filter_value=value, sort=get('sort'), order=get('order')) ">
$if cat == "state":
<img src="/pixmaps/$(value.lower())"></img>
$if cat == "tracker_host":
<img src="http://$value/favicon.ico" width="16" height="16"></img>
$if not value:
$if cat == "label":
$_("No Label") ($count)</a>
$else:
$_("None") ($count)</a>
$else:
$value ($count)</a>
</li>
</div>

View File

@ -1,32 +1,24 @@
$def with (stats)
<div id='stats_panel'>
<div class="panel" id='refresh_panel'>
$_('Auto refresh:')
$if getcookie('auto_refresh') == '1':
($getcookie('auto_refresh_secs')) $_('seconds') &nbsp;
$:render.part_button('GET', '/refresh/set', _('Set'), 'tango/preferences-system.png')
$:render.part_button('POST', '/refresh/off', _('Disable'), 'tango/process-stop.png')
<img src="$base/static/images/tango/connections.png" title="$_('Connections')">$stats.num_connections ($deluge_int(stats.max_num_connections))
<img src="$base/pixmaps/downloading16.png" title="$_('Down Speed')">$stats.download_rate ($deluge_int(stats.max_download))
<img src="$base/pixmaps/seeding16.png" title="$_('Up Speed')">$stats.upload_rate ($deluge_int(stats.max_upload))
<img src="$base/pixmaps/dht16.png" title="$_('DHT Nodes')">$stats.dht_nodes
<img src="$base/static/images/tango/drive-harddisk.png" title="$_('Disk Space')">$fsize(stats.free_space)
$if stats.has_incoming_connections:
$else:
$_('Off') &nbsp;
$:render.part_button('POST', '/refresh/on', _('Enable'), 'tango/view-refresh.png')
$#end
<img src="$base/pixmaps/alert16.png" title="$_('No Incoming Connections')">
$:render.part_button('POST', '/logout', _('Logout'), 'tango/system-log-out.png')
</div>
<div class="panel" id='stats_panel'>
$_('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')
</div>

View File

@ -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
}