Mercurial > zeropaste
annotate app/views/pastes/show.html.erb @ 398:851432f21603
Nope, failing at redesigning.
author | nanaya <me@myconan.net> |
---|---|
date | Sun, 06 Sep 2015 03:52:52 +0900 |
parents | 26f8c634052c |
children | d647e79136d8 |
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| %> | |
40 <div class="form-group <%= error_class f.object, :key %> col-sm-4"> | |
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 |
398 | 57 <hr /> |
58 <ul class="nav nav-pills"> | |
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> |