comparison app/views/pastes/show.html.erb @ 190:d4682cea8e58

Fun with alerts.
author Edho Arief <edho@myconan.net>
date Sat, 23 Feb 2013 14:31:34 +0900
parents b4b7a29b70f6
children 22c4b5f90e24
comparison
equal deleted inserted replaced
189:b4b7a29b70f6 190:d4682cea8e58
1 <% provide :title, "Paste ##{@paste.id}" %> 1 <% provide :title, "Paste ##{@paste.id}" %>
2
3 <% if flash[:error] %>
4 <div class="alert alert-error">
5 <%= flash[:error] %>
6 </div>
7 <% end %>
8
2 <div class="page-header"> 9 <div class="page-header">
3 <h1><%= content_for :title %></h1> 10 <h1><%= content_for :title %></h1>
4 </div> 11 </div>
5 12
6 <div id="paste-show" class="tabbable" data-id="<%= @paste.id %>"> 13 <div id="paste-show" class="tabbable" data-id="<%= @paste.id %>">
36 </div> 43 </div>
37 </div> 44 </div>
38 45
39 <div class="input-append"> 46 <div class="input-append">
40 <%= form_for @paste, :method => :delete do |f| %> 47 <%= form_for @paste, :method => :delete do |f| %>
41 <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key' %> 48 <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :autofocus => !flash[:error].blank? %>
42 <%= f.submit 'Delete this paste', :class => 'btn btn-danger' %> 49 <%= f.submit 'Delete this paste', :class => 'btn btn-danger' %>
43 <% end %> 50 <% end %>
44 </div> 51 </div>
45 52
46 <div> 53 <div>