Show More
@@ -1,154 +1,165 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
3 | 3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> |
|
4 | 4 | <head> |
|
5 | 5 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> |
|
6 | 6 | <meta name="robots" content="index, nofollow"/> |
|
7 | 7 | <title>${next.title()}</title> |
|
8 | 8 | ##For future use yui reset for cross browser compatability. |
|
9 | 9 | ##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" /> |
|
10 | 10 | ${self.css()} |
|
11 | 11 | ${self.js()} |
|
12 | 12 | </head> |
|
13 | 13 | |
|
14 | 14 | <body class="mainbody"> |
|
15 | 15 | <div id="container"> |
|
16 | 16 | <div class="page-header"> |
|
17 | 17 | <h1>${next.breadcrumbs()}</h1> |
|
18 | 18 | ${self.page_nav()} |
|
19 | 19 | <div class="flash_msg"> |
|
20 | 20 | <% messages = h.flash.pop_messages() %> |
|
21 | 21 | % if messages: |
|
22 | 22 | <ul id="flash-messages"> |
|
23 | 23 | % for message in messages: |
|
24 | 24 | <li class="${message.category}_msg">${message}</li> |
|
25 | 25 | % endfor |
|
26 | 26 | </ul> |
|
27 | 27 | % endif |
|
28 | 28 | </div> |
|
29 | 29 | <div id="main"> |
|
30 | 30 | ${next.main()} |
|
31 | 31 | </div> |
|
32 | 32 | <div class="page-footer"> |
|
33 | 33 | Hg App ${c.hg_app_version} © 2010 by Marcin Kuzminski |
|
34 | 34 | </div> |
|
35 | 35 | |
|
36 | 36 | <div id="powered-by"> |
|
37 | 37 | <p> |
|
38 | 38 | <a href="http://mercurial.selenic.com/" title="Mercurial"> |
|
39 | 39 | <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a> |
|
40 | 40 | </p> |
|
41 | 41 | </div> |
|
42 | 42 | |
|
43 | 43 | <div id="corner-top-left"></div> |
|
44 | 44 | <div id="corner-top-right"></div> |
|
45 | 45 | <div id="corner-bottom-left"></div> |
|
46 | 46 | <div id="corner-bottom-right"></div> |
|
47 | 47 | |
|
48 | 48 | </div> |
|
49 | 49 | </body> |
|
50 | 50 | </html> |
|
51 | 51 | |
|
52 | 52 | ### MAKO DEFS ### |
|
53 | 53 | |
|
54 | 54 | <%def name="page_nav()"> |
|
55 | 55 | ${self.menu()} |
|
56 | 56 | ${self.submenu()} |
|
57 | 57 | </%def> |
|
58 | 58 | |
|
59 | 59 | <%def name="menu(current)"> |
|
60 | 60 | <% |
|
61 | 61 | def is_current(selected): |
|
62 | 62 | if selected == current: |
|
63 | 63 | return "class='current'" |
|
64 | 64 | %> |
|
65 | 65 | %if current not in ['home','admin']: |
|
66 | 66 | ##regular menu |
|
67 | 67 | <script type="text/javascript"> |
|
68 | 68 | YAHOO.util.Event.onDOMReady(function(){ |
|
69 | 69 | YAHOO.util.Event.addListener('repo_switcher','click',function(){ |
|
70 | 70 | if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){ |
|
71 | 71 | YAHOO.util.Dom.setStyle('switch_repos','display','none'); |
|
72 | 72 | YAHOO.util.Dom.setStyle('repo_switcher','background',''); |
|
73 | 73 | YAHOO.util.Dom.removeClass('repo_switcher','selected'); |
|
74 | 74 | YAHOO.util.Dom.get('repo_switcher').removeAttribute('style'); |
|
75 | 75 | } |
|
76 | 76 | else{ |
|
77 | 77 | YAHOO.util.Dom.setStyle('switch_repos','display',''); |
|
78 | 78 | YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF'); |
|
79 | 79 | YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5'); |
|
80 | 80 | YAHOO.util.Dom.addClass('repo_switcher','selected'); |
|
81 | 81 | } |
|
82 | 82 | }); |
|
83 | 83 | YAHOO.util.Event.addListener('repos_list','change',function(e){ |
|
84 | 84 | var wa = YAHOO.util.Dom.get('repos_list').value; |
|
85 | 85 | |
|
86 | 86 | var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa); |
|
87 | 87 | window.location = url; |
|
88 | 88 | }) |
|
89 | 89 | }); |
|
90 | 90 | </script> |
|
91 | 91 | <ul class="page-nav"> |
|
92 | 92 | <li> |
|
93 | 93 | <a id="repo_switcher" title="${_('Switch repository')}" href="#">↓</a> |
|
94 | 94 | <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px"> |
|
95 | 95 | <select id="repos_list" size="=10"> |
|
96 | 96 | %for repo in sorted(x.name.lower() for x in c.cached_repo_list.values()): |
|
97 | 97 | <option value="${repo}">${repo}</option> |
|
98 | 98 | %endfor |
|
99 | 99 | </select> |
|
100 | 100 | </div> |
|
101 | 101 | </li> |
|
102 | 102 | <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li> |
|
103 | 103 | <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li> |
|
104 | 104 | <li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li> |
|
105 | 105 | <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li> |
|
106 | 106 | <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li> |
|
107 | 107 | <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li> |
|
108 | 108 | </ul> |
|
109 | 109 | %else: |
|
110 | 110 | ##Root menu |
|
111 | 111 | <ul class="page-nav"> |
|
112 | 112 | <li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li> |
|
113 | 113 | <li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li> |
|
114 | 114 | <li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li> |
|
115 | 115 | </ul> |
|
116 | 116 | %endif |
|
117 | 117 | </div> |
|
118 | 118 | </%def> |
|
119 | 119 | <%def name="submenu(current=None)"> |
|
120 | 120 | <% |
|
121 | 121 | def is_current(selected): |
|
122 | 122 | if selected == current: |
|
123 | 123 | return "class='current_submenu'" |
|
124 | 124 | %> |
|
125 | 125 | %if current != None: |
|
126 | 126 | <div> |
|
127 | 127 | <ul class="submenu"> |
|
128 | 128 | <li ${is_current('repos')}>${h.link_to(u'repos',h.url('repos'),class_='repos')}</li> |
|
129 | 129 | <li ${is_current('users')}>${h.link_to(u'users',h.url('users'),class_='users')}</li> |
|
130 | 130 | <li ${is_current('permissions')}>${h.link_to(u'permissions',h.url('permissions'),class_='permissions')}</li> |
|
131 | 131 | </ul> |
|
132 | 132 | </div> |
|
133 | 133 | %endif |
|
134 | 134 | </%def> |
|
135 | 135 | |
|
136 | 136 | |
|
137 | 137 | <%def name="css()"> |
|
138 | 138 | <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" /> |
|
139 | 139 | </%def> |
|
140 | 140 | |
|
141 | 141 | <%def name="js()"> |
|
142 | 142 | <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script> |
|
143 | 143 | </%def> |
|
144 | 144 | |
|
145 | 145 | <!-- DEFINITION OF FORM ERROR FETCHER --> |
|
146 | 146 | <%def name="get_form_error(element)"> |
|
147 | 147 | %if hasattr(c,'form_errors') and type(c.form_errors) == dict: |
|
148 | 148 | %if c.form_errors.get(element,False): |
|
149 | 149 | <span class="error-message"> |
|
150 | 150 | ${c.form_errors.get(element,'')} |
|
151 | 151 | </span> |
|
152 | 152 | %endif |
|
153 | 153 | %endif |
|
154 | </%def> | |
|
155 | ||
|
156 | <!-- SHORTER LONGER STRINGS --> | |
|
157 | <%def name="message_slug(msg)"> | |
|
158 | <% | |
|
159 | limit = 60 | |
|
160 | if len(msg) > limit: | |
|
161 | return msg[:limit]+'...' | |
|
162 | else: | |
|
163 | return msg | |
|
164 | %> | |
|
154 | 165 | </%def> No newline at end of file |
@@ -1,62 +1,62 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%! |
|
3 | 3 | from pylons_app.lib import filters |
|
4 | 4 | %> |
|
5 | 5 | <%inherit file="base/base.html"/> |
|
6 | 6 | <%def name="title()"> |
|
7 | 7 | ${c.repos_prefix} Mercurial Repositories |
|
8 | 8 | </%def> |
|
9 | 9 | <%def name="breadcrumbs()"> |
|
10 | 10 | ${c.repos_prefix} Mercurial Repositories |
|
11 | 11 | </%def> |
|
12 | 12 | <%def name="page_nav()"> |
|
13 | 13 | ${self.menu('home')} |
|
14 | 14 | </%def> |
|
15 | 15 | <%def name="main()"> |
|
16 | 16 | <%def name="get_sort(name)"> |
|
17 | 17 | <%name_slug = name.lower().replace(' ','_') %> |
|
18 | 18 | %if name_slug == c.cs_slug: |
|
19 | 19 | <span style="font-weight: bold;color:#006699">${name}</span> |
|
20 | 20 | %else: |
|
21 | 21 | <span style="font-weight: bold">${name}</span> |
|
22 | 22 | %endif |
|
23 | 23 | <a href="?sort=${name_slug}">↓</a> |
|
24 | 24 | <a href="?sort=-${name_slug}">↑</a> |
|
25 | 25 | </%def> |
|
26 | 26 | <table> |
|
27 | 27 | <tr> |
|
28 | 28 | <td>${get_sort(_('Name'))}</td> |
|
29 | 29 | <td>${get_sort(_('Description'))}</td> |
|
30 | 30 | <td>${get_sort(_('Last change'))}</td> |
|
31 | 31 | <td>${get_sort(_('Tip'))}</td> |
|
32 | 32 | <td>${get_sort(_('Contact'))}</td> |
|
33 | 33 | <td></td> |
|
34 | 34 | <td></td> |
|
35 | 35 | <td></td> |
|
36 | 36 | </tr> |
|
37 | 37 | %for cnt,repo in enumerate(c.repos_list): |
|
38 | 38 | <tr class="parity${cnt%2}"> |
|
39 | 39 | <td>${h.link(repo['name'],h.url('summary_home',repo_name=repo['name']))}</td> |
|
40 | <td>${repo['description']}</td> | |
|
40 | <td title="${repo['description']}">${self.message_slug(repo['description'])}</td> | |
|
41 | 41 | <td>${repo['last_change']|n,filters.age}</td> |
|
42 | 42 | <td>${h.link_to('r%s:%s' % (repo['rev'],repo['tip']),h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']))}</td> |
|
43 | 43 | <td title="${repo['contact']}">${repo['contact']|n,filters.person}</td> |
|
44 | 44 | |
|
45 | 45 | ##%for archive in repo['repo_archives']: |
|
46 | 46 | ##<td class="indexlinks"> |
|
47 | 47 | ## ${h.link_to(archive['type'], |
|
48 | 48 | ## h.url('files_archive_home',repo_name=repo['name'], |
|
49 | 49 | ## revision='tip',fileformat=archive['extension']),class_="archive_logo" )} |
|
50 | 50 | ##</td> |
|
51 | 51 | ##%endfor |
|
52 | 52 | |
|
53 | 53 | <td> |
|
54 | 54 | ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=repo['name']),class_='rss_logo')} |
|
55 | 55 | </td> |
|
56 | 56 | <td> |
|
57 | 57 | ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=repo['name']),class_='atom_logo')} |
|
58 | 58 | </td> |
|
59 | 59 | </tr> |
|
60 | 60 | %endfor |
|
61 | 61 | </table> |
|
62 | 62 | </%def> |
@@ -1,57 +1,48 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%! |
|
3 | 3 | from pylons_app.lib import filters |
|
4 | 4 | %> |
|
5 | 5 | <table> |
|
6 | <%def name="message_slug(msg)"> | |
|
7 | <% | |
|
8 | limit = 60 | |
|
9 | if len(msg) > limit: | |
|
10 | return msg[:limit]+'...' | |
|
11 | else: | |
|
12 | return msg | |
|
13 | %> | |
|
14 | </%def> | |
|
15 | 6 | %for cnt,cs in enumerate(c.repo_changesets): |
|
16 | 7 | <tr class="parity${cnt%2}"> |
|
17 | 8 | <td>${cs._ctx.date()|n,filters.age}</td> |
|
18 | 9 | <td title="${cs.author}">${cs.author|n,filters.person}</td> |
|
19 | 10 | <td>r${cs.revision}</td> |
|
20 | 11 | <td> |
|
21 | ${h.link_to(message_slug(cs.message), | |
|
12 | ${h.link_to(self.message_slug(cs.message), | |
|
22 | 13 | h.url('changeset_home',repo_name=c.repo_name,revision=cs._short), |
|
23 | 14 | title=cs.message)} |
|
24 | 15 | </td> |
|
25 | 16 | <td> |
|
26 | 17 | <span class="logtags"> |
|
27 | 18 | <span class="branchtag">${cs.branch}</span> |
|
28 | 19 | %for tag in cs.tags: |
|
29 | 20 | <span class="tagtag">${tag}</span> |
|
30 | 21 | %endfor |
|
31 | 22 | </span> |
|
32 | 23 | </td> |
|
33 | 24 | <td class="nowrap"> |
|
34 | 25 | ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))} |
|
35 | 26 | | |
|
36 | 27 | ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))} |
|
37 | 28 | </td> |
|
38 | 29 | </tr> |
|
39 | 30 | %endfor |
|
40 | 31 | |
|
41 | 32 | </table> |
|
42 | 33 | <div> |
|
43 | 34 | <script type="text/javascript"> |
|
44 | 35 | var data_div = 'shortlog_data'; |
|
45 | 36 | YAHOO.util.Event.onDOMReady(function(){ |
|
46 | 37 | YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){ |
|
47 | 38 | YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});}); |
|
48 | 39 | </script> |
|
49 | 40 | <h2> |
|
50 | 41 | ${c.repo_changesets.pager('$link_previous ~2~ $link_next', |
|
51 | 42 | onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{ |
|
52 | 43 | success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText; |
|
53 | 44 | YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){ |
|
54 | 45 | YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');}); |
|
55 | 46 | YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")} |
|
56 | 47 | </h2> |
|
57 | 48 | </div> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now