diff options
Diffstat (limited to 'app/views/admin/links/_form.html.haml')
-rw-r--r-- | app/views/admin/links/_form.html.haml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/views/admin/links/_form.html.haml b/app/views/admin/links/_form.html.haml new file mode 100644 index 0000000..c624a3d --- /dev/null +++ b/app/views/admin/links/_form.html.haml | |||
@@ -0,0 +1,26 @@ | |||
1 | %fieldset#content | ||
2 | .title-field | ||
3 | = f.label :title | ||
4 | = f.text_field :title, placeholder: "Title" | ||
5 | .url-field | ||
6 | = f.label :url | ||
7 | = f.text_field :url, placeholder: "URL" | ||
8 | %fieldset#details | ||
9 | - if f.object.errors.any? | ||
10 | #errors.details-module | ||
11 | %h3 Error! | ||
12 | %ul | ||
13 | - f.object.errors.full_messages.each do |error| | ||
14 | %li= error | ||
15 | .details-module | ||
16 | .tags-field | ||
17 | = f.label :tag_list, "Tags" | ||
18 | = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",") | ||
19 | .details-module | ||
20 | = f.fields_for :records, Record.new do |builder| | ||
21 | .should-create-record-field | ||
22 | = builder.check_box :_destroy, {checked: false}, "0", "1" | ||
23 | = builder.label :_destroy, "Create record?" | ||
24 | .record-description-field | ||
25 | = builder.text_area :description, placeholder: "record text" | ||
26 | .details-module= f.submit | ||