Show More
@@ -1,153 +1,154 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 | YAHOO.util.Dom.get('repo_switcher').removeAttribute('style'); | |
|
74 | 75 | } |
|
75 | 76 | else{ |
|
76 | 77 | YAHOO.util.Dom.setStyle('switch_repos','display',''); |
|
77 | 78 | YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF'); |
|
78 | 79 | YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5'); |
|
79 | 80 | YAHOO.util.Dom.addClass('repo_switcher','selected'); |
|
80 | 81 | } |
|
81 | 82 | }); |
|
82 | 83 | YAHOO.util.Event.addListener('repos_list','change',function(e){ |
|
83 | 84 | var wa = YAHOO.util.Dom.get('repos_list').value; |
|
84 | 85 | |
|
85 | 86 | var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa); |
|
86 | 87 | window.location = url; |
|
87 | 88 | }) |
|
88 | 89 | }); |
|
89 | 90 | </script> |
|
90 | 91 | <ul class="page-nav"> |
|
91 | 92 | <li> |
|
92 | 93 | <a id="repo_switcher" title="${_('Switch repository')}" href="#">↓</a> |
|
93 | 94 | <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px"> |
|
94 | 95 | <select id="repos_list" size="=10"> |
|
95 | 96 | %for repo in c.cached_repo_list.values(): |
|
96 | 97 | <option value="${repo.name}">${repo.name}</option> |
|
97 | 98 | %endfor |
|
98 | 99 | </select> |
|
99 | 100 | </div> |
|
100 | 101 | </li> |
|
101 | 102 | <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li> |
|
102 | 103 | <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li> |
|
103 | 104 | <li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li> |
|
104 | 105 | <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li> |
|
105 | 106 | <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li> |
|
106 | 107 | <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li> |
|
107 | 108 | </ul> |
|
108 | 109 | %else: |
|
109 | 110 | ##Root menu |
|
110 | 111 | <ul class="page-nav"> |
|
111 | 112 | <li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li> |
|
112 | 113 | <li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li> |
|
113 | 114 | <li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li> |
|
114 | 115 | </ul> |
|
115 | 116 | %endif |
|
116 | 117 | </div> |
|
117 | 118 | </%def> |
|
118 | 119 | <%def name="submenu(current=None)"> |
|
119 | 120 | <% |
|
120 | 121 | def is_current(selected): |
|
121 | 122 | if selected == current: |
|
122 | 123 | return "class='current_submenu'" |
|
123 | 124 | %> |
|
124 | 125 | %if current != None: |
|
125 | 126 | <div> |
|
126 | 127 | <ul class="submenu"> |
|
127 | 128 | <li ${is_current('repos')}>${h.link_to(u'repos',h.url('repos'),class_='repos')}</li> |
|
128 | 129 | <li ${is_current('users')}>${h.link_to(u'users',h.url('users'),class_='users')}</li> |
|
129 | 130 | <li ${is_current('permissions')}>${h.link_to(u'permissions',h.url('permissions'),class_='permissions')}</li> |
|
130 | 131 | </ul> |
|
131 | 132 | </div> |
|
132 | 133 | %endif |
|
133 | 134 | </%def> |
|
134 | 135 | |
|
135 | 136 | |
|
136 | 137 | <%def name="css()"> |
|
137 | 138 | <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" /> |
|
138 | 139 | </%def> |
|
139 | 140 | |
|
140 | 141 | <%def name="js()"> |
|
141 | 142 | <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script> |
|
142 | 143 | </%def> |
|
143 | 144 | |
|
144 | 145 | <!-- DEFINITION OF FORM ERROR FETCHER --> |
|
145 | 146 | <%def name="get_form_error(element)"> |
|
146 | 147 | %if hasattr(c,'form_errors') and type(c.form_errors) == dict: |
|
147 | 148 | %if c.form_errors.get(element,False): |
|
148 | 149 | <span class="error-message"> |
|
149 | 150 | ${c.form_errors.get(element,'')} |
|
150 | 151 | </span> |
|
151 | 152 | %endif |
|
152 | 153 | %endif |
|
153 | 154 | </%def> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now