##// 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
@@ -69,7 +69,17 b' class _FileSizeFormat(object):'
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):
72
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]))))
81
82 return literal(' / '.join(url_l))
73
83
74 def pygmentize(code, **kwargs):
84 def pygmentize(code, **kwargs):
75 '''
85 '''
@@ -78,7 +88,7 b' def pygmentize(code, **kwargs):'
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()
@@ -14,7 +14,7 b' html {'
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 {
@@ -33,7 +33,7 b' div#container {'
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 {
@@ -194,33 +194,32 b' p.normal {'
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 {
@@ -471,6 +470,45 b' ul#graphnodes li .info {'
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;
@@ -84,7 +84,7 b''
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()">
@@ -21,14 +21,14 b''
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>
@@ -42,16 +42,20 b''
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
@@ -59,8 +63,8 b''
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():
@@ -87,6 +91,27 b''
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>
@@ -35,6 +35,7 b' from pylons_app.lib import filters'
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}">
@@ -49,10 +50,10 b' from pylons_app.lib import filters'
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 </td>
54 <a href="/${repo['name']}/atom-log">Atom</a>
55 <td>
55 </div>
56 <a class="atom_logo" href="/${repo['name']}/atom-log">Atom</a>
56 </td>
57 </td>
57 </tr>
58 </tr>
58 %endfor
59 %endfor
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