From c650bee03937bd0e741e701f1fe0bfe5cf8e040e Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 12 Aug 2018 07:10:16 -0400 Subject: Add link entry type --- app/views/admin/links/_form.html.haml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 app/views/admin/links/_form.html.haml (limited to 'app/views/admin/links/_form.html.haml') 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 @@ +%fieldset#content + .title-field + = f.label :title + = f.text_field :title, placeholder: "Title" + .url-field + = f.label :url + = f.text_field :url, placeholder: "URL" +%fieldset#details + - if f.object.errors.any? + #errors.details-module + %h3 Error! + %ul + - f.object.errors.full_messages.each do |error| + %li= error + .details-module + .tags-field + = f.label :tag_list, "Tags" + = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",") + .details-module + = f.fields_for :records, Record.new do |builder| + .should-create-record-field + = builder.check_box :_destroy, {checked: false}, "0", "1" + = builder.label :_destroy, "Create record?" + .record-description-field + = builder.text_area :description, placeholder: "record text" + .details-module= f.submit -- cgit 1.4.1