diff options
Diffstat (limited to 'app/views/admin/streams')
| -rw-r--r-- | app/views/admin/streams/_form.html.haml | 6 | ||||
| -rw-r--r-- | app/views/admin/streams/edit.html.haml | 3 | ||||
| -rw-r--r-- | app/views/admin/streams/index.html.haml | 5 | ||||
| -rw-r--r-- | app/views/admin/streams/new.html.haml | 1 |
4 files changed, 11 insertions, 4 deletions
| diff --git a/app/views/admin/streams/_form.html.haml b/app/views/admin/streams/_form.html.haml index ce457cb..a4d8c46 100644 --- a/app/views/admin/streams/_form.html.haml +++ b/app/views/admin/streams/_form.html.haml | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | = f.text_field :slug, placeholder: "insert-slug-here" | 7 | = f.text_field :slug, placeholder: "insert-slug-here" |
| 8 | .body-field | 8 | .body-field |
| 9 | = f.label :body | 9 | = f.label :body |
| 10 | = f.cktext_area :body | 10 | = f.text_area :body |
| 11 | %fieldset#details | 11 | %fieldset#details |
| 12 | - if f.object.errors.any? | 12 | - if f.object.errors.any? |
| 13 | #errors.details-module | 13 | #errors.details-module |
| @@ -16,6 +16,10 @@ | |||
| 16 | - f.object.errors.full_messages.each do |error| | 16 | - f.object.errors.full_messages.each do |error| |
| 17 | %li= error | 17 | %li= error |
| 18 | .details-module | 18 | .details-module |
| 19 | .tags-field | ||
| 20 | = f.label :tag_list, "Tags" | ||
| 21 | = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",") | ||
| 22 | .details-module | ||
| 19 | = f.fields_for :records, Record.new do |builder| | 23 | = f.fields_for :records, Record.new do |builder| |
| 20 | .should-create-record-field | 24 | .should-create-record-field |
| 21 | = builder.check_box :_destroy, {checked: false}, "0", "1" | 25 | = builder.check_box :_destroy, {checked: false}, "0", "1" |
| diff --git a/app/views/admin/streams/edit.html.haml b/app/views/admin/streams/edit.html.haml index 1b58331..8c250e2 100644 --- a/app/views/admin/streams/edit.html.haml +++ b/app/views/admin/streams/edit.html.haml | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | = form_for @stream, url: admin_stream_url(@stream), html: { id: "entry-form" } do |f| | 1 | - title "Editing #{@stream.title}" |
| 2 | = form_for @stream, url: admin_stream_url(@stream.id), html: { id: "entry-form" } do |f| | ||
| 2 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
| diff --git a/app/views/admin/streams/index.html.haml b/app/views/admin/streams/index.html.haml index c69c6f9..a2a25d7 100644 --- a/app/views/admin/streams/index.html.haml +++ b/app/views/admin/streams/index.html.haml | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | - title "Streams" | ||
| 1 | %table#entries | 2 | %table#entries |
| 2 | %tr | 3 | %tr |
| 3 | %th Title | 4 | %th Title |
| @@ -9,5 +10,5 @@ | |||
| 9 | %td= stream.created_at.strftime("%B %d, %Y, %l:%M%P") | 10 | %td= stream.created_at.strftime("%B %d, %Y, %l:%M%P") |
| 10 | %td | 11 | %td |
| 11 | %ul.admin-actions | 12 | %ul.admin-actions |
| 12 | %li= link_to "Edit", edit_admin_stream_url(stream) | 13 | %li= link_to "Edit", edit_admin_stream_url(stream.id) |
| 13 | %li= link_to "Add Update", new_admin_stream_update_url(stream) | 14 | %li= link_to "Add Update", new_admin_stream_update_url(stream.id) |
| diff --git a/app/views/admin/streams/new.html.haml b/app/views/admin/streams/new.html.haml index 52febf5..875805a 100644 --- a/app/views/admin/streams/new.html.haml +++ b/app/views/admin/streams/new.html.haml | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | - title "New stream" | ||
| 1 | = form_for @stream, url: admin_streams_url, html: { id: "entry-form" } do |f| | 2 | = form_for @stream, url: admin_streams_url, html: { id: "entry-form" } do |f| |
| 2 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
