Show More
@@ -1,278 +1,284 b'' | |||||
1 | // summary.less |
|
1 | // summary.less | |
2 | // For use in RhodeCode applications; |
|
2 | // For use in RhodeCode applications; | |
3 | // Used for headers and file detail summary screens. |
|
3 | // Used for headers and file detail summary screens. | |
4 |
|
4 | |||
5 | .summary { |
|
5 | .summary { | |
6 | float: left; |
|
6 | float: left; | |
7 | position: relative; |
|
7 | position: relative; | |
8 | width: 100%; |
|
8 | width: 100%; | |
9 | margin: 0; |
|
9 | margin: 0; | |
10 | padding: 0; |
|
10 | padding: 0; | |
11 |
|
11 | |||
12 | .summary-detail-header { |
|
12 | .summary-detail-header { | |
13 | float: left; |
|
13 | float: left; | |
14 | display: block; |
|
14 | display: block; | |
15 | width: 100%; |
|
15 | width: 100%; | |
16 | margin-bottom: @textmargin; |
|
16 | margin-bottom: @textmargin; | |
17 | padding: 0 0 .5em 0; |
|
17 | padding: 0 0 .5em 0; | |
18 | border-bottom: @border-thickness solid @border-default-color; |
|
18 | border-bottom: @border-thickness solid @border-default-color; | |
19 |
|
19 | |||
20 | .breadcrumbs { |
|
20 | .breadcrumbs { | |
21 | float: left; |
|
21 | float: left; | |
22 | display: inline; |
|
22 | display: inline; | |
23 | margin: 0; |
|
23 | margin: 0; | |
24 | padding: 0; |
|
24 | padding: 0; | |
25 | } |
|
25 | } | |
26 | h4 { |
|
26 | h4 { | |
27 | float: left; |
|
27 | float: left; | |
28 | margin: 0 1em 0 0; |
|
28 | margin: 0 1em 0 0; | |
29 | padding: 0; |
|
29 | padding: 0; | |
30 | line-height: 1.2em; |
|
30 | line-height: 1.2em; | |
31 | font-size: @basefontsize; |
|
31 | font-size: @basefontsize; | |
32 | } |
|
32 | } | |
33 |
|
33 | |||
34 | .action_link { |
|
34 | .action_link { | |
35 | float: right; |
|
35 | float: right; | |
36 | } |
|
36 | } | |
37 |
|
37 | |||
38 | .new-file { |
|
38 | .new-file { | |
39 | float: right; |
|
39 | float: right; | |
40 | margin-top: -1.5em; |
|
40 | margin-top: -1.5em; | |
41 | } |
|
41 | } | |
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | .summary-detail { |
|
44 | .summary-detail { | |
45 | float: left; |
|
45 | float: left; | |
46 | position: relative; |
|
46 | position: relative; | |
47 | width: 73%; |
|
47 | width: 73%; | |
48 | margin: 0 3% @space 0; |
|
48 | margin: 0 3% @space 0; | |
49 | padding: 0; |
|
49 | padding: 0; | |
50 |
|
50 | |||
51 | .file_diff_buttons { |
|
51 | .file_diff_buttons { | |
52 | margin-top: @space; |
|
52 | margin-top: @space; | |
53 | } |
|
53 | } | |
54 |
|
54 | |||
55 | // commit message |
|
55 | // commit message | |
56 | .commit { |
|
56 | .commit { | |
57 | white-space: pre-wrap; |
|
57 | white-space: pre-wrap; | |
58 | } |
|
58 | } | |
59 |
|
59 | |||
60 | .left-clone { |
|
60 | .left-clone { | |
61 | float: left; |
|
61 | float: left; | |
62 | height: 30px; |
|
62 | height: 30px; | |
63 | margin: 0; |
|
63 | margin: 0; | |
64 | padding: 0; |
|
64 | padding: 0; | |
65 | font-family: @text-semibold; |
|
65 | font-family: @text-semibold; | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 | .right-clone { |
|
68 | .right-clone { | |
69 | float: right; |
|
69 | float: right; | |
70 | width: 83%; |
|
70 | width: 83%; | |
71 | } |
|
71 | } | |
72 |
|
72 | |||
73 | .clone_url_input { |
|
73 | .clone_url_input { | |
74 | width: ~"calc(100% - 35px)"; |
|
74 | width: ~"calc(100% - 35px)"; | |
75 | padding: 5px; |
|
75 | padding: 5px; | |
76 | } |
|
76 | } | |
77 |
|
77 | |||
78 | &.directory { |
|
78 | &.directory { | |
79 | margin-bottom: 0; |
|
79 | margin-bottom: 0; | |
80 | } |
|
80 | } | |
81 |
|
81 | |||
82 | .desc { |
|
82 | .desc { | |
83 | white-space: pre-wrap; |
|
83 | white-space: pre-wrap; | |
84 | } |
|
84 | } | |
85 | .disabled { |
|
85 | .disabled { | |
86 | opacity: .5; |
|
86 | opacity: .5; | |
87 | cursor: inherit; |
|
87 | cursor: inherit; | |
88 | } |
|
88 | } | |
89 | .help-block { |
|
89 | .help-block { | |
90 | color: inherit; |
|
90 | color: inherit; | |
91 | margin: 0; |
|
91 | margin: 0; | |
92 | } |
|
92 | } | |
93 | } |
|
93 | } | |
94 |
|
94 | |||
95 | .sidebar-right { |
|
95 | .sidebar-right { | |
96 | float: left; |
|
96 | float: left; | |
97 | width: 24%; |
|
97 | width: 24%; | |
98 | margin: 0; |
|
98 | margin: 0; | |
99 | padding: 0; |
|
99 | padding: 0; | |
100 |
|
100 | |||
101 | ul { |
|
101 | ul { | |
102 | margin-left: 0; |
|
102 | margin-left: 0; | |
103 | padding-left: 0; |
|
103 | padding-left: 0; | |
104 |
|
104 | |||
105 | li { |
|
105 | li { | |
106 |
|
106 | |||
107 | &:before { |
|
107 | &:before { | |
108 | content: none; |
|
108 | content: none; | |
109 | width: 0; |
|
109 | width: 0; | |
110 | } |
|
110 | } | |
111 | } |
|
111 | } | |
112 | } |
|
112 | } | |
113 | } |
|
113 | } | |
114 |
|
114 | |||
115 | #clone_by_name, #clone_by_id{ |
|
115 | #clone_by_name, #clone_by_id{ | |
116 | display: inline-block; |
|
116 | display: inline-block; | |
117 | margin-left: 0px; |
|
117 | margin-left: 0px; | |
118 | } |
|
118 | } | |
119 |
|
119 | |||
120 | .codeblock { |
|
120 | .codeblock { | |
121 | border: none; |
|
121 | border: none; | |
122 | background-color: transparent; |
|
122 | background-color: transparent; | |
123 | } |
|
123 | } | |
124 |
|
124 | |||
125 | .code-body { |
|
125 | .code-body { | |
126 | border: @border-thickness solid @border-default-color; |
|
126 | border: @border-thickness solid @border-default-color; | |
127 | .border-radius(@border-radius); |
|
127 | .border-radius(@border-radius); | |
128 | } |
|
128 | } | |
129 | } |
|
129 | } | |
130 |
|
130 | |||
131 | // this is used outside of just the summary |
|
131 | // this is used outside of just the summary | |
132 | .fieldset, // similar to form fieldset |
|
132 | .fieldset, // similar to form fieldset | |
133 | .summary .sidebar-right-content { // these have to match |
|
133 | .summary .sidebar-right-content { // these have to match | |
134 | clear: both; |
|
134 | clear: both; | |
135 | float: left; |
|
135 | float: left; | |
136 | position: relative; |
|
136 | position: relative; | |
137 | display:block; |
|
137 | display:block; | |
138 | width: 100%; |
|
138 | width: 100%; | |
139 | min-height: 1em; |
|
139 | min-height: 1em; | |
140 | margin-bottom: @textmargin; |
|
140 | margin-bottom: @textmargin; | |
141 | padding: 0; |
|
141 | padding: 0; | |
142 | line-height: 1.2em; |
|
142 | line-height: 1.2em; | |
143 |
|
143 | |||
144 | &:after { // clearfix |
|
144 | &:after { // clearfix | |
145 | content: ""; |
|
145 | content: ""; | |
146 | clear: both; |
|
146 | clear: both; | |
147 | width: 100%; |
|
147 | width: 100%; | |
148 | height: 1em; |
|
148 | height: 1em; | |
149 | } |
|
149 | } | |
150 | } |
|
150 | } | |
151 |
|
151 | |||
152 | .summary .sidebar-right-content { |
|
152 | .summary .sidebar-right-content { | |
153 | margin-bottom: @space; |
|
153 | margin-bottom: @space; | |
154 |
|
154 | |||
155 | .rc-user { |
|
155 | .rc-user { | |
156 | min-width: 0; |
|
156 | min-width: 0; | |
157 | } |
|
157 | } | |
158 | } |
|
158 | } | |
159 |
|
159 | |||
160 | .fieldset { |
|
160 | .fieldset { | |
161 |
|
161 | |||
162 | .left-label { // similar to form legend |
|
162 | .left-label { // similar to form legend | |
163 | float: left; |
|
163 | float: left; | |
164 | display: block; |
|
164 | display: block; | |
165 | width: 25%; |
|
165 | width: 25%; | |
166 | margin: 0; |
|
166 | margin: 0; | |
167 | padding: 0; |
|
167 | padding: 0; | |
168 | font-family: @text-semibold; |
|
168 | font-family: @text-semibold; | |
169 | } |
|
169 | } | |
170 |
|
170 | |||
171 | .right-content { // similar to form fields |
|
171 | .right-content { // similar to form fields | |
172 | float: left; |
|
172 | float: left; | |
173 | display: block; |
|
173 | display: block; | |
174 | width: 75%; |
|
174 | width: 75%; | |
175 | margin: 0 0 0 -15%; |
|
175 | margin: 0 0 0 -15%; | |
176 | padding: 0 0 0 15%; |
|
176 | padding: 0 0 0 15%; | |
177 |
|
177 | |||
178 | .truncate-wrap, |
|
178 | .truncate-wrap, | |
179 | .truncate { |
|
179 | .truncate { | |
180 | max-width: 100%; |
|
180 | max-width: 100%; | |
181 | width: 100%; |
|
181 | width: 100%; | |
182 | } |
|
182 | } | |
183 |
|
183 | |||
184 | .commit-long { |
|
184 | .commit-long { | |
185 | overflow-x: auto; |
|
185 | overflow-x: auto; | |
186 | } |
|
186 | } | |
187 | } |
|
187 | } | |
188 | .commit.truncate-wrap { |
|
188 | .commit.truncate-wrap { | |
189 | overflow:hidden; |
|
189 | overflow:hidden; | |
190 | text-overflow: ellipsis; |
|
190 | text-overflow: ellipsis; | |
191 | } |
|
191 | } | |
192 | } |
|
192 | } | |
193 |
|
193 | |||
194 | // expand commit message |
|
194 | // expand commit message | |
195 | #message_expand { |
|
195 | #message_expand { | |
196 | clear: both; |
|
196 | clear: both; | |
197 | display: block; |
|
197 | display: block; | |
198 | color: @rcblue; |
|
198 | color: @rcblue; | |
199 | cursor: pointer; |
|
199 | cursor: pointer; | |
200 | } |
|
200 | } | |
201 |
|
201 | |||
202 | #trimmed_message_box { |
|
202 | #trimmed_message_box { | |
203 | max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height |
|
203 | max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height | |
204 | overflow: hidden; |
|
204 | overflow: hidden; | |
205 | } |
|
205 | } | |
206 |
|
206 | |||
207 | // show/hide comments button |
|
207 | // show/hide comments button | |
208 | .show-inline-comments { |
|
208 | .show-inline-comments { | |
209 | display: inline; |
|
209 | display: inline; | |
210 | cursor: pointer; |
|
210 | cursor: pointer; | |
211 |
|
211 | |||
212 | .comments-show { display: inline; } |
|
212 | .comments-show { display: inline; } | |
213 | .comments-hide { display: none; } |
|
213 | .comments-hide { display: none; } | |
214 |
|
214 | |||
215 | &.comments-visible { |
|
215 | &.comments-visible { | |
216 | .comments-show { display: none; } |
|
216 | .comments-show { display: none; } | |
217 | .comments-hide { display: inline; } |
|
217 | .comments-hide { display: inline; } | |
218 | } |
|
218 | } | |
219 | } |
|
219 | } | |
220 |
|
220 | |||
221 | // Quick Start section |
|
221 | // Quick Start section | |
222 | .quick_start { |
|
222 | .quick_start { | |
223 | float: left; |
|
223 | float: left; | |
224 | display: block; |
|
224 | display: block; | |
225 | position: relative; |
|
225 | position: relative; | |
226 | width: 100%; |
|
226 | width: 100%; | |
227 |
|
227 | |||
228 | // adds some space to make copy and paste easier |
|
228 | // adds some space to make copy and paste easier | |
229 | .left-label, |
|
229 | .left-label, | |
230 | .right-content { |
|
230 | .right-content { | |
231 | line-height: 1.6em; |
|
231 | line-height: 1.6em; | |
232 | } |
|
232 | } | |
233 | } |
|
233 | } | |
234 |
|
234 | |||
235 | .submodule { |
|
235 | .submodule { | |
236 | .summary-detail { |
|
236 | .summary-detail { | |
237 | width: 100%; |
|
237 | width: 100%; | |
238 |
|
238 | |||
239 | .btn-collapse { |
|
239 | .btn-collapse { | |
240 | display: none; |
|
240 | display: none; | |
241 | } |
|
241 | } | |
242 | } |
|
242 | } | |
243 | } |
|
243 | } | |
244 |
|
244 | |||
245 | .codeblock-header { |
|
245 | .codeblock-header { | |
246 | float: left; |
|
246 | float: left; | |
247 | display: block; |
|
247 | display: block; | |
248 | width: 100%; |
|
248 | width: 100%; | |
249 | margin: 0; |
|
249 | margin: 0; | |
250 |
padding: @space 0 |
|
250 | padding: @space 0 10px 0; | |
251 | border-top: @border-thickness solid @border-default-color; |
|
251 | border-top: @border-thickness solid @border-default-color; | |
252 |
|
252 | |||
253 | .stats { |
|
253 | .stats { | |
254 | float: left; |
|
254 | float: left; | |
255 | width: 50%; |
|
255 | width: 50%; | |
256 | } |
|
256 | } | |
|
257 | .stats-filename { | |||
|
258 | font-size: 120%; | |||
|
259 | } | |||
|
260 | .stats-first-item { | |||
|
261 | padding: 0px 0px 0px 3px; | |||
|
262 | } | |||
257 |
|
263 | |||
258 | .buttons { |
|
264 | .buttons { | |
259 | float: right; |
|
265 | float: right; | |
260 | width: 50%; |
|
266 | width: 50%; | |
261 | text-align: right; |
|
267 | text-align: right; | |
262 | color: @grey4; |
|
268 | color: @grey4; | |
263 | } |
|
269 | } | |
264 | } |
|
270 | } | |
265 |
|
271 | |||
266 | #summary-menu-stats { |
|
272 | #summary-menu-stats { | |
267 |
|
273 | |||
268 | .stats-bullet { |
|
274 | .stats-bullet { | |
269 | color: @grey3; |
|
275 | color: @grey3; | |
270 | min-width: 3em; |
|
276 | min-width: 3em; | |
271 | } |
|
277 | } | |
272 |
|
278 | |||
273 | .repo-size { |
|
279 | .repo-size { | |
274 | margin-bottom: .5em; |
|
280 | margin-bottom: .5em; | |
275 | } |
|
281 | } | |
276 |
|
282 | |||
277 | } |
|
283 | } | |
278 |
|
284 |
@@ -1,105 +1,109 b'' | |||||
1 | <%namespace name="sourceblock" file="/codeblocks/source.mako"/> |
|
1 | <%namespace name="sourceblock" file="/codeblocks/source.mako"/> | |
2 |
|
2 | |||
3 | <div id="codeblock" class="codeblock"> |
|
3 | <div id="codeblock" class="codeblock"> | |
4 | <div class="codeblock-header"> |
|
4 | <div class="codeblock-header"> | |
5 | <div class="stats"> |
|
5 | <div class="stats"> | |
6 | <span> |
|
6 | <span class="stats-filename"> | |
7 | <strong> |
|
7 | <strong> | |
8 | <i class="icon-file-text"></i> |
|
8 | <i class="icon-file-text"></i> | |
9 | ${c.file.unicode_path_safe} |
|
9 | ${c.file.unicode_path_safe} | |
10 | </strong> |
|
10 | </strong> | |
11 | </span> |
|
11 | </span> | |
|
12 | <span class="item last"><i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.f_path}" title="${_('Copy the full path')}"></i></span> | |||
|
13 | <br/> | |||
|
14 | ||||
12 |
|
|
15 | % if c.lf_node: | |
13 | <span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span> |
|
16 | <span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span> | |
14 | % endif |
|
17 | % endif | |
15 | <span> | ${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span> |
|
18 | ||
|
19 | <span class="stats-first-item">${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span> | |||
16 | <span> | ${h.format_byte_size_binary(c.file.size)}</span> |
|
20 | <span> | ${h.format_byte_size_binary(c.file.size)}</span> | |
17 | <span> | ${c.file.mimetype} </span> |
|
21 | <span> | ${c.file.mimetype} </span> | |
18 | <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span> |
|
22 | <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span> | |
19 | <span class="item last"> | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.f_path}" title="${_('Copy the full path')}"></i></span> |
|
23 | ||
20 | </div> |
|
24 | </div> | |
21 | <div class="buttons"> |
|
25 | <div class="buttons"> | |
22 | <a id="file_history_overview" href="#"> |
|
26 | <a id="file_history_overview" href="#"> | |
23 | ${_('History')} |
|
27 | ${_('History')} | |
24 | </a> |
|
28 | </a> | |
25 | <a id="file_history_overview_full" style="display: none" href="${h.route_path('repo_changelog_file',repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path)}"> |
|
29 | <a id="file_history_overview_full" style="display: none" href="${h.route_path('repo_changelog_file',repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path)}"> | |
26 | ${_('Show Full History')} |
|
30 | ${_('Show Full History')} | |
27 | </a> | |
|
31 | </a> | | |
28 | %if c.annotate: |
|
32 | %if c.annotate: | |
29 | ${h.link_to(_('Source'), h.route_path('repo_files', repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
33 | ${h.link_to(_('Source'), h.route_path('repo_files', repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} | |
30 | %else: |
|
34 | %else: | |
31 | ${h.link_to(_('Annotation'), h.route_path('repo_files:annotated',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
35 | ${h.link_to(_('Annotation'), h.route_path('repo_files:annotated',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} | |
32 | %endif |
|
36 | %endif | |
33 | | ${h.link_to(_('Raw'), h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
37 | | ${h.link_to(_('Raw'), h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} | |
34 | | |
|
38 | | | |
35 | % if c.lf_node: |
|
39 | % if c.lf_node: | |
36 | <a href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path, _query=dict(lf=1))}"> |
|
40 | <a href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path, _query=dict(lf=1))}"> | |
37 | ${_('Download largefile')} |
|
41 | ${_('Download largefile')} | |
38 | </a> |
|
42 | </a> | |
39 | % else: |
|
43 | % else: | |
40 | <a href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> |
|
44 | <a href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> | |
41 | ${_('Download')} |
|
45 | ${_('Download')} | |
42 | </a> |
|
46 | </a> | |
43 | % endif |
|
47 | % endif | |
44 |
|
48 | |||
45 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
49 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
46 | | |
|
50 | | | |
47 | %if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary: |
|
51 | %if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary: | |
48 | <a href="${h.route_path('repo_files_edit_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}"> |
|
52 | <a href="${h.route_path('repo_files_edit_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}"> | |
49 | ${_('Edit on Branch:{}').format(c.branch_name)} |
|
53 | ${_('Edit on Branch:{}').format(c.branch_name)} | |
50 | </a> |
|
54 | </a> | |
51 | | <a class="btn-danger btn-link" href="${h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">${_('Delete')} |
|
55 | | <a class="btn-danger btn-link" href="${h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">${_('Delete')} | |
52 | </a> |
|
56 | </a> | |
53 | %elif c.on_branch_head and c.branch_or_raw_id and c.file.is_binary: |
|
57 | %elif c.on_branch_head and c.branch_or_raw_id and c.file.is_binary: | |
54 | ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing binary files not allowed'))} |
|
58 | ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing binary files not allowed'))} | |
55 | | ${h.link_to(_('Delete'), h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit'),class_="btn-danger btn-link")} |
|
59 | | ${h.link_to(_('Delete'), h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit'),class_="btn-danger btn-link")} | |
56 | %else: |
|
60 | %else: | |
57 | ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing files allowed only when on branch head commit'))} |
|
61 | ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing files allowed only when on branch head commit'))} | |
58 | | ${h.link_to(_('Delete'), '#', class_="btn btn-danger btn-link disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))} |
|
62 | | ${h.link_to(_('Delete'), '#', class_="btn btn-danger btn-link disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))} | |
59 | %endif |
|
63 | %endif | |
60 | %endif |
|
64 | %endif | |
61 | </div> |
|
65 | </div> | |
62 | </div> |
|
66 | </div> | |
63 | <div id="file_history_container"></div> |
|
67 | <div id="file_history_container"></div> | |
64 | <div class="code-body"> |
|
68 | <div class="code-body"> | |
65 | %if c.file.is_binary: |
|
69 | %if c.file.is_binary: | |
66 | <% rendered_binary = h.render_binary(c.repo_name, c.file)%> |
|
70 | <% rendered_binary = h.render_binary(c.repo_name, c.file)%> | |
67 | % if rendered_binary: |
|
71 | % if rendered_binary: | |
68 | ${rendered_binary} |
|
72 | ${rendered_binary} | |
69 | % else: |
|
73 | % else: | |
70 | <div> |
|
74 | <div> | |
71 | ${_('Binary file (%s)') % c.file.mimetype} |
|
75 | ${_('Binary file (%s)') % c.file.mimetype} | |
72 | </div> |
|
76 | </div> | |
73 | % endif |
|
77 | % endif | |
74 | %else: |
|
78 | %else: | |
75 | % if c.file.size < c.visual.cut_off_limit_file: |
|
79 | % if c.file.size < c.visual.cut_off_limit_file: | |
76 | %if c.renderer and not c.annotate: |
|
80 | %if c.renderer and not c.annotate: | |
77 | ## pick relative url based on renderer |
|
81 | ## pick relative url based on renderer | |
78 | <% |
|
82 | <% | |
79 | relative_urls = { |
|
83 | relative_urls = { | |
80 | 'raw': h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path), |
|
84 | 'raw': h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path), | |
81 | 'standard': h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path), |
|
85 | 'standard': h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path), | |
82 | } |
|
86 | } | |
83 | %> |
|
87 | %> | |
84 | ${h.render(c.file.content, renderer=c.renderer, relative_urls=relative_urls)} |
|
88 | ${h.render(c.file.content, renderer=c.renderer, relative_urls=relative_urls)} | |
85 | %else: |
|
89 | %else: | |
86 | <table class="cb codehilite"> |
|
90 | <table class="cb codehilite"> | |
87 | %if c.annotate: |
|
91 | %if c.annotate: | |
88 | <% color_hasher = h.color_hasher() %> |
|
92 | <% color_hasher = h.color_hasher() %> | |
89 | %for annotation, lines in c.annotated_lines: |
|
93 | %for annotation, lines in c.annotated_lines: | |
90 | ${sourceblock.render_annotation_lines(annotation, lines, color_hasher)} |
|
94 | ${sourceblock.render_annotation_lines(annotation, lines, color_hasher)} | |
91 | %endfor |
|
95 | %endfor | |
92 | %else: |
|
96 | %else: | |
93 | %for line_num, tokens in enumerate(c.lines, 1): |
|
97 | %for line_num, tokens in enumerate(c.lines, 1): | |
94 | ${sourceblock.render_line(line_num, tokens)} |
|
98 | ${sourceblock.render_line(line_num, tokens)} | |
95 | %endfor |
|
99 | %endfor | |
96 | %endif |
|
100 | %endif | |
97 | </table> |
|
101 | </table> | |
98 | %endif |
|
102 | %endif | |
99 | %else: |
|
103 | %else: | |
100 | ${_('File size {} is bigger then allowed limit {}. ').format(h.format_byte_size_binary(c.file.size), h.format_byte_size_binary(c.visual.cut_off_limit_file))} ${h.link_to(_('Show as raw'), |
|
104 | ${_('File size {} is bigger then allowed limit {}. ').format(h.format_byte_size_binary(c.file.size), h.format_byte_size_binary(c.visual.cut_off_limit_file))} ${h.link_to(_('Show as raw'), | |
101 | h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
105 | h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} | |
102 | %endif |
|
106 | %endif | |
103 | %endif |
|
107 | %endif | |
104 | </div> |
|
108 | </div> | |
105 | </div> No newline at end of file |
|
109 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now