From 5034ddb4b644d77cb866751043392ae97c241a69 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 7 Dec 2015 12:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=84=E7=BB=87=E7=9A=84bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org.html.erb | 56 +++++++++++++++---- .../organizations/_join_course_menu.html.erb | 5 +- .../organizations/_join_project_menu.html.erb | 5 +- .../_org_left_subfield_list.html.erb | 3 - .../organizations/join_course_menu.js.erb | 10 +++- .../organizations/join_project_menu.js.erb | 10 +++- public/stylesheets/new_user.css | 2 +- 7 files changed, 68 insertions(+), 23 deletions(-) diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb index 67cffab28..9ca590390 100644 --- a/app/views/layouts/base_org.html.erb +++ b/app/views/layouts/base_org.html.erb @@ -18,16 +18,30 @@ <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> - + + + +
- +
    - + <% if User.current.logged? %> <% else %> @@ -73,10 +87,12 @@
    <%= link_to @organization.name, organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %> - <% if @organization.is_public? %> - <%= l(:label_public)%> - <% else %> - <%= l(:label_private)%> + <% if User.current.logged? %> + <% if @organization.is_public? %> + <%= l(:label_public)%> + <% else %> + <%= l(:label_private)%> + <% end %> <% end %>
    @@ -95,10 +111,17 @@
    - <%= link_to '文章', organization_org_document_comments_path(@organization) %> ( - <%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %> - ) |  - <%= 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" %>) + <%= 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 %> +  |  + <%= link_to '成员', members_organization_path(@organization.id) %>  + <% if User.current.logged? %> + (<%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %>) + <% end %>
@@ -152,6 +175,17 @@ $("#projectMenu").mouseleave(function(){ $("#topnav_project_menu").hide(); }); + + function show_homepage(id, has_homepage){ + if (has_homepage == 1) + { + window.location.href = "/organizations/" + id + "?show_homepage=1"; + } + else + { + alert("您还没有设置首页! 您可以把您喜欢的文章设为组织首页。"); + } + } diff --git a/app/views/organizations/_join_course_menu.html.erb b/app/views/organizations/_join_course_menu.html.erb index d875550de..fa507db28 100644 --- a/app/views/organizations/_join_course_menu.html.erb +++ b/app/views/organizations/_join_course_menu.html.erb @@ -22,11 +22,10 @@ -
+
请选择关联到组织的课程
-
<%=form_tag url_for(:controller => 'organizations', :action => 'join_courses', :organization_id => organization_id),:method => 'post', :id => 'join_courses_form', :remote => true,:class=>"resourcesSearchBox" do %> @@ -42,7 +41,7 @@
-
+