Mercurial > zeropaste
annotate app/views/pastes/show.html.erb @ 437:d31fe32da7a0
Finish updating to rails 5
author | nanaya <me@myconan.net> |
---|---|
date | Sat, 02 Jul 2016 17:04:25 +0900 |
parents | b2991317d4d7 |
children | 1fc5ddcde386 |
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]}", | |
12 :data => { :toggle => "tab" }, | |
13 :aria => { :controls => el[:target] }, | |
14 :role => "tab", | |
15 :class => "js-show-tab-#{el[:target]}" | |
16 %> | |
395 | 17 </li> |
18 <% end %> | |
398 | 19 </ul> |
20 </div></div> | |
21 | |
22 <div class="row js-showing-paste"><div class="col-xs-12"><div class="paste-show"> | |
23 <div class="tab-content"> | |
24 <div role="tabpanel" class="tab-pane active" id="pl"> | |
25 <pre class="paste-show__content"><code class="js-paste-pl"><%= @paste.paste %></code></pre> | |
26 </div> | |
27 | |
28 <div role="tabpanel" class="tab-pane" id="hl"> | |
420 | 29 <pre class="paste-show__content"><code class="js-paste-hl zp-hl lang-<%= @paste.language.try(:parameterize) %>"></code></pre> |
398 | 30 </div> |
31 | |
32 <div role="tabpanel" class="tab-pane" id="md"> | |
33 <div class="js-paste-md"></div> | |
34 </div> | |
35 </div> | |
36 </div></div></div> | |
37 | |
424 | 38 <div class="row"><div class="col-xs-12"> |
398 | 39 <%= form_for @paste, :method => :delete, :authenticity_token => false do |f| %> |
424 | 40 <div class="form-group form-group--narrow <%= error_class f.object, :key %>"> |
398 | 41 <div class="input-group"> |
42 <%= f.text_field :key, | |
43 :value => nil, | |
44 :placeholder => t("pastes.new.deletion_key"), | |
45 :autofocus => f.object.errors.any?, | |
434 | 46 :autocomplete => "off", |
398 | 47 :class => "form-control" |
48 %> | |
49 | |
50 <span class="input-group-btn"> | |
51 <%= f.button t(".delete"), :class => "btn btn-danger" %> | |
52 </span> | |
53 </div> | |
54 </div> | |
55 <% end %> | |
424 | 56 </div></div> |
2 | 57 |
412
634366b67312
Add extra padding so the links aren't stuck to bottom.
nanaya <me@myconan.net>
parents:
400
diff
changeset
|
58 <ul class="nav nav-pills paste-show__footer"> |
398 | 59 <li role="presentation"> |
60 <%= link_to t(".raw"), paste_path(@paste, :txt) %> | |
61 </li> | |
62 <li role="presentation"> | |
63 <%= link_to t(".derive"), root_path(:base => @paste) %> | |
64 </li> | |
65 <li role="presentation"> | |
66 <%= link_to t(".more"), root_path %> | |
67 </li> | |
68 </ul> |