Mercurial > zeropaste
annotate app/views/pastes/show.html.erb @ 448:b5c71a54613b
Update source url
author | nanaya <me@nanaya.pro> |
---|---|
date | Thu, 15 Jun 2017 16:23:20 +0900 |
parents | 1fc5ddcde386 |
children | 68231013b01b |
rev | line source |
---|---|
98 | 1 <% provide :title, "Paste ##{@paste.id}" %> |
190 | 2 |
398 | 3 <div class="row"><div class="col-xs-12"> |
4 <ul class="nav nav-tabs" role="tablist"> | |
5 <% [ | |
6 { :title => t(".plain"), :target => "pl", :active => true }, | |
7 { :title => t(".highlight"), :target => "hl" }, | |
8 { :title => t(".markdown"), :target => "md" } | |
9 ].each do |el| %> | |
10 <li role="presentation" class="<%= "active" if el[:active] %>"> | |
11 <%= link_to el[:title], "##{el[:target]}", | |
442 | 12 :data => { |
13 :mode => el[:target], | |
14 :toggle => "tab" | |
15 }, | |
398 | 16 :aria => { :controls => el[:target] }, |
17 :role => "tab", | |
442 | 18 :class => "js-show-tab" |
398 | 19 %> |
395 | 20 </li> |
21 <% end %> | |
398 | 22 </ul> |
23 </div></div> | |
24 | |
25 <div class="row js-showing-paste"><div class="col-xs-12"><div class="paste-show"> | |
26 <div class="tab-content"> | |
27 <div role="tabpanel" class="tab-pane active" id="pl"> | |
28 <pre class="paste-show__content"><code class="js-paste-pl"><%= @paste.paste %></code></pre> | |
29 </div> | |
30 | |
31 <div role="tabpanel" class="tab-pane" id="hl"> | |
420 | 32 <pre class="paste-show__content"><code class="js-paste-hl zp-hl lang-<%= @paste.language.try(:parameterize) %>"></code></pre> |
398 | 33 </div> |
34 | |
35 <div role="tabpanel" class="tab-pane" id="md"> | |
36 <div class="js-paste-md"></div> | |
37 </div> | |
38 </div> | |
39 </div></div></div> | |
40 | |
424 | 41 <div class="row"><div class="col-xs-12"> |
398 | 42 <%= form_for @paste, :method => :delete, :authenticity_token => false do |f| %> |
424 | 43 <div class="form-group form-group--narrow <%= error_class f.object, :key %>"> |
398 | 44 <div class="input-group"> |
45 <%= f.text_field :key, | |
46 :value => nil, | |
47 :placeholder => t("pastes.new.deletion_key"), | |
48 :autofocus => f.object.errors.any?, | |
434 | 49 :autocomplete => "off", |
398 | 50 :class => "form-control" |
51 %> | |
52 | |
53 <span class="input-group-btn"> | |
54 <%= f.button t(".delete"), :class => "btn btn-danger" %> | |
55 </span> | |
56 </div> | |
57 </div> | |
58 <% end %> | |
424 | 59 </div></div> |
2 | 60 |
412
634366b67312
Add extra padding so the links aren't stuck to bottom.
nanaya <me@myconan.net>
parents:
400
diff
changeset
|
61 <ul class="nav nav-pills paste-show__footer"> |
398 | 62 <li role="presentation"> |
63 <%= link_to t(".raw"), paste_path(@paste, :txt) %> | |
64 </li> | |
65 <li role="presentation"> | |
66 <%= link_to t(".derive"), root_path(:base => @paste) %> | |
67 </li> | |
68 <li role="presentation"> | |
69 <%= link_to t(".more"), root_path %> | |
70 </li> | |
71 </ul> |