项目资源模块功能完成(样式尚未调整,代码尚未应用)
This commit is contained in:
parent
c4e9321e14
commit
5eac727584
|
@ -320,6 +320,46 @@ class AttachmentsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def add_exist_file_to_projects
|
||||
file = Attachment.find(params[:file_id])
|
||||
projects = params[:projects][:project]
|
||||
@message = ""
|
||||
projects.each do |project|
|
||||
c = Project.find(project);
|
||||
if project_contains_attachment?(c,file)
|
||||
if @message && @message == ""
|
||||
@message += l(:label_project_prompt) + c.name + l(:label_contain_resource) + file.filename + l(:label_quote_resource_failed)
|
||||
next
|
||||
else
|
||||
@message += "<br/>" + l(:label_project_prompt) + c.name + l(:label_contain_resource) + file.filename + l(:label_quote_resource_failed)
|
||||
next
|
||||
end
|
||||
end
|
||||
attach_copied_obj = file.copy
|
||||
attach_copied_obj.tag_list.add(file.tag_list) # tag关联
|
||||
attach_copied_obj.container = c
|
||||
attach_copied_obj.created_on = Time.now
|
||||
attach_copied_obj.author_id = User.current.id
|
||||
attach_copied_obj.copy_from = file.copy_from.nil? ? file.id : file.copy_from
|
||||
if attach_copied_obj.attachtype == nil
|
||||
attach_copied_obj.attachtype = 4
|
||||
end
|
||||
@obj = c
|
||||
@save_flag = attach_copied_obj.save
|
||||
@save_message = attach_copied_obj.errors.full_messages
|
||||
update_quotes attach_copied_obj
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
rescue NoMethodError
|
||||
@save_flag = false
|
||||
@save_message = [] << l(:label_course_empty_select)
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def add_exist_file_to_courses
|
||||
file = Attachment.find(params[:file_id])
|
||||
courses = params[:courses][:course]
|
||||
|
|
|
@ -23,7 +23,7 @@ class FilesController < ApplicationController
|
|||
before_filter :auth_login1, :only => [:index]
|
||||
before_filter :logged_user_by_apptoken,:only => [:index]
|
||||
before_filter :find_project_by_project_id#, :except => [:getattachtype]
|
||||
before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search]
|
||||
before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search,:search_project,:quote_resource_show_project]
|
||||
|
||||
helper :sort
|
||||
include SortHelper
|
||||
|
@ -79,6 +79,39 @@ class FilesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def search_project
|
||||
sort = ""
|
||||
@sort = ""
|
||||
@order = ""
|
||||
@is_remote = true
|
||||
if params[:sort]
|
||||
order_by = params[:sort].split(":")
|
||||
@sort = order_by[0]
|
||||
if order_by.count > 1
|
||||
@order = order_by[1]
|
||||
end
|
||||
sort = "#{@sort} #{@order}"
|
||||
end
|
||||
|
||||
begin
|
||||
q = "%#{params[:name].strip}%"
|
||||
#(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||
if params[:insite]
|
||||
@result = find_public_attache q,sort
|
||||
@result = visable_attachemnts_insite @result,@project
|
||||
@searched_attach = paginateHelper @result,10
|
||||
else
|
||||
@result = find_project_attache q,@project,sort
|
||||
@result = visable_attachemnts @result
|
||||
@searched_attach = paginateHelper @result,10
|
||||
end
|
||||
|
||||
#rescue Exception => e
|
||||
# #render 'stores'
|
||||
# redirect_to search_course_files_url
|
||||
end
|
||||
end
|
||||
|
||||
def find_course_attache keywords,course,sort = ""
|
||||
if sort == ""
|
||||
sort = "created_on DESC"
|
||||
|
@ -88,6 +121,26 @@ class FilesController < ApplicationController
|
|||
#resultSet = Attachment.find_by_sql("SELECT `attachments`.* FROM `attachments` LEFT OUTER JOIN `homework_attaches` ON `attachments`.container_type = 'HomeworkAttach' AND `attachments`.container_id = `homework_attaches`.id LEFT OUTER JOIN `homework_for_courses` ON `homework_attaches`.bid_id = `homework_for_courses`.bid_id LEFT OUTER JOIN `homework_for_courses` AS H_C ON `attachments`.container_type = 'Bid' AND `attachments`.container_id = H_C.bid_id WHERE (`homework_for_courses`.course_id = 117 OR H_C.course_id = 117 OR (`attachments`.container_type = 'Course' AND `attachments`.container_id = 117)) AND `attachments`.filename LIKE '%#{keywords}%'").reorder("created_on DESC")
|
||||
end
|
||||
|
||||
def find_project_attache keywords,project,sort = ""
|
||||
if sort == ""
|
||||
sort = "created_on DESC"
|
||||
end
|
||||
ids = ""
|
||||
len = 0
|
||||
count = project.versions.count
|
||||
project.versions.each do |version|
|
||||
len = len + 1
|
||||
if len != count
|
||||
ids += version.id.to_s + ','
|
||||
else
|
||||
ids += version.id.to_s
|
||||
end
|
||||
end
|
||||
resultSet = Attachment.where("((attachments.container_type = 'Project' And attachments.container_id = '#{project.id}') OR (container_type = 'Version' AND container_id IN (#{ids}))) AND filename LIKE :like ", like: "%#{keywords}%").
|
||||
reorder(sort)
|
||||
#resultSet = Attachment.find_by_sql("SELECT `attachments`.* FROM `attachments` LEFT OUTER JOIN `homework_attaches` ON `attachments`.container_type = 'HomeworkAttach' AND `attachments`.container_id = `homework_attaches`.id LEFT OUTER JOIN `homework_for_courses` ON `homework_attaches`.bid_id = `homework_for_courses`.bid_id LEFT OUTER JOIN `homework_for_courses` AS H_C ON `attachments`.container_type = 'Bid' AND `attachments`.container_id = H_C.bid_id WHERE (`homework_for_courses`.course_id = 117 OR H_C.course_id = 117 OR (`attachments`.container_type = 'Course' AND `attachments`.container_id = 117)) AND `attachments`.filename LIKE '%#{keywords}%'").reorder("created_on DESC")
|
||||
end
|
||||
|
||||
def find_public_attache keywords,sort = ""
|
||||
# StoresController#search 将每条文件都查出来,再次进行判断过滤。---> resultSet.to_a.map
|
||||
# 此时内容不多速度还可,但文件增长,每条判断多则进行3-4次表连接。
|
||||
|
@ -230,6 +283,11 @@ class FilesController < ApplicationController
|
|||
@can_quote = attachment_candown @file
|
||||
end
|
||||
|
||||
def quote_resource_show_project
|
||||
@file = Attachment.find(params[:id])
|
||||
@can_quote = attachment_candown @file
|
||||
end
|
||||
|
||||
def new
|
||||
@versions = @project.versions.sort
|
||||
@course_tag = @project.project_type
|
||||
|
|
|
@ -45,6 +45,7 @@ module FilesHelper
|
|||
File.new(zipfile_name,'w+')
|
||||
end
|
||||
|
||||
#带勾选框的课程列表
|
||||
def courses_check_box_tags(name,courses,current_course,attachment)
|
||||
s = ''
|
||||
courses.each do |course|
|
||||
|
@ -55,6 +56,17 @@ module FilesHelper
|
|||
s.html_safe
|
||||
end
|
||||
|
||||
#带勾选框的项目列表
|
||||
def projects_check_box_tags(name,projects,current_project,attachment)
|
||||
s = ''
|
||||
projects.each do |project|
|
||||
if !project_contains_attachment?(project,attachment) && User.current.allowed_to?(:manage_files, project)
|
||||
s << "<label>#{ check_box_tag name, project.id, false, :id => nil } #{h project.name}</label>"
|
||||
end
|
||||
end
|
||||
s.html_safe
|
||||
end
|
||||
|
||||
#判断用户是否拥有不包含当前资源的课程,需用户在该课程中角色为教师且该课程属于当前学期或下一学期
|
||||
def has_course? user,file
|
||||
result = false
|
||||
|
@ -108,14 +120,23 @@ module FilesHelper
|
|||
result
|
||||
end
|
||||
|
||||
def visable_attachemnts_insite attachments,course
|
||||
def visable_attachemnts_insite attachments,obj
|
||||
result = []
|
||||
attachments.each do |attachment|
|
||||
if attachment.is_public? || (attachment.container_type == "Course" && attachment.container_id == course.id && User.current.member_of_course?(Course.find(attachment.container_id)))|| attachment.author_id == User.current.id
|
||||
result << attachment
|
||||
if obj.is_a?(Course)
|
||||
attachments.each do |attachment|
|
||||
if attachment.is_public? || (attachment.container_type == "Course" && attachment.container_id == obj.id && User.current.member_of_course?(Course.find(attachment.container_id)))|| attachment.author_id == User.current.id
|
||||
result << attachment
|
||||
end
|
||||
end
|
||||
else if obj.is_a?(Project)
|
||||
attachments.each do |attachment|
|
||||
if attachment.is_public? || (attachment.container_type == "Project" && attachment.container_id == obj.id && User.current.member_of_course?(Project.find(attachment.container_id)))|| attachment.author_id == User.current.id
|
||||
result << attachment
|
||||
end
|
||||
end
|
||||
end
|
||||
result
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<% if !@save_flag && @save_message %>
|
||||
$("#error_show").html("<%= @save_message.join(', ') %>");
|
||||
<% elsif @message && @message != "" %>
|
||||
$("#error_show").html("<%= @message.html_safe %>");
|
||||
<% else %>
|
||||
closeModal();
|
||||
<% end %>
|
|
@ -21,7 +21,7 @@
|
|||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
<% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %>
|
||||
<%= link_to(l(:label_slected_to_other_project),quote_resource_show_course_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
<%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
|
||||
<% if manage_allowed && file.container_id == project.id && file.container_type == "Project" %>
|
||||
<span id="is_public_<%= file.id %>">
|
||||
|
@ -31,7 +31,7 @@
|
|||
<!-- <#%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %> -->
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to(l(:label_slected_to_project),quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_course?(User.current,file) %>
|
||||
<%= link_to(l(:label_slected_to_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% end %>
|
||||
|
|
|
@ -5,50 +5,50 @@
|
|||
|
||||
<!--<%#= stylesheet_link_tag 'resource', :media => 'all' %> -->
|
||||
<script>
|
||||
// function show_upload()
|
||||
// {
|
||||
// $('#ajax-modal').html('<%#= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course}) %>');
|
||||
// showModal('ajax-modal', '513px');
|
||||
// $('#ajax-modal').siblings().remove();
|
||||
// $('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>")
|
||||
// $('#ajax-modal').parent().css("top","").css("left","");
|
||||
// $('#ajax-modal').parent().addClass("popbox_polls");
|
||||
// }
|
||||
//
|
||||
// function closeModal()
|
||||
// {
|
||||
// hideModal($("#popbox_upload"));
|
||||
// }
|
||||
//
|
||||
// function presscss(id)
|
||||
// {
|
||||
// if(id == "incourse")
|
||||
// {
|
||||
// $('#incourse').attr("class", "re_schbtn b_dblue");
|
||||
// $('#insite').attr("class", "re_schbtn b_lblue");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $('#incourse').attr("class", "re_schbtn b_lblue");
|
||||
// $('#insite').attr("class", "re_schbtn b_dblue");
|
||||
// }
|
||||
// }
|
||||
// function buttoncss()
|
||||
// {
|
||||
// $('#incourse').attr("class", "re_schbtn b_lblue");
|
||||
// $('#insite').attr("class", "re_schbtn b_lblue");
|
||||
// }
|
||||
function show_upload()
|
||||
{
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show_project',:locals => {:project => project}) %>');
|
||||
showModal('ajax-modal', '513px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>")
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
||||
}
|
||||
|
||||
function closeModal()
|
||||
{
|
||||
hideModal($("#popbox_upload"));
|
||||
}
|
||||
|
||||
function presscss(id)
|
||||
{
|
||||
if(id == "incourse")
|
||||
{
|
||||
$('#incourse').attr("class", "re_schbtn b_dblue");
|
||||
$('#insite').attr("class", "re_schbtn b_lblue");
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#incourse').attr("class", "re_schbtn b_lblue");
|
||||
$('#insite').attr("class", "re_schbtn b_dblue");
|
||||
}
|
||||
}
|
||||
function buttoncss()
|
||||
{
|
||||
$('#incourse').attr("class", "re_schbtn b_lblue");
|
||||
$('#insite').attr("class", "re_schbtn b_lblue");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<div class="resource"><!--资源库内容开始--->
|
||||
<div class="re_top">
|
||||
<%#= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search f_l",:remote=>true) do %>
|
||||
<%#= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%>
|
||||
<%#= submit_tag "课内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()" %>
|
||||
<%#= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %>
|
||||
<%# end %>
|
||||
<%= form_tag( search_project_project_files_path(@project), method: 'get',:class => "re_search f_l",:remote=>true) do %>
|
||||
<%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%>
|
||||
<%= submit_tag "课内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()" %>
|
||||
<%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %>
|
||||
<% end %>
|
||||
<% manage_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
||||
<% if manage_allowed %> <!-- show_window('light','fade','20%','35%')-->
|
||||
<a href="javascript:void(0)" class="re_fabu f_r b_lblue" onclick="show_upload();">上传资源</a>
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
|
||||
<div class="upload_con">
|
||||
<h2>将此课件引入我的资源库</h2>
|
||||
<% if error == '403' %>
|
||||
<div class="upload_box">
|
||||
<div style="color: red;">您没有权限引用此资源</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="upload_box">
|
||||
<div id="error_show" style="color: red;"></div>
|
||||
<%= form_tag attach_relations_path,
|
||||
method: :post,
|
||||
remote: true,
|
||||
id: "relation_file_form" do %>
|
||||
<%= hidden_field_tag(:file_id, file.id) %>
|
||||
<%= content_tag('div', projects_check_box_tags('projects[project][]', User.current.projects,project,file), :id => 'projects')%>
|
||||
<a id="submit_quote" href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_quote();">引 用</a><a href="javascript:void(0)" class="blue_btn grey_btn fl c_white" onclick="closeModal();">取 消</a>
|
||||
<% end -%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function submit_quote()
|
||||
{
|
||||
$('#submit_quote').parent().submit();
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
<div id="popbox_upload" class="box_h3 mb10" style="margin-top: -30px">
|
||||
<div class="upload_con">
|
||||
<h2><%= l(:label_upload_files)%></h2>
|
||||
<div class="upload_box">
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||
|
||||
<%= form_tag(project_files_path(project), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<!-- <label style="margin-top:3px;"><#%= l(:label_file_upload)%></label> -->
|
||||
<%= render :partial => 'attachement_list',:locals => {:project => project} %>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%= l(:button_cancel)%></a>
|
||||
<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function submit_resource()
|
||||
{
|
||||
$('#submit_resource').parent().submit();
|
||||
}
|
||||
</script>
|
|
@ -1,35 +1,33 @@
|
|||
<%if @addTag%>
|
||||
<% if @obj_flag == '3'%>
|
||||
|
||||
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
<% if @addTag%>
|
||||
<% if @obj_flag == '3'%>
|
||||
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
//$('#put-tag-form-issue').hide();
|
||||
$('#name-issue').val("");
|
||||
<% elsif @obj_flag == '6'%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
//$('#put-tag-form-issue').hide();
|
||||
$('#name-issue').val("");
|
||||
<% elsif @obj_flag == '6'%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide();
|
||||
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
|
||||
$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide();
|
||||
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
|
||||
<% else %>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
|
||||
$('#put-tag-form #name').val("");
|
||||
//$('#put-tag-form').hide();
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
|
||||
$('#put-tag-form #name').val("");
|
||||
//$('#put-tag-form').hide();
|
||||
<% end %>
|
||||
<%else%>
|
||||
$("#attachments_fields").children().remove();
|
||||
$("#upload_file_count").text("未上传文件");
|
||||
$('#upload_file_div').slideToggle('slow');
|
||||
<%if @project%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>');
|
||||
<%elsif @course%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "course_show_all_attachment")%>');
|
||||
closeModal();
|
||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||
<%end%>
|
||||
<% if @project%>
|
||||
closeModal();
|
||||
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
|
||||
<%elsif @course%>
|
||||
closeModal();
|
||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||
<% end %>
|
||||
<% end %>
|
||||
$(document).ready(img_thumbnails);
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<% if @can_quote %>
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource_project',:locals => {:project => @project,:file => @file,:error => ''}) %>');
|
||||
<% else %>
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource_project',:locals => {:project => @project,:file => @file,:error => '403'}) %>');
|
||||
<% end %>
|
||||
|
||||
showModal('ajax-modal', '513px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
@ -0,0 +1 @@
|
|||
$("#course_list").html("<%= escape_javascript(render :partial => 'project_file_list',:locals => {project: @project,all_attachments: @result,sort:@sort,order:@order,project_attachments:@searched_attach,:manage_allowed => User.current.allowed_to?(:manage_files, @project)})%>");
|
|
@ -1966,6 +1966,7 @@ zh:
|
|||
field_open_anonymous_evaluation: 是否使用匿评
|
||||
label_course_empty_select: 尚未选择课程!
|
||||
label_course_prompt: 课程:
|
||||
label_project_prompt: 项目:
|
||||
label_contain_resource: 已包含资源:
|
||||
label_quote_resource_failed: ",此资源引用失败! "
|
||||
label_file_lost: 以下无法成功下载,请联系相关人员重新上传:
|
||||
|
|
|
@ -431,8 +431,12 @@ RedmineApp::Application.routes.draw do
|
|||
match 'issues/update_form', :to => 'issues#update_form', :via => [:put, :post], :as => 'issue_form'
|
||||
|
||||
resources :files, :only => [:index, :new, :create] do
|
||||
member do
|
||||
match "quote_resource_show_project",:via => [:get]
|
||||
end
|
||||
collection do
|
||||
match "getattachtype" , :via => [:get, :post]
|
||||
match "search_project",:via => [:post,:get]
|
||||
#match 'getattachtype/:attachtype', :to => 'files#getattachtype', :via => [:get, :post]
|
||||
end
|
||||
end
|
||||
|
@ -590,6 +594,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'attachments/autocomplete'
|
||||
match 'attachments/autocomplete', :to => 'attachments#autocomplete', :via => [:post]
|
||||
post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation'
|
||||
post 'attachments/relationfiles', to: 'attachments#add_exist_file_to_projects', as: 'attach_relations'
|
||||
post 'attachments/courserelationfile', to: 'attachments#add_exist_file_to_course', as: 'course_attach_relation'
|
||||
post 'attachments/courserelationfiles', to: 'attachments#add_exist_file_to_courses', as: 'course_attach_relations'
|
||||
get 'attachments/renderTag/:attchmentId', :to => 'attachments#renderTag', :attchmentId => /\d+/
|
||||
|
|
Loading…
Reference in New Issue