comparison app/views/pastes/show.html.erb @ 264:fa4a1ba990ae

Simplified pastes#show view.
author edogawaconan <me@myconan.net>
date Wed, 16 Oct 2013 02:19:36 +0900
parents a9c45375a656
children 6cca1ab53337
comparison
equal deleted inserted replaced
263:a9c45375a656 264:fa4a1ba990ae
9 <div class="page-header"> 9 <div class="page-header">
10 <h1><%= content_for :title %></h1> 10 <h1><%= content_for :title %></h1>
11 </div> 11 </div>
12 12
13 <div id="paste-show" data-id="<%= @paste.id %>"> 13 <div id="paste-show" data-id="<%= @paste.id %>">
14 <div class="row"><div class="col-lg-12"> 14 <ul id="paste-mode" class="nav nav-tabs">
15 <div class="btn-toolbar"> 15 <li><%= link_to 'Plain', '#pl', :data => { :toggle => 'pill' } %></li>
16 <div id="paste-mode" class="btn-group emul-radio" data-toggle="buttons"> 16 <li><%= link_to 'Highlight', '#hl', :data => { :toggle => 'pill' } %></li>
17 <%= link_to 'Plain', '#pl', :data => { :toggle => 'tab' }, :class => 'btn btn-default active' %> 17 <li><%= link_to 'Markdown', '#md', :data => { :toggle => 'pill' } %></li>
18 <%= link_to 'Highlight', '#hl', :data => { :toggle => 'tab' }, :class => 'btn btn-default' %> 18 </ul>
19 <%= link_to 'Markdown', '#md', :data => { :toggle => 'tab' }, :class => 'btn btn-default' %> 19
20 </div> 20 <div id="paste" class="tab-content">
21 </div>
22 </div></div>
23 <div class="row"><div id="paste" class="col-lg-12 tab-content">
24 <div class="tab-pane active" id="pl"> 21 <div class="tab-pane active" id="pl">
25 <pre><%= @paste.paste %></pre> 22 <pre><%= @paste.paste %></pre>
26 </div> 23 </div>
27 <div class="tab-pane" id="hl"> 24 <div class="tab-pane" id="hl">
28 <pre class="prettyprint linenums"></pre> 25 <pre class="prettyprint linenums"></pre>
29 </div> 26 </div>
30 <div class="tab-pane" id="md"> 27 <div class="tab-pane" id="md">
31 <div class="well"></div> 28 <div class="well"></div>
32 </div> 29 </div>
33 </div></div> 30 </div>
34 </div> 31 </div>
35 32
36 <div class="row"><div class="col-md-4"> 33 <%= form_for @paste, :method => :delete do |f| %>
37 <%= form_for @paste, :method => :delete do |f| %> 34 <div class="row"><div class="col-md-4">
38 <div class="input-group"> 35 <div class="input-group">
39 <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :class => "form-control", :autofocus => !flash[:error].blank? %> 36 <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :class => "form-control", :autofocus => !flash[:error].blank? %>
40 <span class="input-group-btn"> 37 <span class="input-group-btn">
41 <%= f.submit 'Delete this paste', :class => 'btn btn-danger' %> 38 <%= f.submit 'Delete this paste', :class => 'btn btn-danger' %>
42 </span> 39 </span>
43 </div> 40 </div>
44 <% end %> 41 </div></div>
45 </div></div> 42 <% end %>
46 43
47 <div> 44 <ul class="nav nav-pills">
48 <ul class="nav nav-pills"> 45 <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li>
49 <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li> 46 <li><%= link_to 'Derive', root_path(:base => @paste) %></li>
50 <li><%= link_to 'New paste based on this', root_path(:base => @paste) %></li> 47 <li><%= link_to 'More Paste', root_path %></li>
51 <li><%= link_to 'More Paste', root_path %></li> 48 </ul>
52 </ul>
53 </div>