修改帖子页面
This commit is contained in:
parent
fdf8b5640a
commit
4c3e2376f0
|
@ -71,6 +71,11 @@ class RelativeMemo < ActiveRecord::Base
|
|||
errors.add :base, l(:label_memo_locked) if root.locked? && self != root
|
||||
end
|
||||
|
||||
def short_content(length = 25)
|
||||
str = "^(.{,#{length}})[^\n\r]*.*$"
|
||||
content.gsub(Regexp.new(str), '\1...').strip if content
|
||||
end
|
||||
|
||||
# def update_memos_forum
|
||||
# if forum_id_changed?
|
||||
# Message.update_all({:board_id => board_id}, ["id = ? OR parent_id = ?", root.id, root.id ])
|
||||
|
|
|
@ -51,20 +51,18 @@
|
|||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
<td><span class="font_description"><%= topic.short_content(70) %> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<td align="left"><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
</span></td>
|
||||
<td align="left"><%= no_use_link(topic, User.current) %> </td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table></td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -51,17 +51,17 @@
|
|||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
<td><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<td align="left"><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
</span></td>
|
||||
<td align="left"><%= no_use_link(topic, User.current) %> </td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
|
|
@ -467,17 +467,17 @@
|
|||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
<td><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%=user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<td align="left"><span class="font_lighter"><%=user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
</span></td>
|
||||
<td align="left"><%= no_use_link(topic, User.current) %> </td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue