Mon Jul 31 05:10:03 UTC 2006 Alberto Bertogli <albertito@gmail.com>
* Make browsing files in tree root easier.
This patch makes it easier to browse files in the root of the tree, by making
it simpler to return to the root tree view.
{
hunk ./darcsweb.cgi 1779
- print """
- <div class="title"><b>
- """
hunk ./darcsweb.cgi 1780
- # and the linked, with links
- parts = filepath.split('/')
- print '/ '
- sofar = '/'
- for p in parts:
- if not p: continue
- sofar += '/' + p
- print '<a href="%s;a=tree;f=%s">%s</a> /' % \
- (config.myreponame, sofar, p)
+ if filepath == '/':
+ print '<div><a class="title" href="%s;a=tree">/</a></div>' % \
+ (config.myreponame)
+ else:
+ print '<div class="title"><b>'
hunk ./darcsweb.cgi 1786
- print '</b></div>'
+ # and the linked, with links
+ parts = filepath.split('/')
+ print '/ '
+ sofar = '/'
+ for p in parts:
+ if not p: continue
+ sofar += '/' + p
+ print '<a href="%s;a=tree;f=%s">%s</a> /' % \
+ (config.myreponame, sofar, p)
+
+ print '</b></div>'
}