删除提示框作业,作业提交的问题。附件提交之后还会存在。
This commit is contained in:
parent
733524b413
commit
5e9bb9a99f
|
@ -730,6 +730,7 @@ class BidsController < ApplicationController
|
|||
end
|
||||
end
|
||||
@homework_list = @bid.homeworks
|
||||
@homework = HomeworkAttach.new
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
module WelcomeHelper
|
||||
|
||||
StudentRoles = [5, 10]
|
||||
|
||||
include CoursesHelper
|
||||
|
||||
def find_all_hot_project
|
||||
sort_project_by_hot
|
||||
|
@ -102,12 +101,6 @@ module WelcomeHelper
|
|||
str.html_safe
|
||||
end
|
||||
|
||||
# 返回学生数量,即roles表中定义的Reporter
|
||||
def studentCount project
|
||||
# searchCountByRoles project,StudentRoles
|
||||
# or
|
||||
searchStudent(project).count
|
||||
end
|
||||
def find_new_forum_topics limit=7
|
||||
Memo.where('memos.parent_id IS NULL').reorder('memos.created_at DESC').limit(limit)
|
||||
# activity = Redmine::Activity::Fetcher.new(nil)
|
||||
|
@ -204,18 +197,4 @@ module WelcomeHelper
|
|||
end
|
||||
end
|
||||
|
||||
def searchStudent project
|
||||
searchPeopleByRoles(project, StudentRoles)
|
||||
end
|
||||
|
||||
def searchPeopleByRoles project, roles_id
|
||||
people = []
|
||||
begin
|
||||
people = project.members.joins(:member_roles).where("member_roles.role_id IN (:role_id)", {:role_id => roles_id})
|
||||
rescue Exception => e
|
||||
logger.error "[CoursesHelper] ===> #{e}"
|
||||
end
|
||||
people
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<legend>
|
||||
<%= l(:label_attachment_plural) %>
|
||||
</legend>
|
||||
<p>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @homework} %>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
$('#bidding_project_list').html('<%= escape_javascript(render(:partial => 'homework_list', :locals => {:homework => @homework_list})) %>');
|
||||
$('#put-bid-form-partial').html(' <%= escape_javascript( render( :partial => 'attachments/form', :locals => {:container => @homework}) )%>')
|
||||
$("#project_id").val("请选择项目");
|
||||
$("#bid_message").val( "<%= l(:label_bid_reason) %>" );
|
||||
$("#put-bid-form").hide();
|
|
@ -104,7 +104,6 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% logger.debug "=============@bidding_project=====================#{@bidding_project.count}" %>
|
||||
<div id='bidding_project_list'>
|
||||
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project,:bid => @bid} %>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<% unless @activity.empty? %>
|
||||
<div id="activity">
|
||||
<% @activity.each do |e| %>
|
||||
<% next if( (e.act_type == 'JournalsForMessage') && !(User.current.id.eql?(params[:id].to_i)) ) %>
|
||||
<% #next if( (e.act_type == 'JournalsForMessage') && !(User.current.id.eql?(params[:id].to_i)) ) %>
|
||||
<% act = e.act %>
|
||||
<% unless act.nil? %>
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ function addFile(inputEl, file, eagerUpload) {
|
|||
fileSpan.append(
|
||||
$('<input>', { type: 'text', 'class': 'filename readonly', name: 'attachments[' + attachmentId + '][filename]', readonly: 'readonly'} ).val(file.name),
|
||||
$('<input>', { type: 'text', 'class': 'description', name: 'attachments[' + attachmentId + '][description]', maxlength: 255, placeholder: $(inputEl).data('description-placeholder') } ).toggle(!eagerUpload),
|
||||
$('<a> </a>').attr({ href: "#", 'class': 'remove-upload' }).click(removeFile).toggle(!eagerUpload)
|
||||
$('<a> </a>').attr({ href: "#", 'class': 'remove-upload', 'data-confirm' : "您确定要删除吗?" }).click(removeFile).toggle(!eagerUpload)
|
||||
).appendTo('#attachments_fields');
|
||||
|
||||
if(eagerUpload) {
|
||||
|
|
Loading…
Reference in New Issue