##// END OF EJS Templates
fixed branches and tags, fetching for new vcs implementation
marcink -
r277:7ec4463b default
parent child Browse files
Show More
@@ -1,44 +1,46
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 # encoding: utf-8
2 # encoding: utf-8
3 # branches controller for pylons
3 # branches controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5
5
6 # This program is free software; you can redistribute it and/or
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; version 2
8 # as published by the Free Software Foundation; version 2
9 # of the License or (at your opinion) any later version of the license.
9 # of the License or (at your opinion) any later version of the license.
10 #
10 #
11 # This program is distributed in the hope that it will be useful,
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
14 # GNU General Public License for more details.
15 #
15 #
16 # You should have received a copy of the GNU General Public License
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 # MA 02110-1301, USA.
19 # MA 02110-1301, USA.
20 """
20 """
21 Created on April 21, 2010
21 Created on April 21, 2010
22 branches controller for pylons
22 branches controller for pylons
23 @author: marcink
23 @author: marcink
24 """
24 """
25 from pylons import tmpl_context as c, app_globals as g
25 from pylons import tmpl_context as c
26 from pylons_app.lib.auth import LoginRequired
26 from pylons_app.lib.auth import LoginRequired
27 from pylons_app.lib.base import BaseController, render
27 from pylons_app.lib.base import BaseController, render
28 from pylons_app.model.hg_model import HgModel
28 from pylons_app.model.hg_model import HgModel
29 import logging
29 import logging
30
30
31 log = logging.getLogger(__name__)
31 log = logging.getLogger(__name__)
32
32
33 class BranchesController(BaseController):
33 class BranchesController(BaseController):
34
34
35 @LoginRequired()
35 @LoginRequired()
36 def __before__(self):
36 def __before__(self):
37 super(BranchesController, self).__before__()
37 super(BranchesController, self).__before__()
38
38
39 def index(self):
39 def index(self):
40 hg_model = HgModel()
40 hg_model = HgModel()
41 c.repo_info = hg_model.get_repo(c.repo_name)
41 c.repo_info = hg_model.get_repo(c.repo_name)
42 c.repo_branches = c.repo_info.branches
42 c.repo_branches = {}
43 for name, hash in c.repo_info.branches.items():
44 c.repo_branches[name] = c.repo_info.get_changeset(hash)
43
45
44 return render('branches/branches.html')
46 return render('branches/branches.html')
@@ -1,52 +1,58
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 # encoding: utf-8
2 # encoding: utf-8
3 # summary controller for pylons
3 # summary controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5
5
6 # This program is free software; you can redistribute it and/or
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; version 2
8 # as published by the Free Software Foundation; version 2
9 # of the License or (at your opinion) any later version of the license.
9 # of the License or (at your opinion) any later version of the license.
10 #
10 #
11 # This program is distributed in the hope that it will be useful,
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
14 # GNU General Public License for more details.
15 #
15 #
16 # You should have received a copy of the GNU General Public License
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 # MA 02110-1301, USA.
19 # MA 02110-1301, USA.
20 """
20 """
21 Created on April 18, 2010
21 Created on April 18, 2010
22 summary controller for pylons
22 summary controller for pylons
23 @author: marcink
23 @author: marcink
24 """
24 """
25 from pylons import tmpl_context as c, request
25 from pylons import tmpl_context as c, request
26 from pylons_app.lib.auth import LoginRequired
26 from pylons_app.lib.auth import LoginRequired
27 from pylons_app.lib.base import BaseController, render
27 from pylons_app.lib.base import BaseController, render
28 from pylons_app.model.hg_model import HgModel, _full_changelog_cached
28 from pylons_app.model.hg_model import HgModel, _full_changelog_cached
29 import logging
29 import logging
30
30
31 log = logging.getLogger(__name__)
31 log = logging.getLogger(__name__)
32
32
33 class SummaryController(BaseController):
33 class SummaryController(BaseController):
34
34
35 @LoginRequired()
35 @LoginRequired()
36 def __before__(self):
36 def __before__(self):
37 super(SummaryController, self).__before__()
37 super(SummaryController, self).__before__()
38
38
39 def index(self):
39 def index(self):
40 hg_model = HgModel()
40 hg_model = HgModel()
41 c.repo_info = hg_model.get_repo(c.repo_name)
41 c.repo_info = hg_model.get_repo(c.repo_name)
42 c.repo_changesets = _full_changelog_cached(c.repo_name)[:10]
42 c.repo_changesets = _full_changelog_cached(c.repo_name)[:10]
43 e = request.environ
43 e = request.environ
44 uri = u'%(protocol)s://%(user)s@%(host)s/%(repo_name)s' % {
44 uri = u'%(protocol)s://%(user)s@%(host)s/%(repo_name)s' % {
45 'protocol': e.get('wsgi.url_scheme'),
45 'protocol': e.get('wsgi.url_scheme'),
46 'user':str(c.hg_app_user.username),
46 'user':str(c.hg_app_user.username),
47 'host':e.get('HTTP_HOST'),
47 'host':e.get('HTTP_HOST'),
48 'repo_name':c.repo_name, }
48 'repo_name':c.repo_name, }
49 c.clone_repo_url = uri
49 c.clone_repo_url = uri
50 c.repo_tags = c.repo_info.tags[:10]
50 c.repo_tags = {}
51 c.repo_branches = c.repo_info.branches[:10]
51 for name, hash in c.repo_info.tags.items()[:10]:
52 c.repo_tags[name] = c.repo_info.get_changeset(hash)
53
54 c.repo_branches = {}
55 for name, hash in c.repo_info.branches.items()[:10]:
56 c.repo_branches[name] = c.repo_info.get_changeset(hash)
57
52 return render('summary/summary.html')
58 return render('summary/summary.html')
@@ -1,44 +1,46
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 # encoding: utf-8
2 # encoding: utf-8
3 # tags controller for pylons
3 # tags controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5
5
6 # This program is free software; you can redistribute it and/or
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; version 2
8 # as published by the Free Software Foundation; version 2
9 # of the License or (at your opinion) any later version of the license.
9 # of the License or (at your opinion) any later version of the license.
10 #
10 #
11 # This program is distributed in the hope that it will be useful,
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
14 # GNU General Public License for more details.
15 #
15 #
16 # You should have received a copy of the GNU General Public License
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 # MA 02110-1301, USA.
19 # MA 02110-1301, USA.
20 """
20 """
21 Created on April 21, 2010
21 Created on April 21, 2010
22 tags controller for pylons
22 tags controller for pylons
23 @author: marcink
23 @author: marcink
24 """
24 """
25 from pylons import tmpl_context as c
25 from pylons import tmpl_context as c
26 from pylons_app.lib.auth import LoginRequired
26 from pylons_app.lib.auth import LoginRequired
27 from pylons_app.lib.base import BaseController, render
27 from pylons_app.lib.base import BaseController, render
28 from pylons_app.model.hg_model import HgModel
28 from pylons_app.model.hg_model import HgModel
29 import logging
29 import logging
30
30
31 log = logging.getLogger(__name__)
31 log = logging.getLogger(__name__)
32
32
33 class TagsController(BaseController):
33 class TagsController(BaseController):
34
34
35 @LoginRequired()
35 @LoginRequired()
36 def __before__(self):
36 def __before__(self):
37 super(TagsController, self).__before__()
37 super(TagsController, self).__before__()
38
38
39 def index(self):
39 def index(self):
40 hg_model = HgModel()
40 hg_model = HgModel()
41 c.repo_info = hg_model.get_repo(c.repo_name)
41 c.repo_info = hg_model.get_repo(c.repo_name)
42 c.repo_tags = c.repo_info.tags
42 c.repo_tags = {}
43 for name, hash in c.repo_info.tags.items():
44 c.repo_tags[name] = c.repo_info.get_changeset(hash)
43
45
44 return render('tags/tags.html')
46 return render('tags/tags.html')
@@ -1,38 +1,39
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2 <%! from pylons_app.lib import filters %>
2 <%! from pylons_app.lib import filters %>
3 <%def name="title()">
3 <%def name="title()">
4 ${_('Branches')}
4 ${_('Branches')}
5 </%def>
5 </%def>
6 <%def name="breadcrumbs()">
6 <%def name="breadcrumbs()">
7 ${h.link_to(u'Home',h.url('/'))}
7 ${h.link_to(u'Home',h.url('/'))}
8 /
8 /
9 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
9 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
10 /
10 /
11 ${_('branches')}
11 ${_('branches')}
12 </%def>
12 </%def>
13 <%def name="page_nav()">
13 <%def name="page_nav()">
14 ${self.menu('branches')}
14 ${self.menu('branches')}
15 </%def>
15 </%def>
16 <%def name="main()">
16 <%def name="main()">
17
17
18 <h2 class="no-link no-border">${_('Branches')}</h2>
18 <h2 class="no-link no-border">${_('Branches')}</h2>
19
19
20 <table>
20 <table>
21 %for cnt,branch in enumerate(c.repo_branches):
21 %for cnt,branch in enumerate(c.repo_branches.items()):
22 <tr class="parity${cnt%2}">
22 <tr class="parity${cnt%2}">
23 <td>${branch._ctx.date()|n,filters.age}</td>
23 <td>${branch[1]._ctx.date()|n,filters.age}</td>
24 <td>
24 <td>
25 <span class="logtags">
25 <span class="logtags">
26 <span class="branchtag">${h.link_to(branch.branch,h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}</span>
26 <span class="branchtag">${h.link_to(branch[0],
27 h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
27 </span>
28 </span>
28 </td>
29 </td>
29 <td class="nowrap">
30 <td class="nowrap">
30 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}
31 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}
31 |
32 |
32 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch._short))}
33 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}
33 </td>
34 </td>
34 </tr>
35 </tr>
35 %endfor
36 %endfor
36 </table>
37 </table>
37
38
38 </%def> No newline at end of file
39 </%def>
@@ -1,48 +1,48
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%!
2 <%!
3 from pylons_app.lib import filters
3 from pylons_app.lib import filters
4 %>
4 %>
5 <table>
5 <table>
6 %for cnt,cs in enumerate(c.repo_changesets):
6 %for cnt,cs in enumerate(c.repo_changesets):
7 <tr class="parity${cnt%2}">
7 <tr class="parity${cnt%2}">
8 <td>${cs._ctx.date()|n,filters.age}</td>
8 <td>${cs._ctx.date()|n,filters.age}</td>
9 <td title="${cs.author}">${cs.author|n,filters.person}</td>
9 <td title="${cs.author}">${cs.author|n,filters.person}</td>
10 <td>r${cs.revision}</td>
10 <td>r${cs.revision}</td>
11 <td>
11 <td>
12 ${h.link_to(h.truncate(cs.message,60),
12 ${h.link_to(h.truncate(cs.message,60),
13 h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
13 h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
14 title=cs.message)}
14 title=cs.message)}
15 </td>
15 </td>
16 <td>
16 <td>
17 <span class="logtags">
17 <span class="logtags">
18 <span class="branchtag">${cs.branch}</span>
18 <span class="branchtag">${cs.branch}</span>
19 %for tag in cs.tags:
19 %for tag in cs.tags:
20 <span class="tagtag">${tag}</span>
20 <span class="tagtag">${tag}</span>
21 %endfor
21 %endfor
22 </span>
22 </span>
23 </td>
23 </td>
24 <td class="nowrap">
24 <td class="nowrap">
25 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
25 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
26 |
26 |
27 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
27 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
28 </td>
28 </td>
29 </tr>
29 </tr>
30 %endfor
30 %endfor
31
31
32 </table>
32 </table>
33 <div>
33 <div>
34 <script type="text/javascript">
34 <script type="text/javascript">
35 var data_div = 'shortlog_data';
35 var data_div = 'shortlog_data';
36 YAHOO.util.Event.onDOMReady(function(){
36 YAHOO.util.Event.onDOMReady(function(){
37 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
37 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
38 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
38 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
39 </script>
39 </script>
40 <h2>
40 <h2>
41 ${c.repo_changesets.pager('$link_previous ~2~ $link_next',
41 ${c.repo_changesets.pager('$link_previous ~2~ $link_next',
42 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
42 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
43 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
43 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
44 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
44 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
45 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
45 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
46 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
46 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
47 </h2>
47 </h2>
48 </div> No newline at end of file
48 </div>
@@ -1,132 +1,134
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 ${self.menu('summary')}
16 ${self.menu('summary')}
17 </%def>
17 </%def>
18
18
19 <%def name="js()">
19 <%def name="js()">
20 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
20 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
21 <script type="text/javascript">
21 <script type="text/javascript">
22 var E = YAHOO.util.Event;
22 var E = YAHOO.util.Event;
23 var D = YAHOO.util.Dom;
23 var D = YAHOO.util.Dom;
24
24
25 E.onDOMReady(function(e){
25 E.onDOMReady(function(e){
26 id = 'clone_url';
26 id = 'clone_url';
27 E.addListener(id,'click',function(e){
27 E.addListener(id,'click',function(e){
28 D.get('clone_url').select();
28 D.get('clone_url').select();
29 })
29 })
30 })
30 })
31 </script>
31 </script>
32 </%def>
32 </%def>
33
33
34 <%def name="main()">
34 <%def name="main()">
35 <h2 class="no-link no-border">${_('Mercurial Repository Overview')}</h2>
35 <h2 class="no-link no-border">${_('Mercurial Repository Overview')}</h2>
36 <dl class="overview">
36 <dl class="overview">
37 <dt>${_('name')}</dt>
37 <dt>${_('name')}</dt>
38 <dd>${c.repo_info.name}</dd>
38 <dd>${c.repo_info.name}</dd>
39 <dt>${_('description')}</dt>
39 <dt>${_('description')}</dt>
40 <dd>${c.repo_info.description}</dd>
40 <dd>${c.repo_info.description}</dd>
41 <dt>${_('contact')}</dt>
41 <dt>${_('contact')}</dt>
42 <dd>${c.repo_info.contact}</dd>
42 <dd>${c.repo_info.contact}</dd>
43 <dt>${_('last change')}</dt>
43 <dt>${_('last change')}</dt>
44 <dd>${c.repo_info.last_change|n,filters.age} - ${c.repo_info.last_change|n,filters.rfc822date}</dd>
44 <dd>${c.repo_info.last_change|n,filters.age} - ${c.repo_info.last_change|n,filters.rfc822date}</dd>
45 <dt>${_('clone url')}</dt>
45 <dt>${_('clone url')}</dt>
46 <dd><input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/></dd>
46 <dd><input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/></dd>
47 <dt>${_('download')}</dt>
47 <dt>${_('download')}</dt>
48 <dd>
48 <dd>
49 %for cnt,archive in enumerate(c.repo_info._get_archives()):
49 %for cnt,archive in enumerate(c.repo_info._get_archives()):
50 %if cnt >=1:
50 %if cnt >=1:
51 |
51 |
52 %endif
52 %endif
53 ${h.link_to(c.repo_info.name+'.'+archive['type'],
53 ${h.link_to(c.repo_info.name+'.'+archive['type'],
54 h.url('files_archive_home',repo_name=c.repo_info.name,
54 h.url('files_archive_home',repo_name=c.repo_info.name,
55 revision='tip',fileformat=archive['extension']),class_="archive_logo")}
55 revision='tip',fileformat=archive['extension']),class_="archive_logo")}
56 %endfor
56 %endfor
57 </dd>
57 </dd>
58 <dt>${_('feeds')}</dt>
58 <dt>${_('feeds')}</dt>
59 <dd>
59 <dd>
60 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo_info.name),class_='rss_logo')}
60 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo_info.name),class_='rss_logo')}
61 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo_info.name),class_='atom_logo')}
61 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo_info.name),class_='atom_logo')}
62 </dd>
62 </dd>
63 </dl>
63 </dl>
64
64
65 <h2>${h.link_to(_('Changes'),h.url('changelog_home',repo_name=c.repo_name))}</h2>
65 <h2>${h.link_to(_('Changes'),h.url('changelog_home',repo_name=c.repo_name))}</h2>
66 <table>
66 <table>
67 %for cnt,cs in enumerate(c.repo_changesets):
67 %for cnt,cs in enumerate(c.repo_changesets):
68 <tr class="parity${cnt%2}">
68 <tr class="parity${cnt%2}">
69 <td>${cs._ctx.date()|n,filters.age}</td>
69 <td>${cs._ctx.date()|n,filters.age}</td>
70 <td>${cs.author|n,filters.person}</td>
70 <td>${cs.author|n,filters.person}</td>
71 <td>r${cs.revision}</td>
71 <td>r${cs.revision}</td>
72 <td>
72 <td>
73 ${h.link_to(h.truncate(cs.message,60),
73 ${h.link_to(h.truncate(cs.message,60),
74 h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
74 h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
75 title=cs.message)}
75 title=cs.message)}
76 </td>
76 </td>
77 <td>
77 <td>
78 <span class="logtags">
78 <span class="logtags">
79 <span class="branchtag">${cs.branch}</span>
79 <span class="branchtag">${cs.branch}</span>
80 %for tag in cs.tags:
80 %for tag in cs.tags:
81 <span class="tagtag">${tag}</span>
81 <span class="tagtag">${tag}</span>
82 %endfor
82 %endfor
83 </span>
83 </span>
84 </td>
84 </td>
85 <td class="nowrap">
85 <td class="nowrap">
86 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
86 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
87 |
87 |
88 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
88 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
89 </td>
89 </td>
90 </tr>
90 </tr>
91 %endfor
91 %endfor
92 </table>
92 </table>
93
93
94 <h2>${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</h2>
94 <h2>${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</h2>
95 <table>
95 <table>
96 %for cnt,tag in enumerate(c.repo_tags):
96 %for cnt,tag in enumerate(c.repo_tags.items()):
97 <tr class="parity${cnt%2}">
97 <tr class="parity${cnt%2}">
98 <td>${tag._ctx.date()|n,filters.age}</td>
98 <td>${tag[1]._ctx.date()|n,filters.age}</td>
99 <td>
99 <td>
100 <span class="logtags">
100 <span class="logtags">
101 <span class="tagtag">${h.link_to(tag.tags[-1],h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}</span>
101 <span class="tagtag">${h.link_to(tag[0],
102 h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}</span>
102 </span>
103 </span>
103 </td>
104 </td>
104 <td class="nowrap">
105 <td class="nowrap">
105 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}
106 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
106 |
107 |
107 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag._short))}
108 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
108 </td>
109 </td>
109 </tr>
110 </tr>
110 %endfor
111 %endfor
111 </table>
112 </table>
112
113
113 <h2>${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</h2>
114 <h2>${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</h2>
114 <table>
115 <table>
115 %for cnt,branch in enumerate(c.repo_branches):
116 %for cnt,branch in enumerate(c.repo_branches.items()):
116 <tr class="parity${cnt%2}">
117 <tr class="parity${cnt%2}">
117 <td>${branch._ctx.date()|n,filters.age}</td>
118 <td>${branch[1]._ctx.date()|n,filters.age}</td>
118 <td>
119 <td>
119 <span class="logtags">
120 <span class="logtags">
120 <span class="branchtag">${h.link_to(branch.branch,h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}</span>
121 <span class="branchtag">${h.link_to(branch[0],
122 h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
121 </span>
123 </span>
122 </td>
124 </td>
123 <td class="nowrap">
125 <td class="nowrap">
124 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}
126 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}
125 |
127 |
126 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch._short))}
128 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}
127 </td>
129 </td>
128 </tr>
130 </tr>
129 %endfor
131 %endfor
130 </table>
132 </table>
131
133
132 </%def> No newline at end of file
134 </%def>
@@ -1,40 +1,40
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 ${_('Tags')}
6 ${_('Tags')}
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 ${_('tags')}
13 ${_('tags')}
14 </%def>
14 </%def>
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 ${self.menu('tags')}
16 ${self.menu('tags')}
17 </%def>
17 </%def>
18 <%def name="main()">
18 <%def name="main()">
19
19
20 <h2 class="no-link no-border">${_('Tags')}</h2>
20 <h2 class="no-link no-border">${_('Tags')}</h2>
21
22 <table>
21 <table>
23 %for cnt,tag in enumerate(c.repo_tags):
22 %for cnt,tag in enumerate(c.repo_tags.items()):
24 <tr class="parity${cnt%2}">
23 <tr class="parity${cnt%2}">
25 <td>${tag._ctx.date()|n,filters.age}</td>
24 <td>${tag[1]._ctx.date()|n,filters.age}</td>
26 <td>
25 <td>
27 <span class="logtags">
26 <span class="logtags">
28 <span class="tagtag">${h.link_to(tag.tags[-1],h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}</span>
27 <span class="tagtag">${h.link_to(tag[0],
28 h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}</span>
29 </span>
29 </span>
30 </td>
30 </td>
31 <td class="nowrap">
31 <td class="nowrap">
32 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}
32 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
33 |
33 |
34 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag._short))}
34 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
35 </td>
35 </td>
36 </tr>
36 </tr>
37 %endfor
37 %endfor
38 </table>
38 </table>
39
39
40 </%def> No newline at end of file
40 </%def>
General Comments 0
You need to be logged in to leave comments. Login now