diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 675ad33c5..fa1856b3d 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -111,11 +111,13 @@ module Mobile requires :token, type: String requires :user_id, type: Integer,desc: '被留言的用户id' requires :content,type:String,desc:'留言内容' - optional :refer_user_id,type:Integer,desc:'被回复的用户id' + requires :ref_user_id,type:Integer,desc:'被回复的用户id' + requires :parent_id,type:Integer,desc:'留言父id' + requires :ref_message_id,type:Integer,desc:'引用消息id' end post ':user_id/leave_message' do us = UsersService.new - jours = us.leave_messages params,current_user + jours = us.reply_user_messages params,current_user present :status,0 end diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index d9d910a66..1347c3026 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -255,7 +255,7 @@ module QueriesHelper # Give it a name, required to be valid @query = IssueQuery.new(:name => "_") @query.project = @project - params[:f] = %w(subject status_id priority_id author_id assigned_to_id) unless params[:status_id].nil? + params[:f] = %w(subject status_id priority_id author_id assigned_to_id created_on) unless params[:status_id].nil? params[:op] = {'subject' => "~" , 'status_id' => ( params[:status_id] == '0' ? "!":"=" ), 'priority_id' => ( params[:priority_id] == '0' ? "!":"=" ), @@ -266,6 +266,19 @@ module QueriesHelper 'priority_id' => [params[:priority_id]], 'author_id' => [params[:author_id]], 'assigned_to_id' => [params[:assigned_to_id]]} unless params[:status_id].nil? + if(params[:status_id] != nil) + if( params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='' && + params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='' ) + params[:op][:created_on]='><' + params[:v][:created_on]=[params[:issue_create_date_start],params[:issue_create_date_end]] + elsif(params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='') + params[:op][:created_on]='>=' + params[:v][:created_on]=[params[:issue_create_date_start]] + elsif(params[:issue_create_date_end]!=nil && params[:issue_create_date_end]!='') + params[:op][:created_on]='<=' + params[:v][:created_on]=[params[:issue_create_date_end]] + end + end @query.build_from_params(params) #session[:query] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names} # else diff --git a/app/services/users_service.rb b/app/services/users_service.rb index 6e566b519..a8aacb095 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -166,13 +166,22 @@ class UsersService jours end - # 给某个用户留言 - def leave_messages params,current_user + # 回复用户 + def reply_user_messages params,current_user user = User.find(params[:user_id]) - user.add_jour(current_user, params[:content], params[:refer_user_id] ||= 0) - unless params[:refer_user_id].nil? || params[:refer_user_id] == 0 || params[:refer_user_id] == User.current.id - User.find(params[:refer_user_id]).add_jour(current_user, params[:content], params[:refer_user_id]) - end + parent_id = params[:parent_id] + author_id = current_user.id + reply_user_id = params[:ref_user_id] + reply_id = params[:ref_message_id] + content = params[:content] + options = {:user_id => author_id, + :status => true, + :m_parent_id => parent_id, + :m_reply_id => reply_id, + :reply_id => reply_user_id, + :notes => content, + :is_readed => false} + user.add_jour(nil, nil,nil,options) end diff --git a/app/views/bids/_new_homework_form.html.erb b/app/views/bids/_new_homework_form.html.erb index 7a5f628f9..5958fccff 100644 --- a/app/views/bids/_new_homework_form.html.erb +++ b/app/views/bids/_new_homework_form.html.erb @@ -15,10 +15,10 @@ <% if edit_mode %> - <%= f.kindeditor :description,:width=>'91%',:editor_id => 'bid_description_editor',:owner_id => bid.id,:owner_type =>OwnerTypeHelper::BID %> + <%= f.kindeditor :description,:width=>'91%',:editor_id => 'bid_description_editor',:owner_id => bid.id,:owner_type =>OwnerTypeHelper::BID,:resizeType => 0 %> <% else %> <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - <%= f.kindeditor :description,:width=>'91%',:editor_id => 'bid_description_editor' %> + <%= f.kindeditor :description,:width=>'91%',:editor_id => 'bid_description_editor',:resizeType => 0 %> <% end %>
diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb index 222d90458..420a22f8a 100644 --- a/app/views/courses/_course.html.erb +++ b/app/views/courses/_course.html.erb @@ -39,8 +39,8 @@<%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %> - <%= content_tag "div", course.short_description, :class => "brief_introduction", :title => course.short_description %>
+ <%= content_tag "div", course.short_description, :class => "brief_introduction",:style=>'float:left;', :title => course.short_description %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index ebbff0bfb..9bd0f6ac4 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1,19 +1,38 @@