socialforge/app/views/files/_subfield_files.html.erb

87 lines
5.2 KiB
Plaintext
Raw Normal View History

2016-06-24 09:30:46 +08:00
<%= stylesheet_link_tag 'css/courses'%>
2016-03-05 03:16:04 +08:00
<script>
function searchone4reload(fileid){
var url = "<%= searchone4reload_org_subfield_files_path(@org_subfield)%>";
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"));
}
</script>
<div class="homepageRight mt0 ml0">
<div class="homepageRightBanner" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>">
<div class="NewsBannerName"><%= org_subfield.name %></div>
<ul class="resourcesSelect">
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="resourcesType">
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield)%>','','<%= @q%>','<%= org_subfield.id%>');" class="resourcesTypeAll resourcesGrey">全部</a></li>
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield)%>','软件','<%= @q%>','<%= org_subfield.id%>');" class="softwareIcon postTypeGrey">软件</a></li>
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield)%>','媒体','<%= @q%>','<%= org_subfield.id%>');" class="mediaIcon resourcesGrey">媒体</a></li>
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield)%>','代码','<%= @q%>','<%= org_subfield.id%>');" class="codeIcon resourcesGrey">代码</a></li>
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield,:other=>true)%>','其他','<%= @q%>','<%= org_subfield.id%>');" class="othersIcon resourcesGrey">其它</a></li>
</ul>
</li>
</ul>
</ul>
</div>
<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-03-05 03:16:04 +08:00
<div class="resources mt10" style="padding-bottom:5px;">
<div class="reTop mb5">
<%= form_tag( search_files_in_subfield_org_subfield_files_path(@org_subfield), method: 'get',:class => "re_search",:remote=>true) do %>
<%= text_field_tag 'name', params[:name], name: "name", :class => 'researchBox fl',:style=>"padding: 0px"%>
<%= submit_tag "栏目内搜索", :class => "blueBtn mr5 fl",:style => 'width:72px;',:name => "inorg_subfield",:id => "inorg_subfield", :onmouseover => "presscss('inorg_subfield')",:onmouseout =>"buttoncss()" %>
<%#= submit_tag "全站搜索", :class => "blueBtn mr5 fl",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %>
<% if User.current.member_of_org?(org_subfield.organization) %>
<input class="blueBtn fr mr5" value="上传资源" onclick="org_upload_files(<%= org_subfield.id %>);">
<%= link_to("导入资源", import_resources_user_path(User.current, :type => 6, :subfield_file_id => @org_subfield.id), :class => "blue-btn fr mr5", :remote => true) %>
<% end %>
2016-03-05 03:16:04 +08:00
<% end %>
</div><!---re_top end-->
<div class="cl"></div>
<div>
<div class="re_con_top">
<div class="files_tag" id="files_tag">
<%= render :partial => "files/subfield_tags", :locals => {:tag_list => @tag_list,:org_subfield => @org_subfield,:tag_name => @tag_name}%>
</div>
<div class="cl"></div>
2016-03-07 18:12:40 +08:00
<p class="f_l fontBlue f_b f_14">共有&nbsp;<span id="attachment_count"><%= User.current.member_of_org?(@org_subfield.organization) ? @all_attachments.count : @all_attachments.select{|attach| attach.is_public == 1 }.count %></span>&nbsp;个资源</p>
<p class="f_r" style="color: #808080" id="org_sort">
<%= render :partial => 'files/org_order_filter', :locals => {:order => @order, :sort => @sort, :tag_name => @tag_name, :search_name => nil} %>
2016-03-05 03:16:04 +08:00
</p>
</div>
<div class="cl"></div>
</div>
</div>
<div id="org_subfield_list">
<%= render :partial => 'files/org_subfield_list',:locals => {org_subfield: @org_subfield,all_attachments: @all_attachments,sort:@sort,order:@order,org_subfield_attachments:@obj_attachments} %>
</div><!---re_con end-->
</div>
<%# html_title(l(:label_attachment_plural)) -%>
<script>
function org_upload_files(org_subfield_id){
$.ajax({
url :"/org_subfields/" + org_subfield_id + "/files/subfield_upload_file",
type :'post'
});
}
2016-01-12 16:43:40 +08:00
</script>