diff options
Diffstat (limited to 'app/views/admin/quotes/_form.html.haml')
-rw-r--r-- | app/views/admin/quotes/_form.html.haml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/views/admin/quotes/_form.html.haml b/app/views/admin/quotes/_form.html.haml new file mode 100644 index 0000000..920835b --- /dev/null +++ b/app/views/admin/quotes/_form.html.haml | |||
@@ -0,0 +1,27 @@ | |||
1 | %fieldset#content | ||
2 | %h2 Quote ##{f.object.id} | ||
3 | .halfbody-field | ||
4 | = f.label :content | ||
5 | = f.text_area :content | ||
6 | %h3 Notes | ||
7 | .halfbody-field | ||
8 | = f.label :notes | ||
9 | = f.text_area :notes | ||
10 | %fieldset#details | ||
11 | - if f.object.errors.any? | ||
12 | #errors.details-module | ||
13 | %h3 Error! | ||
14 | %ul | ||
15 | - f.object.errors.full_messages.each do |error| | ||
16 | %li= error | ||
17 | - unless f.object.new_record? | ||
18 | #entry-preview-link.details-module= link_to "View quote", quote_url(f.object.id), target: "entry-preview" | ||
19 | .details-module | ||
20 | .tags-field | ||
21 | = f.label :tag_list, "Tags" | ||
22 | = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",") | ||
23 | .details-module | ||
24 | .published-field | ||
25 | = f.label :state | ||
26 | = f.select :state, Quote.state.options | ||
27 | .details-module= f.submit | ||