##// END OF EJS Templates
Updated template for summary (archives links)...
marcink -
r149:b3c93efd default
parent child Browse files
Show More
@@ -1,53 +1,56 b''
1 """Routes configuration
1 """Routes configuration
2
2
3 The more specific and detailed routes should be defined first so they
3 The more specific and detailed routes should be defined first so they
4 may take precedent over the more generic routes. For more information
4 may take precedent over the more generic routes. For more information
5 refer to the routes manual at http://routes.groovie.org/docs/
5 refer to the routes manual at http://routes.groovie.org/docs/
6 """
6 """
7 from routes import Mapper
7 from routes import Mapper
8
8
9 def make_map(config):
9 def make_map(config):
10 """Create, configure and return the routes Mapper"""
10 """Create, configure and return the routes Mapper"""
11 map = Mapper(directory=config['pylons.paths']['controllers'],
11 map = Mapper(directory=config['pylons.paths']['controllers'],
12 always_scan=config['debug'])
12 always_scan=config['debug'])
13 map.minimization = False
13 map.minimization = False
14 map.explicit = False
14 map.explicit = False
15
15
16 # The ErrorController route (handles 404/500 error pages); it should
16 # The ErrorController route (handles 404/500 error pages); it should
17 # likely stay at the top, ensuring it can always be resolved
17 # likely stay at the top, ensuring it can always be resolved
18 map.connect('/error/{action}', controller='error')
18 map.connect('/error/{action}', controller='error')
19 map.connect('/error/{action}/{id}', controller='error')
19 map.connect('/error/{action}/{id}', controller='error')
20
20
21 # CUSTOM ROUTES HERE
21 # CUSTOM ROUTES HERE
22 map.connect('hg_home', '/', controller='hg', action='index')
22 map.connect('hg_home', '/', controller='hg', action='index')
23
23
24
24
25 #REST controllers
25 #REST controllers
26 map.resource('repo', 'repos', path_prefix='/_admin')
26 map.resource('repo', 'repos', path_prefix='/_admin')
27 map.resource('user', 'users', path_prefix='/_admin')
27 map.resource('user', 'users', path_prefix='/_admin')
28
28
29 #ADMIN
29 #ADMIN
30 with map.submapper(path_prefix='/_admin', controller='admin') as m:
30 with map.submapper(path_prefix='/_admin', controller='admin') as m:
31 m.connect('admin_home', '/', action='index')#main page
31 m.connect('admin_home', '/', action='index')#main page
32 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo')
32 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
33 action='add_repo')
33
34
34
35
35 map.connect('changeset_home', '/{repo_name}/changeset/{revision}',
36 map.connect('changeset_home', '/{repo_name}/changeset/{revision}',
36 controller='changeset', revision='tip')
37 controller='changeset', revision='tip')
37 map.connect('summary_home', '/{repo_name}/summary',
38 map.connect('summary_home', '/{repo_name}/summary',
38 controller='summary')
39 controller='summary')
39 map.connect('shortlog_home', '/{repo_name}/shortlog/{revision}',
40 map.connect('shortlog_home', '/{repo_name}/shortlog/{revision}',
40 controller='shortlog', revision='tip')
41 controller='shortlog', revision='tip')
41 map.connect('branches_home', '/{repo_name}/branches',
42 map.connect('branches_home', '/{repo_name}/branches',
42 controller='branches')
43 controller='branches')
43 map.connect('tags_home', '/{repo_name}/tags',
44 map.connect('tags_home', '/{repo_name}/tags',
44 controller='tags')
45 controller='tags')
45 map.connect('changelog_home', '/{repo_name}/changelog/{revision}',
46 map.connect('changelog_home', '/{repo_name}/changelog/{revision}',
46 controller='changelog', revision='tip')
47 controller='changelog', revision='tip')
47 map.connect('files_home', '/{repo_name}/files/{revision}/{f_path:.*}',
48 map.connect('files_home', '/{repo_name}/files/{revision}/{f_path:.*}',
48 controller='files', revision='tip', f_path='')
49 controller='files', revision='tip', f_path='')
49 map.connect('files_diff_home', '/{repo_name}/diff/{f_path:.*}',
50 map.connect('files_diff_home', '/{repo_name}/diff/{f_path:.*}',
50 controller='files', action='diff', revision='tip', f_path='')
51 controller='files', action='diff', revision='tip', f_path='')
51 map.connect('files_raw_home', '/{repo_name}/rawfile/{revision}/{f_path:.*}',
52 map.connect('files_raw_home', '/{repo_name}/rawfile/{revision}/{f_path:.*}',
52 controller='files', action='rawfile', revision='tip', f_path='')
53 controller='files', action='rawfile', revision='tip', f_path='')
54 map.connect('files_archive_home', '/{repo_name}/archive/{revision}/{fileformat}',
55 controller='files', action='archivefile', revision='tip')
53 return map
56 return map
@@ -1,93 +1,108 b''
1 import logging
1 import logging
2
2
3 from pylons import request, response, session, tmpl_context as c, url, config, app_globals as g
3 from pylons import request, response, session, tmpl_context as c, url, config, app_globals as g
4 from pylons.controllers.util import abort, redirect
4 from pylons.controllers.util import abort, redirect
5
5
6 from pylons_app.lib.base import BaseController, render
6 from pylons_app.lib.base import BaseController, render
7 from pylons_app.lib.utils import get_repo_slug
7 from pylons_app.lib.utils import get_repo_slug
8 from pylons_app.model.hg_model import HgModel
8 from pylons_app.model.hg_model import HgModel
9 from difflib import unified_diff
9 from difflib import unified_diff
10 from pylons_app.lib.differ import render_udiff
10 from pylons_app.lib.differ import render_udiff
11 from vcs.exceptions import RepositoryError, ChangesetError
11 from vcs.exceptions import RepositoryError, ChangesetError
12
12
13 log = logging.getLogger(__name__)
13 log = logging.getLogger(__name__)
14
14
15 class FilesController(BaseController):
15 class FilesController(BaseController):
16 def __before__(self):
16 def __before__(self):
17 c.repos_prefix = config['repos_name']
17 c.repos_prefix = config['repos_name']
18 c.repo_name = get_repo_slug(request)
18 c.repo_name = get_repo_slug(request)
19
19
20 def index(self, repo_name, revision, f_path):
20 def index(self, repo_name, revision, f_path):
21 hg_model = HgModel()
21 hg_model = HgModel()
22 c.repo = repo = hg_model.get_repo(c.repo_name)
22 c.repo = repo = hg_model.get_repo(c.repo_name)
23 revision = request.POST.get('at_rev', None) or revision
23
24
24 revision = request.POST.get('at_rev', None) or revision
25 def get_next_rev(cur):
25 if request.POST.get('view_low'):
26 revision = int(revision) - 1
27 if request.POST.get('view_high'):
28 revision = int(revision) + 1
29 max_rev = len(c.repo.revisions) - 1
26 max_rev = len(c.repo.revisions) - 1
30 if revision > max_rev:
27 r = cur + 1
31 revision = max_rev
28 if r > max_rev:
29 r = max_rev
30 return r
31
32 def get_prev_rev(cur):
33 r = cur - 1
34 return r
32
35
33 c.f_path = f_path
36 c.f_path = f_path
34
37
35
38
36 try:
39 try:
37 c.changeset = repo.get_changeset(repo._get_revision(revision))
40 cur_rev = repo.get_changeset(revision).revision
41 prev_rev = repo.get_changeset(get_prev_rev(cur_rev)).raw_id
42 next_rev = repo.get_changeset(get_next_rev(cur_rev)).raw_id
43
44 c.url_prev = url('files_home', repo_name=c.repo_name,
45 revision=prev_rev, f_path=f_path)
46 c.url_next = url('files_home', repo_name=c.repo_name,
47 revision=next_rev, f_path=f_path)
48
49 c.changeset = repo.get_changeset(revision)
38 try:
50 try:
39 c.file_msg = c.changeset.get_file_message(f_path)
51 c.file_msg = c.changeset.get_file_message(f_path)
40 except:
52 except:
41 c.file_msg = None
53 c.file_msg = None
42
54
43 c.cur_rev = c.changeset.raw_id
55 c.cur_rev = c.changeset.raw_id
44 c.rev_nr = c.changeset.revision
56 c.rev_nr = c.changeset.revision
45 c.files_list = c.changeset.get_node(f_path)
57 c.files_list = c.changeset.get_node(f_path)
46 c.file_history = self._get_history(repo, c.files_list, f_path)
58 c.file_history = self._get_history(repo, c.files_list, f_path)
47
59
48 except (RepositoryError, ChangesetError):
60 except (RepositoryError, ChangesetError):
49 c.files_list = None
61 c.files_list = None
50
62
51 return render('files/files.html')
63 return render('files/files.html')
52
64
53 def rawfile(self, repo_name, revision, f_path):
65 def rawfile(self, repo_name, revision, f_path):
54 hg_model = HgModel()
66 hg_model = HgModel()
55 c.repo = hg_model.get_repo(c.repo_name)
67 c.repo = hg_model.get_repo(c.repo_name)
56 file_node = c.repo.get_changeset(revision).get_node(f_path)
68 file_node = c.repo.get_changeset(revision).get_node(f_path)
57 response.headers['Content-type'] = file_node.mimetype
69 response.headers['Content-type'] = file_node.mimetype
58 response.headers['Content-disposition'] = 'attachment; filename=%s' \
70 response.headers['Content-disposition'] = 'attachment; filename=%s' \
59 % f_path.split('/')[-1]
71 % f_path.split('/')[-1]
60 return file_node.content
72 return file_node.content
61
73
74 def archivefile(self, repo_name, revision, fileformat):
75 return '%s %s %s' % (repo_name, revision, fileformat)
76
62 def diff(self, repo_name, f_path):
77 def diff(self, repo_name, f_path):
63 hg_model = HgModel()
78 hg_model = HgModel()
64 diff1 = request.GET.get('diff1')
79 diff1 = request.GET.get('diff1')
65 diff2 = request.GET.get('diff2')
80 diff2 = request.GET.get('diff2')
66 c.no_changes = diff1 == diff2
81 c.no_changes = diff1 == diff2
67 c.f_path = f_path
82 c.f_path = f_path
68 c.repo = hg_model.get_repo(c.repo_name)
83 c.repo = hg_model.get_repo(c.repo_name)
69 c.changeset_1 = c.repo.get_changeset(diff1)
84 c.changeset_1 = c.repo.get_changeset(diff1)
70 c.changeset_2 = c.repo.get_changeset(diff2)
85 c.changeset_2 = c.repo.get_changeset(diff2)
71
86
72 c.file_1 = c.changeset_1.get_file_content(f_path)
87 c.file_1 = c.changeset_1.get_file_content(f_path)
73 c.file_2 = c.changeset_2.get_file_content(f_path)
88 c.file_2 = c.changeset_2.get_file_content(f_path)
74 c.diff1 = 'r%s:%s' % (c.changeset_1.revision, c.changeset_1._short)
89 c.diff1 = 'r%s:%s' % (c.changeset_1.revision, c.changeset_1._short)
75 c.diff2 = 'r%s:%s' % (c.changeset_2.revision, c.changeset_2._short)
90 c.diff2 = 'r%s:%s' % (c.changeset_2.revision, c.changeset_2._short)
76
91
77 d2 = unified_diff(c.file_1.splitlines(1), c.file_2.splitlines(1))
92 d2 = unified_diff(c.file_1.splitlines(1), c.file_2.splitlines(1))
78 c.diff_files = render_udiff(udiff=d2)
93 c.diff_files = render_udiff(udiff=d2)
79
94
80 if len(c.diff_files) < 1:
95 if len(c.diff_files) < 1:
81 c.no_changes = True
96 c.no_changes = True
82 return render('files/file_diff.html')
97 return render('files/file_diff.html')
83
98
84 def _get_history(self, repo, node, f_path):
99 def _get_history(self, repo, node, f_path):
85 from vcs.nodes import NodeKind
100 from vcs.nodes import NodeKind
86 if not node.kind is NodeKind.FILE:
101 if not node.kind is NodeKind.FILE:
87 return []
102 return []
88 changesets = node.history
103 changesets = node.history
89 hist_l = []
104 hist_l = []
90 for chs in changesets:
105 for chs in changesets:
91 n_desc = 'r%s:%s' % (chs.revision, chs._short)
106 n_desc = 'r%s:%s' % (chs.revision, chs._short)
92 hist_l.append((chs._short, n_desc,))
107 hist_l.append((chs._short, n_desc,))
93 return hist_l
108 return hist_l
@@ -1,66 +1,66 b''
1 <%def name="file_class(node)">
1 <%def name="file_class(node)">
2 %if node.is_file():
2 %if node.is_file():
3 <%return "browser-file" %>
3 <%return "browser-file" %>
4 %else:
4 %else:
5 <%return "browser-dir"%>
5 <%return "browser-dir"%>
6 %endif
6 %endif
7 </%def>
7 </%def>
8 <div id="body" class="browserblock">
8 <div id="body" class="browserblock">
9 <div class="browser-header">
9 <div class="browser-header">
10 ${h.form(h.url.current())}
10 ${h.form(h.url.current())}
11 <span>${_('view')}@rev ${h.submit('view_low','-')}${h.text('at_rev',value=c.rev_nr,size='5')}${h.submit('view_high','+')}</span>
11 <span>${_('view')}@rev <a style="font-size: 1.3em" href="${c.url_prev}">&laquo;</a>${h.text('at_rev',value=c.rev_nr,size='5')}<a style="font-size: 1.3em" href="${c.url_next}">&raquo;</a></span>
12 ${h.submit('view','view')}
12 ${h.submit('view','view')}
13 ${h.end_form()}
13 ${h.end_form()}
14 </div>
14 </div>
15 <div class="browser-body">
15 <div class="browser-body">
16 <table class="code-browser">
16 <table class="code-browser">
17 <thead>
17 <thead>
18 <tr>
18 <tr>
19 <th>${_('Name')}</th>
19 <th>${_('Name')}</th>
20 <th>${_('Size')}</th>
20 <th>${_('Size')}</th>
21 <th>${_('Revision')}</th>
21 <th>${_('Revision')}</th>
22 <th>${_('Last modified')}</th>
22 <th>${_('Last modified')}</th>
23 <th>${_('Last commiter')}</th>
23 <th>${_('Last commiter')}</th>
24 </tr>
24 </tr>
25 </thead>
25 </thead>
26 <tr class="parity0">
26 <tr class="parity0">
27 <td>
27 <td>
28 % if c.files_list.parent:
28 % if c.files_list.parent:
29 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent.path),class_="browser-dir")}
29 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent.path),class_="browser-dir")}
30 %endif
30 %endif
31 </td>
31 </td>
32 <td></td>
32 <td></td>
33 <td></td>
33 <td></td>
34 <td></td>
34 <td></td>
35 <td></td>
35 <td></td>
36 </tr>
36 </tr>
37 %for cnt,node in enumerate(c.files_list,1):
37 %for cnt,node in enumerate(c.files_list,1):
38 <tr class="parity${cnt%2}">
38 <tr class="parity${cnt%2}">
39 <td>
39 <td>
40 ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=node.path),class_=file_class(node))}
40 ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=node.path),class_=file_class(node))}
41 </td>
41 </td>
42 <td>
42 <td>
43 %if node.is_file():
43 %if node.is_file():
44 ${h.filesizeformat(node.size)}
44 ${h.filesizeformat(node.size)}
45 %endif
45 %endif
46 </td>
46 </td>
47 <td>
47 <td>
48 %if node.is_file():
48 %if node.is_file():
49 ${node.last_changeset.revision}
49 ${node.last_changeset.revision}
50 %endif
50 %endif
51 </td>
51 </td>
52 <td>
52 <td>
53 %if node.is_file():
53 %if node.is_file():
54 ${node.last_changeset.date}
54 ${node.last_changeset.date}
55 %endif
55 %endif
56 </td>
56 </td>
57 <td>
57 <td>
58 %if node.is_file():
58 %if node.is_file():
59 ${node.last_changeset.author}
59 ${node.last_changeset.author}
60 %endif
60 %endif
61 </td>
61 </td>
62 </tr>
62 </tr>
63 %endfor
63 %endfor
64 </table>
64 </table>
65 </div>
65 </div>
66 </div> No newline at end of file
66 </div>
@@ -1,125 +1,127 b''
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2 <%!
2 <%!
3 from pylons_app.lib import filters
3 from pylons_app.lib import filters
4 %>
4 %>
5 <%def name="title()">
5 <%def name="title()">
6 ${_('Repository managment')}
6 ${_('Repository managment')}
7 </%def>
7 </%def>
8 <%def name="breadcrumbs()">
8 <%def name="breadcrumbs()">
9 ${h.link_to(u'Home',h.url('/'))}
9 ${h.link_to(u'Home',h.url('/'))}
10 /
10 /
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
12 /
12 /
13 ${_('summary')}
13 ${_('summary')}
14 </%def>
14 </%def>
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 <form action="log">
16 <form action="log">
17 <dl class="search">
17 <dl class="search">
18 <dt><label>Search: </label></dt>
18 <dt><label>Search: </label></dt>
19 <dd><input type="text" name="rev" /></dd>
19 <dd><input type="text" name="rev" /></dd>
20 </dl>
20 </dl>
21 </form>
21 </form>
22
22
23 ${self.menu('summary')}
23 ${self.menu('summary')}
24 </%def>
24 </%def>
25 <%def name="main()">
25 <%def name="main()">
26
26
27 <h2 class="no-link no-border">${_('Mercurial Repository Overview')}</h2>
27 <h2 class="no-link no-border">${_('Mercurial Repository Overview')}</h2>
28 <dl class="overview">
28 <dl class="overview">
29 <dt>${_('name')}</dt>
29 <dt>${_('name')}</dt>
30 <dd>${c.repo_info.name}</dd>
30 <dd>${c.repo_info.name}</dd>
31 <dt>${_('description')}</dt>
31 <dt>${_('description')}</dt>
32 <dd>${c.repo_info.description}</dd>
32 <dd>${c.repo_info.description}</dd>
33 <dt>${_('contact')}</dt>
33 <dt>${_('contact')}</dt>
34 <dd>${c.repo_info.contact}</dd>
34 <dd>${c.repo_info.contact}</dd>
35 <dt>${_('last change')}</dt>
35 <dt>${_('last change')}</dt>
36 <dd>${c.repo_info.last_change|n,filters.rfc822date} - ${c.repo_info.last_change|n,filters.age}</dd>
36 <dd>${c.repo_info.last_change|n,filters.rfc822date} - ${c.repo_info.last_change|n,filters.age}</dd>
37 <dt>${_('url')}</dt>
37 <dt>${_('url')}</dt>
38 <dd><pre>hg clone <a href="${c.clone_repo_url}">${c.clone_repo_url}</a></pre></dd>
38 <dd><pre>hg clone <a href="${c.clone_repo_url}">${c.clone_repo_url}</a></pre></dd>
39 <dt>${_('Download')}</dt>
39 <dt>${_('Download')}</dt>
40 <dd>
40 <dd>
41 %for archive in c.repo_info._get_archives():
41 %for cnt,archive in enumerate(c.repo_info._get_archives()):
42 | <a href="/${c.repo_info.name}/archive/${archive['node']}${archive['extension']}">
42 %if cnt >=1:
43 ${c.repo_info.name}.${archive['type']}
43 |
44 </a>
44 %endif
45 ${h.link_to(c.repo_info.name+'.'+archive['type'],
46 h.url('files_archive_home',repo_name=c.repo_info.name,
47 revision='tip',fileformat=archive['extension']))}
45 %endfor
48 %endfor
46 |
47 </dd>
49 </dd>
48 </dl>
50 </dl>
49
51
50 <h2>${h.link_to(_('Changes'),h.url('changelog_home',repo_name=c.repo_name))}</h2>
52 <h2>${h.link_to(_('Changes'),h.url('changelog_home',repo_name=c.repo_name))}</h2>
51 <table>
53 <table>
52 <%def name="message_slug(msg)">
54 <%def name="message_slug(msg)">
53 <%
55 <%
54 limit = 60
56 limit = 60
55 if len(msg) > limit:
57 if len(msg) > limit:
56 return msg[:limit]+'...'
58 return msg[:limit]+'...'
57 else:
59 else:
58 return msg
60 return msg
59 %>
61 %>
60 </%def>
62 </%def>
61 %for cnt,cs in enumerate(c.repo_changesets):
63 %for cnt,cs in enumerate(c.repo_changesets):
62 <tr class="parity${cnt%2}">
64 <tr class="parity${cnt%2}">
63 <td>${cs._ctx.date()|n,filters.age}</td>
65 <td>${cs._ctx.date()|n,filters.age}</td>
64 <td>${cs.author|n,filters.person}</td>
66 <td>${cs.author|n,filters.person}</td>
65 <td>
67 <td>
66 ${h.link_to(message_slug(cs.message),
68 ${h.link_to(message_slug(cs.message),
67 h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
69 h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
68 title=cs.message)}
70 title=cs.message)}
69 </td>
71 </td>
70 <td>
72 <td>
71 <span class="logtags">
73 <span class="logtags">
72 <span class="branchtag">${cs.branch}</span>
74 <span class="branchtag">${cs.branch}</span>
73 %for tag in cs.tags:
75 %for tag in cs.tags:
74 <span class="tagtag">${tag}</span>
76 <span class="tagtag">${tag}</span>
75 %endfor
77 %endfor
76 </span>
78 </span>
77 </td>
79 </td>
78 <td class="nowrap">
80 <td class="nowrap">
79 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
81 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
80 |
82 |
81 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
83 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
82 </td>
84 </td>
83 </tr>
85 </tr>
84 %endfor
86 %endfor
85 </table>
87 </table>
86
88
87 <h2>${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</h2>
89 <h2>${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</h2>
88 <table>
90 <table>
89 %for cnt,tag in enumerate(c.repo_tags):
91 %for cnt,tag in enumerate(c.repo_tags):
90 <tr class="parity${cnt%2}">
92 <tr class="parity${cnt%2}">
91 <td>${tag._ctx.date()|n,filters.age}</td>
93 <td>${tag._ctx.date()|n,filters.age}</td>
92 <td>
94 <td>
93 <span class="logtags">
95 <span class="logtags">
94 <span class="tagtag">${h.link_to(tag.tags[-1],h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}</span>
96 <span class="tagtag">${h.link_to(tag.tags[-1],h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}</span>
95 </span>
97 </span>
96 </td>
98 </td>
97 <td class="nowrap">
99 <td class="nowrap">
98 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}
100 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}
99 |
101 |
100 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag._short))}
102 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag._short))}
101 </td>
103 </td>
102 </tr>
104 </tr>
103 %endfor
105 %endfor
104 </table>
106 </table>
105
107
106 <h2>${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</h2>
108 <h2>${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</h2>
107 <table>
109 <table>
108 %for cnt,branch in enumerate(c.repo_branches):
110 %for cnt,branch in enumerate(c.repo_branches):
109 <tr class="parity${cnt%2}">
111 <tr class="parity${cnt%2}">
110 <td>${branch._ctx.date()|n,filters.age}</td>
112 <td>${branch._ctx.date()|n,filters.age}</td>
111 <td>
113 <td>
112 <span class="logtags">
114 <span class="logtags">
113 <span class="branchtag">${h.link_to(branch.branch,h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}</span>
115 <span class="branchtag">${h.link_to(branch.branch,h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}</span>
114 </span>
116 </span>
115 </td>
117 </td>
116 <td class="nowrap">
118 <td class="nowrap">
117 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}
119 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}
118 |
120 |
119 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch._short))}
121 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch._short))}
120 </td>
122 </td>
121 </tr>
123 </tr>
122 %endfor
124 %endfor
123 </table>
125 </table>
124
126
125 </%def> No newline at end of file
127 </%def>
General Comments 0
You need to be logged in to leave comments. Login now