Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 483
- Log:
Fix RedCloth link
- Author:
- rool
- Date:
- Wed Jan 03 20:48:40 +0000 2024
- Size:
- 6365 Bytes
1 | <% @page_title = @topic.title %> |
2 | <% @monitoring = logged_in? && !Monitorship.count(:all, :conditions => ['user_id = ? and topic_id = ? and active = ?', current_user.id, @topic.id, true]).zero? %> |
3 | |
4 | <% content_for :right do -%> |
5 | <% unless @forum.description.blank? %> |
6 | <h3>Description</h3> |
7 | <%= @forum.description_html %> |
8 | <% end %> |
9 | |
10 | <h3>Voices</h3> |
11 | <ul class="flat talking"> |
12 | <% @voices.each do | user | %> |
13 | <li><%= link_to h(user.display_name), user_path(user) %></li> |
14 | <% end %> |
15 | </ul> |
16 | |
17 | |
18 | <% end # right content -%> |
19 | |
20 | <% if logged_in? -%> |
21 | <% form_tag monitorships_path(@forum, @topic) + (@monitoring ? '/destroy' : ''), :style => 'margin-top:0em; float:right;' do -%> |
22 | <div> |
23 | <input id="monitor_checkbox" type="checkbox" <%= "checked='checked'" if @monitoring %> /> |
24 | <label id="monitor_label" for="monitor_checkbox">Watch<%= "ing" if @monitoring %> topic</label> |
25 | <%= submit_tag :Set, :id => 'monitor_submit' %> |
26 | </div> |
27 | <% end -%> |
28 | <% end -%> |
29 | |
30 | |
31 | <div class="crumbs"> |
32 | <%= link_to "Forums", home_path %> <span class="arrow">→</span> |
33 | <%= link_to h(@topic.forum.name), forum_path(@topic.forum) %> <span class="arrow">→</span> |
34 | </div> |
35 | |
36 | <h1 id="topic-title" style="margin-top:0.5em;"<%= %( onmouseover="$('topic_mod').show();" onmouseout="$('topic_mod').hide();") if logged_in? %>> |
37 | |
38 | |
39 | <%= h @topic.title %> |
40 | <% if @topic.locked? %> |
41 | <span>(locked)</span> |
42 | <% end %> |
43 | <% if logged_in? %> |
44 | <% if (current_user.admin? && @topic.editable_by?(current_user)) -%> |
45 | <span id="topic_mod"> |
46 | <%= link_to('edit', edit_topic_path(@forum, @topic), :class => "utility") %> |
47 | <% form_for(:topic, |
48 | { |
49 | :html => { |
50 | :method => :delete, |
51 | :class => 'xdialog', |
52 | :style => 'display:inline', |
53 | :onsubmit => 'return confirm("Delete this topic forever?");' |
54 | }, |
55 | :url => topic_path(@forum, @topic) |
56 | } |
57 | ) do |f| -%> |
58 | <%= submit_tag 'Delete' %> |
59 | <% end -%> |
60 | </span> |
61 | <% end -%> |
62 | <% end %> |
63 | </h1> |
64 | |
65 | <p class="subtitle"> |
66 | <%= feed_icon_tag @topic.title, formatted_topic_path(@forum, @topic, :rss) %> |
67 | <%= pluralize @topic.posts.count, 'post' %>, <%= pluralize @topic.voices, 'voice' %> |
68 | </p> |
69 | |
70 | <% if @post_pages.page_count > 1 -%> |
71 | <div style="float: right; white-space: nowrap"> |
72 | <% form_tag( @posts, { :method => 'get' } ) do %> |
73 | <%= hidden_field_tag(:q, params[:q] ) if params.has_key?(:q) %> |
74 | <small> |
75 | Posts per page: |
76 | <%= |
77 | select_tag( |
78 | 'posts_per_page', |
79 | options_for_select( |
80 | ['25', '50', '100'], |
81 | params[:posts_per_page] |
82 | ), |
83 | :id => nil |
84 | ) |
85 | %> |
86 | </small> |
87 | <%= submit_tag( 'Change', { :name => 'posts_per_page_change', :style => 'font-size: 9pt' } ) %> |
88 | <% end %> |
89 | </div> |
90 | <p class="pages">Pages: <strong><%= topicshelp_pagination_links_for( @post_pages ) %></strong></p> |
91 | <% end -%> |
92 | |
93 | <a name="<%= @posts.first.dom_id %>" id="<%= @posts.first.dom_id %>" class="spacer_link"> </a> |
94 | |
95 | <table border="0" cellspacing="0" cellpadding="0" class="posts wide"> |
96 | <% for post in @posts do %> |
97 | <% unless post == @posts.first %> |
98 | <tr class="spacer"> |
99 | <td colspan="2"> |
100 | <a name="<%= post.dom_id %>" id="<%= post.dom_id %>" class="spacer_link"> </a> |
101 | </td> |
102 | </tr> |
103 | <% end %> |
104 | <tr class="post hentry" id="<%= post.dom_id %>-row"> |
105 | <td class="author vcard"> |
106 | <div class="date"> |
107 | <a href="#<%= post.dom_id %>" rel="bookmark"> |
108 | <abbr class="updated" title="<%= post.created_at.xmlschema %>"> |
109 | <%= time_ago_in_words(post.created_at) %> |
110 | </abbr> |
111 | </a> |
112 | </div> |
113 | |
114 | <%= avatar_for post.user %> |
115 | <span class="fn"><%= link_to h(post.user.display_name), user_path(post.user), :class => (post.user == @posts.first.user ? "admin" : nil) %></span> |
116 | <span class="posts"><%= pluralize post.user.posts_count, 'post' %></span> |
117 | |
118 | <% if logged_in? && post.editable_by?(current_user) -%> |
119 | <p> |
120 | <span class="edit"> |
121 | <%= link_to('Edit post', edit_post_path(:forum_id => @forum, :topic_id => @topic, :id => post, :page => @post_pages.current, :posts_per_page => params[:posts_per_page]), :class => "utility") %> |
122 | </span> |
123 | </p> |
124 | <% end -%> |
125 | |
126 | |
127 | </td> |
128 | <td class="body entry-content" id="post-body-<%= post.id %>"> |
129 | <!-- |
130 | <%= link_to_function image_tag('clearbits/comment.gif', :class => 'icon reply'), "$('reply').toggle()" if logged_in? %> |
131 | --> |
132 | <%= post.body_html %> |
133 | </td> |
134 | </tr> |
135 | |
136 | <% end %> |
137 | </table> |
138 | |
139 | <% if @post_pages and @post_pages.current.next %> |
140 | <p style="float:right;"><%= link_to "Next page", { :page => @post_pages.current.next }.merge(params.reject{|k,v| k=="page"}) %></p> |
141 | <% end %> |
142 | |
143 | <% if @post_pages.page_count > 1 -%> |
144 | <p class="pages">Pages: <strong><%= topicshelp_pagination_links_for( @post_pages ) %></strong></p> |
145 | <% end -%> |
146 | |
147 | <% if logged_in? %> |
148 | <div id="edit"></div> |
149 | <% if @topic.locked? %> |
150 | <p> |
151 | <%= image_tag "clearbits/lock.gif", :class => "icon grey", :title => "Topic locked" %> |
152 | <label> |
153 | This topic is locked.</label> |
154 | </p> |
155 | <% else %> |
156 | |
157 | <p /> |
158 | <h3>Reply</h3> |
159 | |
160 | <p /> |
161 | <div class="editbox container"> |
162 | <%= content_tag 'p', h(flash[:bad_reply]), :class => 'notice' if flash[:bad_reply] %> |
163 | <% form_for :post, :url => posts_path(:forum_id => @forum, :topic_id => @topic, :page => @topic.last_page(params[:posts_per_page])) do |f| -%> |
164 | <%= f.text_area :body, :rows => 8 %> |
165 | |
166 | <p /> |
167 | <h5>Formatting Help</h5> |
168 | |
169 | <ul class="help"> |
170 | <li>*bold* _italics_ bq. <span>(quotes)</span></li> |
171 | <li>"IBM":http://www.ibm.com</li> |
172 | <li>* or # <span>(lists)</span></li> |
173 | </ul> |
174 | |
175 | See also the Textile reference <a href="https://textile-lang.com" target="_blank">here</a>. |
176 | Don't worry about making mistakes - after adding a reply, you can edit |
177 | your message as many times as you like. |
178 | |
179 | <p align="right"> |
180 | <%= apphelp_pagination_fields() %> |
181 | <%= submit_tag "Save Reply" %> |
182 | </p> |
183 | <% end -%> |
184 | </div> |
185 | <% end %> |
186 | <% else %> |
187 | <p /> |
188 | <h3>Reply</h3> |
189 | |
190 | <p /> |
191 | To post replies, please first <a href="/hub/account/login">log in</a>. |
192 | <% end %> |
193 | |
194 | <div class="crumbs" style="margin-top:1.1em;"> |
195 | <%= link_to "Forums", home_path %> <span class="arrow">→</span> |
196 | <%= link_to h(@topic.forum.name), forum_path(@topic.forum) %> <span class="arrow">→</span> |
197 | </div> |