Mercurial > zeropaste
diff 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 |
line wrap: on
line diff
--- a/app/views/pastes/show.html.erb Mon Nov 12 09:44:44 2012 +0700 +++ b/app/views/pastes/show.html.erb Mon Nov 12 10:42:00 2012 +0700 @@ -3,7 +3,25 @@ <div class="page-header"> <h1><%= content_for :title %></h1> </div> -<pre class="prettyprint linenums"><%= @paste.paste.gsub(/^$/, ' ') %></pre> + +<div class="tabbable"> + <ul class="nav nav-tabs"> + <li class="active"><%= link_to 'Plain', '#plain', :data => { :toggle => 'tab' } %></li> + <li><%= link_to 'Highlight', '#highlight', :data => { :toggle => 'tab' } %></li> + <li><%= link_to 'Markdown', '#markdown', :data => { :toggle => 'tab' } %></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="plain"> + <pre><%= @paste.paste %></pre> + </div> + <div class="tab-pane" id="highlight"> + <pre class="prettyprint linenums"></pre> + </div> + <div class="tab-pane" id="markdown"> + <div></div> + </div> + </div> +</div> <ul class="nav nav-pills"> <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li>