diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-07-02 13:03:43 -0400 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-07-02 13:03:43 -0400 |
| commit | e47e83cf6bded3d1924b4d500193e7876833ef83 (patch) | |
| tree | 058f011637e67455dcd8451fbfa784b5883c6f69 /app/views/admin/blogs/_form.html.haml | |
| parent | 528ccde8915cd1ed7a39e137dd4d98869797956a (diff) | |
| download | thoughts-e47e83cf6bded3d1924b4d500193e7876833ef83.tar.gz thoughts-e47e83cf6bded3d1924b4d500193e7876833ef83.tar.bz2 thoughts-e47e83cf6bded3d1924b4d500193e7876833ef83.zip | |
Created admin panel
Currently allows you to create and edit blogs, including associated records. Uses a WYSIWYG editor that allows uploading images. Also included jQuery :(
Diffstat (limited to 'app/views/admin/blogs/_form.html.haml')
| -rw-r--r-- | app/views/admin/blogs/_form.html.haml | 23 |
1 files changed, 23 insertions, 0 deletions
| diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml new file mode 100644 index 0000000..55a297a --- /dev/null +++ b/app/views/admin/blogs/_form.html.haml | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | - if f.object.errors.any? | ||
| 2 | %ul#errors | ||
| 3 | - f.object.errors.full_messages.each do |error| | ||
| 4 | %li= error | ||
| 5 | %fieldset#content | ||
| 6 | .title-field | ||
| 7 | = f.label :title | ||
| 8 | = f.text_field :title, placeholder: "Title" | ||
| 9 | .slug-field | ||
| 10 | = f.label :slug, "https://feffernoo.se/says/" | ||
| 11 | = f.text_field :slug, placeholder: "insert-slug-here" | ||
| 12 | .body-field | ||
| 13 | = f.label :body | ||
| 14 | = f.cktext_area :body | ||
| 15 | %fieldset#details | ||
| 16 | .details-module | ||
| 17 | = f.fields_for :records, Record.new do |builder| | ||
| 18 | .should-create-record-field | ||
| 19 | = builder.check_box :_destroy, {checked: false}, "0", "1" | ||
| 20 | = builder.label :_destroy, "Create record?" | ||
| 21 | .record-description-field | ||
| 22 | = builder.text_area :description, placeholder: "record text" | ||
| 23 | .details-module= f.submit | ||
