Show More
@@ -1,154 +1,154 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> |
|
3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> | |
4 | <head> |
|
4 | <head> | |
5 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> |
|
5 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> | |
6 | <meta name="robots" content="index, nofollow"/> |
|
6 | <meta name="robots" content="index, nofollow"/> | |
7 | <title>${next.title()}</title> |
|
7 | <title>${next.title()}</title> | |
8 | ##For future use yui reset for cross browser compatability. |
|
8 | ##For future use yui reset for cross browser compatability. | |
9 | ##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" /> |
|
9 | ##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" /> | |
10 | ${self.css()} |
|
10 | ${self.css()} | |
11 | ${self.js()} |
|
11 | ${self.js()} | |
12 | </head> |
|
12 | </head> | |
13 |
|
13 | |||
14 | <body class="mainbody"> |
|
14 | <body class="mainbody"> | |
15 | <div id="container"> |
|
15 | <div id="container"> | |
16 | <div class="page-header"> |
|
16 | <div class="page-header"> | |
17 | <h1>${next.breadcrumbs()}</h1> |
|
17 | <h1>${next.breadcrumbs()}</h1> | |
18 | ${self.page_nav()} |
|
18 | ${self.page_nav()} | |
19 | <div class="flash_msg"> |
|
19 | <div class="flash_msg"> | |
20 | <% messages = h.flash.pop_messages() %> |
|
20 | <% messages = h.flash.pop_messages() %> | |
21 | % if messages: |
|
21 | % if messages: | |
22 | <ul id="flash-messages"> |
|
22 | <ul id="flash-messages"> | |
23 | % for message in messages: |
|
23 | % for message in messages: | |
24 | <li class="${message.category}_msg">${message}</li> |
|
24 | <li class="${message.category}_msg">${message}</li> | |
25 | % endfor |
|
25 | % endfor | |
26 | </ul> |
|
26 | </ul> | |
27 | % endif |
|
27 | % endif | |
28 | </div> |
|
28 | </div> | |
29 | <div id="main"> |
|
29 | <div id="main"> | |
30 | ${next.main()} |
|
30 | ${next.main()} | |
31 | </div> |
|
31 | </div> | |
32 | <div class="page-footer"> |
|
32 | <div class="page-footer"> | |
33 | Hg App ${c.hg_app_version} © 2010 by Marcin Kuzminski |
|
33 | Hg App ${c.hg_app_version} © 2010 by Marcin Kuzminski | |
34 | </div> |
|
34 | </div> | |
35 |
|
35 | |||
36 | <div id="powered-by"> |
|
36 | <div id="powered-by"> | |
37 | <p> |
|
37 | <p> | |
38 | <a href="http://mercurial.selenic.com/" title="Mercurial"> |
|
38 | <a href="http://mercurial.selenic.com/" title="Mercurial"> | |
39 | <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a> |
|
39 | <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a> | |
40 | </p> |
|
40 | </p> | |
41 | </div> |
|
41 | </div> | |
42 |
|
42 | |||
43 | <div id="corner-top-left"></div> |
|
43 | <div id="corner-top-left"></div> | |
44 | <div id="corner-top-right"></div> |
|
44 | <div id="corner-top-right"></div> | |
45 | <div id="corner-bottom-left"></div> |
|
45 | <div id="corner-bottom-left"></div> | |
46 | <div id="corner-bottom-right"></div> |
|
46 | <div id="corner-bottom-right"></div> | |
47 |
|
47 | |||
48 | </div> |
|
48 | </div> | |
49 | </body> |
|
49 | </body> | |
50 | </html> |
|
50 | </html> | |
51 |
|
51 | |||
52 | ### MAKO DEFS ### |
|
52 | ### MAKO DEFS ### | |
53 |
|
53 | |||
54 | <%def name="page_nav()"> |
|
54 | <%def name="page_nav()"> | |
55 | ${self.menu()} |
|
55 | ${self.menu()} | |
56 | ${self.submenu()} |
|
56 | ${self.submenu()} | |
57 | </%def> |
|
57 | </%def> | |
58 |
|
58 | |||
59 | <%def name="menu(current)"> |
|
59 | <%def name="menu(current)"> | |
60 | <% |
|
60 | <% | |
61 | def is_current(selected): |
|
61 | def is_current(selected): | |
62 | if selected == current: |
|
62 | if selected == current: | |
63 | return "class='current'" |
|
63 | return "class='current'" | |
64 | %> |
|
64 | %> | |
65 | %if current not in ['home','admin']: |
|
65 | %if current not in ['home','admin']: | |
66 | ##regular menu |
|
66 | ##regular menu | |
67 | <script type="text/javascript"> |
|
67 | <script type="text/javascript"> | |
68 | YAHOO.util.Event.onDOMReady(function(){ |
|
68 | YAHOO.util.Event.onDOMReady(function(){ | |
69 | YAHOO.util.Event.addListener('repo_switcher','click',function(){ |
|
69 | YAHOO.util.Event.addListener('repo_switcher','click',function(){ | |
70 | if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){ |
|
70 | if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){ | |
71 | YAHOO.util.Dom.setStyle('switch_repos','display','none'); |
|
71 | YAHOO.util.Dom.setStyle('switch_repos','display','none'); | |
72 | YAHOO.util.Dom.setStyle('repo_switcher','background',''); |
|
72 | YAHOO.util.Dom.setStyle('repo_switcher','background',''); | |
73 | YAHOO.util.Dom.removeClass('repo_switcher','selected'); |
|
73 | YAHOO.util.Dom.removeClass('repo_switcher','selected'); | |
74 | YAHOO.util.Dom.get('repo_switcher').removeAttribute('style'); |
|
74 | YAHOO.util.Dom.get('repo_switcher').removeAttribute('style'); | |
75 | } |
|
75 | } | |
76 | else{ |
|
76 | else{ | |
77 | YAHOO.util.Dom.setStyle('switch_repos','display',''); |
|
77 | YAHOO.util.Dom.setStyle('switch_repos','display',''); | |
78 | YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF'); |
|
78 | YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF'); | |
79 | YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5'); |
|
79 | YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5'); | |
80 | YAHOO.util.Dom.addClass('repo_switcher','selected'); |
|
80 | YAHOO.util.Dom.addClass('repo_switcher','selected'); | |
81 | } |
|
81 | } | |
82 | }); |
|
82 | }); | |
83 | YAHOO.util.Event.addListener('repos_list','change',function(e){ |
|
83 | YAHOO.util.Event.addListener('repos_list','change',function(e){ | |
84 | var wa = YAHOO.util.Dom.get('repos_list').value; |
|
84 | var wa = YAHOO.util.Dom.get('repos_list').value; | |
85 |
|
85 | |||
86 | var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa); |
|
86 | var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa); | |
87 | window.location = url; |
|
87 | window.location = url; | |
88 | }) |
|
88 | }) | |
89 | }); |
|
89 | }); | |
90 | </script> |
|
90 | </script> | |
91 | <ul class="page-nav"> |
|
91 | <ul class="page-nav"> | |
92 | <li> |
|
92 | <li> | |
93 | <a id="repo_switcher" title="${_('Switch repository')}" href="#">↓</a> |
|
93 | <a id="repo_switcher" title="${_('Switch repository')}" href="#">↓</a> | |
94 | <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px"> |
|
94 | <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px"> | |
95 | <select id="repos_list" size="=10"> |
|
95 | <select id="repos_list" size="=10"> | |
96 | %for repo in c.cached_repo_list.values(): |
|
96 | %for repo in sorted(x.name.lower() for x in c.cached_repo_list.values()): | |
97 |
<option value="${repo |
|
97 | <option value="${repo}">${repo}</option> | |
98 | %endfor |
|
98 | %endfor | |
99 | </select> |
|
99 | </select> | |
100 | </div> |
|
100 | </div> | |
101 | </li> |
|
101 | </li> | |
102 | <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li> |
|
102 | <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li> | |
103 | <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li> |
|
103 | <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li> | |
104 | <li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li> |
|
104 | <li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li> | |
105 | <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li> |
|
105 | <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li> | |
106 | <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li> |
|
106 | <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li> | |
107 | <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li> |
|
107 | <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li> | |
108 | </ul> |
|
108 | </ul> | |
109 | %else: |
|
109 | %else: | |
110 | ##Root menu |
|
110 | ##Root menu | |
111 | <ul class="page-nav"> |
|
111 | <ul class="page-nav"> | |
112 | <li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li> |
|
112 | <li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li> | |
113 | <li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li> |
|
113 | <li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li> | |
114 | <li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li> |
|
114 | <li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li> | |
115 | </ul> |
|
115 | </ul> | |
116 | %endif |
|
116 | %endif | |
117 | </div> |
|
117 | </div> | |
118 | </%def> |
|
118 | </%def> | |
119 | <%def name="submenu(current=None)"> |
|
119 | <%def name="submenu(current=None)"> | |
120 | <% |
|
120 | <% | |
121 | def is_current(selected): |
|
121 | def is_current(selected): | |
122 | if selected == current: |
|
122 | if selected == current: | |
123 | return "class='current_submenu'" |
|
123 | return "class='current_submenu'" | |
124 | %> |
|
124 | %> | |
125 | %if current != None: |
|
125 | %if current != None: | |
126 | <div> |
|
126 | <div> | |
127 | <ul class="submenu"> |
|
127 | <ul class="submenu"> | |
128 | <li ${is_current('repos')}>${h.link_to(u'repos',h.url('repos'),class_='repos')}</li> |
|
128 | <li ${is_current('repos')}>${h.link_to(u'repos',h.url('repos'),class_='repos')}</li> | |
129 | <li ${is_current('users')}>${h.link_to(u'users',h.url('users'),class_='users')}</li> |
|
129 | <li ${is_current('users')}>${h.link_to(u'users',h.url('users'),class_='users')}</li> | |
130 | <li ${is_current('permissions')}>${h.link_to(u'permissions',h.url('permissions'),class_='permissions')}</li> |
|
130 | <li ${is_current('permissions')}>${h.link_to(u'permissions',h.url('permissions'),class_='permissions')}</li> | |
131 | </ul> |
|
131 | </ul> | |
132 | </div> |
|
132 | </div> | |
133 | %endif |
|
133 | %endif | |
134 | </%def> |
|
134 | </%def> | |
135 |
|
135 | |||
136 |
|
136 | |||
137 | <%def name="css()"> |
|
137 | <%def name="css()"> | |
138 | <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" /> |
|
138 | <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" /> | |
139 | </%def> |
|
139 | </%def> | |
140 |
|
140 | |||
141 | <%def name="js()"> |
|
141 | <%def name="js()"> | |
142 | <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script> |
|
142 | <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script> | |
143 | </%def> |
|
143 | </%def> | |
144 |
|
144 | |||
145 | <!-- DEFINITION OF FORM ERROR FETCHER --> |
|
145 | <!-- DEFINITION OF FORM ERROR FETCHER --> | |
146 | <%def name="get_form_error(element)"> |
|
146 | <%def name="get_form_error(element)"> | |
147 | %if hasattr(c,'form_errors') and type(c.form_errors) == dict: |
|
147 | %if hasattr(c,'form_errors') and type(c.form_errors) == dict: | |
148 | %if c.form_errors.get(element,False): |
|
148 | %if c.form_errors.get(element,False): | |
149 | <span class="error-message"> |
|
149 | <span class="error-message"> | |
150 | ${c.form_errors.get(element,'')} |
|
150 | ${c.form_errors.get(element,'')} | |
151 | </span> |
|
151 | </span> | |
152 | %endif |
|
152 | %endif | |
153 | %endif |
|
153 | %endif | |
154 | </%def> No newline at end of file |
|
154 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now