Mercurial > zeropaste
annotate app/views/pastes/show.html.erb @ 413:39d59ae9d9db
Good enough without the line.
author | nanaya <me@myconan.net> |
---|---|
date | Mon, 07 Sep 2015 21:56:42 +0900 |
parents | 634366b67312 |
children | 080dd141898c |
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"> | |
29 <pre class="paste-show__content"><code class="js-paste-hl zp-hl"></code></pre> | |
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 | |
38 <div class="row"> | |
39 <%= form_for @paste, :method => :delete, :authenticity_token => false do |f| %> | |
400 | 40 <div class="form-group <%= error_class f.object, :key %> col-sm-6"> |
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 %> | |
100
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
55 </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> |