子页面没有内容显示

This commit is contained in:
huang 2016-06-08 09:16:57 +08:00
parent b965698fdf
commit e4f48f046b
3 changed files with 54 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class OrganizationsController < ApplicationController
helper :issues
include UsersHelper
include OrganizationsHelper
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses]
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses, :acts]
# before_filter :allow_as_admin, :only => [:students, :teachers, :projects, :courses, :acts]
layout 'base_org'
def index
@ -265,6 +265,13 @@ class OrganizationsController < ApplicationController
end
def acts
@subfield_content = @organization.org_subfields.order("priority")
@org_subfield = OrgSubfield.where(:id => params[:org_subfield_id]).first
@subfield_acts = get_subfield_acts(@org_subfield)
respond_to do |format|
format.html{render :layout => 'base_org_custom'}
format.js
end
end
def searchmember_by_name members, name

View File

@ -1,4 +1,5 @@
<% if @subfield_acts.blank? %>
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
<% else %>
<div class="sn-inner-body">
<div class="sn-innner-content">

View File

@ -0,0 +1,45 @@
<% if @subfield_acts.blank? %>
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
<% else %>
<div class="sn-inner-body">
<div class="sn-innner-content">
<div class="sn-row sn-bg-white">
<div class="sn-font-grey3 f14">
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> &gt;
<a class = "sn-link-grey2"><%= @org_subfield.name %></a>
</div>
</div>
<div class="sn-inner-newslist mt15">
<h2 class="sn-inner-newsh2"><%= @org_subfield.name %></h2>
<ul>
<% @subfield_acts.each do |act| %>
<% title = subfield_title_type(act) %>
<% time = subfield_time_type(act) %>
<% reply_count = subfield_reply_count_type(act) %>
<% document = act.org_act %>
<li>
<div class="sn-circle fl"></div>
<% if act.org_act_type == "OrgDocumentComment" %>
<%=link_to title, org_document_comment_path(act.org_act, :organization_id => @organization.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
<% elsif act.org_act_type == "News" %>
<%=link_to title, news_path(act.org_act), :class => "sn-newslist-titile fl", :target => "_blank" %>
<% elsif act.org_act_type == "Message" %>
<%=link_to title, board_message_path(act.org_act.board.id, act.org_act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
<% end %>
<span class=" txt-grey fr"><%= format_date(time) %></span>
<span class="sn-newslist-reply fr mr10 txt-grey">回复(<%= reply_count %></span>
<div class="cl"></div>
</li>
<% end %>
</ul>
<!--<div>-->
<!--<ul class="sn-inner-pages" id="pages" style="margin-top: 5px;">-->
<!--<%#= pagination_links_full @atta_pages, @atta_count, :per_page_links => true, :remote => @is_remote, :flag => true %>-->
<!--<div class="cl"></div>-->
<!--</ul>-->
<!--</div>-->
</div>
</div>
</div>
<% end %>