From 46e4f2c14321f744d416f8236994c8254ed499a9 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 30 May 2016 14:23:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=96=B0base=E6=A1=86?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 2 +- app/views/layouts/_org_custom_footer.html.erb | 10 +++ ...stom.thml.erb => base_org_custom.html.erb} | 40 +++-------- .../organizations/_org_custom_header.html.erb | 67 +++++++++++++++++++ .../organizations/_org_custom_left1.html.erb | 0 .../organizations/_org_custom_left2.html.erb | 0 .../organizations/_org_custom_left3.html.erb | 0 .../organizations/_org_custom_right1.html.erb | 0 .../organizations/_org_custom_right2.html.erb | 0 .../organizations/_org_custom_right3.html.erb | 0 app/views/organizations/show.html.erb | 2 +- public/stylesheets/org_custom.css | 24 +++---- 12 files changed, 100 insertions(+), 45 deletions(-) create mode 100644 app/views/layouts/_org_custom_footer.html.erb rename app/views/layouts/{base_org_custom.thml.erb => base_org_custom.html.erb} (50%) create mode 100644 app/views/organizations/_org_custom_header.html.erb create mode 100644 app/views/organizations/_org_custom_left1.html.erb create mode 100644 app/views/organizations/_org_custom_left2.html.erb create mode 100644 app/views/organizations/_org_custom_left3.html.erb create mode 100644 app/views/organizations/_org_custom_right1.html.erb create mode 100644 app/views/organizations/_org_custom_right2.html.erb create mode 100644 app/views/organizations/_org_custom_right3.html.erb diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 2ab724728..3cf36a781 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -91,7 +91,7 @@ class OrganizationsController < ApplicationController course_types = "('Message','News','HomeworkCommon','Poll','Course')" @project_acts = get_project_activities_org @organization, project_ids @course_acts = get_course_activities_org @organization, course_ids - render :layout => 'base_org2' + render :layout => 'base_org_custom' else render_403 end diff --git a/app/views/layouts/_org_custom_footer.html.erb b/app/views/layouts/_org_custom_footer.html.erb new file mode 100644 index 000000000..a9c4a7e36 --- /dev/null +++ b/app/views/layouts/_org_custom_footer.html.erb @@ -0,0 +1,10 @@ + diff --git a/app/views/layouts/base_org_custom.thml.erb b/app/views/layouts/base_org_custom.html.erb similarity index 50% rename from app/views/layouts/base_org_custom.thml.erb rename to app/views/layouts/base_org_custom.html.erb index a453d1cd7..4a9ba4dce 100644 --- a/app/views/layouts/base_org_custom.thml.erb +++ b/app/views/layouts/base_org_custom.html.erb @@ -9,36 +9,18 @@ <%= favicon %> <%= javascript_heads %> <%= heads_for_theme %> - <%= stylesheet_link_tag 'org2','jquery/jquery-ui-1.9.2' %> - - <%#= call_hook :view_layouts_base_html_head %> + <%= stylesheet_link_tag 'org_custom', 'new_user', 'public','jquery/jquery-ui-1.9.2' %> + <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> <%=render :partial => "math_js" %> - - - - -
-
-
- -
- -
- <%= render :partial => "org_field_menu", :locals => {:subfield_content => @subfield_content} %> -
-
+ +<% update_visiti_count @organization %> +
+ <%= render :partial => 'org_custom_header' %>
-<%# 更新访问数,刷新的时候更新访问次数 %> -<% update_visiti_count @organization %> -<%# over %> +
<%= render_flash_messages %> @@ -46,10 +28,8 @@ <%= call_hook :view_layouts_base_content %>
-
- <%= render :partial => "org2_footer" %> -
- +
+ <%= render :partial => "layouts/org_custom_footer" %>
<%# 弹框 %> @@ -60,7 +40,7 @@ <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> <%= javascript_include_tag 'attachments' %> - + diff --git a/app/views/organizations/_org_custom_header.html.erb b/app/views/organizations/_org_custom_header.html.erb new file mode 100644 index 000000000..027e4e8ec --- /dev/null +++ b/app/views/organizations/_org_custom_header.html.erb @@ -0,0 +1,67 @@ +
+
+ + <% if User.current.logged? %> + + <% else %> + + <% end %> + +
+
+
+ + + + \ No newline at end of file diff --git a/app/views/organizations/_org_custom_left1.html.erb b/app/views/organizations/_org_custom_left1.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/organizations/_org_custom_left2.html.erb b/app/views/organizations/_org_custom_left2.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/organizations/_org_custom_left3.html.erb b/app/views/organizations/_org_custom_left3.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/organizations/_org_custom_right1.html.erb b/app/views/organizations/_org_custom_right1.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/organizations/_org_custom_right2.html.erb b/app/views/organizations/_org_custom_right2.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/organizations/_org_custom_right3.html.erb b/app/views/organizations/_org_custom_right3.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/organizations/show.html.erb b/app/views/organizations/show.html.erb index c490efb85..ba18438e5 100644 --- a/app/views/organizations/show.html.erb +++ b/app/views/organizations/show.html.erb @@ -1,6 +1,6 @@ <%# 区分两种模式 params[:org_subfield_id] 不为空的时候则跳到栏目%> <% if @organization.switch_type && params[:org_subfield_id].nil? %> - <%= render :partial => 'show_type2' %> + <%#= render :partial => 'show_type2' %> <% else %> <%= javascript_include_tag "jquery.infinitescroll.js" %> diff --git a/public/stylesheets/org_custom.css b/public/stylesheets/org_custom.css index 790877660..ce4bff32f 100644 --- a/public/stylesheets/org_custom.css +++ b/public/stylesheets/org_custom.css @@ -7,8 +7,6 @@ ol,ul,li{ list-style-type:none} a:link,a:visited{color:#000;text-decoration:none;} a:hover,a:active{color:#3b94d6;} - - /* 公共 */ .clear:after {content:".";height:0;visibility:hidden;display:block;clear:both;} .fl{ float:left;} @@ -24,11 +22,11 @@ a:hover,a:active{color:#3b94d6;} .mr5{ margin-right:5px;} .mr10{ margin-right:15px;} .mr15{ margin-right:10px;} -a.c_red{color:#df0600;} -.c_red{color:#df0600;} + /* 门户首页 */ -#por_header{ width:100%; height:70px; background-color:#3b94d6; } -.por_header_con{ width:1000px; margin:0 auto;} +#por_header{ width:100%; } +.por_header_top{ width:100%; height:70px; background:#3b94d6; } +.por_header_con{ width:1000px; margin:0 auto; height:70px; } .por_logo{ margin-top:5px;} .por_login li{ float:left;} .por_login li a{ display:block; padding:0 15px; height:70px; line-height:70px;font-size:16px; color:#fff; } @@ -37,15 +35,17 @@ a.c_red{color:#df0600;} .pro_input_search{ background-color:#daeefc; height:36px; width:355px; border:none; padding:0 5px; color:#3b94d6;} a.por_search_btn{ display:block;background:#daeefc url(../images/icons_por.png) 0 8px no-repeat; width:25px; height:36px;} a:hover.por_search_btn{background:#daeefc url(../images/icons_por.png) -35px 8px no-repeat; } +.por_nav{ width:1000px; height:70px; overflow:hidden; margin: 0 auto; position:relative; } +a.por_edit_index{ position:absolute; font-size:14px; right:5px; top:20px;} +.por_nav ul{ border-bottom:7px solid #ccc; height:63px;} +.por_nav ul li{ float:left; } +.por_nav ul li a{ display: block; height:63px; padding:0 20px; line-height:63px; font-size:18px; color:#333; } +.por_nav ul li a:hover{ border-bottom:7px solid #3b94d6; } +.por_index_act{border-bottom:7px solid #3b94d6; } #por_container{ width:1000px; margin:10px auto;} .por_left{ width:685px; margin-right:15px; float:left; } .por_right{ width:300px; float:left;} -.por_nav{ width:1000px; overflow:hidden; position:relative;height:53px; border-bottom:7px solid #ccc; margin-bottom:10px;} -a.por_edit_index{ position:absolute; font-size:14px; right:5px; top:15px;} -.por_nav ul li{ float:left;} -.por_nav ul li a{ display: block; height:53px; padding:0 20px; line-height:53px; font-size:18px; color:#333;} -.por_nav ul li a:hover{ border-bottom:7px solid #3b94d6;} .por_icons_hot{ background:url(../images/icons_por.png) 0 -78px no-repeat; height:22px; width:55px; padding-left:3px; color:#fff; font-size:12px; line-height:22px; font-weight:normal;} .por_h2_index{ font-size:20px; font-weight:normal; color:#3b94d6; width:100%; border-bottom:1px solid #e8e5e5; height:40px; line-height:40px;} a.por_more_index{ font-size:12px; color:#999; } @@ -115,8 +115,6 @@ a.por_teachers_name{ display:block; width:80px; font-size:18px;overflow:hidden; .por_footer_con ul li a span{ color:#999; margin:0 15px ;} .por_footer_con p{ text-align:center; margin-top:20px; color:#777;} -.por_index_position{ position:relative;} -a.por_xiang_index{ position:absolute; color:red; background:#fff; top:40px; left:292px;}