comparison app/views/pastes/show.html.erb @ 100:90b59418828a

Three times more fun with tabs (added plain and markdown tab).
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 10:42:00 +0700
parents 58aa32120b54
children 17f682a53b13
comparison
equal deleted inserted replaced
99:e0e99705e79d 100:90b59418828a
1 <% provide :title, "Paste ##{@paste.id}" %> 1 <% provide :title, "Paste ##{@paste.id}" %>
2 <% @skip_csrf = true %> 2 <% @skip_csrf = true %>
3 <div class="page-header"> 3 <div class="page-header">
4 <h1><%= content_for :title %></h1> 4 <h1><%= content_for :title %></h1>
5 </div> 5 </div>
6 <pre class="prettyprint linenums"><%= @paste.paste.gsub(/^$/, ' ') %></pre> 6
7 <div class="tabbable">
8 <ul class="nav nav-tabs">
9 <li class="active"><%= link_to 'Plain', '#plain', :data => { :toggle => 'tab' } %></li>
10 <li><%= link_to 'Highlight', '#highlight', :data => { :toggle => 'tab' } %></li>
11 <li><%= link_to 'Markdown', '#markdown', :data => { :toggle => 'tab' } %></li>
12 </ul>
13 <div class="tab-content">
14 <div class="tab-pane active" id="plain">
15 <pre><%= @paste.paste %></pre>
16 </div>
17 <div class="tab-pane" id="highlight">
18 <pre class="prettyprint linenums"></pre>
19 </div>
20 <div class="tab-pane" id="markdown">
21 <div></div>
22 </div>
23 </div>
24 </div>
7 25
8 <ul class="nav nav-pills"> 26 <ul class="nav nav-pills">
9 <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li> 27 <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li>
10 <li><%= link_to 'New paste based on this', root_path(:base => @paste.id) %></li> 28 <li><%= link_to 'New paste based on this', root_path(:base => @paste.id) %></li>
11 <li><%= link_to 'More Paste', root_path %></li> 29 <li><%= link_to 'More Paste', root_path %></li>