annotate app/views/pastes/show.html.erb @ 391:45fef9116924

Forgot to remove unused helper.
author nanaya <me@myconan.net>
date Sun, 07 Jun 2015 19:39:15 +0900
parents 91dabc034389
children 26f8c634052c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
98
58aa32120b54 Added paste id to title.
Edho Arief <edho@myconan.net>
parents: 90
diff changeset
1 <% provide :title, "Paste ##{@paste.id}" %>
190
d4682cea8e58 Fun with alerts.
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
2
261
f057e8c78e50 Fix /show.
edogawaconan <me@myconan.net>
parents: 257
diff changeset
3 <div id="paste-show" data-id="<%= @paste.id %>">
264
fa4a1ba990ae Simplified pastes#show view.
edogawaconan <me@myconan.net>
parents: 263
diff changeset
4 <ul id="paste-mode" class="nav nav-tabs">
288
c8757469da39 The magic hash was broken.
edogawaconan <me@myconan.net>
parents: 287
diff changeset
5 <li class="active"><%= link_to 'Plain', '#pl', :data => { :toggle => 'pill' } %></li>
264
fa4a1ba990ae Simplified pastes#show view.
edogawaconan <me@myconan.net>
parents: 263
diff changeset
6 <li><%= link_to 'Highlight', '#hl', :data => { :toggle => 'pill' } %></li>
fa4a1ba990ae Simplified pastes#show view.
edogawaconan <me@myconan.net>
parents: 263
diff changeset
7 <li><%= link_to 'Markdown', '#md', :data => { :toggle => 'pill' } %></li>
fa4a1ba990ae Simplified pastes#show view.
edogawaconan <me@myconan.net>
parents: 263
diff changeset
8 </ul>
fa4a1ba990ae Simplified pastes#show view.
edogawaconan <me@myconan.net>
parents: 263
diff changeset
9
390
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
10 <div id="paste">
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
11 <% lines = @paste.paste.split("\n") %>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
12 <%# list number contains <n> + "." + <2.5 * spaces (approx)> %>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
13 <ol style="padding-left: <%= lines.size.to_s.length + 4 %>ch">
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
14 <% lines.each.with_index(1) do |line, i| %>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
15 <li id="L<%= i %>">
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
16 <%= line %>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
17 </li>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
18 <% end %>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
19 </ol>
264
fa4a1ba990ae Simplified pastes#show view.
edogawaconan <me@myconan.net>
parents: 263
diff changeset
20 </div>
100
90b59418828a Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents: 98
diff changeset
21 </div>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
22
390
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
23 <nav id="paste-show-nav">
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
24 <%= form_for @paste, :method => :delete, :authenticity_token => false do |f| %>
265
6cca1ab53337 Infinitely better error messages and notice.
edogawaconan <me@myconan.net>
parents: 264
diff changeset
25
390
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
26 <div class="row"><div class="col-md-4">
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
27 <div class="input-group">
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
28 <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :class => "form-control", :autofocus => f.object.errors.any? %>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
29 <span class="input-group-btn">
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
30 <%= f.button 'Delete this paste', :class => 'btn btn-danger' %>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
31 </span>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
32 </div>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
33 </div></div>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
34 <% end %>
189
b4b7a29b70f6 Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents: 179
diff changeset
35
390
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
36 <ul class="nav nav-pills">
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
37 <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
38 <li><%= link_to 'Derive', root_path(:base => @paste) %></li>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
39 <li><%= link_to 'More Paste', root_path %></li>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
40 </ul>
91dabc034389 Improved styling for show.
nanaya <me@myconan.net>
parents: 388
diff changeset
41 </nav>