diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/blogs/_form.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/streams/_form.html.haml | 4 | ||||
-rw-r--r-- | app/views/records/_record.html.haml | 7 | ||||
-rw-r--r-- | app/views/records/index.html.haml | 8 |
4 files changed, 16 insertions, 7 deletions
diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml index 12f7a82..36925af 100644 --- a/app/views/admin/blogs/_form.html.haml +++ b/app/views/admin/blogs/_form.html.haml | |||
@@ -22,6 +22,10 @@ | |||
22 | - else | 22 | - else |
23 | = link_to "Preview post", admin_blog_url(f.object), target: "entry-preview" | 23 | = link_to "Preview post", admin_blog_url(f.object), target: "entry-preview" |
24 | .details-module | 24 | .details-module |
25 | .tags-field | ||
26 | = f.label :tag_list, "Tags" | ||
27 | = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",") | ||
28 | .details-module | ||
25 | .published-field | 29 | .published-field |
26 | = f.check_box :published | 30 | = f.check_box :published |
27 | = f.label :published | 31 | = f.label :published |
diff --git a/app/views/admin/streams/_form.html.haml b/app/views/admin/streams/_form.html.haml index ce457cb..e04a3fb 100644 --- a/app/views/admin/streams/_form.html.haml +++ b/app/views/admin/streams/_form.html.haml | |||
@@ -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/records/_record.html.haml b/app/views/records/_record.html.haml new file mode 100644 index 0000000..80a365c --- /dev/null +++ b/app/views/records/_record.html.haml | |||
@@ -0,0 +1,7 @@ | |||
1 | %li | ||
2 | %span.description= link_to record.description, record.recordable.path | ||
3 | %ul.tags | ||
4 | %li.record-date= record.created_at.strftime("%m.%d.%y") | ||
5 | %li.entry-type{ class: "entry-type-#{record.recordable_type.downcase}" }= record.recordable_type | ||
6 | - record.recordable.taggable.tag_list.each do |tag| | ||
7 | %li.entry-tag= tag | ||
diff --git a/app/views/records/index.html.haml b/app/views/records/index.html.haml index 200321e..4ceed2c 100644 --- a/app/views/records/index.html.haml +++ b/app/views/records/index.html.haml | |||
@@ -1,7 +1 @@ | |||
1 | %ul#records | %ul#records= render @records | |
2 | - @records.each do |record| | ||
3 | %li | ||
4 | %span.description= link_to record.description, record.recordable.path | ||
5 | %ul.tags | ||
6 | %li.record-date= record.created_at.strftime("%m.%d.%y") | ||
7 | %li.entry-type{ class: "entry-type-#{record.recordable_type.downcase}" }= record.recordable_type | ||