diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index a47d8ee09..057a056f3 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -271,6 +271,19 @@ class ForumsController < ApplicationController end end + # 更新贴吧描述 + def update_memo_description + @forum = Forum.find(params[:id]) + if @forum.blank? + result = { :result => false } + else + forum_decription = params[:forum][:description] + @forum.update_attributes(:description => forum_decription ) + result = { :result => true } + end + render :json => result + end + def search_forum # @forums = paginateHelper Forum.where("name LIKE '%#{params[:name]}%'") q = "%#{params[:name].strip}%" diff --git a/app/views/memos/_my_count_message.html.erb b/app/views/memos/_my_count_message.html.erb index 36c500cf0..16af682ba 100644 --- a/app/views/memos/_my_count_message.html.erb +++ b/app/views/memos/_my_count_message.html.erb @@ -5,7 +5,8 @@
<% user_name = @forum.creator.show_name.empty? ? @forum.creator.name : @forum.creator.show_name %> -
吧主:
<%= user_name %> +
吧主:
+ <%= user_name %>
回答:<%= @my_replies_count %> 帖子:<%= @my_topic_count %>
@@ -13,8 +14,9 @@ <%= link_to @forum.name, forum_path(@forum), :class => "f16 fontBlue", :style => "word-break: break-all; word-wrap:break-word;white-space:pre-wrap;" %>
-
<%= @forum.description.html_safe%> - <%if @forum.creator.id == User.current.id%> +
+ <%= h @forum.description.html_safe%> + <% if @forum.creator.id == User.current.id %> <%= image_tag('signature_edit.png',{:width => 12,:height => 12}) %> @@ -49,23 +51,22 @@