Show More
@@ -1,169 +1,175 b'' | |||
|
1 | 1 | div.codeblock { |
|
2 | 2 | overflow: auto; |
|
3 | 3 | padding: 0px; |
|
4 | 4 | border: 1px solid #ccc; |
|
5 | 5 | background: #f8f8f8; |
|
6 | 6 | font-size: 100%; |
|
7 | 7 | line-height: 100%; |
|
8 | 8 | /* new */ |
|
9 | 9 | line-height: 125%; |
|
10 | 10 | -webkit-border-radius: 4px; |
|
11 | 11 | -moz-border-radius: 4px; |
|
12 | 12 | border-radius: 4px; |
|
13 | 13 | } |
|
14 | 14 | div.codeblock .code-header{ |
|
15 | 15 | border-bottom: 1px solid #CCCCCC; |
|
16 | 16 | background: #EEEEEE; |
|
17 | 17 | padding:10px 0 10px 0; |
|
18 | 18 | } |
|
19 | 19 | |
|
20 | 20 | div.codeblock .code-header .stats{ |
|
21 | 21 | clear: both; |
|
22 | margin-top:-3px; | |
|
23 | padding-left: 8px; | |
|
24 | border-bottom: 1px solid rgb(204, 204, 204); | |
|
25 |
margin-bottom: |
|
|
22 | padding: 6px 8px 6px 10px; | |
|
23 | border-bottom: 1px solid rgb(204, 204, 204); | |
|
24 | height: 23px; | |
|
25 | margin-bottom: 6px; | |
|
26 | 26 | } |
|
27 | 27 | |
|
28 | 28 | div.codeblock .code-header .stats .left{ |
|
29 | 29 | float:left; |
|
30 | 30 | } |
|
31 | div.codeblock .code-header .stats .left.img{ | |
|
32 | margin-top:-2px; | |
|
33 | } | |
|
31 | 34 | div.codeblock .code-header .stats .left.item{ |
|
32 | 35 | float:left; |
|
33 | 36 | padding: 0 9px 0 9px; |
|
34 | 37 | border-right:1px solid #ccc; |
|
35 | 38 | } |
|
39 | div.codeblock .code-header .stats .left.item pre{ | |
|
40 | ||
|
41 | } | |
|
36 | 42 | div.codeblock .code-header .stats .left.item.last{ |
|
37 | 43 | border-right:none; |
|
38 | 44 | } |
|
39 | 45 | div.codeblock .code-header .stats .buttons{ |
|
40 | 46 | float:right; |
|
41 | 47 | padding-right:4px; |
|
42 | 48 | } |
|
43 | 49 | |
|
44 | 50 | div.codeblock .code-header .author{ |
|
45 | 51 | margin-left:25px; |
|
46 | 52 | font-weight: bold; |
|
47 | 53 | height: 25px; |
|
48 | 54 | } |
|
49 | 55 | div.codeblock .code-header .author .user{ |
|
50 | 56 | padding-top:3px; |
|
51 | 57 | } |
|
52 | 58 | div.codeblock .code-header .commit{ |
|
53 | 59 | margin-left:25px; |
|
54 | 60 | font-weight: normal; |
|
55 | 61 | white-space:pre; |
|
56 | 62 | } |
|
57 | 63 | |
|
58 | 64 | div.codeblock .code-body table{ |
|
59 | 65 | width: 0 !important; |
|
60 | 66 | border: 0px !important; |
|
61 | 67 | } |
|
62 | 68 | div.codeblock .code-body table td { |
|
63 | 69 | border: 0px !important; |
|
64 | 70 | } |
|
65 | 71 | div.code-body { |
|
66 | 72 | background-color: #FFFFFF; |
|
67 | 73 | } |
|
68 | 74 | |
|
69 | 75 | div.codeblock .code-header .search-path { |
|
70 | 76 | padding: 0px 0px 0px 10px; |
|
71 | 77 | } |
|
72 | 78 | |
|
73 | 79 | div.search-code-body { |
|
74 | 80 | background-color: #FFFFFF; |
|
75 | 81 | padding: 5px 0px 5px 10px; |
|
76 | 82 | } |
|
77 | 83 | |
|
78 | 84 | div.search-code-body pre .match{ |
|
79 | 85 | background-color: #FAFFA6; |
|
80 | 86 | } |
|
81 | 87 | div.search-code-body pre .break{ |
|
82 | 88 | background-color: #DDE7EF; |
|
83 | 89 | width: 100%; |
|
84 | 90 | color: #747474; |
|
85 | 91 | display: block; |
|
86 | 92 | |
|
87 | 93 | } |
|
88 | 94 | div.annotatediv{ |
|
89 | 95 | margin-left:2px; |
|
90 | 96 | margin-right:4px; |
|
91 | 97 | } |
|
92 | 98 | .code-highlight { |
|
93 | 99 | padding: 0px; |
|
94 | 100 | margin-top: 5px; |
|
95 | 101 | margin-bottom: 5px; |
|
96 | 102 | border-left: 2px solid #ccc; |
|
97 | 103 | } |
|
98 | 104 | .code-highlight pre, .linenodiv pre { |
|
99 | 105 | padding: 5px; |
|
100 | 106 | margin: 0; |
|
101 | 107 | } |
|
102 | 108 | .code-highlight pre div:target { |
|
103 | 109 | background-color: #FFFFBE !important; |
|
104 | 110 | } |
|
105 | 111 | |
|
106 | 112 | .linenos a { text-decoration: none; } |
|
107 | 113 | |
|
108 | 114 | .code { display: block; } |
|
109 | 115 | .code-highlight .hll, .codehilite .hll { background-color: #ffffcc } |
|
110 | 116 | .code-highlight .c, .codehilite .c { color: #408080; font-style: italic } /* Comment */ |
|
111 | 117 | .code-highlight .err, .codehilite .err { border: 1px solid #FF0000 } /* Error */ |
|
112 | 118 | .code-highlight .k, .codehilite .k { color: #008000; font-weight: bold } /* Keyword */ |
|
113 | 119 | .code-highlight .o, .codehilite .o { color: #666666 } /* Operator */ |
|
114 | 120 | .code-highlight .cm, .codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */ |
|
115 | 121 | .code-highlight .cp, .codehilite .cp { color: #BC7A00 } /* Comment.Preproc */ |
|
116 | 122 | .code-highlight .c1, .codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */ |
|
117 | 123 | .code-highlight .cs, .codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */ |
|
118 | 124 | .code-highlight .gd, .codehilite .gd { color: #A00000 } /* Generic.Deleted */ |
|
119 | 125 | .code-highlight .ge, .codehilite .ge { font-style: italic } /* Generic.Emph */ |
|
120 | 126 | .code-highlight .gr, .codehilite .gr { color: #FF0000 } /* Generic.Error */ |
|
121 | 127 | .code-highlight .gh, .codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */ |
|
122 | 128 | .code-highlight .gi, .codehilite .gi { color: #00A000 } /* Generic.Inserted */ |
|
123 | 129 | .code-highlight .go, .codehilite .go { color: #808080 } /* Generic.Output */ |
|
124 | 130 | .code-highlight .gp, .codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ |
|
125 | 131 | .code-highlight .gs, .codehilite .gs { font-weight: bold } /* Generic.Strong */ |
|
126 | 132 | .code-highlight .gu, .codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ |
|
127 | 133 | .code-highlight .gt, .codehilite .gt { color: #0040D0 } /* Generic.Traceback */ |
|
128 | 134 | .code-highlight .kc, .codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ |
|
129 | 135 | .code-highlight .kd, .codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ |
|
130 | 136 | .code-highlight .kn, .codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ |
|
131 | 137 | .code-highlight .kp, .codehilite .kp { color: #008000 } /* Keyword.Pseudo */ |
|
132 | 138 | .code-highlight .kr, .codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ |
|
133 | 139 | .code-highlight .kt, .codehilite .kt { color: #B00040 } /* Keyword.Type */ |
|
134 | 140 | .code-highlight .m, .codehilite .m { color: #666666 } /* Literal.Number */ |
|
135 | 141 | .code-highlight .s, .codehilite .s { color: #BA2121 } /* Literal.String */ |
|
136 | 142 | .code-highlight .na, .codehilite .na { color: #7D9029 } /* Name.Attribute */ |
|
137 | 143 | .code-highlight .nb, .codehilite .nb { color: #008000 } /* Name.Builtin */ |
|
138 | 144 | .code-highlight .nc, .codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */ |
|
139 | 145 | .code-highlight .no, .codehilite .no { color: #880000 } /* Name.Constant */ |
|
140 | 146 | .code-highlight .nd, .codehilite .nd { color: #AA22FF } /* Name.Decorator */ |
|
141 | 147 | .code-highlight .ni, .codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */ |
|
142 | 148 | .code-highlight .ne, .codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ |
|
143 | 149 | .code-highlight .nf, .codehilite .nf { color: #0000FF } /* Name.Function */ |
|
144 | 150 | .code-highlight .nl, .codehilite .nl { color: #A0A000 } /* Name.Label */ |
|
145 | 151 | .code-highlight .nn, .codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ |
|
146 | 152 | .code-highlight .nt, .codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */ |
|
147 | 153 | .code-highlight .nv, .codehilite .nv { color: #19177C } /* Name.Variable */ |
|
148 | 154 | .code-highlight .ow, .codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ |
|
149 | 155 | .code-highlight .w, .codehilite .w { color: #bbbbbb } /* Text.Whitespace */ |
|
150 | 156 | .code-highlight .mf, .codehilite .mf { color: #666666 } /* Literal.Number.Float */ |
|
151 | 157 | .code-highlight .mh, .codehilite .mh { color: #666666 } /* Literal.Number.Hex */ |
|
152 | 158 | .code-highlight .mi, .codehilite .mi { color: #666666 } /* Literal.Number.Integer */ |
|
153 | 159 | .code-highlight .mo, .codehilite .mo { color: #666666 } /* Literal.Number.Oct */ |
|
154 | 160 | .code-highlight .sb, .codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */ |
|
155 | 161 | .code-highlight .sc, .codehilite .sc { color: #BA2121 } /* Literal.String.Char */ |
|
156 | 162 | .code-highlight .sd, .codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ |
|
157 | 163 | .code-highlight .s2, .codehilite .s2 { color: #BA2121 } /* Literal.String.Double */ |
|
158 | 164 | .code-highlight .se, .codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ |
|
159 | 165 | .code-highlight .sh, .codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */ |
|
160 | 166 | .code-highlight .si, .codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ |
|
161 | 167 | .code-highlight .sx, .codehilite .sx { color: #008000 } /* Literal.String.Other */ |
|
162 | 168 | .code-highlight .sr, .codehilite .sr { color: #BB6688 } /* Literal.String.Regex */ |
|
163 | 169 | .code-highlight .s1, .codehilite .s1 { color: #BA2121 } /* Literal.String.Single */ |
|
164 | 170 | .code-highlight .ss, .codehilite .ss { color: #19177C } /* Literal.String.Symbol */ |
|
165 | 171 | .code-highlight .bp, .codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */ |
|
166 | 172 | .code-highlight .vc, .codehilite .vc { color: #19177C } /* Name.Variable.Class */ |
|
167 | 173 | .code-highlight .vg, .codehilite .vg { color: #19177C } /* Name.Variable.Global */ |
|
168 | 174 | .code-highlight .vi, .codehilite .vi { color: #19177C } /* Name.Variable.Instance */ |
|
169 | 175 | .code-highlight .il, .codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */ |
@@ -1,104 +1,104 b'' | |||
|
1 | 1 | <dl> |
|
2 | 2 | <dt style="padding-top:10px;font-size:16px">${_('History')}</dt> |
|
3 | 3 | <dd> |
|
4 | 4 | <div> |
|
5 | 5 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
6 | 6 | ${h.hidden('diff2',c.file.last_changeset.raw_id)} |
|
7 | 7 | ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} |
|
8 | 8 | ${h.submit('diff','diff to revision',class_="ui-btn")} |
|
9 | 9 | ${h.submit('show_rev','show at revision',class_="ui-btn")} |
|
10 | 10 | ${h.end_form()} |
|
11 | 11 | </div> |
|
12 | 12 | </dd> |
|
13 | 13 | </dl> |
|
14 | 14 | |
|
15 | 15 | <div id="body" class="codeblock"> |
|
16 | 16 | <div class="code-header"> |
|
17 | 17 | <div class="stats"> |
|
18 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> | |
|
18 | <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div> | |
|
19 | 19 | <div class="left item"><pre>${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id))}</pre></div> |
|
20 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |
|
21 | <div class="left item last">${c.file.mimetype}</div> | |
|
20 | <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div> | |
|
21 | <div class="left item last"><pre>${c.file.mimetype}</pre></div> | |
|
22 | 22 | <div class="buttons"> |
|
23 | 23 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
24 | 24 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
25 | 25 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
26 | 26 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
27 | 27 | % if not c.file.is_binary: |
|
28 | 28 | ${h.link_to(_('edit'),h.url('files_edit_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
29 | 29 | % endif |
|
30 | 30 | % endif |
|
31 | 31 | </div> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="author"> |
|
34 | 34 | <div class="gravatar"> |
|
35 | 35 | <img alt="gravatar" src="${h.gravatar_url(h.email(c.file.last_changeset.author),16)}"/> |
|
36 | 36 | </div> |
|
37 | 37 | <div title="${c.file.last_changeset.author}" class="user">${h.person(c.file.last_changeset.author)}</div> |
|
38 | 38 | </div> |
|
39 | <div class="commit">${c.file.last_changeset.message}</div> | |
|
39 | <div class="commit">${h.urlify_commit(c.file.last_changeset.message,c.repo_name)}</div> | |
|
40 | 40 | </div> |
|
41 | 41 | <div class="code-body"> |
|
42 | 42 | %if c.file.is_binary: |
|
43 | 43 | ${_('Binary file (%s)') % c.file.mimetype} |
|
44 | 44 | %else: |
|
45 | 45 | % if c.file.size < c.cut_off_limit: |
|
46 | 46 | ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} |
|
47 | 47 | %else: |
|
48 | 48 | ${_('File is too big to display')} ${h.link_to(_('show as raw'), |
|
49 | 49 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id,f_path=c.f_path))} |
|
50 | 50 | %endif |
|
51 | 51 | <script type="text/javascript"> |
|
52 | 52 | function highlight_lines(lines){ |
|
53 | 53 | for(pos in lines){ |
|
54 | 54 | YUD.setStyle('L'+lines[pos],'background-color','#FFFFBE'); |
|
55 | 55 | } |
|
56 | 56 | } |
|
57 | 57 | page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L'); |
|
58 | 58 | if (page_highlights.length == 2){ |
|
59 | 59 | highlight_ranges = page_highlights[1].split(","); |
|
60 | 60 | |
|
61 | 61 | var h_lines = []; |
|
62 | 62 | for (pos in highlight_ranges){ |
|
63 | 63 | var _range = highlight_ranges[pos].split('-'); |
|
64 | 64 | if(_range.length == 2){ |
|
65 | 65 | var start = parseInt(_range[0]); |
|
66 | 66 | var end = parseInt(_range[1]); |
|
67 | 67 | if (start < end){ |
|
68 | 68 | for(var i=start;i<=end;i++){ |
|
69 | 69 | h_lines.push(i); |
|
70 | 70 | } |
|
71 | 71 | } |
|
72 | 72 | } |
|
73 | 73 | else{ |
|
74 | 74 | h_lines.push(parseInt(highlight_ranges[pos])); |
|
75 | 75 | } |
|
76 | 76 | } |
|
77 | 77 | highlight_lines(h_lines); |
|
78 | 78 | |
|
79 | 79 | //remember original location |
|
80 | 80 | var old_hash = location.href.substring(location.href.indexOf('#')); |
|
81 | 81 | |
|
82 | 82 | // this makes a jump to anchor moved by 3 posstions for padding |
|
83 | 83 | window.location.hash = '#L'+Math.max(parseInt(h_lines[0])-3,1); |
|
84 | 84 | |
|
85 | 85 | //sets old anchor |
|
86 | 86 | window.location.hash = old_hash; |
|
87 | 87 | |
|
88 | 88 | } |
|
89 | 89 | </script> |
|
90 | 90 | %endif |
|
91 | 91 | </div> |
|
92 | 92 | </div> |
|
93 | 93 | |
|
94 | 94 | <script type="text/javascript"> |
|
95 | 95 | YUE.onDOMReady(function(){ |
|
96 | 96 | YUE.on('show_rev','click',function(e){ |
|
97 | 97 | YUE.preventDefault(e); |
|
98 | 98 | var cs = YUD.get('diff1').value; |
|
99 | 99 | var url = "${h.url('files_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); |
|
100 | 100 | window.location = url; |
|
101 | 101 | }); |
|
102 | 102 | YUE.on('hlcode','mouseup',getSelectionLink("${_('Selection link')}")) |
|
103 | 103 | }); |
|
104 | 104 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now