Mercurial > zeropaste
annotate app/views/pastes/show.html.erb @ 261:f057e8c78e50
Fix /show.
author | edogawaconan <me@myconan.net> |
---|---|
date | Tue, 15 Oct 2013 22:40:08 +0900 |
parents | 2d5c09a73958 |
children | a9c45375a656 |
rev | line source |
---|---|
98 | 1 <% provide :title, "Paste ##{@paste.id}" %> |
190 | 2 |
3 <% if flash[:error] %> | |
4 <div class="alert alert-error"> | |
5 <%= flash[:error] %> | |
6 </div> | |
7 <% end %> | |
8 | |
43
bc088ddb470f
Added page header div for show.
Edho Arief <edho@myconan.net>
parents:
42
diff
changeset
|
9 <div class="page-header"> |
98 | 10 <h1><%= content_for :title %></h1> |
43
bc088ddb470f
Added page header div for show.
Edho Arief <edho@myconan.net>
parents:
42
diff
changeset
|
11 </div> |
100
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
12 |
261 | 13 <div id="paste-show" data-id="<%= @paste.id %>"> |
14 <div class="row"><div class="col-lg-12"> | |
15 <div class="btn-toolbar"> | |
16 <div id="paste-mode" class="btn-group emul-radio" data-toggle="buttons"> | |
17 <%= link_to 'Plain', '#pl', :data => { :toggle => 'tab' }, :class => 'btn btn-default active' %> | |
18 <%= link_to 'Highlight', '#hl', :data => { :toggle => 'tab' }, :class => 'btn btn-default' %> | |
19 <%= link_to 'Markdown', '#md', :data => { :toggle => 'tab' }, :class => 'btn btn-default' %> | |
20 </div> | |
21 <div class="btn-group" id="paste-resize"> | |
22 <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-base="Width: :size:" href="#"> | |
23 <span id="width-text">Width: auto</span> | |
24 <span class="caret"></span> | |
25 </a> | |
26 <ul class="dropdown-menu"> | |
27 <li><a href="#">auto</a></li> | |
28 <li><a href="#">560px</a></li> | |
29 <li><a href="#">760px</a></li> | |
30 <li><a href="#">960px</a></li> | |
31 </ul> | |
32 </div> | |
125
64f73525503b
Use button toolbar instead of nav.
Edho Arief <edho@myconan.net>
parents:
115
diff
changeset
|
33 </div> |
261 | 34 </div></div> |
35 <div class="row"><div id="paste" class="col-lg-12 tab-content"> | |
214
22c4b5f90e24
Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
190
diff
changeset
|
36 <div class="tab-pane active" id="pl"> |
100
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
37 <pre><%= @paste.paste %></pre> |
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
38 </div> |
214
22c4b5f90e24
Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
190
diff
changeset
|
39 <div class="tab-pane" id="hl"> |
100
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
40 <pre class="prettyprint linenums"></pre> |
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
41 </div> |
214
22c4b5f90e24
Massive javascript and html refactor. Also, ie9
Edho Arief <edho@myconan.net>
parents:
190
diff
changeset
|
42 <div class="tab-pane" id="md"> |
105 | 43 <div class="well"></div> |
100
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
44 </div> |
261 | 45 </div></div> |
100
90b59418828a
Three times more fun with tabs (added plain and markdown tab).
Edho Arief <edho@myconan.net>
parents:
98
diff
changeset
|
46 </div> |
2 | 47 |
261 | 48 <div class="row"><div class="col-md-4"> |
189
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
179
diff
changeset
|
49 <%= form_for @paste, :method => :delete do |f| %> |
261 | 50 <div class="input-group"> |
51 <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :class => "form-control", :autofocus => !flash[:error].blank? %> | |
52 <span class="input-group-btn"> | |
53 <%= f.submit 'Delete this paste', :class => 'btn btn-danger' %> | |
54 </span> | |
55 </div> | |
189
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
179
diff
changeset
|
56 <% end %> |
261 | 57 </div></div> |
189
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
179
diff
changeset
|
58 |
107 | 59 <div> |
60 <ul class="nav nav-pills"> | |
61 <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li> | |
257 | 62 <li><%= link_to 'New paste based on this', root_path(:base => @paste) %></li> |
107 | 63 <li><%= link_to 'More Paste', root_path %></li> |
64 </ul> | |
65 </div> |