annotate app/views/pastes/_form.html.erb @ 261:f057e8c78e50

Fix /show.
author edogawaconan <me@myconan.net>
date Tue, 15 Oct 2013 22:40:08 +0900
parents c4aba8990c5e
children 6cca1ab53337
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
260
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
1 <%= form_for @paste do |f| %>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
2 <% if @paste.errors.any? %>
56
8ef70e8c239d Bootstrap-styled error message.
Edho Arief <edho@myconan.net>
parents: 39
diff changeset
3 <div class="alert alert-error" id="error_explanation">
8ef70e8c239d Bootstrap-styled error message.
Edho Arief <edho@myconan.net>
parents: 39
diff changeset
4 <h5><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h5>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
5
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
6 <ul>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
7 <% @paste.errors.full_messages.each do |msg| %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
8 <li><%= msg %></li>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
9 <% end %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
10 </ul>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
11 </div>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
12 <% end %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
13
260
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
14 <div class="form-group">
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
15 <%= f.text_area :paste, :rows => 10, :class => "form-control" %>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
16 </div>
189
b4b7a29b70f6 Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents: 56
diff changeset
17
260
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
18 <div class="form-group">
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
19 <%= f.label :key, "Deletion key", class: "control-label" %>
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
20 <div class="row"><div class="col-sm-3">
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
21 <%= f.text_field :key, :class => "form-control" %>
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
22 </div></div>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
23 </div>
260
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
24 <div class="checkbox">
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
25 <%= f.label :is_private do %>
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
26 <%= f.check_box :is_private %>
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
27 Private
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
28 <% end %>
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
29 </div>
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
30 <%= f.submit :class => 'btn btn-primary' %>
c4aba8990c5e Fix new paste form.
edogawaconan <me@myconan.net>
parents: 213
diff changeset
31 <%= link_to 'Clear', root_path, :class => 'btn btn-danger', :id => 'reset_paste' %>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
32 <% end %>