Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 178
- Log:
Hub integration of Beast forum. Completed styling for RISC OS Open site.
Removed reliance on JavaScript. Added Textile hints to various views.
Added bespoke utility code used to port over RForum data for posterity;
note the rather large bug that it ignores the deleted flag on RForum
data.Some amount of testing carried out on Firefox, Opera and Netsurf. Looks
OK so far, but there are definitely some aesthetic kinks to work out
still and doubtless some operational bugs will surface once it goes
live and is subjected to more intensive real world use.
- Author:
- rool
- Date:
- Mon Mar 12 00:19:40 +0000 2007
- Size:
- 2617 Bytes
1 | <% @page_title = @user.display_name -%> |
2 | |
3 | <% content_for :right do %> |
4 | <% if admin? %> |
5 | <h3>Admin & Moderation</h3> |
6 | |
7 | <% if @user.forums.any? -%> |
8 | <p>This user can moderate the following forums. Select one to remove it.</p> |
9 | |
10 | <% @user.forums.find(:all, :select => 'forums.*, moderatorships.id as moderatorship_id').each do |forum| -%> |
11 | <div><%# form_for() calls form_tag() which for :method => :delete writes out a hidden INPUT field at the time of writing - but wraps it in an outer DIV. This broke earlier layout using <LI> items to hold the buttons. Sigh - I have so many reservations about Rails 1.2.x... Anyway, herein, a rather tragic workaround which gives up on <LI> tags but puts its own (currently redundant) DIV around the small form, to ensure line breaks work even in future Rails gets rid of its own strange little DIV. -%> |
12 | <% form_for(:user, |
13 | { |
14 | :html => { |
15 | :method => :delete, |
16 | :class => 'xdialog', |
17 | :onsubmit => 'return confirm("Are you sure you want to remove the user as a moderator for this forum?");' |
18 | }, |
19 | :url => moderator_path(@user, |
20 | forum.moderatorship_id), |
21 | } |
22 | ) do |f| -%> |
23 | <%= submit_tag forum.name %> |
24 | <% end -%> |
25 | </div> |
26 | <% end -%> |
27 | <% end -%> |
28 | |
29 | <p> |
30 | <% form_for :user, :url => admin_user_path(@user), :html => {:class => "xdialog"} do |f| -%> |
31 | <label>Add as moderator</label><br /> |
32 | <select name="moderator"> |
33 | <option value="-"></option> |
34 | <%= options_from_collection_for_select(Forum.find(:all, :order => 'position') - @user.forums, "id", "name") %> |
35 | </select></p> |
36 | |
37 | <p><label><%= f.check_box :admin %> User is an administrator</label></p> |
38 | |
39 | <p><%= submit_tag :Save %></p> |
40 | <% end -%> |
41 | <% end -%> |
42 | <% end %> |
43 | |
44 | <p style="float:right;"><%= avatar_for @user, 80 %></p> |
45 | |
46 | <h1><%=h @user.display_name %> </h1> |
47 | |
48 | <p class="subtitle"> |
49 | <%= feed_icon_tag @user.display_name, formatted_user_posts_path(:user_id => @user, :format => :rss) %> |
50 | <span> |
51 | <%= pluralize @user.topics.count, 'topic' %>, |
52 | <%= pluralize @user.posts_count, 'post' %> |
53 | (view <%= link_to "all", user_posts_path(@user) %> | |
54 | <%= link_to 'monitored', monitored_posts_path(@user) %> posts)<br /> |
55 | </span> |
56 | </p> |
57 | |
58 | <%= @user.bio_html %> |
59 | |
60 | <% unless @user.website.blank? -%> |
61 | <p><strong>Website:</strong> <%= white_list link_to(@user.website.gsub("http://",""), "http://" + @user.website.gsub("http://","")) %> |
62 | <% end -%> |
63 | <p>User since <%= @user.created_at.to_date.to_s :long %></p> |
64 |