##// 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
1 NO CONTENT: new file 100644, binary diff hidden
@@ -69,7 +69,17 b' class _FileSizeFormat(object):'
69 69 return _("%.1f MB") % (bytes / (1024 * 1024))
70 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 84 def pygmentize(code, **kwargs):
75 85 '''
@@ -78,7 +88,7 b' def pygmentize(code, **kwargs):'
78 88 return literal(highlight(code, guess_lexer(code), HtmlFormatter(**kwargs)))
79 89
80 90
81
91 files_breadcrumbs = _FilesBreadCrumbs()
82 92 filesizeformat = _FileSizeFormat()
83 93 link = _Link()
84 94 flash = _Flash()
@@ -14,7 +14,7 b' html {'
14 14 body {
15 15 font-size: 77%;
16 16 margin: 15px 50px;
17 background: #4B4B4C;
17 background: #DBD4C6;
18 18 }
19 19
20 20 a {
@@ -33,7 +33,7 b' div#container {'
33 33
34 34 div.page-header {
35 35 padding: 50px 20px 0;
36 background: #006699 top left repeat-x;
36 background: #556cb5 top left repeat-x;
37 37 position: relative;
38 38 }
39 39 div.page-header h1 {
@@ -194,33 +194,32 b' p.normal {'
194 194 }
195 195
196 196 table {
197 margin: 10px 0 0 20px;
198 width: 95%;
197 margin: 0 0 0 0;
199 198 border-collapse: collapse;
200 199 }
200 /*
201 201 table tr td {
202 202 font-size: 1.1em;
203 203 }
204 204 table tr td.nowrap {
205 205 white-space: nowrap;
206 206 }
207 /*
208 table tr.parity0:hover,
209 table tr.parity1:hover {
207 */
208 table tr.parity0:hover,table tr.parity1:hover {
210 209 background: #D5E1E6;
211 210 }
212 */
211
213 212 table tr.parity0 {
214 background: #F1F6F7;
213 background: #EAEAE9;
215 214 }
216 215 table tr.parity1 {
217 216 background: #FFFFFF;
218 217 }
219 218 table tr td {
220 padding: 5px 5px;
219 padding: 3px 3px;
221 220 }
222 221 table.annotated tr td {
223 padding: 0px 5px;
222 padding: 0px 3px;
224 223 }
225 224
226 225 span.logtags span {
@@ -471,6 +470,45 b' ul#graphnodes li .info {'
471 470 }
472 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 512 .browser-file {
475 513 background-image:url("/images/file.png");
476 514 background-repeat:no-repeat;
@@ -84,7 +84,7 b''
84 84 </%def>
85 85
86 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 88 </%def>
89 89
90 90 <%def name="js()">
@@ -21,14 +21,14 b''
21 21 ${self.menu('files')}
22 22 </%def>
23 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 25 <link rel="stylesheet" href="/css/pygments.css" type="text/css" />
26 26 </%def>
27 27 <%def name="main()">
28 28
29 29 <h2 class="no-link no-border">${_('Files')}</h2>
30 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 32 %if c.files_list.is_dir():
33 33 <table class="code-browser">
34 34 <thead>
@@ -42,16 +42,20 b''
42 42 </thead>
43 43 <tr>
44 44 % if c.files_list.parent:
45 <td colspan="5" class="browser-dir">
46 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent))}
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),class_="browser-dir")}
47 47 </td>
48 <td></td>
49 <td></td>
50 <td></td>
51 <td></td>
48 52 %endif
49 53 </tr>
50 54 <%def name="file_class(node)">
51 55 %if node.is_file():
52 browser-file
56 <%return "browser-file" %>
53 57 %else:
54 browser-dir
58 <%return "browser-dir"%>
55 59 %endif
56 60 </%def>
57 61
@@ -59,8 +63,8 b''
59 63 %for cnt,node in enumerate(c.files_list):
60 64 <tr class="parity${cnt%2}">
61 65
62 <td class="${file_class(node)}">
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')}
66 <td>
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 68 </td>
65 69 <td>
66 70 %if node.is_file():
@@ -87,6 +91,27 b''
87 91 %endfor
88 92 </table>
89 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 115 <div id="body" class="codeblock">
91 116 ${h.pygmentize(c.files_list.content,linenos=True,anchorlinenos=True,cssclass="code-highlight")}
92 117 </div>
@@ -35,6 +35,7 b' from pylons_app.lib import filters'
35 35 <td>${get_sort(_('Contact'))}</td>
36 36 <td></td>
37 37 <td></td>
38 <td></td>
38 39 </tr>
39 40 %for cnt,repo in enumerate(c.repos_list):
40 41 <tr class="parity${cnt%2}">
@@ -49,11 +50,11 b' from pylons_app.lib import filters'
49 50 %endfor
50 51 </td>
51 52 <td>
52 <div class="rss_logo">
53 <a href="/${repo['name']}/rss-log">RSS</a>
54 <a href="/${repo['name']}/atom-log">Atom</a>
55 </div>
53 <a class="rss_logo" href="/${repo['name']}/rss-log">RSS</a>
56 54 </td>
55 <td>
56 <a class="atom_logo" href="/${repo['name']}/atom-log">Atom</a>
57 </td>
57 58 </tr>
58 59 %endfor
59 60 </table>
1 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