annotate app/views/pastes/_form.html.erb @ 219:56c4cd16d849

Correct place to put vendored assets is vendor/
author Edho Arief <edho@myconan.net>
date Sun, 12 May 2013 12:00:17 +0900
parents 0993715b455d
children c4aba8990c5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
1 <%= form_for(@paste) do |f| %>
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
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
14 <div class="field">
35
e09a3be8dd14 Hardcoded rows.
Edho Arief <edho@myconan.net>
parents: 29
diff changeset
15 <%= f.text_area :paste, :class => 'span12', :rows => 10 %>
189
b4b7a29b70f6 Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents: 56
diff changeset
16
213
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
17 <div class="form-horizontal">
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
18 <div class="control-group">
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
19 <%= f.label :key, "Deletion key", class: "control-label" %>
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
20 <div class="controls">
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
21 <%= f.text_field :key %>
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
22 </div>
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
23 </div>
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
24 <div class="control-group">
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
25 <%= f.label :is_private, "Make private", class: "control-label" %>
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
26 <div class="controls">
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
27 <%= f.check_box :is_private %>
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
28 </div>
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
29 </div>
0993715b455d Add make private checkbox
Edho Arief <edho@myconan.net>
parents: 189
diff changeset
30 </div>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
31 </div>
189
b4b7a29b70f6 Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents: 56
diff changeset
32
29
5cfc0b956083 Better action area.
Edho Arief <edho@myconan.net>
parents: 28
diff changeset
33 <div class="form-actions">
5cfc0b956083 Better action area.
Edho Arief <edho@myconan.net>
parents: 28
diff changeset
34 <%= f.submit :class => 'btn btn-primary' %>
39
a930c717654c Add Clear button to the form.
Edho Arief <edho@myconan.net>
parents: 35
diff changeset
35 <%= link_to 'Clear', root_path, :class => 'btn', :id => 'reset_paste' %>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
36 </div>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
37 <% end %>