diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index da0eb8009..6cd55be39 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -28,11 +28,18 @@ class OrganizationsController < ApplicationController helper :project_score helper :issues include UsersHelper - before_filter :find_organization, :only => [:show, :members, :apply_subdomain] + before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout] layout 'base_org' def index end + + # 组织风格判定 + # style:为0的时候为老式风格,1 为新式风格 + def select_org_layout + @org.style == 0 ? 'base_org' : 'base_org_newstyle' + end + def new @organization = Organization.new render :layout => 'new_base' diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb new file mode 100644 index 000000000..0296d20b4 --- /dev/null +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -0,0 +1,208 @@ +<% @nav_dispaly_project_label = 1 + @nav_dispaly_forum_label = 1 %> +<%#@nav_dispaly_project_label = 1 %> + + + + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= javascript_heads %> + <%= heads_for_theme %> + <%= stylesheet_link_tag 'pleft','prettify','jquery/jquery-ui-1.9.2','header','new_user','repository','courses','org', 'share' %> + <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> + <%= javascript_include_tag 'attachments' %> + <%= call_hook :view_layouts_base_html_head %> + + <%= yield :header_tags -%> + + + + + + + + +
+
+ + + +
+
+
+
+
+
+
+ + + + + +
+ <%= link_to truncate(@organization.name,:length => 26), organization_path(@organization.id), :class=>"pr_info_name c_dark fb break_word" %> + <% if User.current.logged? %> + <% if @organization.is_public? %> + <%= l(:label_public)%> + <% else %> + <%= l(:label_private)%> + <% end %> + <% end %> +
+ + <% if User.current.admin_of_org?(@organization) %> + 配置 + <% end %> + + + + + + + + + + +
+
+ <%= link_to '文章', organization_org_document_comments_path(@organization) %>  + <%# if User.current.logged? %> + ( + <%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %> + ) + <%# end %> + <% if User.current.logged? %> +  |  + <%= link_to '成员', members_organization_path(@organization.id) %>  + (<%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %>) + <% end %> +
+
+
+ <%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %> +
+
访问计数 <%= @organization.visits.to_i %>
+
+
+ <%= render_flash_messages %> + <%= yield %> + <%= call_hook :view_layouts_base_content %> +
+
+
+
+ + +
+ +
+ + + + + + + +