|
|
|
@ -29,17 +29,11 @@ class OrganizationsController < ApplicationController
|
|
|
|
|
helper :issues
|
|
|
|
|
include UsersHelper
|
|
|
|
|
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout]
|
|
|
|
|
layout :select_org_layout
|
|
|
|
|
layout 'base_org'
|
|
|
|
|
def index
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 组织风格判定
|
|
|
|
|
# style:为0的时候为老式风格,1 为新式风格
|
|
|
|
|
def select_org_layout
|
|
|
|
|
(@organization.show_mode == 1 && params[:action] == "show")? 'base_org_newstyle' : 'base_org'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def new
|
|
|
|
|
@organization = Organization.new
|
|
|
|
|
render :layout => 'new_base'
|
|
|
|
@ -81,6 +75,7 @@ class OrganizationsController < ApplicationController
|
|
|
|
|
@project_acts = get_project_activities_org @organization
|
|
|
|
|
@course_acts_homework = get_course_homework_activities_org @organization
|
|
|
|
|
@course_acts_message = get_course_message_activities_org @organization
|
|
|
|
|
render :layout => 'base_org_newstyle'
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
|
|
|
|