组织科配置
This commit is contained in:
parent
c431658333
commit
f662bfa40b
|
@ -160,7 +160,7 @@ class OrganizationsController < ApplicationController
|
|||
def get_project_activities_org org
|
||||
project_ids = org.projects.map{|project| project.id}.join(",")
|
||||
unless project_ids.blank?
|
||||
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' order by updated_at desc limit 3;")
|
||||
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' order by updated_at desc limit 8;")
|
||||
else
|
||||
project_acts = nil
|
||||
end
|
||||
|
@ -171,7 +171,7 @@ class OrganizationsController < ApplicationController
|
|||
def get_course_activities_org org
|
||||
course_ids = org.courses.map{|course| course.id}.join(",")
|
||||
unless course_ids.blank?
|
||||
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' order by updated_at desc limit 6;")
|
||||
project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' order by updated_at desc limit 8;")
|
||||
else
|
||||
project_acts = nil
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module OrganizationsHelper
|
|||
end
|
||||
|
||||
def get_message_org(org_id, field_id)
|
||||
OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and org_subfield_id = #{field_id} and parent_id is null order by updated_at desc limit 3;")
|
||||
OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and org_subfield_id = #{field_id} and parent_id is null order by updated_at desc limit 8;")
|
||||
end
|
||||
|
||||
def get_message_reply_org(org_id, ids)
|
||||
|
|
|
@ -110,13 +110,10 @@
|
|||
<% if is_default_field?(field) %>
|
||||
<% case field.name %>
|
||||
<% when 'course' %>
|
||||
|
||||
|
||||
|
||||
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<div class="box1 bg-grey" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<% if field.status == 0 %>
|
||||
<div class="content">
|
||||
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">课程动态</h2><p class="box-title-p">course activities</p></div>
|
||||
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">课程动态</h2></div>
|
||||
<% if @course_acts.nil? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<% else %>
|
||||
|
@ -173,16 +170,17 @@
|
|||
<% end %>
|
||||
</div><!--box1 end-->
|
||||
<% when 'project' %>
|
||||
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<% if field.status == 0 %>
|
||||
<div class="content ">
|
||||
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p"></p></div>
|
||||
<div class="box-top" id="project_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p"></p></div>
|
||||
<% if @project_acts.nil? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<% else %>
|
||||
<div class="course-list">
|
||||
<ul class="clearfix">
|
||||
<% unless @project_acts.nil? %>
|
||||
<%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts} %>
|
||||
<%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts.first(3)} %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
|
@ -194,7 +192,7 @@
|
|||
</div><!--content end-->
|
||||
<% else %>
|
||||
<div class="content">
|
||||
<div class="box-top" id="resource_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
|
||||
<div class="box-top" style="display:<%= field.hide == 0?'block':'none' %>;" id="project_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p"></p></div>
|
||||
<% if @project_acts.nil? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<% else %>
|
||||
|
@ -209,7 +207,7 @@
|
|||
|
||||
</div><!--row end-->
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if field.field_type == "Post" %> <%# 讨论类型 %>
|
||||
|
@ -219,13 +217,13 @@
|
|||
<% if field.status == 0 %>
|
||||
<div class="content">
|
||||
<div class="box-top" id="message_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
|
||||
<% if message_ats.nil? %>
|
||||
<% if message_ats.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<% else %>
|
||||
<div class="course-list">
|
||||
<ul class="clearfix">
|
||||
|
||||
<% message_ats.each do |act| %>
|
||||
<% message_ats.first(3).each do |act| %>
|
||||
<%= render :partial => 'organizations/org_new_forum_pic', :locals => {:activity => act, :field => field, :organization => @organization} %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
@ -239,7 +237,7 @@
|
|||
<% else %>
|
||||
<div class="content">
|
||||
<div class="box-top" id="resource_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
|
||||
<% if message_ats.nil? %>
|
||||
<% if message_ats.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<% else %>
|
||||
<div class="row">
|
||||
|
@ -262,7 +260,7 @@
|
|||
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
|
||||
<div class="content">
|
||||
<div class="box-top" id="resource_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
|
||||
<% if org_attachs.nil? %>
|
||||
<% if org_attachs.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<% else %>
|
||||
<div class="row">
|
||||
|
|
|
@ -95,7 +95,7 @@ a.pre-back{ background:#888;}
|
|||
.footer-con ul{ display:block; width:430px; height:50px; margin:0 auto; }
|
||||
.footer-con ul li a{font-size:18px; color:#fff; margin-right:35px; font-weight:bold;}
|
||||
/** download **/
|
||||
.row-ziyuan{ width:570px; border-bottom:1px solid #f0f0f0; padding:15px 0;margin: 0px 15px;}
|
||||
.row-ziyuan{ width:570px; border-bottom:1px solid #e6e6e6; padding:15px 0;margin: 0px 15px;}
|
||||
.ziyuan-box{ width:420px; margin-right:20px;}
|
||||
.ziyuan-box span{ margin-right:5px;}
|
||||
.ziyuan-title{ display:block; width:420px; font-size:16px;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
|
||||
|
@ -177,7 +177,8 @@ a:hover.read-more{ text-decoration:underline;}
|
|||
|
||||
|
||||
a.more-btn{ display:block; background:#ccc; color:#fff; margin-top:10px; width:100px; height:38px;font-size:14px; -webkit-border-radius: 5px;border-radius:5px;text-align:center; line-height:38px;}
|
||||
a.more-btn-center{ display:block; background:#ccc; color:#fff; margin-top:10px; width:100px; height:38px;font-size:14px; -webkit-border-radius: 5px;border-radius:5px;text-align:center; line-height:38px;width:100px; margin:0px auto;margin-top: 15px;}
|
||||
a.more-btn{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}
|
||||
a.more-btn-center{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}
|
||||
a:hover.more-btn{ background:#29146f; color:#fff;}
|
||||
a:hover.more-btn-center{ background:#29146f; color:#fff;}
|
||||
.mt30{ margin-top:30px;}
|
||||
|
|
Loading…
Reference in New Issue