commit
9594edd45e
@ -0,0 +1,6 @@
|
|||||||
|
<font></font>
|
||||||
|
<div style="margin: 5px auto;width:150px;">
|
||||||
|
<img class="mr5 fl mt2" src="/images/loading.gif">
|
||||||
|
<span class="fl">正在加载中,请稍后...</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
@ -0,0 +1,10 @@
|
|||||||
|
<div class="por_footer_con">
|
||||||
|
<ul>
|
||||||
|
<li ><a href="<%= about_us_path %>" target="_blank" class="" >关于我们<span>|</span></a></li>
|
||||||
|
<li ><a href="<%= agreement_path %>" target="_blank" class="" >服务协议<span>|</span></a></li>
|
||||||
|
<li ><a href="http://forge.trustie.net/forums/1/memos/1168" target="_blank" class="" >帮助中心<span>|</span></a></li>
|
||||||
|
<li ><a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="" > 贴吧交流</a></li>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<p>Copyright 2007~2016, All Rights Reserved 湘ICP备09019772</p>
|
||||||
|
</div>
|
@ -0,0 +1,43 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title><%= h html_title %></title>
|
||||||
|
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
||||||
|
<meta name="keywords" content="issue,bug,tracker" />
|
||||||
|
<%= csrf_meta_tag %>
|
||||||
|
<%= favicon %>
|
||||||
|
<%= javascript_heads %>
|
||||||
|
<%= heads_for_theme %>
|
||||||
|
<%= stylesheet_link_tag 'new_user', 'public', 'org_custom','jquery/jquery-ui-1.9.2' %>
|
||||||
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
|
<%= yield :header_tags -%>
|
||||||
|
<!-- MathJax的配置 -->
|
||||||
|
<%=render :partial => "math_js" %>
|
||||||
|
</head>
|
||||||
|
<body style="background: #fff">
|
||||||
|
<% update_visiti_count @organization %>
|
||||||
|
<header id="por_header">
|
||||||
|
<%= render :partial => 'org_custom_header', :locals => {:subfield_content => @subfield_content} %>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<%# 内容开始 %>
|
||||||
|
<div id="por_container">
|
||||||
|
<%= render_flash_messages %>
|
||||||
|
<%= yield %>
|
||||||
|
<%= call_hook :view_layouts_base_content %>
|
||||||
|
</div>
|
||||||
|
<%# 内容结束 %>
|
||||||
|
<%# 页面底部 %>
|
||||||
|
<footer class="por_footer"><%= render :partial => "layouts/org_custom_footer" %></footer>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<%# 弹框 %>
|
||||||
|
<div id="ajax-modal" style="display:none;"></div>
|
||||||
|
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
|
||||||
|
<%= call_hook :view_layouts_base_body_bottom %>
|
||||||
|
<%# JS提前加载 %>
|
||||||
|
<%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%>
|
||||||
|
<%= javascript_include_tag 'attachments' %>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
<div>
|
||||||
|
<input class="postDetailInput fl mr15" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" placeholder="请输入文章标题"></input>
|
||||||
|
</div>
|
||||||
|
<div id="doc_title_hint">
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="" >
|
||||||
|
<div class="mt10">
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='description_textarea' name="org_document_comment[content]"></textarea>
|
||||||
|
<%#= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p id="homework_course_id_span" class="c_red mt5"></p>
|
||||||
|
<p id="e_tip" class="c_grey"></p>
|
||||||
|
<p id="e_tips" class="c_grey"></p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="mt10">
|
||||||
|
<div class="fl" id="topic_attachments">
|
||||||
|
<%= render :partial => 'org_document_comments/attachment', :locals => {:container => nil} %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<div class="mt5">
|
||||||
|
<a href="javascript:void(0);" class="BlueCirBtnMini fr" id="new_topic_submit_btn">确定</a>
|
||||||
|
<span class="fr mr10 mt3">或</span>
|
||||||
|
<a href="javascript:void(0);" onclick="cancel_create_org_document();" id="new_topic_cancel_btn" class="fr mr10 mt3">取消</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,10 +1,9 @@
|
|||||||
<% if @res %>
|
<% if @res %>
|
||||||
$("#org_subfield_list").html("");
|
$("#org_subfield_list").html("");
|
||||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
||||||
:locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
|
|
||||||
$("#sub_field_left_lists").html("");
|
$("#sub_field_left_lists").html("");
|
||||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||||
$("#org_excellent_teachers").html("<%= escape_javascript(render :partial => 'organizations/setting_excellent_teachers') %>");
|
$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
$("#subfield_name").val("");
|
$("#subfield_name").val("");
|
||||||
$("#sub_dir").val("");
|
$("#sub_dir").val("");
|
@ -1,6 +1,5 @@
|
|||||||
$("#org_subfield_list").html("");
|
$("#org_subfield_list").html("");
|
||||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
||||||
:locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
|
|
||||||
$("#sub_field_left_lists").html("");
|
$("#sub_field_left_lists").html("");
|
||||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||||
$("#org_excellent_teachers").html("<%= escape_javascript(render :partial => 'organizations/setting_excellent_teachers') %>");
|
$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
$("#subfield_show_<%= @subfield.id %>").html("<%= @subfield.name %>");
|
$("#subfield_show_<%= @subfield.id %>").html("<%= @subfield.name %>");
|
||||||
$("#sub_field_left_lists").html("");
|
$("#sub_field_left_lists").html("");
|
||||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||||
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
@ -1,2 +1,2 @@
|
|||||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',:locals => {:subfields => @organization.org_subfields.order("priority")}) %>");
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
||||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
@ -1,9 +1,9 @@
|
|||||||
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
|
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
|
||||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||||
<%= link_to "更多", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more" , :target => "_blank" %>
|
<%= link_to "更多", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "f12 fontGrey2 fr" , :target => "_blank" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to "更多", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more" , :target => "_blank" %>
|
<%= link_to "更多", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "f12 fontGrey2 fr" , :target => "_blank" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to "更多", organization_path(@organization, :org_subfield_id => field.id), :class => "more" , :target => "_blank" %>
|
<%= link_to "更多", organization_path(@organization, :org_subfield_id => field.id), :class => "f12 fontGrey2 fr" , :target => "_blank" %>
|
||||||
<% end %>
|
<% end %>
|
@ -0,0 +1,8 @@
|
|||||||
|
<% if @org_logo_attchment.blank? || !User.current.logged? %>
|
||||||
|
<img src="/images/org_new_style/logo.jpg" width="367" height="63" class="sn-mt13 sn-fl" alt=""/>
|
||||||
|
<% else %>
|
||||||
|
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" width="367" height="63" class="sn-mt13 sn-fl" alt="">
|
||||||
|
<% end %>
|
||||||
|
<% if User.current.admin_of_org?(@organization) %>
|
||||||
|
<a href="#" class="sn-logo-add" title="点击替换LOGO" onclick="org_new_files_upload();"></a>
|
||||||
|
<% end %>
|
@ -0,0 +1,24 @@
|
|||||||
|
<% containers.each do |container| %>
|
||||||
|
<div class="teacher-list-row">
|
||||||
|
<div>
|
||||||
|
<div class="teacher-avatar">
|
||||||
|
<%= link_to image_tag(url_to_avatar(container), :width => "90", :height => "90"), container.class == Course ? course_path(container) : project_path(container) %>
|
||||||
|
</div>
|
||||||
|
<div class="fl">
|
||||||
|
<div class="ml25 mb20"><span class="teacher-name"><%=link_to container.name, container.class == Course ? course_path(container) : project_path(container) %></span></div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num"><%= container.members.count %></div>
|
||||||
|
<div class="block-title">成员</div>
|
||||||
|
</div>
|
||||||
|
<div class="block-slice"></div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num"><%= container.attachments.count %></div>
|
||||||
|
<div class="block-title">资源</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a href="javascript:void(0);" class="fr teacher-select" onclick="admin_hide_org($(this),'<%= container.id %>');" id="hide_<%= container.id %>"><%= container.class == Course ? (container.is_excellent == 0 ? "设为精品" : "取消精品") : (container.hot ==0 ? "设为热门" : "取消热门") %></a>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
<% if allow_to_create?(@organization, "Comptec") %>
|
||||||
|
<li class="fl mr15">
|
||||||
|
<input type="radio" id="orgTec" value="Comptec" name="field_type" />
|
||||||
|
<label for="Comptec">教师</label>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if allow_to_create?(@organization, "Compstu") %>
|
||||||
|
<li class="fl mr15">
|
||||||
|
<input type="radio" id="orgStu" value="Compstu" name="field_type" />
|
||||||
|
<label for="Comptec">学生</label>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if allow_to_create?(@organization, "Comppro") %>
|
||||||
|
<li class="fl mr15">
|
||||||
|
<input type="radio" id="orgPro" value="Comppro" name="field_type" />
|
||||||
|
<label for="Comppro">热门项目</label>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if allow_to_create?(@organization, "Compcou") %>
|
||||||
|
<li class="fl mr15">
|
||||||
|
<input type="radio" id="orgCou" value="Compcou" name="field_type" />
|
||||||
|
<label for="Compcou">精品课程</label>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if allow_to_create?(@organization, "Compact") %>
|
||||||
|
<li class="fl mr15">
|
||||||
|
<input type="radio" id="orgAct" value="Compact" name="field_type" />
|
||||||
|
<label for="Compact">最新动态</label>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
@ -0,0 +1,96 @@
|
|||||||
|
<div class="por_header_top">
|
||||||
|
<div class="por_header_con" >
|
||||||
|
<%= image_tag(url_to_avatar(@organization), width:"67", height: "61", :id => 'nh_user_tx', :class => "por_logo fl ", :target => "_blank") %>
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<div class="navHomepageProfile" id="navHomepageProfile">
|
||||||
|
<ul>
|
||||||
|
<li class="homepageProfileMenuIcon fr mt15" id="homepageProfileMenuIcon">
|
||||||
|
<%= link_to "<div class='user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :width =>"40", :height => "40", :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_activities_path(User.current.id) %>
|
||||||
|
<ul class="topnav_login_list none sn-f12" id="topnav_login_list" style="text-align:left;">
|
||||||
|
<li><%= link_to "修改资料", my_account_path, :class => "menuGrey"%></li>
|
||||||
|
<li><%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%></li>
|
||||||
|
<li><%= link_to "新建组织", new_organization_path, :class => "menuGrey"%></li>
|
||||||
|
<li><%= link_to "退出", logout_url_without_domain, :class => "menuGrey", :method => "post"%></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<ul class="por_login fr">
|
||||||
|
<li><a href="<%= signin_url_without_domain %>" target="_blank" class=" ">登录</a></li>
|
||||||
|
<li><a href="<%= register_url_without_domain %>" target="_blank" class=" ">注册</a></li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<!--<div class="por_search fr">-->
|
||||||
|
<!--<input type="text" class="pro_input_search fl" value="00000" />-->
|
||||||
|
<!--<a href="javascript:void(0);" class="por_search_btn fl"></a>-->
|
||||||
|
<!--</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="por_nav" >
|
||||||
|
<ul >
|
||||||
|
<% subfield_content.each do |field| %>
|
||||||
|
<% if is_default_field?(field) %>
|
||||||
|
<% case field.name %>
|
||||||
|
<% when 'activity' %>
|
||||||
|
<li style="display:<%= field.hide == 0 ? 'block':'none' %>;">
|
||||||
|
<%= link_to "首页", organization_path(@organization), :class => "por_index_act" %>
|
||||||
|
</li>
|
||||||
|
<% when 'course' %>
|
||||||
|
<% when 'project' %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% else %>
|
||||||
|
<% if field.field_type == "Post" && field.hide == 0 %>
|
||||||
|
<li>
|
||||||
|
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
|
||||||
|
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||||
|
<%= link_to field.name, show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to field.name, show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to field.name, organization_path(@organization, :org_subfield_id => field.id), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<!--二级目录-->
|
||||||
|
<div class="sn-row sn-subnav-position sn-grey-opacity" style="display:none;">
|
||||||
|
<ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;">
|
||||||
|
<% field.sub_domains.each do |subdomain| %>
|
||||||
|
<li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey" %></li>
|
||||||
|
<li class="sn-subnav-slice">|</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% elsif field.field_type == "Resource" && field.hide == 0 %>
|
||||||
|
<li class="nav-element">
|
||||||
|
<%= link_to field.name, org_subfield_files_path(field), :class => "sn-link-white", :target => "_blank" %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% if User.current.admin_of_org?(@organization) %>
|
||||||
|
<a href="<%= setting_organization_path(@organization) %>" class="link-black fr por_edit_index" target="_blank">配置</a>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--por_nav end-->
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#navHomepageProfile").mouseenter(function(){
|
||||||
|
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
|
||||||
|
$("#topnav_login_list").show();
|
||||||
|
});
|
||||||
|
$("#navHomepageProfile").mouseleave(function(){
|
||||||
|
$("#homepageProfileMenuIcon").removeClass("homepageProfileMenuIconhover");
|
||||||
|
$("#topnav_login_list").hide();
|
||||||
|
});
|
||||||
|
function signout(){
|
||||||
|
$.post(
|
||||||
|
'<%= signout_path%>',
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,170 @@
|
|||||||
|
<div class="por_hotbar clear" style="display:<%= field.hide == 0 ? 'block':'none' %>;">
|
||||||
|
<% if acts.blank? %>
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %></h2>
|
||||||
|
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||||
|
<% else %>
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %>
|
||||||
|
<%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
|
||||||
|
</h2>
|
||||||
|
<ul class="por_hotbar_left fl">
|
||||||
|
<% if acts.count > 1 %>
|
||||||
|
<% acts[1..2].each do |activity| %>
|
||||||
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||||
|
<% document = activity.org_act %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span>
|
||||||
|
<%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||||
|
</li>
|
||||||
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
|
<% message = activity.org_act %>
|
||||||
|
<% content = message.parent_id.nil? ? message.content : message.parent.content %>
|
||||||
|
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
|
||||||
|
<% if message.board.org_subfield_id %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{title}".html_safe, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
|
||||||
|
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{title}".html_safe, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
|
||||||
|
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
|
<% news = activity.org_act %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{news.title}".html_safe, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(news.created_on) %></span>
|
||||||
|
<%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if acts.count > 3 %>
|
||||||
|
<% activity = acts[3] %>
|
||||||
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||||
|
<% document = activity.org_act %>
|
||||||
|
<li>
|
||||||
|
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span>
|
||||||
|
<%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||||
|
</li>
|
||||||
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
|
<% message = activity.org_act %>
|
||||||
|
<% content = message.parent_id.nil? ? message.content : message.parent.content %>
|
||||||
|
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
|
||||||
|
<% if message.board.org_subfield_id %>
|
||||||
|
<li>
|
||||||
|
<%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
|
||||||
|
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li>
|
||||||
|
<%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
|
||||||
|
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
|
<% news = activity.org_act %>
|
||||||
|
<li>
|
||||||
|
<%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(news.created_on) %></span>
|
||||||
|
<%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<%# if acts.count > 3 %>
|
||||||
|
<% activity = acts.first %>
|
||||||
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||||
|
<% document = activity.org_act %>
|
||||||
|
<div class="por_hotbar_right fl">
|
||||||
|
<% if get_image_path_from_content(document.content).nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %></p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
|
||||||
|
</div>
|
||||||
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
|
<!--发送过来的帖子-->
|
||||||
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
|
<% message = activity.org_act %>
|
||||||
|
<% content = message.parent_id.nil? ? message.content : message.parent.content %>
|
||||||
|
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
|
||||||
|
<% if message.board.org_subfield_id %>
|
||||||
|
<div class="por_hotbar_right fl">
|
||||||
|
<% if get_image_path_from_content(content).nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), board_message_url_in_org(message.board.id, message.id), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_url_in_org(message.board.id, message.id), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to title, board_message_url_in_org(message.board.id, message.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span><%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %></p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="por_hotbar_right fl">
|
||||||
|
<% if get_image_path_from_content(document.content).nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), board_message_path(message.board.id, message.id), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_path(message.board.id, message.id), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to title, board_message_path(message.board.id, message.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span><%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %></p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
|
<% news = activity.org_act %>
|
||||||
|
<% path = get_image_path_from_content(news.description) %>
|
||||||
|
<div class="por_hotbar_right fl">
|
||||||
|
<% if path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-1.jpg", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{path}", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to news.title, news_path(news), :class => 'por_hot_title_r link-black', :target => "_blank", :title => news.title %>
|
||||||
|
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(news.created_on) %></span><%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %></p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%# end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--por_hotbar end-->
|
@ -0,0 +1,212 @@
|
|||||||
|
<div class="por_course mt10 clear" style="display:<%= field.hide == 0 ? 'block':'none' %>;">
|
||||||
|
<% if is_default_field?(field) %>
|
||||||
|
<% case field.name %>
|
||||||
|
<% when 'course' %>
|
||||||
|
<h2 class="por_h2_index clear">课程动态</h2>
|
||||||
|
<% if @course_acts.blank? %>
|
||||||
|
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||||
|
<% else %>
|
||||||
|
<% @course_acts.first(4).each do |act| %>
|
||||||
|
<% if act.org_act_type == "HomeworkCommon" %>
|
||||||
|
<% activity = act.org_act %>
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.name.to_s %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now(activity.updated_at) %></span>
|
||||||
|
</div>
|
||||||
|
<% elsif act.org_act_type == "Message" %>
|
||||||
|
<% activity = act.org_act %>
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to activity.parent_id.nil? ? activity.subject : activity.parent.subject, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.parent_id.nil? ? activity.subject : activity.parent.subject %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now activity.updated_on %></span>
|
||||||
|
</div>
|
||||||
|
<% elsif act.org_act_type == "News" %>
|
||||||
|
<% activity = News.find(act.org_act_id) %>
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.title %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), news_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), news_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now activity.created_on %></span>
|
||||||
|
</div>
|
||||||
|
<% elsif act.org_act_type == "Poll" %>
|
||||||
|
<% activity = act.org_act %>
|
||||||
|
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||||
|
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
|
||||||
|
<% if ( activity.polls_status==2) %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<% if has_commit %>
|
||||||
|
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "por_course_title link-black", :title => poll_name %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "por_course_title link-black", :title => poll_name %>
|
||||||
|
<% end %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.polls_description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now activity.published_at %></span>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% when 'project' %>
|
||||||
|
<h2 class="por_h2_index clear">项目动态</h2>
|
||||||
|
<% if @project_acts.blank? %>
|
||||||
|
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||||
|
<% else %>
|
||||||
|
<% @project_acts.first(4).each do |act| %>
|
||||||
|
<% if act.org_act_type == "Issue" %>
|
||||||
|
<% activity = act.org_act %>
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to activity.subject, issue_url_in_org(activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.subject %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), issue_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), issue_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now activity.updated_on %></span>
|
||||||
|
</div>
|
||||||
|
<% elsif act.org_act_type == "Message" %>
|
||||||
|
<% activity = act.org_act %>
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
|
<% subject = activity.parent_id.nil? ? activity.subject : activity.parent.subject %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to subject, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "por_course_title link-black", :title => subject %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now activity.updated_on %></span>
|
||||||
|
</div>
|
||||||
|
<% elsif act.org_act_type == "News" %>
|
||||||
|
<% activity = act.org_act %>
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "por_course_title link-black", :title => activity.title %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), news_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), news_url_in_org(activity.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now activity.created_on %></span>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% if field.field_type == "Post" %>
|
||||||
|
<% org_acts = get_subfield_acts field %>
|
||||||
|
<% if org_acts.blank? %>
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %></h2>
|
||||||
|
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||||
|
<% else %>
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %>
|
||||||
|
<%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
|
||||||
|
</h2>
|
||||||
|
<% org_acts.first(4).each do |activity| %>
|
||||||
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||||
|
<% document = activity.org_act %>
|
||||||
|
<% org_subfield_id = params[:org_subfield_id] %>
|
||||||
|
<% iamge_path = get_image_path_from_content(document.content) %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "por_course_title link-black", :title => document.title %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now document.created_at %></span>
|
||||||
|
</div>
|
||||||
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where(:id => activity.org_act_id).count > 0 %>
|
||||||
|
<% message = activity.org_act %>
|
||||||
|
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
|
||||||
|
<% content = message.parent_id.nil? ? message.content : message.parent.content%>
|
||||||
|
<% iamge_path = get_image_path_from_content(content) %>
|
||||||
|
<% if message.board.org_subfield_id %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to title, board_message_url_in_org(message.board.id, message.id), :target => '_blank', :class => "por_course_title link-black", :title => title %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), board_message_url_in_org(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_url_in_org(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now message.created_on %></span>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to title, board_message_path(message.board, message.id), :target => '_blank', :class => "por_course_title link-black", :title => title %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), board_message_path(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_path(message.board.id, message.id), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now message.created_on %></span>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.org_act_type == 'News' and News.where(:id => activity.org_act_id).count > 0 %>
|
||||||
|
<% news = activity.org_act %>
|
||||||
|
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to news.title, news_path(news), :target => '_blank', :class => "por_course_title link-black", :title => news.title %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-2.jpg", :width => "140", :height => "100"), news_path(news), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), news_path(news), :target => "_blank", :class =>"fl" %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= time_from_now news.created_on %></span>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% elsif 'Compcou' %>
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %></h2>
|
||||||
|
<% if @excellent_courses.blank? %>
|
||||||
|
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||||
|
<% else %>
|
||||||
|
<% @excellent_courses.first(4).each do |course| %>
|
||||||
|
<div class="por_course_bar fl clear">
|
||||||
|
<%= link_to course.name, course_path(course.id), :target => '_blank', :class => "por_course_title link-black", :title => course.name %>
|
||||||
|
<%= link_to image_tag(url_to_avatar(course),:width => "140", :height => "100"), course_path(course), :target => "_blank", :class => "fl" %>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => course.id, :content=> course.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
|
||||||
|
<span class=" por_course_time"><%= current_time_and_term course %></span>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--por_course end-->
|
@ -0,0 +1,149 @@
|
|||||||
|
<div class="por_post mt10" style="display:<%= field.hide == 0 ? 'block':'none' %>;">
|
||||||
|
<% if acts.blank? %>
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %></h2>
|
||||||
|
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||||
|
<% else %>
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %>
|
||||||
|
<%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
|
||||||
|
</h2>
|
||||||
|
<div class="por_post_left fl">
|
||||||
|
<div class="por_post_leftbar ">
|
||||||
|
<% activity = acts.first %>
|
||||||
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||||
|
<% document = activity.org_act %>
|
||||||
|
<% if get_image_path_from_content(document.content).nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "por_post_title link-black", :title => document.title %>
|
||||||
|
<p class="mt5 mb5">
|
||||||
|
<span class="por_time mr10"><%= time_from_now(document.created_at) %> </span>
|
||||||
|
<%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => acts.first.org_act.id, :content=> acts.first.org_act.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
|
||||||
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
|
<% message = activity.org_act %>
|
||||||
|
<% content = message.parent_id.nil? ? message.content : message.parent.content %>
|
||||||
|
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
|
||||||
|
<% iamge_path = get_image_path_from_content(content) %>
|
||||||
|
<% if message.board.org_subfield_id %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to title, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "por_post_title link-black", :title => title %>
|
||||||
|
<p class="mt5 mb5">
|
||||||
|
<span class="por_time mr10"><%= time_from_now(message.created_on) %> </span>
|
||||||
|
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> message.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
|
||||||
|
<% else %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), board_message_path(message.board, message), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), board_message_path(message.board, message), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to title, board_message_path(message.board, message), :target => '_blank', :class => "por_post_title link-black", :title => title %>
|
||||||
|
<p class="mt5 mb5">
|
||||||
|
<span class="por_time mr10"><%= time_from_now(message.created_on) %> </span>
|
||||||
|
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> message.content, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
|
<% news = News.find(activity.org_act_id) %>
|
||||||
|
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to news.title, news_path(news), :target => '_blank', :class => "por_post_title link-black", :title => news.title %>
|
||||||
|
<p class="mt5 mb5">
|
||||||
|
<span class="por_time mr10"><%= time_from_now(news.created_on) %> </span>
|
||||||
|
<%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||||
|
</p>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% unless acts[1..5].nil? %>
|
||||||
|
<% acts[1..5].each do |activity| %>
|
||||||
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||||
|
<% document = activity.org_act %>
|
||||||
|
<ul class="por_post_list">
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
|
||||||
|
</ul>
|
||||||
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
|
<% message = Message.find(activity.org_act_id) %>
|
||||||
|
<% if message.board.org_subfield_id %>
|
||||||
|
<ul class="por_post_list">
|
||||||
|
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
|
||||||
|
<% else %>
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% else %>
|
||||||
|
<ul class="por_post_list">
|
||||||
|
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_path(message.board,message), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
|
||||||
|
<% else %>
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_path(message.board, message), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
|
<% news = News.find(activity.org_act_id) %>
|
||||||
|
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||||
|
<ul class="por_post_list">
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{news.title}".html_safe, news_path(news), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% unless acts[6..19].nil? %>
|
||||||
|
<div class="fl">
|
||||||
|
<ul class="por_post_right por_post_list">
|
||||||
|
<% acts[6..19].each do |activity| %>
|
||||||
|
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||||
|
<% document = activity.org_act %>
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
|
||||||
|
<% else activity.container_type == 'OrgSubfield' %>
|
||||||
|
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||||
|
<% message = Message.find(activity.org_act_id) %>
|
||||||
|
<% if message.board.org_subfield_id %>
|
||||||
|
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
|
||||||
|
<% else %>
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_path(message.board,message), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
|
||||||
|
<% else %>
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_path(message.board, message), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||||
|
<% news = News.find(activity.org_act_id) %>
|
||||||
|
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||||
|
<li><%= link_to "<span class='post_icons_grey fl'></span>#{news.title}".html_safe, news_path(news), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
</div><!--por_post end-->
|
@ -0,0 +1,37 @@
|
|||||||
|
<div class="por_news" style="display:<%= field.hide == 0 ? 'block':'none' %>;">
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %></h2>
|
||||||
|
<% if @acts.blank? %>
|
||||||
|
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||||
|
<% else %>
|
||||||
|
<ul class="por_news_list clear">
|
||||||
|
<% @acts.each do |obj| %>
|
||||||
|
<% user = org_user_by_type(obj) %>
|
||||||
|
<% title = org_title_by_type(obj) %>
|
||||||
|
<% content = org_content_by_type(obj) %>
|
||||||
|
<% time = org_time_by_type(obj) %>
|
||||||
|
<li>
|
||||||
|
<%= link_to image_tag(url_to_avatar(user),:width => "43", :height => "43", :class => "por_users_img"), user_path(user), :target => "_blank", :class => "fl" %>
|
||||||
|
<div class="por_news_txt fl">
|
||||||
|
<p class="por_news_p fl">
|
||||||
|
<%= link_to user.show_name, user_path(user), :class => "por_hot_name link-blue fl", :target => "_blank" %>
|
||||||
|
<span class="fl"> : </span>
|
||||||
|
<% if obj.act_type == "Message" %>
|
||||||
|
<%= link_to title, board_message_path(obj.act.board.id, obj.act.id) %>
|
||||||
|
<% elsif obj.act_type == "News" %>
|
||||||
|
<%= link_to title, news_path(obj.act.id) %>
|
||||||
|
<% elsif obj.act_type == "HomeworkCommon" %>
|
||||||
|
<%= link_to title, student_work_index_url_in_org(obj.act.id) %>
|
||||||
|
<% elsif obj.act_type == "Issue" %>
|
||||||
|
<%= link_to title, issue_path(obj.act.id) %>
|
||||||
|
<% end %>
|
||||||
|
</p>
|
||||||
|
<p><span class="por_time fl"><%= time_from_now(time) %> </span>
|
||||||
|
<!--<a href="javascript:void(0);" target="_blank" class="por_zan fr">50</a>-->
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
</div><!--por_news end-->
|
@ -0,0 +1,24 @@
|
|||||||
|
<div class="por_projects" style="display:<%= field.hide == 0 ? 'block':'none' %>;">
|
||||||
|
<h2 class="por_h2_index clear">热点项目</h2>
|
||||||
|
<% if containers.blank? %>
|
||||||
|
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||||
|
<% else %>
|
||||||
|
<ul>
|
||||||
|
<% container = containers.first %>
|
||||||
|
<li class="por_project_li">
|
||||||
|
<%= link_to "<span class='post_icons_grey fl'></span>#{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 link-black fl", :title => container.name, :target => "_blank" %>
|
||||||
|
<p class="fr por_time">活跃度<a class="ml5" ><%= static_project_score(container.project_score) %></a></p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => container.id, :content=> container.description, :maxheight => 40, :maxwordsnum => 55, :maxwidth => 0, :cl => "por_project_p"} %>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<% containers[1..4].each do |container| %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "<span class='post_icons_grey fl'></span>#{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 link-black fl", :title => container.name, :target => "_blank" %>
|
||||||
|
<p class="fr por_time">活跃度<a class="ml5" ><%= static_project_score(container.project_score) %></a></p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
</div><!--por_projects end-->
|
@ -0,0 +1,105 @@
|
|||||||
|
<% if field.field_type == "Resource" %>
|
||||||
|
<div class="por_teachers" style="display:<%= field.hide == 0 ? 'block' : 'none' %>;">
|
||||||
|
<h2 class="por_h2_index clear"><%= field.name %><%= link_to "更多>", org_subfield_files_path(field), :target => "_blank", :class => "f12 fontGrey2 fr" %></h2>
|
||||||
|
<div>
|
||||||
|
<ul class="por_teachers_li">
|
||||||
|
<% get_attach_org2(field).each do |attach| %>
|
||||||
|
<li >
|
||||||
|
<%= link_to image_tag(url_to_avatar(attach.author),:width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(attach.author), :target => "_blank", :class => "fl" %>
|
||||||
|
<!--<a href="javascript:void(0);" target="_blank" class="fl"><img src="/images/org_custom/homepageImage.jpg" width="43" height="43" alt="" class="por_teachers_img fl mr15"/></a>-->
|
||||||
|
<div class="por_teachers_txt fl mt5">
|
||||||
|
<%= link_to attach.author, user_path(attach.author), :class => " por_teachers_name link-black fl", :target => "_blank" %>
|
||||||
|
<p class="por_teachers_p fr">
|
||||||
|
<%= link_to truncate(attach.filename,length: 20, omission: '...'),
|
||||||
|
download_named_attachment_path(attach.id, attach.filename),
|
||||||
|
:title => attach.filename+"\n"+attach.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p class="por_teachers_span ">
|
||||||
|
<span class="mr10">类型:<span><%= attach.tag_list[0] %></span></span>
|
||||||
|
<span class="mr10">下载:<span><%= attach.downloads %></span></span>
|
||||||
|
<span class="mr10">引用:<span><%= attach.quotes.nil? ? 0 : attach.quotes %></span></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% elsif field.field_type == "Comptec" || field.field_type == "Compstu" %>
|
||||||
|
<div class="por_teachers" style="display:<%= field.hide == 0 ? 'block' : 'none' %>;">
|
||||||
|
<ul id="por_teachers_nav">
|
||||||
|
<li id="por_teachers_nav_1" class="por_teachers_hover" onclick="HoverLi(1);">
|
||||||
|
<a href="javascript:void(0);" class="por_teachers_type">名师风采</a>
|
||||||
|
</li>
|
||||||
|
<li id="por_teachers_nav_2" onclick="HoverLi(2);">
|
||||||
|
<a href="javascript:void(0);" class="por_teachers_type">学生英雄榜</a>
|
||||||
|
</li>
|
||||||
|
<!--<a href="javascript:void(0);" target="_blank" class="f12 fontGrey2 fr mt5">更多></a>-->
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<div id="por_teachers_content_1">
|
||||||
|
<ul class="por_teachers_li">
|
||||||
|
<% excellent_teachers.each do |teacher| %>
|
||||||
|
<li >
|
||||||
|
<%= link_to image_tag(url_to_avatar(teacher), :width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(teacher), :alt => "用户头像", :target => '_blank', :class => "fl" %>
|
||||||
|
<div class="por_teachers_txt fl mt5">
|
||||||
|
<%=link_to teacher.try(:realname) ? teacher.try(:realname) :teacher.try(:login), user_path(teacher), :class => "por_teachers_name link-black fl", :target => '_blank' %>
|
||||||
|
<p class="por_teachers_p fr" title="<%= teacher.my_workplace %>"><%= teacher.my_workplace %></p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p class="por_teachers_span ">
|
||||||
|
<% unless teacher.my_blogs_count == 0 %>
|
||||||
|
<span class=" mr10">博客 <%= teacher.my_blogs_count %></span>
|
||||||
|
<% end %>
|
||||||
|
<% unless teacher.courses.count == 0 %>
|
||||||
|
<span class="mr10">课程 <%= teacher.courses.count %></span>
|
||||||
|
<% end %>
|
||||||
|
<% unless teacher.my_students == 0 %>
|
||||||
|
<span class="mr10">学生 <%= teacher.my_students %></span>
|
||||||
|
<% end %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="por_teachers_content_2" class="undis">
|
||||||
|
<ul class="por_teachers_li">
|
||||||
|
<% excellent_students.each do |student| %>
|
||||||
|
<li >
|
||||||
|
<%= link_to image_tag(url_to_avatar(student), :width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(student), :alt => "用户头像", :target => '_blank', :class => "fl" %>
|
||||||
|
<div class="por_teachers_txt fl mt5">
|
||||||
|
<%=link_to student.try(:realname) ? student.try(:realname) :student.try(:login), user_path(student), :class => "por_teachers_name link-black fl", :target => '_blank' %>
|
||||||
|
<p class="por_teachers_p fr" title="<%= student.my_workplace %>"><%= student.my_workplace %></p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p class="por_teachers_span ">
|
||||||
|
<% unless student.my_blogs_count == 0 %>
|
||||||
|
<span class=" mr10">博客 <%= student.my_blogs_count %></span>
|
||||||
|
<% end %>
|
||||||
|
<% unless student.courses.count == 0 %>
|
||||||
|
<span class="mr10">课程 <%= student.courses.count %></span>
|
||||||
|
<% end %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//名师列表
|
||||||
|
function g(o){return document.getElementById(o);}
|
||||||
|
function HoverLi(n){
|
||||||
|
for(var i=1;i<=2;i++){
|
||||||
|
g('por_teachers_nav_'+i).className='por_teachers_nomal';
|
||||||
|
g('por_teachers_content_'+i).className='undis';
|
||||||
|
}
|
||||||
|
g('por_teachers_content_'+n).className='dis';
|
||||||
|
g('por_teachers_nav_'+n).className='por_teachers_hover';
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<% end %>
|
@ -0,0 +1,44 @@
|
|||||||
|
<ul class="sn-nav">
|
||||||
|
<% subfield_content.each do |field| %>
|
||||||
|
<% if is_default_field?(field) %>
|
||||||
|
<% case field.name %>
|
||||||
|
<% when 'activity' %>
|
||||||
|
<li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<%= link_to "首页", organization_path(@organization), :class => "sn-link-white" %>
|
||||||
|
</li>
|
||||||
|
<% when 'course' %>
|
||||||
|
<li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<a href="#course_<%= field.id %>" class="sn-link-white"> 课程动态</a>
|
||||||
|
</li>
|
||||||
|
<% when 'project' %>
|
||||||
|
<li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<a href="#project_<%= field.id %>" class="sn-link-white">项目动态</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% if field.field_type == "Post" && field.hide == 0 %>
|
||||||
|
<li class="nav-element">
|
||||||
|
<a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a>
|
||||||
|
</li>
|
||||||
|
<!--二级目录-->
|
||||||
|
<div class="sn-row sn-subnav-position sn-grey-opacity" style="display:none;">
|
||||||
|
<ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;">
|
||||||
|
<% field.sub_domains.each do |subdomain| %>
|
||||||
|
<li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey" %></li>
|
||||||
|
<li class="sn-subnav-slice">|</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% elsif field.field_type == "Resource" && field.hide == 0 %>
|
||||||
|
<li class="nav-element">
|
||||||
|
<a href="#resource_<%= field.id %>" class="sn-link-white"><%= field.name %></a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if User.current.admin_of_org?(@organization) %>
|
||||||
|
<li class="nav-element">
|
||||||
|
<a href="<%= setting_organization_path(@organization) %>" class="sn-link-white">配置</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
@ -0,0 +1,45 @@
|
|||||||
|
<% org_students.each do |org_student| %>
|
||||||
|
<% school = School.where("id =?", org_student.school_id).first %>
|
||||||
|
<div class="teacher-list-row">
|
||||||
|
<div>
|
||||||
|
<div class="teacher-avatar">
|
||||||
|
<%= link_to image_tag(url_to_avatar(org_student), :width => "90", :height => "90"), user_url_in_org(org_student), :alt => "用户头像" %>
|
||||||
|
</div>
|
||||||
|
<div class="fl">
|
||||||
|
<div class="ml25 mb20"><span class="teacher-name"><%=link_to org_student.try(:realname).nil? ? org_student.try(:login) : org_student.try(:realname), user_url_in_org(org_student) %></span>
|
||||||
|
<% unless school.nil? %>
|
||||||
|
<span class="f12 fontGrey2 mr15"><%= school.name %></span>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num"><%= org_student.courses.count %></div>
|
||||||
|
<div class="block-title">课程数</div>
|
||||||
|
</div>
|
||||||
|
<div class="block-slice"></div>
|
||||||
|
<div class="teacher-social-block">
|
||||||
|
<div class="block-num"><%= org_teacher_resource_count(org_student) %></div>
|
||||||
|
<div class="block-title">资源数</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% if User.current.admin_of_org?(@organization) %>
|
||||||
|
<a href="javascript:void(0);" class="fr teacher-select" onclick="hide($(this),'<%= org_student.id %>');" id="hide_<%= org_student.id %>"><%= org_student.excellent_student ==0 ? "设为学霸" : "取消设置" %></a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function hide(content, id){
|
||||||
|
if (content.text() == '设为学霸')
|
||||||
|
$.ajax({
|
||||||
|
url: "/organizations/set_excellent_student?user=" + id ,
|
||||||
|
type: "post"
|
||||||
|
});
|
||||||
|
else
|
||||||
|
$.ajax({
|
||||||
|
url: "/organizations/reset_excellent_student?user=" + id ,
|
||||||
|
type: "post"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,24 @@
|
|||||||
|
<div class="<%= cl %>" id="activity_description_<%= user_activity_id %>">
|
||||||
|
<span id="intro_content_<%= user_activity_id%>">
|
||||||
|
<%= content.to_s.html_safe%>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#intro_content_<%= user_activity_id %>").hide();
|
||||||
|
$(function() {
|
||||||
|
var heightType = <%= maxheight %>;
|
||||||
|
|
||||||
|
if (heightType > 0) {
|
||||||
|
$("#activity_description_<%= user_activity_id %>").css("max-height", heightType + "px");
|
||||||
|
}
|
||||||
|
|
||||||
|
var maxWidth = <%= maxwidth %>
|
||||||
|
if (maxWidth > 0) {
|
||||||
|
$("#intro_content_<%= user_activity_id%>").css("max-width", maxWidth + "px");
|
||||||
|
}
|
||||||
|
|
||||||
|
description_showwords_ellipsis(<%= user_activity_id %>,<%= maxwordsnum %>);
|
||||||
|
});
|
||||||
|
</script>
|
@ -0,0 +1,12 @@
|
|||||||
|
<% if @organization.allow_set_teachers && !org_subfield_had_created?(@organization, "Comptec") %>
|
||||||
|
<li class="fl mr15">
|
||||||
|
<input type="radio" id="orgTec" value="Comptec" name="field_type" />
|
||||||
|
<label for="Comptec">教师</label>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if User.current.admin? && !org_subfield_had_created?(@organization, "Compstu") %>
|
||||||
|
<li class="fl mr15">
|
||||||
|
<input type="radio" id="orgStu" value="Compstu" name="field_type" />
|
||||||
|
<label for="Comptec">学生</label>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
@ -0,0 +1,24 @@
|
|||||||
|
<div class="por_left">
|
||||||
|
<% @subfield_content.each do |field| %>
|
||||||
|
<% if field.status.to_i == 1 %>
|
||||||
|
<%= render :partial => 'organizations/org_custom_left1', :locals => {:field => field, :acts => get_subfield_acts(field) } %>
|
||||||
|
<% elsif field.status.to_i == 2 %>
|
||||||
|
<%= render :partial => 'organizations/org_custom_left2', :locals => {:field => field} %>
|
||||||
|
<% elsif field.status.to_i == 3 %>
|
||||||
|
<%= render :partial => 'organizations/org_custom_left3', :locals => {:field => field, :acts => get_subfield_acts(field) }%>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<!--右侧-->
|
||||||
|
<div class="por_right">
|
||||||
|
<% @subfield_content.each do |field| %>
|
||||||
|
<% if field.status.to_i == 4 %>
|
||||||
|
<%= render :partial => 'organizations/org_custom_right1', :locals => {:field => field} %>
|
||||||
|
<% elsif field.status.to_i == 5 %>
|
||||||
|
<%= render :partial => 'organizations/org_custom_right2', :locals => {:field => field, :containers => @excellent_projects} %>
|
||||||
|
<% elsif field.status.to_i == 6 %>
|
||||||
|
<%= render :partial => 'organizations/org_custom_right3', :locals => {:field => field} %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
@ -0,0 +1,33 @@
|
|||||||
|
<div class="sn-content-left fl sn-mt15">
|
||||||
|
<% @subfield_content.each do |field| %>
|
||||||
|
<% if field.status.to_i == 1 %>
|
||||||
|
<%= render :partial => 'organizations/org_subfield_leftT', :locals => {:field => field} %>
|
||||||
|
<% elsif field.status.to_i == 3 %>
|
||||||
|
<%#= render :partial => 'organizations/org_subfield_leftM', :locals => {:field => field} %>
|
||||||
|
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||||
|
<%= render :partial => 'organizations/org_subfield_leftM1', :locals => {:field => field} %>
|
||||||
|
<%= render :partial => 'organizations/org_subfield_leftM2', :locals => {:field => field} %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% elsif field.status.to_i == 4 %>
|
||||||
|
<%= render :partial => 'organizations/org_subfield_leftMD', :locals => {:field => field} %>
|
||||||
|
<% elsif field.status.to_i == 5 %>
|
||||||
|
<%= render :partial => 'organizations/org_subfield_leftD', :locals => {:field => field} %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<!--右侧-->
|
||||||
|
<div class="sn-content-right fr sn-mt15">
|
||||||
|
<% @subfield_content.each do |field| %>
|
||||||
|
<% if field.status.to_i == 6 %>
|
||||||
|
<%= render :partial => 'organizations/org_subfield_rightT', :locals => {:field => field} %>
|
||||||
|
<% elsif field.status.to_i == 7 %>
|
||||||
|
<%= render :partial => 'organizations/org_subfield_rightM', :locals => {:field => field} %>
|
||||||
|
<% elsif field.status.to_i == 8 %>
|
||||||
|
<%= render :partial => 'organizations/org_subfield_rightD', :locals => {:field => field} %>
|
||||||
|
<% elsif field.status.to_i == 23 %>
|
||||||
|
<%= render :partial => 'organizations/org_subfield_rightM2', :locals => {:field => field} %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
@ -0,0 +1,30 @@
|
|||||||
|
<div class="homepageRightBanner">
|
||||||
|
<div class="f16 fontGrey3">
|
||||||
|
<% if @type == "famous" %>
|
||||||
|
精品课程
|
||||||
|
<% else %>
|
||||||
|
<%= @field.name %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="resources mt10">
|
||||||
|
<div class="function-row" id="org_student_search">
|
||||||
|
<%= form_tag(url_for(:controller => 'organizations', :action => 'courses', :type => @type), :remote => true , :method => 'get', :id => 'resource_search_form') do %>
|
||||||
|
<input type="text" name="search" placeholder="输入项目名进行搜索" class="teacher-list-search fl" />
|
||||||
|
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
|
||||||
|
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
|
||||||
|
<% end %>
|
||||||
|
<div class="sn-font-grey fr">
|
||||||
|
<%= link_to "精品课程", courses_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div id="org_container_list">
|
||||||
|
<%=render 'organizations/org_container', :containers => @containers %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="wlist" id="pages" style="margin-top: 15px;">
|
||||||
|
<%= pagination_links_full @atta_pages, @containers_count, :per_page_links => false, :flag => true %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,3 @@
|
|||||||
|
$("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>');
|
||||||
|
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||||
|
$("#org_student_search").attr('href','<%= courses_organization_path(@organization, :type => @type) %>');
|
@ -0,0 +1,30 @@
|
|||||||
|
<div class="homepageRightBanner">
|
||||||
|
<div class="f16 fontGrey3">
|
||||||
|
<% if @type == "famous" %>
|
||||||
|
热门项目
|
||||||
|
<% else %>
|
||||||
|
<%= @field.name %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="resources mt10">
|
||||||
|
<div class="function-row" id="org_student_search">
|
||||||
|
<%= form_tag(url_for(:controller => 'organizations', :action => 'projects', :type => @type), :remote => true , :method => 'get', :id => 'resource_search_form') do %>
|
||||||
|
<input type="text" name="search" placeholder="输入项目名进行搜索" class="teacher-list-search fl" />
|
||||||
|
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
|
||||||
|
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
|
||||||
|
<% end %>
|
||||||
|
<div class="sn-font-grey fr">
|
||||||
|
<%= link_to "热门项目", projects_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div id="org_container_list">
|
||||||
|
<%=render 'organizations/org_container', :containers => @containers %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="wlist" id="pages" style="margin-top: 15px;">
|
||||||
|
<%= pagination_links_full @atta_pages, @containers_count, :per_page_links => false, :flag => true %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,3 @@
|
|||||||
|
$("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>');
|
||||||
|
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||||
|
$("#org_student_search").attr('href','<%= projects_organization_path(@organization, :type => @type) %>');
|
@ -0,0 +1 @@
|
|||||||
|
$("#hide_<%= @ex_student.id %>").text("设为学霸");
|
@ -0,0 +1 @@
|
|||||||
|
$("#hide_<%= @ex_student.id %>").text("取消设置");
|
@ -0,0 +1,30 @@
|
|||||||
|
<div class="homepageRightBanner">
|
||||||
|
<div class="f16 fontGrey3">
|
||||||
|
<% if @type == "famous" %>
|
||||||
|
学霸列表
|
||||||
|
<% else %>
|
||||||
|
<%= @field.name %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="resources mt10">
|
||||||
|
<div class="function-row" id="org_student_search">
|
||||||
|
<%= form_tag(url_for(:controller => 'organizations', :action => 'students', :type => @type), :remote => true , :method => 'get', :id => 'resource_search_form') do %>
|
||||||
|
<input type="text" name="search" placeholder="输入学生名进行搜索" class="teacher-list-search fl" />
|
||||||
|
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
|
||||||
|
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
|
||||||
|
<% end %>
|
||||||
|
<div class="sn-font-grey fr">
|
||||||
|
<%= link_to "学霸列表", students_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div id="org_students_list">
|
||||||
|
<%=render 'organizations/org_students_list', :org_students => @org_students %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="wlist" id="pages" style="margin-top: 15px;">
|
||||||
|
<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :flag => true %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,3 @@
|
|||||||
|
$("#org_students_list").html('<%= escape_javascript( render :partial => 'organizations/org_students_list', :locals => {:org_students => @org_students})%>');
|
||||||
|
$("#pages").html('<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||||
|
$("#org_student_search").attr('href','<%= students_organization_path(@organization, :type => @type) %>');
|
@ -0,0 +1,5 @@
|
|||||||
|
<% if @type == "course" %>
|
||||||
|
$("#hide_<%= @container.id %>").text("<%= (@status == 'reset' ? '设为精品' : '取消精品') %>");
|
||||||
|
<% elsif @type == "project" %>
|
||||||
|
$("#hide_<%= @container.id %>").text("<%= (@status == 'reset' ? '设为热门' : '取消热门') %>");
|
||||||
|
<% end %>
|
@ -1,8 +1,5 @@
|
|||||||
<% if @res %>
|
<% if @res %>
|
||||||
$("#org_subfield_list").html("");
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
||||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
|
|
||||||
$("#sub_field_left_lists").html("");
|
$("#sub_field_left_lists").html("");
|
||||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
$("#subfield_name").val("");
|
|
||||||
$("#sub_dir").val("");
|
|
@ -1,4 +1,4 @@
|
|||||||
$("#org_subfield_list").html("");
|
$("#org_subfield_list").html("");
|
||||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
||||||
$("#sub_field_left_lists").html("");
|
$("#sub_field_left_lists").html("");
|
||||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
@ -1,2 +1,2 @@
|
|||||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',:locals => {:subfields => @organization.org_subfields.order("priority")}) %>");
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
||||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
@ -1,3 +1,4 @@
|
|||||||
$("#subsubdomain_show_<%= @subdomain.id %>").html("<%= @subdomain.name %>");
|
$("#subsubdomain_show_<%= @subdomain.id %>").html("<%= @subdomain.name %>");
|
||||||
$("#sub_field_left_lists").html("");
|
$("#sub_field_left_lists").html("");
|
||||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||||
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
@ -1,3 +1 @@
|
|||||||
<% if @type != "2" %>
|
<div class="resourcesUploadBox mt10" ><a href="javascript:void(0);" onclick="show_upload();" class="uploadBoxIcon">上传资源</a></div>
|
||||||
<div class="resourcesUploadBox mt10" ><a href="javascript:void(0);" onclick="show_upload();" class="uploadBoxIcon">上传资源</a></div>
|
|
||||||
<% end %>
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
$("#user_messages_list").html("<%=escape_javascript(render :partial => 'layouts/show_messages_list', :locals => {:messages => @message_alls}) %>");
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddStatusToOrgDocumentComment < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :org_document_comments, :status, :integer, :default => false
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddExcellentStudentToUser < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :users, :excellent_student, :integer, :default => false
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddHotToProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :hot, :integer, :default => false
|
||||||
|
end
|
||||||
|
end
|
@ -1,4 +1,4 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://ruby.taobao.org/'
|
||||||
|
|
||||||
# Specify your gem's dependencies in gitlab.gemspec
|
# Specify your gem's dependencies in gitlab.gemspec
|
||||||
gemspec
|
gemspec
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue