diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index ae1119609..098cefceb 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -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 diff --git a/app/views/organizations/_show_custom_org_subfield.html.erb b/app/views/organizations/_show_custom_org_subfield.html.erb index 10ac31637..54416b6f0 100644 --- a/app/views/organizations/_show_custom_org_subfield.html.erb +++ b/app/views/organizations/_show_custom_org_subfield.html.erb @@ -1,4 +1,5 @@ <% if @subfield_acts.blank? %> +

该模块暂时没有相关内容

<% else %>
diff --git a/app/views/organizations/acts.html.erb b/app/views/organizations/acts.html.erb new file mode 100644 index 000000000..da6b79ee6 --- /dev/null +++ b/app/views/organizations/acts.html.erb @@ -0,0 +1,45 @@ +<% if @subfield_acts.blank? %> +

该模块暂时没有相关内容

+<% else %> +
+
+
+
+ 您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> > + <%= @org_subfield.name %> +
+
+
+

<%= @org_subfield.name %>

+
    + <% @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 %> +
  • +
    + <% 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 %> + <%= format_date(time) %> + 回复(<%= reply_count %>) +
    +
  • + <% end %> +
+ + + + + + + +
+
+
+<% end %>