From add9b67c8a04f2a9361c165f48acc7aa376bb960 Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Sun, 27 Jan 2013 01:48:32 -0500 Subject: [PATCH] Added labes for sticky and locked topics --- app/views/forums/index.html.erb | 3 ++- app/views/forums/show.html.erb | 11 +++++++++-- app/views/topics/show.html.erb | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index fd37e29..e867eed 100755 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -22,7 +22,8 @@ <%= image_tag 'ruby.png' %> - <%= link_to forum.title, forum_path(forum) %>
+ <%= link_to forum.title, forum_path(forum) %> +
<%= forum.description %>
<%= forum.topics.size %> diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 305069b..5f41a2d 100755 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -30,8 +30,15 @@ <% @topics.each do |topic| %> <%= image_tag 'ruby.png' %> - - <%= link_to topic.title, topic_path(topic) %>
+ + <% if topic.sticky %> + Sticky + <% end %> + <% if topic.locked %> + Locked + <% end %> + <%= link_to topic.title, topic_path(topic) %> +
by <%= topic.user.username %> <%= topic.posts.size - 1 %> diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 4115bd8..a0ecbea 100755 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -1,6 +1,12 @@
<%= link_to "Back to Forum", forum_path(@topic.forum) %>
+ <% if @topic.sticky %> + Sticky + <% end %> + <% if @topic.locked %> + Locked + <% end %> <%= @topic.title %> <%= link_to "Edit", edit_topic_path(@topic) if can? :manage, @topic %>