##// END OF EJS Templates
Updated tempaltes, added file browser breadcrumbs, and feed icons
marcink -
r102:2dc0c8e4 default
parent child Browse files
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -1,85 +1,95 b''
1 """Helper functions
1 """Helper functions
2
2
3 Consists of functions to typically be used within templates, but also
3 Consists of functions to typically be used within templates, but also
4 available to Controllers. This module is available to both as 'h'.
4 available to Controllers. This module is available to both as 'h'.
5 """
5 """
6 from pylons import url
6 from pylons import url
7 from pylons.i18n.translation import _, ungettext
7 from pylons.i18n.translation import _, ungettext
8 from webhelpers.html import (literal, HTML, escape)
8 from webhelpers.html import (literal, HTML, escape)
9 from webhelpers.html.builder import make_tag
9 from webhelpers.html.builder import make_tag
10 from webhelpers.html.tools import (auto_link, button_to, highlight, js_obfuscate
10 from webhelpers.html.tools import (auto_link, button_to, highlight, js_obfuscate
11 , mail_to, strip_links, strip_tags, tag_re)
11 , mail_to, strip_links, strip_tags, tag_re)
12 from webhelpers.html.tags import (auto_discovery_link, checkbox, css_classes,
12 from webhelpers.html.tags import (auto_discovery_link, checkbox, css_classes,
13 end_form, file, form, hidden, image,
13 end_form, file, form, hidden, image,
14 javascript_link, link_to, link_to_if,
14 javascript_link, link_to, link_to_if,
15 link_to_unless, ol, required_legend,
15 link_to_unless, ol, required_legend,
16 select, stylesheet_link,
16 select, stylesheet_link,
17 submit, text, password, textarea, title,
17 submit, text, password, textarea, title,
18 ul, xml_declaration)
18 ul, xml_declaration)
19 from webhelpers.text import (chop_at, collapse, convert_accented_entities,
19 from webhelpers.text import (chop_at, collapse, convert_accented_entities,
20 convert_misc_entities, lchop, plural, rchop,
20 convert_misc_entities, lchop, plural, rchop,
21 remove_formatting, replace_whitespace, urlify)
21 remove_formatting, replace_whitespace, urlify)
22
22
23 from webhelpers.pylonslib import Flash as _Flash
23 from webhelpers.pylonslib import Flash as _Flash
24 from webhelpers.pylonslib.secure_form import secure_form
24 from webhelpers.pylonslib.secure_form import secure_form
25
25
26 from pygments import highlight
26 from pygments import highlight
27 from pygments.formatters import HtmlFormatter
27 from pygments.formatters import HtmlFormatter
28 from pygments.lexers import guess_lexer
28 from pygments.lexers import guess_lexer
29 from pygments.lexers import get_lexer_by_name
29 from pygments.lexers import get_lexer_by_name
30
30
31 #Custom helper here :)
31 #Custom helper here :)
32 class _Link(object):
32 class _Link(object):
33 '''
33 '''
34 Make a url based on label and url with help of url_for
34 Make a url based on label and url with help of url_for
35 @param label:name of link if not defined url is used
35 @param label:name of link if not defined url is used
36 @param url: the url for link
36 @param url: the url for link
37 '''
37 '''
38
38
39 def __call__(self, label='', *url_, **urlargs):
39 def __call__(self, label='', *url_, **urlargs):
40 if label is None or '':
40 if label is None or '':
41 label = url
41 label = url
42 link_fn = link_to(label, url(*url_, **urlargs))
42 link_fn = link_to(label, url(*url_, **urlargs))
43 return link_fn
43 return link_fn
44
44
45
45
46 class _GetError(object):
46 class _GetError(object):
47
47
48 def __call__(self, field_name, form_errors):
48 def __call__(self, field_name, form_errors):
49 tmpl = """<span class="error_msg">%s</span>"""
49 tmpl = """<span class="error_msg">%s</span>"""
50 if form_errors and form_errors.has_key(field_name):
50 if form_errors and form_errors.has_key(field_name):
51 return literal(tmpl % form_errors.get(field_name))
51 return literal(tmpl % form_errors.get(field_name))
52
52
53 class _FileSizeFormat(object):
53 class _FileSizeFormat(object):
54 """
54 """
55 Formats the value like a 'human-readable' file size (i.e. 13 KB, 4.1 MB,
55 Formats the value like a 'human-readable' file size (i.e. 13 KB, 4.1 MB,
56 102 bytes, etc).
56 102 bytes, etc).
57 """
57 """
58 def __call__(self, bytes):
58 def __call__(self, bytes):
59 try:
59 try:
60 bytes = float(bytes)
60 bytes = float(bytes)
61 except TypeError:
61 except TypeError:
62 return u"0 bytes"
62 return u"0 bytes"
63
63
64 if bytes < 1024:
64 if bytes < 1024:
65 return ungettext("%(size)d byte", "%(size)d bytes", bytes) % {'size': bytes}
65 return ungettext("%(size)d byte", "%(size)d bytes", bytes) % {'size': bytes}
66 if bytes < 1024 * 1024:
66 if bytes < 1024 * 1024:
67 return _("%.1f KB") % (bytes / 1024)
67 return _("%.1f KB") % (bytes / 1024)
68 if bytes < 1024 * 1024 * 1024:
68 if bytes < 1024 * 1024 * 1024:
69 return _("%.1f MB") % (bytes / (1024 * 1024))
69 return _("%.1f MB") % (bytes / (1024 * 1024))
70 return _("%.1f GB") % (bytes / (1024 * 1024 * 1024))
70 return _("%.1f GB") % (bytes / (1024 * 1024 * 1024))
71
71
72 class _FilesBreadCrumbs(object):
73
74 def __call__(self, repo_name, rev, paths):
75 url_l = [link_to(repo_name, url('files_home', repo_name=repo_name, f_path=''))]
76 paths_l = paths.split('/')
77
78 for cnt, p in enumerate(paths_l, 1):
79 if p != '':
80 url_l.append(link_to(p, url('files_home', repo_name=repo_name, f_path='/'.join(paths_l[:cnt]))))
72
81
82 return literal(' / '.join(url_l))
73
83
74 def pygmentize(code, **kwargs):
84 def pygmentize(code, **kwargs):
75 '''
85 '''
76 Filter for chunks of html to replace code tags with pygmented code
86 Filter for chunks of html to replace code tags with pygmented code
77 '''
87 '''
78 return literal(highlight(code, guess_lexer(code), HtmlFormatter(**kwargs)))
88 return literal(highlight(code, guess_lexer(code), HtmlFormatter(**kwargs)))
79
89
80
90
81
91 files_breadcrumbs = _FilesBreadCrumbs()
82 filesizeformat = _FileSizeFormat()
92 filesizeformat = _FileSizeFormat()
83 link = _Link()
93 link = _Link()
84 flash = _Flash()
94 flash = _Flash()
85 get_error = _GetError()
95 get_error = _GetError()
@@ -1,491 +1,529 b''
1 /*** Initial Settings ***/
1 /*** Initial Settings ***/
2 * {
2 * {
3 margin: 0;
3 margin: 0;
4 padding: 0;
4 padding: 0;
5 font-weight: normal;
5 font-weight: normal;
6 font-style: normal;
6 font-style: normal;
7 }
7 }
8
8
9 html {
9 html {
10 font-size: 100%;
10 font-size: 100%;
11 font-family: sans-serif;
11 font-family: sans-serif;
12 }
12 }
13
13
14 body {
14 body {
15 font-size: 77%;
15 font-size: 77%;
16 margin: 15px 50px;
16 margin: 15px 50px;
17 background: #4B4B4C;
17 background: #DBD4C6;
18 }
18 }
19
19
20 a {
20 a {
21 color:#0000cc;
21 color:#0000cc;
22 text-decoration: none;
22 text-decoration: none;
23 }
23 }
24 /*** end of Initial Settings ***/
24 /*** end of Initial Settings ***/
25
25
26
26
27 /** common settings **/
27 /** common settings **/
28 div#container {
28 div#container {
29 background: #FFFFFF;
29 background: #FFFFFF;
30 position: relative;
30 position: relative;
31 color: #666;
31 color: #666;
32 }
32 }
33
33
34 div.page-header {
34 div.page-header {
35 padding: 50px 20px 0;
35 padding: 50px 20px 0;
36 background: #006699 top left repeat-x;
36 background: #556cb5 top left repeat-x;
37 position: relative;
37 position: relative;
38 }
38 }
39 div.page-header h1 {
39 div.page-header h1 {
40 margin: 10px 0 30px;
40 margin: 10px 0 30px;
41 font-size: 1.8em;
41 font-size: 1.8em;
42 font-weight: bold;
42 font-weight: bold;
43 font-family: osaka,'MS P Gothic', Georgia, serif;
43 font-family: osaka,'MS P Gothic', Georgia, serif;
44 letter-spacing: 1px;
44 letter-spacing: 1px;
45 color: #DDD;
45 color: #DDD;
46 }
46 }
47 div.page-header h1 a {
47 div.page-header h1 a {
48 font-weight: bold;
48 font-weight: bold;
49 color: #FFF;
49 color: #FFF;
50 }
50 }
51 div.page-header a {
51 div.page-header a {
52 text-decoration: none;
52 text-decoration: none;
53 }
53 }
54
54
55 div.page-header form {
55 div.page-header form {
56 position: absolute;
56 position: absolute;
57 margin-bottom: 2px;
57 margin-bottom: 2px;
58 bottom: 0;
58 bottom: 0;
59 right: 20px;
59 right: 20px;
60 }
60 }
61 div.page-header form label {
61 div.page-header form label {
62 color: #DDD;
62 color: #DDD;
63 }
63 }
64 div.page-header form input {
64 div.page-header form input {
65 padding: 2px;
65 padding: 2px;
66 border: solid 1px #DDD;
66 border: solid 1px #DDD;
67 }
67 }
68 div.page-header form dl {
68 div.page-header form dl {
69 overflow: hidden;
69 overflow: hidden;
70 }
70 }
71 div.page-header form dl dt {
71 div.page-header form dl dt {
72 font-size: 1.2em;
72 font-size: 1.2em;
73 }
73 }
74 div.page-header form dl dt,
74 div.page-header form dl dt,
75 div.page-header form dl dd {
75 div.page-header form dl dd {
76 margin: 0 0 0 5px;
76 margin: 0 0 0 5px;
77 float: left;
77 float: left;
78 height: 24px;
78 height: 24px;
79 line-height: 20px;
79 line-height: 20px;
80 }
80 }
81
81
82 ul.page-nav {
82 ul.page-nav {
83 margin: 10px 0 0 0;
83 margin: 10px 0 0 0;
84 list-style-type: none;
84 list-style-type: none;
85 overflow: hidden;
85 overflow: hidden;
86 width: 800px;
86 width: 800px;
87 }
87 }
88 ul.page-nav li {
88 ul.page-nav li {
89 margin: 0 2px 0 0;
89 margin: 0 2px 0 0;
90 float: left;
90 float: left;
91 width: 80px;
91 width: 80px;
92 height: 24px;
92 height: 24px;
93 font-size: 1.1em;
93 font-size: 1.1em;
94 line-height: 24px;
94 line-height: 24px;
95 text-align: center;
95 text-align: center;
96 }
96 }
97 ul.page-nav li.current {
97 ul.page-nav li.current {
98 background: #FFF;
98 background: #FFF;
99 }
99 }
100 ul.page-nav li a {
100 ul.page-nav li a {
101 height: 24px;
101 height: 24px;
102 color: #666;
102 color: #666;
103 background: #DDD;
103 background: #DDD;
104 display: block;
104 display: block;
105 text-decoration: none;
105 text-decoration: none;
106 }
106 }
107 ul.page-nav li a:hover {
107 ul.page-nav li a:hover {
108 color:#333;
108 color:#333;
109 background: #FFF;
109 background: #FFF;
110 }
110 }
111
111
112 ul.submenu {
112 ul.submenu {
113 margin: 10px 0 -10px 20px;
113 margin: 10px 0 -10px 20px;
114 list-style-type: none;
114 list-style-type: none;
115 }
115 }
116 ul.submenu li {
116 ul.submenu li {
117 margin: 0 10px 0 0;
117 margin: 0 10px 0 0;
118 font-size: 1.2em;
118 font-size: 1.2em;
119 display: inline;
119 display: inline;
120 }
120 }
121
121
122 h2 {
122 h2 {
123 margin: 20px 0 10px;
123 margin: 20px 0 10px;
124 height: 30px;
124 height: 30px;
125 line-height: 30px;
125 line-height: 30px;
126 text-indent: 20px;
126 text-indent: 20px;
127 background: #FFF;
127 background: #FFF;
128 font-size: 1.2em;
128 font-size: 1.2em;
129 border-top: dotted 1px #D5E1E6;
129 border-top: dotted 1px #D5E1E6;
130 font-weight: bold;
130 font-weight: bold;
131 }
131 }
132 h2.no-link {
132 h2.no-link {
133 color:#006699;
133 color:#006699;
134 }
134 }
135 h2.no-border {
135 h2.no-border {
136 color: #FFF;
136 color: #FFF;
137 background: #006699;
137 background: #006699;
138 border: 0;
138 border: 0;
139 }
139 }
140 h2 a {
140 h2 a {
141 font-weight:bold;
141 font-weight:bold;
142 color:#006699;
142 color:#006699;
143 }
143 }
144
144
145 div.page-path {
145 div.page-path {
146 text-align: right;
146 text-align: right;
147 padding: 20px 30px 10px 0;
147 padding: 20px 30px 10px 0;
148 border:solid #d9d8d1;
148 border:solid #d9d8d1;
149 border-width:0px 0px 1px;
149 border-width:0px 0px 1px;
150 font-size: 1.2em;
150 font-size: 1.2em;
151 }
151 }
152
152
153 div.page-footer {
153 div.page-footer {
154 margin: 50px 0 0;
154 margin: 50px 0 0;
155 position: relative;
155 position: relative;
156 }
156 }
157 div.page-footer p {
157 div.page-footer p {
158 position: relative;
158 position: relative;
159 left: 20px;
159 left: 20px;
160 bottom: 5px;
160 bottom: 5px;
161 font-size: 1.2em;
161 font-size: 1.2em;
162 }
162 }
163
163
164 ul.rss-logo {
164 ul.rss-logo {
165 position: absolute;
165 position: absolute;
166 top: -10px;
166 top: -10px;
167 right: 20px;
167 right: 20px;
168 height: 20px;
168 height: 20px;
169 list-style-type: none;
169 list-style-type: none;
170 }
170 }
171 ul.rss-logo li {
171 ul.rss-logo li {
172 display: inline;
172 display: inline;
173 }
173 }
174 ul.rss-logo li a {
174 ul.rss-logo li a {
175 padding: 3px 6px;
175 padding: 3px 6px;
176 line-height: 10px;
176 line-height: 10px;
177 border:1px solid;
177 border:1px solid;
178 border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
178 border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
179 color:#ffffff;
179 color:#ffffff;
180 background-color:#ff6600;
180 background-color:#ff6600;
181 font-weight:bold;
181 font-weight:bold;
182 font-family:sans-serif;
182 font-family:sans-serif;
183 font-size:10px;
183 font-size:10px;
184 text-align:center;
184 text-align:center;
185 text-decoration:none;
185 text-decoration:none;
186 }
186 }
187 div.rss-logo li a:hover {
187 div.rss-logo li a:hover {
188 background-color:#ee5500;
188 background-color:#ee5500;
189 }
189 }
190
190
191 p.normal {
191 p.normal {
192 margin: 20px 0 20px 30px;
192 margin: 20px 0 20px 30px;
193 font-size: 1.2em;
193 font-size: 1.2em;
194 }
194 }
195
195
196 table {
196 table {
197 margin: 10px 0 0 20px;
197 margin: 0 0 0 0;
198 width: 95%;
199 border-collapse: collapse;
198 border-collapse: collapse;
200 }
199 }
200 /*
201 table tr td {
201 table tr td {
202 font-size: 1.1em;
202 font-size: 1.1em;
203 }
203 }
204 table tr td.nowrap {
204 table tr td.nowrap {
205 white-space: nowrap;
205 white-space: nowrap;
206 }
206 }
207 /*
207 */
208 table tr.parity0:hover,
208 table tr.parity0:hover,table tr.parity1:hover {
209 table tr.parity1:hover {
210 background: #D5E1E6;
209 background: #D5E1E6;
211 }
210 }
212 */
211
213 table tr.parity0 {
212 table tr.parity0 {
214 background: #F1F6F7;
213 background: #EAEAE9;
215 }
214 }
216 table tr.parity1 {
215 table tr.parity1 {
217 background: #FFFFFF;
216 background: #FFFFFF;
218 }
217 }
219 table tr td {
218 table tr td {
220 padding: 5px 5px;
219 padding: 3px 3px;
221 }
220 }
222 table.annotated tr td {
221 table.annotated tr td {
223 padding: 0px 5px;
222 padding: 0px 3px;
224 }
223 }
225
224
226 span.logtags span {
225 span.logtags span {
227 padding: 2px 6px;
226 padding: 2px 6px;
228 font-weight: normal;
227 font-weight: normal;
229 font-size: 11px;
228 font-size: 11px;
230 border: 1px solid;
229 border: 1px solid;
231 background-color: #ffaaff;
230 background-color: #ffaaff;
232 border-color: #ffccff #ff00ee #ff00ee #ffccff;
231 border-color: #ffccff #ff00ee #ff00ee #ffccff;
233 }
232 }
234 span.logtags span.tagtag {
233 span.logtags span.tagtag {
235 background-color: #ffffaa;
234 background-color: #ffffaa;
236 border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
235 border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
237 }
236 }
238 span.logtags span.branchtag {
237 span.logtags span.branchtag {
239 background-color: #aaffaa;
238 background-color: #aaffaa;
240 border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
239 border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
241 }
240 }
242 span.logtags span.inbranchtag {
241 span.logtags span.inbranchtag {
243 background-color: #d5dde6;
242 background-color: #d5dde6;
244 border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
243 border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
245 }
244 }
246
245
247 div.diff pre {
246 div.diff pre {
248 margin: 10px 0 0 0;
247 margin: 10px 0 0 0;
249 }
248 }
250 div.diff pre span {
249 div.diff pre span {
251 font-family: monospace;
250 font-family: monospace;
252 white-space: pre;
251 white-space: pre;
253 font-size: 1.2em;
252 font-size: 1.2em;
254 padding: 3px 0;
253 padding: 3px 0;
255 }
254 }
256 td.source {
255 td.source {
257 white-space: pre;
256 white-space: pre;
258 font-family: monospace;
257 font-family: monospace;
259 margin: 10px 30px 0;
258 margin: 10px 30px 0;
260 font-size: 1.2em;
259 font-size: 1.2em;
261 font-family: monospace;
260 font-family: monospace;
262 }
261 }
263 div.source div.parity0,
262 div.source div.parity0,
264 div.source div.parity1 {
263 div.source div.parity1 {
265 padding: 1px;
264 padding: 1px;
266 font-size: 1.2em;
265 font-size: 1.2em;
267 }
266 }
268 div.source div.parity0 {
267 div.source div.parity0 {
269 background: #F1F6F7;
268 background: #F1F6F7;
270 }
269 }
271 div.source div.parity1 {
270 div.source div.parity1 {
272 background: #FFFFFF;
271 background: #FFFFFF;
273 }
272 }
274 div.parity0:hover,
273 div.parity0:hover,
275 div.parity1:hover {
274 div.parity1:hover {
276 background: #D5E1E6;
275 background: #D5E1E6;
277 }
276 }
278 .linenr {
277 .linenr {
279 color: #999;
278 color: #999;
280 text-align: right;
279 text-align: right;
281 }
280 }
282 .lineno {
281 .lineno {
283 text-align: right;
282 text-align: right;
284 }
283 }
285 .lineno a {
284 .lineno a {
286 color: #999;
285 color: #999;
287 }
286 }
288 td.linenr {
287 td.linenr {
289 width: 60px;
288 width: 60px;
290 }
289 }
291
290
292 div#powered-by {
291 div#powered-by {
293 position: absolute;
292 position: absolute;
294 width: 75px;
293 width: 75px;
295 top: 15px;
294 top: 15px;
296 right: 20px;
295 right: 20px;
297 font-size: 1.2em;
296 font-size: 1.2em;
298 }
297 }
299 div#powered-by a {
298 div#powered-by a {
300 color: #EEE;
299 color: #EEE;
301 text-decoration: none;
300 text-decoration: none;
302 }
301 }
303 div#powered-by a:hover {
302 div#powered-by a:hover {
304 text-decoration: underline;
303 text-decoration: underline;
305 }
304 }
306 /*
305 /*
307 div#monoblue-corner-top-left {
306 div#monoblue-corner-top-left {
308 position: absolute;
307 position: absolute;
309 top: 0;
308 top: 0;
310 left: 0;
309 left: 0;
311 width: 10px;
310 width: 10px;
312 height: 10px;
311 height: 10px;
313 background: url(./monoblue-corner.png) top left no-repeat !important;
312 background: url(./monoblue-corner.png) top left no-repeat !important;
314 background: none;
313 background: none;
315 }
314 }
316 div#monoblue-corner-top-right {
315 div#monoblue-corner-top-right {
317 position: absolute;
316 position: absolute;
318 top: 0;
317 top: 0;
319 right: 0;
318 right: 0;
320 width: 10px;
319 width: 10px;
321 height: 10px;
320 height: 10px;
322 background: url(./monoblue-corner.png) top right no-repeat !important;
321 background: url(./monoblue-corner.png) top right no-repeat !important;
323 background: none;
322 background: none;
324 }
323 }
325 div#monoblue-corner-bottom-left {
324 div#monoblue-corner-bottom-left {
326 position: absolute;
325 position: absolute;
327 bottom: 0;
326 bottom: 0;
328 left: 0;
327 left: 0;
329 width: 10px;
328 width: 10px;
330 height: 10px;
329 height: 10px;
331 background: url(./monoblue-corner.png) bottom left no-repeat !important;
330 background: url(./monoblue-corner.png) bottom left no-repeat !important;
332 background: none;
331 background: none;
333 }
332 }
334 div#monoblue-corner-bottom-right {
333 div#monoblue-corner-bottom-right {
335 position: absolute;
334 position: absolute;
336 bottom: 0;
335 bottom: 0;
337 right: 0;
336 right: 0;
338 width: 10px;
337 width: 10px;
339 height: 10px;
338 height: 10px;
340 background: url(./monoblue-corner.png) bottom right no-repeat !important;
339 background: url(./monoblue-corner.png) bottom right no-repeat !important;
341 background: none;
340 background: none;
342 }
341 }
343 */
342 */
344 /** end of common settings **/
343 /** end of common settings **/
345
344
346 /** summary **/
345 /** summary **/
347 dl.overview {
346 dl.overview {
348 margin: 0 0 0 30px;
347 margin: 0 0 0 30px;
349 font-size: 1.1em;
348 font-size: 1.1em;
350 overflow: hidden;
349 overflow: hidden;
351 }
350 }
352 dl.overview dt,
351 dl.overview dt,
353 dl.overview dd {
352 dl.overview dd {
354 margin: 5px 0;
353 margin: 5px 0;
355 float: left;
354 float: left;
356 }
355 }
357 dl.overview dt {
356 dl.overview dt {
358 clear: left;
357 clear: left;
359 font-weight: bold;
358 font-weight: bold;
360 width: 150px;
359 width: 150px;
361 }
360 }
362 /** end of summary **/
361 /** end of summary **/
363
362
364 /** chagelog **/
363 /** chagelog **/
365 h3.changelog {
364 h3.changelog {
366 margin: 20px 0 5px 30px;
365 margin: 20px 0 5px 30px;
367 padding: 0 0 2px;
366 padding: 0 0 2px;
368 font-size: 1.4em;
367 font-size: 1.4em;
369 border-bottom: dotted 1px #D5E1E6;
368 border-bottom: dotted 1px #D5E1E6;
370 }
369 }
371 ul.changelog-entry {
370 ul.changelog-entry {
372 margin: 0 0 10px 30px;
371 margin: 0 0 10px 30px;
373 list-style-type: none;
372 list-style-type: none;
374 position: relative;
373 position: relative;
375 }
374 }
376 ul.changelog-entry li span.revdate {
375 ul.changelog-entry li span.revdate {
377 font-size: 1.1em;
376 font-size: 1.1em;
378 }
377 }
379 ul.changelog-entry li.age {
378 ul.changelog-entry li.age {
380 position: absolute;
379 position: absolute;
381 top: -25px;
380 top: -25px;
382 right: 10px;
381 right: 10px;
383 font-size: 1.4em;
382 font-size: 1.4em;
384 color: #CCC;
383 color: #CCC;
385 font-weight: bold;
384 font-weight: bold;
386 font-style: italic;
385 font-style: italic;
387 }
386 }
388 ul.changelog-entry li span.name {
387 ul.changelog-entry li span.name {
389 font-size: 1.2em;
388 font-size: 1.2em;
390 font-weight: bold;
389 font-weight: bold;
391 }
390 }
392 ul.changelog-entry li.description {
391 ul.changelog-entry li.description {
393 margin: 10px 0 0;
392 margin: 10px 0 0;
394 font-size: 1.1em;
393 font-size: 1.1em;
395 }
394 }
396 /** end of changelog **/
395 /** end of changelog **/
397
396
398 /** file **/
397 /** file **/
399 p.files {
398 p.files {
400 margin: 0 0 0 20px;
399 margin: 0 0 0 20px;
401 font-size: 2.0em;
400 font-size: 2.0em;
402 font-weight: bold;
401 font-weight: bold;
403 }
402 }
404 /** end of file **/
403 /** end of file **/
405
404
406 /** changeset **/
405 /** changeset **/
407 h3.changeset {
406 h3.changeset {
408 margin: 20px 0 5px 20px;
407 margin: 20px 0 5px 20px;
409 padding: 0 0 2px;
408 padding: 0 0 2px;
410 font-size: 1.6em;
409 font-size: 1.6em;
411 border-bottom: dotted 1px #D5E1E6;
410 border-bottom: dotted 1px #D5E1E6;
412 }
411 }
413 p.changeset-age {
412 p.changeset-age {
414 position: relative;
413 position: relative;
415 }
414 }
416 p.changeset-age span {
415 p.changeset-age span {
417 position: absolute;
416 position: absolute;
418 top: -25px;
417 top: -25px;
419 right: 10px;
418 right: 10px;
420 font-size: 1.4em;
419 font-size: 1.4em;
421 color: #CCC;
420 color: #CCC;
422 font-weight: bold;
421 font-weight: bold;
423 font-style: italic;
422 font-style: italic;
424 }
423 }
425 p.description {
424 p.description {
426 margin: 10px 30px 0 30px;
425 margin: 10px 30px 0 30px;
427 padding: 10px;
426 padding: 10px;
428 border: solid 1px #CCC;
427 border: solid 1px #CCC;
429 font-size: 1.2em;
428 font-size: 1.2em;
430 }
429 }
431 /** end of changeset **/
430 /** end of changeset **/
432
431
433 /** canvas **/
432 /** canvas **/
434 div#wrapper {
433 div#wrapper {
435 position: relative;
434 position: relative;
436 font-size: 1.2em;
435 font-size: 1.2em;
437 }
436 }
438
437
439 canvas {
438 canvas {
440 position: absolute;
439 position: absolute;
441 z-index: 5;
440 z-index: 5;
442 top: -0.7em;
441 top: -0.7em;
443 }
442 }
444
443
445 ul#nodebgs li.parity0 {
444 ul#nodebgs li.parity0 {
446 background: #F1F6F7;
445 background: #F1F6F7;
447 }
446 }
448
447
449 ul#nodebgs li.parity1 {
448 ul#nodebgs li.parity1 {
450 background: #FFFFFF;
449 background: #FFFFFF;
451 }
450 }
452
451
453 ul#graphnodes {
452 ul#graphnodes {
454 position: absolute;
453 position: absolute;
455 z-index: 10;
454 z-index: 10;
456 top: 7px;
455 top: 7px;
457 list-style: none inside none;
456 list-style: none inside none;
458 }
457 }
459
458
460 ul#nodebgs {
459 ul#nodebgs {
461 list-style: none inside none;
460 list-style: none inside none;
462 }
461 }
463
462
464 ul#graphnodes li, ul#nodebgs li {
463 ul#graphnodes li, ul#nodebgs li {
465 height: 39px;
464 height: 39px;
466 }
465 }
467
466
468 ul#graphnodes li .info {
467 ul#graphnodes li .info {
469 display: block;
468 display: block;
470 position: relative;
469 position: relative;
471 }
470 }
472 /** end of canvas **/
471 /** end of canvas **/
473
472
473 table.code-browser{
474
475 }
476 table.code-browser thead th {
477 background-color:#EEEEEE;
478 border:1px solid #999999;
479 height:20px;
480 font-size: 1.1em;
481 font-weight: bold;
482 }
483 table.code-browser tbody td {
484 border:1px solid #999999;
485 height:20px;
486 }
487 .info-table {
488 background:none repeat scroll 0 0 #FAFAFA;
489 border-bottom:1px solid #DDDDDD;
490 width:100%;
491 }
492 .rss_logo{
493 background-image:url("/images/feed.png");
494 background-repeat:no-repeat;
495 display:block;
496 height:16px;
497 padding-left:20px;
498 padding-top:0px;
499 text-align:left;
500
501 }
502 .atom_logo{
503 background-image:url("/images/atom.png");
504 background-repeat:no-repeat;
505 display:block;
506 height:16px;
507 padding-left:20px;
508 padding-top:0px;
509 text-align:left;
510
511 }
474 .browser-file {
512 .browser-file {
475 background-image:url("/images/file.png");
513 background-image:url("/images/file.png");
476 background-repeat:no-repeat;
514 background-repeat:no-repeat;
477 display:block;
515 display:block;
478 height:16px;
516 height:16px;
479 padding-left:20px;
517 padding-left:20px;
480 padding-top:5px;
518 padding-top:5px;
481 text-align:left;
519 text-align:left;
482 }
520 }
483 .browser-dir {
521 .browser-dir {
484 background-image:url("/images/folder.png");
522 background-image:url("/images/folder.png");
485 background-repeat:no-repeat;
523 background-repeat:no-repeat;
486 display:block;
524 display:block;
487 height:16px;
525 height:16px;
488 padding-left:20px;
526 padding-left:20px;
489 padding-top:5px;
527 padding-top:5px;
490 text-align:left;
528 text-align:left;
491 } No newline at end of file
529 }
@@ -1,92 +1,92 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">
3 <html xmlns="http://www.w3.org/1999/xhtml">
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 ${self.css()}
8 ${self.css()}
9 ${self.js()}
9 ${self.js()}
10 </head>
10 </head>
11
11
12 <body>
12 <body>
13 <div id="container">
13 <div id="container">
14 <div class="page-header">
14 <div class="page-header">
15 <h1>
15 <h1>
16 ${next.breadcrumbs()}
16 ${next.breadcrumbs()}
17 </h1>
17 </h1>
18 <ul class="page-nav">
18 <ul class="page-nav">
19 ${self.page_nav()}
19 ${self.page_nav()}
20 </ul>
20 </ul>
21 </div>
21 </div>
22 ${next.main()}
22 ${next.main()}
23 <div class="page-footer">
23 <div class="page-footer">
24 Mercurial App &copy; 2010
24 Mercurial App &copy; 2010
25 </div>
25 </div>
26
26
27 <div id="powered-by">
27 <div id="powered-by">
28 <p>
28 <p>
29 <a href="http://mercurial.selenic.com/" title="Mercurial">
29 <a href="http://mercurial.selenic.com/" title="Mercurial">
30 <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a>
30 <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a>
31 </p>
31 </p>
32 </div>
32 </div>
33
33
34 <div id="corner-top-left"></div>
34 <div id="corner-top-left"></div>
35 <div id="corner-top-right"></div>
35 <div id="corner-top-right"></div>
36 <div id="corner-bottom-left"></div>
36 <div id="corner-bottom-left"></div>
37 <div id="corner-bottom-right"></div>
37 <div id="corner-bottom-right"></div>
38
38
39 </div>
39 </div>
40 </body>
40 </body>
41 </html>
41 </html>
42
42
43 <%def name="page_nav()">
43 <%def name="page_nav()">
44
44
45 ${self.menu()}
45 ${self.menu()}
46
46
47 </%def>
47 </%def>
48
48
49
49
50 <%def name="menu(current)">
50 <%def name="menu(current)">
51 <ul class="page-nav">
51 <ul class="page-nav">
52
52
53 <li
53 <li
54 %if current=='summary':
54 %if current=='summary':
55 class='current'
55 class='current'
56 %endif
56 %endif
57 >${h.link_to_unless(current=='summary',_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
57 >${h.link_to_unless(current=='summary',_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
58 <li
58 <li
59 %if current=='changelog':
59 %if current=='changelog':
60 class='current'
60 class='current'
61 %endif
61 %endif
62 >${h.link_to_unless(current=='changelog',_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
62 >${h.link_to_unless(current=='changelog',_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
63 <li
63 <li
64 %if current=='branches':
64 %if current=='branches':
65 class='current'
65 class='current'
66 %endif
66 %endif
67 >${h.link_to_unless(current=='branches',_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
67 >${h.link_to_unless(current=='branches',_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
68 <li
68 <li
69 %if current=='tags':
69 %if current=='tags':
70 class='current'
70 class='current'
71 %endif
71 %endif
72 >${h.link_to_unless(current=='tags',_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
72 >${h.link_to_unless(current=='tags',_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
73 <li
73 <li
74 %if current=='graph':
74 %if current=='graph':
75 class='current'
75 class='current'
76 %endif
76 %endif
77 >${h.link_to_unless(current=='graph',_('graph'),h.url('graph_home',repo_name=c.repo_name))}</li>
77 >${h.link_to_unless(current=='graph',_('graph'),h.url('graph_home',repo_name=c.repo_name))}</li>
78 <li
78 <li
79 %if current=='files':
79 %if current=='files':
80 class='current'
80 class='current'
81 %endif
81 %endif
82 >${h.link_to_unless(current=='files',_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
82 >${h.link_to_unless(current=='files',_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
83 </ul>
83 </ul>
84 </%def>
84 </%def>
85
85
86 <%def name="css()">
86 <%def name="css()">
87 <link rel="stylesheet" href="/css/style-monoblue_custom.css" type="text/css" />
87 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
88 </%def>
88 </%def>
89
89
90 <%def name="js()">
90 <%def name="js()">
91 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
91 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
92 </%def> No newline at end of file
92 </%def>
@@ -1,95 +1,120 b''
1 <%inherit file="base/base.html"/>
1 <%inherit file="base/base.html"/>
2
2
3 <%def name="title()">
3 <%def name="title()">
4 ${_('Repository managment')}
4 ${_('Repository managment')}
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('files_home',repo_name=c.repo_name))}
9 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
10 /
10 /
11 ${_('files')}
11 ${_('files')}
12 </%def>
12 </%def>
13 <%def name="page_nav()">
13 <%def name="page_nav()">
14 <form action="log">
14 <form action="log">
15 <dl class="search">
15 <dl class="search">
16 <dt><label>Search: </label></dt>
16 <dt><label>Search: </label></dt>
17 <dd><input type="text" name="rev" /></dd>
17 <dd><input type="text" name="rev" /></dd>
18 </dl>
18 </dl>
19 </form>
19 </form>
20
20
21 ${self.menu('files')}
21 ${self.menu('files')}
22 </%def>
22 </%def>
23 <%def name="css()">
23 <%def name="css()">
24 <link rel="stylesheet" href="/css/style-monoblue_custom.css" type="text/css" />
24 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
25 <link rel="stylesheet" href="/css/pygments.css" type="text/css" />
25 <link rel="stylesheet" href="/css/pygments.css" type="text/css" />
26 </%def>
26 </%def>
27 <%def name="main()">
27 <%def name="main()">
28
28
29 <h2 class="no-link no-border">${_('Files')}</h2>
29 <h2 class="no-link no-border">${_('Files')}</h2>
30 <div id="files_data">
30 <div id="files_data">
31 <h2>${_('File')}: ${c.repo_name}/${c.f_path}</h2>
31 <h2>${_('File')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.files_list.path)}</h2>
32 %if c.files_list.is_dir():
32 %if c.files_list.is_dir():
33 <table class="code-browser">
33 <table class="code-browser">
34 <thead>
34 <thead>
35 <tr>
35 <tr>
36 <th class="width-50 lefted">${_('Name')}</th>
36 <th class="width-50 lefted">${_('Name')}</th>
37 <th class="width-10 righted">${_('Size')}</th>
37 <th class="width-10 righted">${_('Size')}</th>
38 <th class="width-10 righted">${_('Revision')}</th>
38 <th class="width-10 righted">${_('Revision')}</th>
39 <th class="width-15 righted">${_('Last modified')}</th>
39 <th class="width-15 righted">${_('Last modified')}</th>
40 <th class="width-15 righted">${_('Last commiter')}</th>
40 <th class="width-15 righted">${_('Last commiter')}</th>
41 </tr>
41 </tr>
42 </thead>
42 </thead>
43 <tr>
43 <tr>
44 % if c.files_list.parent:
44 % if c.files_list.parent:
45 <td colspan="5" class="browser-dir">
45 <td>
46 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent))}
46 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent),class_="browser-dir")}
47 </td>
47 </td>
48 <td></td>
49 <td></td>
50 <td></td>
51 <td></td>
48 %endif
52 %endif
49 </tr>
53 </tr>
50 <%def name="file_class(node)">
54 <%def name="file_class(node)">
51 %if node.is_file():
55 %if node.is_file():
52 browser-file
56 <%return "browser-file" %>
53 %else:
57 %else:
54 browser-dir
58 <%return "browser-dir"%>
55 %endif
59 %endif
56 </%def>
60 </%def>
57
61
58
62
59 %for cnt,node in enumerate(c.files_list):
63 %for cnt,node in enumerate(c.files_list):
60 <tr class="parity${cnt%2}">
64 <tr class="parity${cnt%2}">
61
65
62 <td class="${file_class(node)}">
66 <td>
63 ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=node.path),class_='file or dir')}
67 ${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))}
64 </td>
68 </td>
65 <td>
69 <td>
66 %if node.is_file():
70 %if node.is_file():
67 ${h.filesizeformat(node.size)}
71 ${h.filesizeformat(node.size)}
68 %endif
72 %endif
69 </td>
73 </td>
70 <td>
74 <td>
71 %if node.is_file():
75 %if node.is_file():
72 ${node.last_changeset.revision}
76 ${node.last_changeset.revision}
73 %endif
77 %endif
74 </td>
78 </td>
75 <td>
79 <td>
76 %if node.is_file():
80 %if node.is_file():
77 ${node.last_changeset.date}
81 ${node.last_changeset.date}
78 %endif
82 %endif
79 </td>
83 </td>
80 <td>
84 <td>
81 %if node.is_file():
85 %if node.is_file():
82 ${node.last_changeset.author}
86 ${node.last_changeset.author}
83 %endif
87 %endif
84
88
85 </td>
89 </td>
86 </tr>
90 </tr>
87 %endfor
91 %endfor
88 </table>
92 </table>
89 %else:
93 %else:
94 <table class="info-table">
95 <tr>
96 <td>r70:17ecc1c97401</td>
97 <td>374 loc</td>
98 <td>12.5 KB</td>
99 <td>
100 <a href="/marcinkuzminski/vcs/history/vcs/backends/hg.py">history</a> /
101 <a href="/marcinkuzminski/vcs/annotate/17ecc1c97401/vcs/backends/hg.py">annotate</a> /
102 <a href="/marcinkuzminski/vcs/raw/17ecc1c97401/vcs/backends/hg.py">raw</a> /
103 <form class="source-view-form" method="get" action="/marcinkuzminski/vcs/diff/vcs/backends/hg.py">
104
105 <input type="hidden" value="17ecc1c97401" name="diff2">
106 <select class="smaller" name="diff1">
107 <option>history</option>
108 </select>
109 <input type="submit" class="smaller" value="diff">
110
111 </form>
112 </td>
113 </tr>
114 </table>
90 <div id="body" class="codeblock">
115 <div id="body" class="codeblock">
91 ${h.pygmentize(c.files_list.content,linenos=True,anchorlinenos=True,cssclass="code-highlight")}
116 ${h.pygmentize(c.files_list.content,linenos=True,anchorlinenos=True,cssclass="code-highlight")}
92 </div>
117 </div>
93 %endif
118 %endif
94 </div>
119 </div>
95 </%def> No newline at end of file
120 </%def>
@@ -1,60 +1,61 b''
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 <%inherit file="base/base.html"/>
5 <%inherit file="base/base.html"/>
6 <%def name="title()">
6 <%def name="title()">
7 ${c.repos_prefix} Mercurial Repositories
7 ${c.repos_prefix} Mercurial Repositories
8 </%def>
8 </%def>
9 <%def name="breadcrumbs()">
9 <%def name="breadcrumbs()">
10 ${c.repos_prefix} Mercurial Repositories
10 ${c.repos_prefix} Mercurial Repositories
11 </%def>
11 </%def>
12 <%def name="page_nav()">
12 <%def name="page_nav()">
13 <li class="current">${_('Home')}</li>
13 <li class="current">${_('Home')}</li>
14 <li>${h.link_to(u'Admin',h.url('admin_home'))}</li>
14 <li>${h.link_to(u'Admin',h.url('admin_home'))}</li>
15 </%def>
15 </%def>
16 <%def name="main()">
16 <%def name="main()">
17 <%def name="get_sort(name)">
17 <%def name="get_sort(name)">
18 <%name_slug = name.lower().replace(' ','_') %>
18 <%name_slug = name.lower().replace(' ','_') %>
19 %if name_slug == c.cs_slug:
19 %if name_slug == c.cs_slug:
20 <span style="font-weight: bold;color:#006699">${name}</span>
20 <span style="font-weight: bold;color:#006699">${name}</span>
21 %else:
21 %else:
22 <span style="font-weight: bold">${name}</span>
22 <span style="font-weight: bold">${name}</span>
23 %endif
23 %endif
24
24
25 <a href="?sort=${name_slug}">&darr;</a>
25 <a href="?sort=${name_slug}">&darr;</a>
26 <a href="?sort=-${name_slug}">&uarr;</a>
26 <a href="?sort=-${name_slug}">&uarr;</a>
27
27
28 </%def>
28 </%def>
29 <table>
29 <table>
30 <tr>
30 <tr>
31 <td>${get_sort(_('Name'))}</td>
31 <td>${get_sort(_('Name'))}</td>
32 <td>${get_sort(_('Description'))}</td>
32 <td>${get_sort(_('Description'))}</td>
33 <td>${get_sort(_('Last change'))}</td>
33 <td>${get_sort(_('Last change'))}</td>
34 <td>${get_sort(_('Tip'))}</td>
34 <td>${get_sort(_('Tip'))}</td>
35 <td>${get_sort(_('Contact'))}</td>
35 <td>${get_sort(_('Contact'))}</td>
36 <td></td>
36 <td></td>
37 <td></td>
37 <td></td>
38 <td></td>
38 </tr>
39 </tr>
39 %for cnt,repo in enumerate(c.repos_list):
40 %for cnt,repo in enumerate(c.repos_list):
40 <tr class="parity${cnt%2}">
41 <tr class="parity${cnt%2}">
41 <td>${h.link(repo['name'],h.url('summary_home',repo_name=repo['name']))}</td>
42 <td>${h.link(repo['name'],h.url('summary_home',repo_name=repo['name']))}</td>
42 <td>${repo['description']}</td>
43 <td>${repo['description']}</td>
43 <td>${repo['last_change']|n,filters.age}</td>
44 <td>${repo['last_change']|n,filters.age}</td>
44 <td>r${repo['rev']}:<a href="/${repo['name']}/rev/${repo['tip']}/">${repo['tip']}</a></td>
45 <td>r${repo['rev']}:<a href="/${repo['name']}/rev/${repo['tip']}/">${repo['tip']}</a></td>
45 <td>${repo['contact']}</td>
46 <td>${repo['contact']}</td>
46 <td class="indexlinks">
47 <td class="indexlinks">
47 %for archive in repo['repo_archives']:
48 %for archive in repo['repo_archives']:
48 <a href="/${repo['name']}/archive/${archive['node']}${archive['extension']}">${archive['type']}</a>
49 <a href="/${repo['name']}/archive/${archive['node']}${archive['extension']}">${archive['type']}</a>
49 %endfor
50 %endfor
50 </td>
51 </td>
51 <td>
52 <td>
52 <div class="rss_logo">
53 <a class="rss_logo" href="/${repo['name']}/rss-log">RSS</a>
53 <a href="/${repo['name']}/rss-log">RSS</a>
54 <a href="/${repo['name']}/atom-log">Atom</a>
55 </div>
56 </td>
54 </td>
55 <td>
56 <a class="atom_logo" href="/${repo['name']}/atom-log">Atom</a>
57 </td>
57 </tr>
58 </tr>
58 %endfor
59 %endfor
59 </table>
60 </table>
60 </%def>
61 </%def>
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (554 lines changed) Show them Hide them
General Comments 0
You need to be logged in to leave comments. Login now