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:
- 6049 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 | |
6 | <h3>Voices</h3> |
7 | <ul class="flat talking"> |
8 | <% @voices.each do | user | %> |
9 | <li><%= link_to h(user.display_name), user_path(user) %></li> |
10 | <% end %> |
11 | </ul> |
12 | |
13 | |
14 | <% end # right content -%> |
15 | |
16 | <% if logged_in? -%> |
17 | <% form_tag monitorships_path(@forum, @topic) + (@monitoring ? '/destroy' : ''), :style => 'margin-top:0em; float:right;' do -%> |
18 | <div> |
19 | <input id="monitor_checkbox" type="checkbox" <%= "checked='checked'" if @monitoring %> /> |
20 | <label id="monitor_label" for="monitor_checkbox">Watch<%= "ing" if @monitoring %> topic</label> |
21 | <%= submit_tag :Set, :id => 'monitor_submit' %> |
22 | </div> |
23 | <% end -%> |
24 | <% end -%> |
25 | |
26 | |
27 | <div class="crumbs"> |
28 | <%= link_to "Forums", home_path %> <span class="arrow">→</span> |
29 | <%= link_to h(@topic.forum.name), forum_path(@topic.forum) %> <span class="arrow">→</span> |
30 | </div> |
31 | |
32 | <h1 id="topic-title" style="margin-top:0.5em;"<%= %( onmouseover="$('topic_mod').show();" onmouseout="$('topic_mod').hide();") if logged_in? %>> |
33 | |
34 | |
35 | <%= h @topic.title %> |
36 | <% if @topic.locked? %> |
37 | <span>(locked)</span> |
38 | <% end %> |
39 | <% if logged_in? %> |
40 | <% if (current_user.admin? && @topic.editable_by?(current_user)) -%> |
41 | <span id="topic_mod"> |
42 | <%= link_to('edit', edit_topic_path(@forum, @topic), :class => "utility") %> |
43 | <% form_for(:topic, |
44 | { |
45 | :html => { |
46 | :method => :delete, |
47 | :class => 'xdialog', |
48 | :style => 'display:inline', |
49 | :onsubmit => 'return confirm("Delete this topic forever?");' |
50 | }, |
51 | :url => topic_path(@forum, @topic) |
52 | } |
53 | ) do |f| -%> |
54 | <%= submit_tag 'Delete' %> |
55 | <% end -%> |
56 | </span> |
57 | <% end -%> |
58 | <% end %> |
59 | </h1> |
60 | |
61 | <p class="subtitle"> |
62 | <%= feed_icon_tag @topic.title, formatted_topic_path(@forum, @topic, :rss) %> |
63 | <%= pluralize @topic.posts.count, 'post' %>, <%= pluralize @topic.voices, 'voice' %> |
64 | </p> |
65 | |
66 | <% if @post_pages.page_count > 1 -%> |
67 | <p class="pages">Pages: <strong><%= pagination_links @post_pages, :window_size => 10 %></strong></p> |
68 | <% end -%> |
69 | |
70 | <a name="<%= @posts.first.dom_id %>" id="<%= @posts.first.dom_id %>" class="spacer_link"> </a> |
71 | |
72 | <table border="0" cellspacing="0" cellpadding="0" class="posts wide"> |
73 | <% for post in @posts do %> |
74 | <% unless post == @posts.first %> |
75 | <tr class="spacer"> |
76 | <td colspan="2"> |
77 | <a name="<%= post.dom_id %>" id="<%= post.dom_id %>" class="spacer_link"> </a> |
78 | </td> |
79 | </tr> |
80 | <% end %> |
81 | <tr class="post hentry" id="<%= post.dom_id %>-row"> |
82 | <td class="author vcard"> |
83 | <div class="date"> |
84 | <a href="#<%= post.dom_id %>" rel="bookmark"> |
85 | <abbr class="updated" title="<%= post.created_at.xmlschema %>"> |
86 | <%= time_ago_in_words(post.created_at) %> |
87 | </abbr> |
88 | </a> |
89 | </div> |
90 | |
91 | <%= avatar_for post.user %> |
92 | <span class="fn"><%= link_to truncate(h(post.user.display_name), 32), user_path(post.user), :class => (post.user == @posts.first.user ? "admin" : nil) %></span> |
93 | <span class="posts"><%= pluralize post.user.posts_count, 'post' %></span> |
94 | |
95 | <% if logged_in? && post.editable_by?(current_user) -%> |
96 | <p> |
97 | <span class="edit"> |
98 | <%= link_to('Edit post', edit_post_path(:forum_id => @forum, :topic_id => @topic, :id => post), :class => "utility") %> |
99 | </span> |
100 | </p> |
101 | <% end -%> |
102 | |
103 | |
104 | </td> |
105 | <td class="body entry-content" id="post-body-<%= post.id %>"> |
106 | <!-- |
107 | <%= link_to_function image_tag('clearbits/comment.gif', :class => 'icon reply'), "$('reply').toggle()" if logged_in? %> |
108 | --> |
109 | <%= post.body_html %> |
110 | </td> |
111 | </tr> |
112 | |
113 | <% end %> |
114 | </table> |
115 | |
116 | <% if @post_pages and @post_pages.current.next %> |
117 | <p style="float:right;"><%= link_to "Next page", { :page => @post_pages.current.next }.merge(params.reject{|k,v| k=="page"}) %></p> |
118 | <% end %> |
119 | |
120 | <% if @post_pages.page_count > 1 -%> |
121 | <p class="pages">Pages: <strong><%= pagination_links @post_pages, :window_size => 10 %></strong></p> |
122 | <% end -%> |
123 | |
124 | <% if logged_in? %> |
125 | <div id="edit"></div> |
126 | <% if @topic.locked? %> |
127 | <p> |
128 | <%= image_tag "clearbits/lock.gif", :class => "icon grey", :title => "Topic locked" %> |
129 | <label> |
130 | This topic is locked.</label> |
131 | </p> |
132 | <% else %> |
133 | |
134 | <script language="JavaScript"> |
135 | function quickRedReference() { |
136 | window.open( |
137 | "http://hobix.com/textile/quick.html", |
138 | "redRef", |
139 | "height=600,width=550,channelmode=0,dependent=0," + |
140 | "directories=0,fullscreen=0,location=0,menubar=0," + |
141 | "resizable=0,scrollbars=1,status=1,toolbar=0" |
142 | ); |
143 | } |
144 | </script> |
145 | |
146 | <p /> |
147 | <h3>Reply</h3> |
148 | |
149 | <p /> |
150 | <div class="editbox container"> |
151 | <%= content_tag 'p', h(flash[:bad_reply]), :class => 'notice' if flash[:bad_reply] %> |
152 | <% form_for :post, :url => posts_path(:forum_id => @forum, :topic_id => @topic, :page => @topic.last_page) do |f| -%> |
153 | <%= f.text_area :body, :rows => 8 %> |
154 | |
155 | <p /> |
156 | <h5>Formatting Help</h5> |
157 | |
158 | <ul class="help"> |
159 | <li>*bold* _italics_ bq. <span>(quotes)</span></li> |
160 | <li>"IBM":http://www.ibm.com</li> |
161 | <li>* or # <span>(lists)</span></li> |
162 | </ul> |
163 | |
164 | See also the Textile reference <a href="http://hobix.com/textile/quick.html" target="_blank" onClick="quickRedReference(); return false;">here</a>. |
165 | Don't worry about making mistakes - after adding a reply, you can edit |
166 | your message as many times as you like. |
167 | |
168 | <p align="right"> |
169 | <%= submit_tag "Save Reply" %> |
170 | </p> |
171 | <% end -%> |
172 | </div> |
173 | <% end %> |
174 | <% else %> |
175 | <p /> |
176 | <h3>Reply</h3> |
177 | |
178 | <p /> |
179 | To post replies, please first <a href="/hub/account/login">log in</a>. |
180 | <% end %> |
181 | |
182 | <div class="crumbs" style="margin-top:1.1em;"> |
183 | <%= link_to "Forums", home_path %> <span class="arrow">→</span> |
184 | <%= link_to h(@topic.forum.name), forum_path(@topic.forum) %> <span class="arrow">→</span> |
185 | </div> |