Mercurial > zeropaste
annotate app/views/pastes/show.html.erb @ 432:b6cabed63bc7
Add missing translation
author | nanaya <me@myconan.net> |
---|---|
date | Fri, 13 May 2016 03:59:39 +0900 |
parents | 967233b26404 |
children | b2991317d4d7 |
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?, | |
46 :class => "form-control" | |
47 %> | |
48 | |
49 <span class="input-group-btn"> | |
50 <%= f.button t(".delete"), :class => "btn btn-danger" %> | |
51 </span> | |
52 </div> | |
53 </div> | |
54 <% end %> | |
424 | 55 </div></div> |
2 | 56 |
412
634366b67312
Add extra padding so the links aren't stuck to bottom.
nanaya <me@myconan.net>
parents:
400
diff
changeset
|
57 <ul class="nav nav-pills paste-show__footer"> |
398 | 58 <li role="presentation"> |
59 <%= link_to t(".raw"), paste_path(@paste, :txt) %> | |
60 </li> | |
61 <li role="presentation"> | |
62 <%= link_to t(".derive"), root_path(:base => @paste) %> | |
63 </li> | |
64 <li role="presentation"> | |
65 <%= link_to t(".more"), root_path %> | |
66 </li> | |
67 </ul> |