Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 480
- Log:
Deal with odd historical data item which had a 'nil' creator in the forum list.
- Author:
- rool
- Date:
- Sun May 24 04:29:25 +0100 2020
- Size:
- 3189 Bytes
1 | <% content_for :right do %> |
2 | |
3 | <% unless @forum.description.blank? %> |
4 | <h3>Description</h3> |
5 | <%= @forum.description_html %> |
6 | <% end %> |
7 | |
8 | <% if @forum.moderators.any? -%> |
9 | <h3>Moderators</h3> |
10 | |
11 | <ul class="flat" style="margin-top:1em;"> |
12 | <% @forum.moderators.each do |user| -%> |
13 | <li><%= link_to user.display_name, user_path(user) %></li> |
14 | <% end -%> |
15 | </ul> |
16 | <% else -%> |
17 | <h3>Unmoderated</h3> |
18 | |
19 | <p>This forum is currently unmoderated.</p> |
20 | <p>Please always be courteous.</p> |
21 | <% end -%> |
22 | |
23 | <% end %> |
24 | |
25 | <% @page_title = @forum.name %> |
26 | |
27 | <div class="crumbs"> |
28 | <%= link_to "Forums", home_path %> <span class="arrow">→</span> |
29 | </div> |
30 | <h1 style="margin-top:0.5em"> |
31 | <%= h @forum.name %> |
32 | </h1> |
33 | |
34 | <p class="subtitle"> |
35 | <%= feed_icon_tag @forum.name, formatted_forum_posts_path(@forum, :rss) %> |
36 | <%= pluralize @forum.topics_count, 'topic' %>, <%= pluralize @forum.posts_count, 'post' %> |
37 | </p> |
38 | |
39 | <% if @topic_pages.page_count > 1 -%> |
40 | <p> |
41 | <%= link_to 'New topic', new_topic_path(@forum) %> | |
42 | Pages: <strong><%= pagination_links @topic_pages, :window_size => 10 %></strong> |
43 | </p> |
44 | <% end -%> |
45 | |
46 | <table border="0" cellspacing="0" cellpadding="0" class="wide topics"> |
47 | <tr> |
48 | <th class="la" colspan="2">Topic</th> |
49 | <th width="1%">Posts</th> |
50 | <th width="1%">Views</th> |
51 | <th class="la">Last post</th> |
52 | </tr> |
53 | <% for topic in @topics %> |
54 | <tr class="hentry"> |
55 | <td style="padding:5px; width:16px;" class="c1"> |
56 | <% |
57 | icon = "comment" |
58 | color = "" |
59 | if topic.locked? |
60 | icon = "lock" |
61 | post = ", this topic is locked." |
62 | color = "darkgrey" |
63 | end |
64 | %> |
65 | <% if recent_topic_activity(topic) %> |
66 | <%= image_tag "clearbits/#{icon}.gif", :class => "icon green", :title => "Recent activity#{post}" %> |
67 | <% else %> |
68 | <%= image_tag "clearbits/#{icon}.gif", :class => "icon grey #{color}", :title => "No recent activity#{post}" %> |
69 | <% end %> |
70 | </td> |
71 | <td class="c2"> |
72 | <%= "Sticky: <strong>" if topic.sticky? %> |
73 | <%= link_to h(topic.title), topic_path(@forum, topic), :class => "entry-title", :rel => "bookmark" %> |
74 | <%= "</strong>" if topic.sticky? %> |
75 | <% if topic.paged? -%> |
76 | <small><%= link_to 'last', topic_path(:forum_id => @forum, :id => topic, :page => topic.last_page) %></small> |
77 | <% end -%> |
78 | </td> |
79 | <td class="ca inv stat"><%= topic.posts_count-1 %></td> |
80 | <td class="ca inv stat"><%= number_with_delimiter(topic.views) %></td> |
81 | <td class="lp"> |
82 | <abbr class="updated" title="<%= topic.replied_at.xmlschema %>"><%= time_ago_in_words(topic.replied_at) %></abbr> |
83 | by <span class="author"><strong class="fn"><%= h(topic.replied_by_user.blank? ? 'Unknown' : topic.replied_by_user.display_name) %></strong></span> |
84 | <span><%= link_to 'view', topic_path(:forum_id => @forum, :id => topic, :page => topic.last_page, :anchor => "posts-#{topic.last_post_id}") %></span> |
85 | </td> |
86 | </tr> |
87 | <% end %> |
88 | </table> |
89 | |
90 | <p> |
91 | <%= link_to 'New topic', new_topic_path(@forum) %> |
92 | <% if @topic_pages.page_count > 1 -%> |
93 | | Pages: <strong><%= pagination_links @topic_pages, :window_size => 10 %></strong> |
94 | <% end -%> |
95 | <% if @topic_pages and @topic_pages.current.next %> |
96 | | <%= link_to "Next page", { :page => @topic_pages.current.next }.merge(params.reject{|k,v| k=="page"}) %> |
97 | <% end %> |
98 | </p> |