Show More
@@ -418,9 +418,17 b' div.codeblock {' | |||
|
418 | 418 | } |
|
419 | 419 | |
|
420 | 420 | .gist_url { |
|
421 |
padding: 0px 0px |
|
|
421 | padding: 0px 0px 35px 0px; | |
|
422 | 422 | } |
|
423 | 423 | |
|
424 | .gist-desc { | |
|
425 | clear: both; | |
|
426 | margin: 0 0 10px 0; | |
|
427 | code { | |
|
428 | white-space: pre-line; | |
|
429 | line-height: inherit | |
|
430 | } | |
|
431 | } | |
|
424 | 432 | .author { |
|
425 | 433 | clear: both; |
|
426 | 434 | vertical-align: middle; |
@@ -49,6 +49,19 b'' | |||
|
49 | 49 | .tag7 { .border ( @border-thickness-tags, @color7 ); color:@color7; } |
|
50 | 50 | .tag8 { .border ( @border-thickness-tags, @color8 ); color:@color8; } |
|
51 | 51 | |
|
52 | ||
|
53 | .tag-gist-public { | |
|
54 | .border (@border-thickness-tags, @color1); | |
|
55 | color: @color1; | |
|
56 | } | |
|
57 | ||
|
58 | ||
|
59 | .tag-gist-private { | |
|
60 | .border (@border-thickness-tags, @color2); | |
|
61 | color: @color2; | |
|
62 | } | |
|
63 | ||
|
64 | ||
|
52 | 65 | .metatag-list { |
|
53 | 66 | margin: 0; |
|
54 | 67 | padding: 0; |
@@ -1,5 +1,6 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.mako"/> |
|
3 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
|
3 | 4 | |
|
4 | 5 | <%def name="robots()"> |
|
5 | 6 | %if c.gist.gist_type != 'public': |
@@ -27,55 +28,53 b'' | |||
|
27 | 28 | <%def name="main()"> |
|
28 | 29 | <div class="box"> |
|
29 | 30 | <!-- box / title --> |
|
30 | <div class="title"> | |
|
31 | ${self.breadcrumbs()} | |
|
32 | </div> | |
|
33 | 31 | |
|
34 | 32 | <div class="table"> |
|
35 | 33 | <div id="files_data"> |
|
36 | 34 | <div id="codeblock" class="codeblock"> |
|
37 | 35 | <div class="code-header"> |
|
38 | 36 | <div class="gist_url"> |
|
39 |
< |
|
|
37 | <div class="pull-left"> | |
|
38 | <code> | |
|
39 | ${dt.gist_type(c.gist.gist_type)} | |
|
40 | <span class="tag disabled">${c.gist.gist_access_id}</span> | |
|
40 | 41 | ${c.gist.gist_url()} <span class="icon-clipboard clipboard-action" data-clipboard-text="${c.gist.gist_url()}" title="${_('Copy the url')}"></span> |
|
41 | </code> | |
|
42 | </div> | |
|
43 | <div class="stats"> | |
|
44 | %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id: | |
|
45 | <div class="remove_gist"> | |
|
46 | ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)} | |
|
47 | ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")} | |
|
48 | ${h.end_form()} | |
|
42 | </code> | |
|
49 | 43 | </div> |
|
50 | %endif | |
|
51 | <div class="buttons"> | |
|
44 | ||
|
45 | <div class="pull-right buttons"> | |
|
52 | 46 | ## only owner should see that |
|
53 | 47 | <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy content')}</a> |
|
54 | 48 | |
|
55 | 49 | %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id: |
|
56 |
|
|
|
50 | ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")} | |
|
57 | 51 | %endif |
|
58 | 52 | ${h.link_to(_('Show as Raw'), h.route_path('gist_show_formatted', gist_id=c.gist.gist_access_id, revision='tip', format='raw'), class_="btn btn-mini")} |
|
53 | ||
|
54 | %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id: | |
|
55 | <div class="pull-right remove_gist"> | |
|
56 | ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)} | |
|
57 | ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")} | |
|
58 | ${h.end_form()} | |
|
59 | </div> | |
|
60 | %endif | |
|
59 | 61 | </div> |
|
60 |
|
|
|
61 | %if c.gist.gist_type != 'public': | |
|
62 | <span class="tag tag-ok disabled">${_('Private Gist')}</span> | |
|
63 | %endif | |
|
64 | <span> ${c.gist.gist_description}</span> | |
|
65 | <span>${_('Expires')}: | |
|
62 | </div> | |
|
63 | ||
|
64 | <div class="gist-desc"> | |
|
65 | <code>${c.gist.gist_description}</code> | |
|
66 | </div> | |
|
67 | ||
|
68 | <div class="author"> | |
|
69 | <div title="${h.tooltip(c.file_last_commit.author)}"> | |
|
70 | ${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)}, | |
|
71 | ${_('expires')}: | |
|
66 | 72 | %if c.gist.gist_expires == -1: |
|
67 | 73 | ${_('never')} |
|
68 | 74 | %else: |
|
69 | 75 | ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))} |
|
70 | 76 | %endif |
|
71 | 77 | </span> |
|
72 | ||
|
73 | </div> | |
|
74 | </div> | |
|
75 | ||
|
76 | <div class="author"> | |
|
77 | <div title="${h.tooltip(c.file_last_commit.author)}"> | |
|
78 | ${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)} | |
|
79 | 78 | </div> |
|
80 | 79 | |
|
81 | 80 | </div> |
@@ -83,22 +82,22 b'' | |||
|
83 | 82 | </div> |
|
84 | 83 | |
|
85 | 84 | ## iterate over the files |
|
86 | % for file in c.files: | |
|
87 | <% renderer = c.render and h.renderer_from_filename(file.path, exclude=['.txt', '.TXT'])%> | |
|
85 | % for gist_file in c.files: | |
|
86 | <% renderer = c.render and h.renderer_from_filename(gist_file.path, exclude=['.txt', '.TXT'])%> | |
|
88 | 87 | <!-- |
|
89 | <div id="${h.FID('G', file.path)}" class="stats" > | |
|
88 | <div id="${h.FID('G', gist_file.path)}" class="stats" > | |
|
90 | 89 | <a href="${c.gist.gist_url()}">¶</a> |
|
91 | <b >${file.path}</b> | |
|
90 | <b >${gist_file.path}</b> | |
|
92 | 91 | <div> |
|
93 | ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=file.commit.raw_id, format='raw', f_path=file.path), class_="btn btn-mini")} | |
|
92 | ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=gist_file.commit.raw_id, format='raw', f_path=gist_file.path), class_="btn btn-mini")} | |
|
94 | 93 | </div> |
|
95 | 94 | </div> |
|
96 | 95 | --> |
|
97 | 96 | <div class="code-body textarea text-area editor"> |
|
98 | 97 | %if renderer: |
|
99 | ${h.render(file.content, renderer=renderer)} | |
|
98 | ${h.render(gist_file.content, renderer=renderer)} | |
|
100 | 99 | %else: |
|
101 | ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
|
100 | ${h.pygmentize(gist_file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
|
102 | 101 | %endif |
|
103 | 102 | </div> |
|
104 | 103 | %endfor |
@@ -338,8 +338,10 b'' | |||
|
338 | 338 | </%def> |
|
339 | 339 | |
|
340 | 340 | <%def name="gist_type(gist_type)"> |
|
341 |
%if gist_type |
|
|
342 | <div class="tag">${_('Private')}</div> | |
|
341 | %if gist_type == 'public': | |
|
342 | <span class="tag tag-gist-public disabled">${_('Public Gist')}</span> | |
|
343 | %else: | |
|
344 | <span class="tag tag-gist-private disabled">${_('Private Gist')}</span> | |
|
343 | 345 | %endif |
|
344 | 346 | </%def> |
|
345 | 347 |
General Comments 0
You need to be logged in to leave comments.
Login now