2014-06-09 14:23:31 +08:00
|
|
|
|
2016-01-04 17:05:32 +08:00
|
|
|
<script>
|
|
|
|
$(function(){
|
|
|
|
$("#RSide").removeAttr("id")
|
|
|
|
$("#container").css('width',"1000px")
|
|
|
|
});
|
|
|
|
function searchone4reload(fileid){
|
|
|
|
var url = "<%= searchone4reload_project_files_path(@project)%>";
|
|
|
|
var data = {};data.fileid=fileid;
|
|
|
|
$.ajax({
|
|
|
|
url:url,dataType:'text',data:data,success:function(text){
|
|
|
|
var container_file_div = $("#container_files_"+fileid);
|
|
|
|
container_file_div.after(text);
|
|
|
|
container_file_div.remove();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
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="homepageRight mt0 ml10">
|
|
|
|
<div class="homepageRightBanner">
|
|
|
|
<div class="NewsBannerName">资源库</div>
|
|
|
|
<ul class="resourcesSelect">
|
|
|
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
|
|
|
<ul class="resourcesType">
|
2016-01-05 11:00:26 +08:00
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_project_files_path(@project)%>','','<%= @q%>','<%= @project.id%>');" class="resourcesTypeAll resourcesGrey">全部</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_project_files_path(@project)%>','软件版本','<%= @q%>','<%= @project.id%>');" class="softwareIcon postTypeGrey">软件版本</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_project_files_path(@project)%>','文档','<%= @q%>','<%= @project.id%>');" class="homepagePostTypeAssignment postTypeGrey">文档</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_project_files_path(@project)%>','代码','<%= @q%>','<%= @project.id%>');" class="codeIcon resourcesGrey">代码</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_project_files_path(@project)%>','媒体','<%= @q%>','<%= @project.id%>');" class="mediaIcon resourcesGrey">媒体</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_project_files_path(@project)%>','论文','<%= @q%>','<%= @project.id%>');" class="thesisIcon resourcesGrey">论文</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_project_files_path(@project,:other=>true)%>','其他','<%= @q%>','<%= @project.id%>');" class="othersIcon resourcesGrey">其它</a></li>
|
2016-01-04 17:05:32 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2016-07-07 16:46:41 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
<% unless User.current.logged? %>
|
|
|
|
<div class="syllabusbox_tishi mt10">
|
|
|
|
<p style="text-align: center;">您尚未登录,<a href='<%= signin_url_without_domain %>' class='syllabusbox_a_blue' target='_Blank' >登录</a>
|
|
|
|
后可浏览更多信息
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2016-08-26 15:57:45 +08:00
|
|
|
<div class="resources mt10 pr" style="padding-bottom:5px;">
|
2016-01-04 17:05:32 +08:00
|
|
|
<div class="reTop mb5">
|
2016-01-08 14:51:47 +08:00
|
|
|
<%= form_tag( search_project_project_files_path(@project), method: 'get',:class => "re_search",:remote=>true) do %>
|
2016-01-05 11:00:26 +08:00
|
|
|
<%= 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()", :style =>"width:72px;" %>
|
2016-03-02 17:46:10 +08:00
|
|
|
<%#= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %>
|
2016-01-04 17:05:32 +08:00
|
|
|
<!--REDO: 权限测试-->
|
2016-01-08 14:51:47 +08:00
|
|
|
<% if User.current.member_of?(@project) %>
|
2016-01-04 17:05:32 +08:00
|
|
|
<input class="blueBtn fr mr5" value="上传资源" onclick="project_files_upload();">
|
2016-03-03 17:15:47 +08:00
|
|
|
<%= link_to("导入资源", import_resources_user_path(User.current, :type => 6, :project_id => @project.id), :class => "blue-btn fr mr5", :remote => true) %>
|
2016-03-02 17:46:10 +08:00
|
|
|
<!--<input class="blueBtn fr mr5" value="导入资源" onclick="project_files_import();">-->
|
2016-01-04 17:05:32 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2014-06-09 14:23:31 +08:00
|
|
|
</div>
|
2016-01-04 17:05:32 +08:00
|
|
|
<div>
|
2016-01-08 16:30:04 +08:00
|
|
|
<div class="fileTagWrap" id="files_tag_project">
|
2016-01-05 10:01:56 +08:00
|
|
|
<%= render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project, :tag_name => @tag_name}%>
|
2016-01-04 17:05:32 +08:00
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="re_con_top">
|
2016-09-02 11:27:35 +08:00
|
|
|
<p class="f_l fontBlue f_b f_14" id="tip_attachment_count">
|
|
|
|
<%= render :partial => "files/tip_attachment_count" %>
|
|
|
|
</p>
|
2016-01-04 17:05:32 +08:00
|
|
|
<p class="f_r" style="color: #808080">
|
|
|
|
<% if @order == "asc" %>
|
|
|
|
按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
|
|
|
|
<%= link_to "下载次数",params.merge(:sort=>"downloads:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"downloads"} %> /
|
|
|
|
<%= link_to "引用次数",params.merge(:sort=>"quotes:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"quotes"} %> 排序
|
|
|
|
<% else %>
|
|
|
|
按 <%= link_to "时间",params.merge(:sort=>"created_on:asc"),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
|
|
|
|
<%= link_to "下载次数",params.merge(:sort=>"downloads:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"downloads"} %> /
|
|
|
|
<%= link_to "引用次数",params.merge(:sort=>"quotes:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"quotes"} %> 排序
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
</div>
|
2014-06-09 14:23:31 +08:00
|
|
|
</div>
|
2016-01-04 17:05:32 +08:00
|
|
|
<div class="cl"></div>
|
2016-09-02 11:27:35 +08:00
|
|
|
<% if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %>
|
|
|
|
<div class="resource_tip_box fontGrey2">
|
|
|
|
<em></em>
|
|
|
|
<span></span>
|
|
|
|
<p class="mb5">私有资源:<br/>仅对本项目成员可见</p>
|
|
|
|
<p>公共资源:<br/>对所有用户可见</p>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2014-06-09 14:23:31 +08:00
|
|
|
</div>
|
2016-01-06 16:22:25 +08:00
|
|
|
<div id="course_list">
|
2016-01-05 10:01:56 +08:00
|
|
|
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %>
|
2014-07-21 17:33:13 +08:00
|
|
|
</div>
|
2014-06-09 14:23:31 +08:00
|
|
|
</div>
|
2016-01-22 19:49:05 +08:00
|
|
|
<%# html_title(l(:label_attachment_plural)) -%>
|