view app/views/pastes/show.html.erb @ 311:408c4a17e1a6

Fix Gemfile groups.
author edogawaconan <me@myconan.net>
date Wed, 12 Mar 2014 19:58:51 +0900
parents 1a409564ffad
children 45bf99bfd48b
line wrap: on
line source

<% provide :title, "Paste ##{@paste.id}" %>

<% if alert %>
  <div class="alert alert-danger">
    <%= alert %>
  </div>
<% end %>

<div class="page-header">
  <h1><%= content_for :title %></h1>
</div>

<div id="paste-show" data-id="<%= @paste.id %>">
  <ul id="paste-mode" class="nav nav-tabs">
    <li class="active"><%= link_to 'Plain', '#pl', :data => { :toggle => 'pill' } %></li>
    <li><%= link_to 'Highlight', '#hl', :data => { :toggle => 'pill' } %></li>
    <li><%= link_to 'Markdown', '#md', :data => { :toggle => 'pill' } %></li>
  </ul>

  <div id="paste" class="tab-content">
    <div class="tab-pane active" id="pl">
      <pre><%= @paste.paste %></pre>
    </div>
    <div class="tab-pane" id="hl">
      <pre class="prettyprint linenums"></pre>
    </div>
    <div class="tab-pane" id="md">
      <div class="well"></div>
    </div>
  </div>
</div>

<%= form_for @paste, :method => :delete do |f| %>

  <div class="row"><div class="col-md-4">
    <div class="input-group">
      <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :class => "form-control", :autofocus => f.object.errors.any? %>
      <span class="input-group-btn">
        <%= f.button 'Delete this paste', :class => 'btn btn-danger' %>
      </span>
    </div>
  </div></div>
<% end %>

<ul class="nav nav-pills">
  <li><%= link_to 'Raw', paste_path(@paste, :txt) %></li>
  <li><%= link_to 'Derive', root_path(:base => @paste) %></li>
  <li><%= link_to 'More Paste', root_path %></li>
</ul>