From 42d9db526d3aef2e08848d6bc587feaf3700db42 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 7 Jul 2018 16:23:04 -0400 Subject: Added tags Blogs and streams can now be tagged. Records now show the appropriate tags for an entry. Updates work oddly, because their records show the stream's tags, since updates do not have tags themselves. refs #2 --- app/views/records/_record.html.haml | 7 +++++++ app/views/records/index.html.haml | 8 +------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 app/views/records/_record.html.haml (limited to 'app/views/records') 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 @@ +%li + %span.description= link_to record.description, record.recordable.path + %ul.tags + %li.record-date= record.created_at.strftime("%m.%d.%y") + %li.entry-type{ class: "entry-type-#{record.recordable_type.downcase}" }= record.recordable_type + - record.recordable.taggable.tag_list.each do |tag| + %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 @@ -%ul#records - - @records.each do |record| - %li - %span.description= link_to record.description, record.recordable.path - %ul.tags - %li.record-date= record.created_at.strftime("%m.%d.%y") - %li.entry-type{ class: "entry-type-#{record.recordable_type.downcase}" }= record.recordable_type +%ul#records= render @records -- cgit 1.4.1