diff options
Diffstat (limited to 'app/views/admin/updates')
-rw-r--r-- | app/views/admin/updates/_form.html.haml | 22 | ||||
-rw-r--r-- | app/views/admin/updates/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/updates/new.html.haml | 2 |
3 files changed, 26 insertions, 0 deletions
diff --git a/app/views/admin/updates/_form.html.haml b/app/views/admin/updates/_form.html.haml new file mode 100644 index 0000000..9dd8741 --- /dev/null +++ b/app/views/admin/updates/_form.html.haml | |||
@@ -0,0 +1,22 @@ | |||
1 | %fieldset#content | ||
2 | .title-field | ||
3 | = f.label :title | ||
4 | = f.text_field :title, value: @stream.title, readonly: true | ||
5 | .body-field | ||
6 | = f.label :body | ||
7 | = f.cktext_area :body | ||
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 | = f.fields_for :records, Record.new do |builder| | ||
17 | .should-create-record-field | ||
18 | = builder.check_box :_destroy, {checked: false}, "0", "1" | ||
19 | = builder.label :_destroy, "Create record?" | ||
20 | .record-description-field | ||
21 | = builder.text_area :description, placeholder: "record text" | ||
22 | .details-module= f.submit | ||
diff --git a/app/views/admin/updates/edit.html.haml b/app/views/admin/updates/edit.html.haml new file mode 100644 index 0000000..5651d23 --- /dev/null +++ b/app/views/admin/updates/edit.html.haml | |||
@@ -0,0 +1,2 @@ | |||
1 | = form_for @update, url: admin_stream_update_url(@stream, @update), html: { id: "entry-form" } do |f| | ||
2 | = render partial: "form", locals: { f: f } | ||
diff --git a/app/views/admin/updates/new.html.haml b/app/views/admin/updates/new.html.haml new file mode 100644 index 0000000..14c6d77 --- /dev/null +++ b/app/views/admin/updates/new.html.haml | |||
@@ -0,0 +1,2 @@ | |||
1 | = form_for @update, url: admin_stream_updates_url(@stream), html: { id: "entry-form" } do |f| | ||
2 | = render partial: "form", locals: { f: f } | ||