Commit 788061bd authored by koniu's avatar koniu
Browse files

Merge pull request #24 from medoc92/master

Fixes to the directory filter list
parents 8f470069 887c9725
......@@ -15,12 +15,13 @@
<b>Folder</b><br>
<select id="folders" name="dir">
%for d in sorted(dirs, key=str.lower):
%style = "margin-left: %dem" % (2*d.count('/'))
%space = "&nbsp;" * (4 * d.count('/'))
%if d in query['dir']:
<option style="{{style}}" selected value="{{d}}">{{re.sub('.+/','', d)}}</option>
%selected = "selected"
%else:
<option style="{{style}}" value="{{d}}">{{re.sub('.+/','', d)}}</option>
%selected = ""
%end
<option {{selected}} value="{{d}}">{{!space}}{{re.sub('.+/','', d)}}</option>
%end
</select><br>
<b>Dates</b> <small class="gray">YYYY[-MM][-DD]</small><br>
......
......@@ -125,7 +125,7 @@ def get_dirs(tops, depth):
dirs = dirs + glob.glob(top + '/*' * d)
dirs = filter(lambda f: os.path.isdir(f), dirs)
top_path = top.rsplit('/', 1)[0]
dirs = [w.replace(top_path+'/', '') for w in dirs]
dirs = [w.replace(top_path+'/', '', 1) for w in dirs]
v = v + dirs
return ['<all>'] + v
#}}}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment