diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-05-12 14:53:31 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-05-12 14:53:31 -0400 |
commit | b7c5853de5f0f04625eab6389cba9de8b02e48fb (patch) | |
tree | 1764a974e1b93b024c90f98246590d0bac5430ef /app/views/streams/index.html.haml | |
parent | 4016070f2caf30f576d0b0df8a65a7b4b468e951 (diff) | |
download | thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.tar.gz thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.tar.bz2 thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.zip |
Added streams index
Diffstat (limited to 'app/views/streams/index.html.haml')
-rw-r--r-- | app/views/streams/index.html.haml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/views/streams/index.html.haml b/app/views/streams/index.html.haml new file mode 100644 index 0000000..bf5073f --- /dev/null +++ b/app/views/streams/index.html.haml | |||
@@ -0,0 +1,19 @@ | |||
1 | %table#streams-index | ||
2 | %tr#streams-index-header-row | ||
3 | %th Stream Topic | ||
4 | %th Updates | ||
5 | %th Last Post | ||
6 | - @streams.each do |stream| | ||
7 | %tr | ||
8 | %td | ||
9 | = link_to stream.title, stream, class: "stream-link" | ||
10 | %br | ||
11 | %time= stream.created_at.strftime("%B #{stream.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") | ||
12 | %td= stream.updates.size | ||
13 | %td | ||
14 | - unless stream.updates.empty? | ||
15 | - latest_post = stream.updates.order(created_at: :desc).first | ||
16 | = link_to (stripped_markdown(latest_post.body)[0, 30] + "..."), stream | ||
17 | %br | ||
18 | %time= latest_post.created_at.strftime("%B #{latest_post.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") | ||
19 | = will_paginate @streams | ||