Changesets can be listed by changeset number.
The Git repository is here.
Changeset 488
Jan 2024 forum updates
- Comitted by: rool
- Date: Sunday January 28 09:28:34 2024 (11 months ago)
Affected files:
- rool/rails/beast/trunk/public/404.html
- rool/rails/beast/trunk/public/422.html
- rool/rails/beast/trunk/public/500.html
- rool/rails/beast/trunk/app/controllers/posts_controller.rb (diff)
- rool/rails/beast/trunk/app/views/forums/index.rhtml (diff)
- rool/rails/beast/trunk/app/views/posts/edit.rhtml (diff)
- rool/rails/beast/trunk/public/stylesheets/display.css (diff)
rool/rails/beast/trunk/app/controllers/posts_controller.rb:
prev. | current | |
conditions = [] | ||
[:user_id, :forum_id].each { |attr| conditions << Post.send(:sanitize_sql, ["posts.#{attr} = ?", params[attr]]) if params[attr] } | ||
conditions = conditions.any? ? conditions.collect { |c| "(#{c})" }.join(' AND ') : nil | ||
125 | ||
126 | if conditions.nil? | |
127 | if params[:tests_and_aldershot] == 'yes' | |
128 | conditions = "(name = 'Aldershot' OR name = 'Tests')" | |
129 | elsif params[:everything] != 'yes' | |
130 | conditions = "name != 'Aldershot' AND name != 'Tests'" | |
131 | end | |
132 | end | |
133 | ||
@post_pages, @posts = paginate(:posts, @@query_options.merge(:conditions => conditions).merge(per_page())) | ||
@users = User.find(:all, :select => 'distinct *', :conditions => ['id in (?)', @posts.collect(&:user_id).uniq]).index_by(&:id) | ||
end |
rool/rails/beast/trunk/app/views/forums/index.rhtml:
prev. | current | |
</table> | ||
<p> | ||
68 | | |
68 | <%= link_to "Recent main forum posts", all_posts_path %> | | |
69 | <%= link_to "Test and Aldershot posts", all_posts_path('tests_and_aldershot' => 'yes') %> | | |
70 | <%= link_to "Everything", all_posts_path('everything' => 'yes') %> | |
</p> | ||
<% online_users = User.currently_online -%> |
rool/rails/beast/trunk/app/views/posts/edit.rhtml:
prev. | current | |
<% form_for(:post, | ||
{ | ||
9 | | |
9 | :html => { :method => :put }, | |
:url => post_path(:forum_id => params[:forum_id], | ||
:topic_id => params[:topic_id], | ||
:id => @post) | ||
} | ||
14 | | |
14 | ) do |f| -%> | |
<p id="post_body"><%= f.text_area :body %></p> | ||
<p align="right"> | ||
... | ... | |
:html => { | ||
:method => :delete, | ||
:onsubmit => "return confirm('Are you sure you want to permanently delete this post?');" | ||
28 | | |
28 | }, | |
:url => post_path(:forum_id => params[:forum_id], | ||
:topic_id => params[:topic_id], | ||
:id => @post) | ||
} | ||
33 | | |
33 | ) do |f| -%> | |
<p align="right"> | ||
<%= apphelp_pagination_fields() %> | ||
or <%= submit_tag('Delete post forever') %> | ||
... | ... | |
<li>* or # <span>(lists)</span></li> | ||
</ul> | ||
49 | ||
50 | ||
49 | See also the Textile reference <a href="https://textile-lang.com" target="_blank" onClick="quickRedReference(); return false;">here</a>. | |
50 | Don't worry about making mistakes - after adding a reply, you can edit | |
your message as many times as you like. |
rool/rails/beast/trunk/public/stylesheets/display.css:
prev. | current | |
* Heavily based on the Beast default theme. | ||
*/ | ||
6 | ||
6 | @import url("/css/risc_os_open_2024.css"); | |
div.template_sidebar_node p {font-size:80%;} | ||
div.template_sidebar_node form.xdialog | ||
... | ... | |
#content p.subtitle img { vertical-align: bottom; } | ||
#content p.subtitle a { border: none; } | ||
92 | ||
92 | #content h1 { margin-bottom: 20px; font-size: 2em; } | |
#content h1 img { vertical-align:middle; } | ||
#content h1 span { font-size:0.7em; color:#999; font-weight:normal; padding-left: 1em;} | ||