From c57c575c84a80cfd004f2ef3bdae569a66da5b3e Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 30 May 2016 16:24:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=89=88=E7=BB=84=E7=BB=87=E9=9D=99?= =?UTF-8?q?=E6=80=81=E9=A1=B5=E9=9D=A2=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/organizations_helper.rb | 56 +++++------- app/views/layouts/base_org_custom.html.erb | 14 +-- .../organizations/_org_custom_left1.html.erb | 27 ++++++ .../organizations/_org_custom_left2.html.erb | 28 ++++++ .../organizations/_org_custom_left3.html.erb | 37 ++++++++ .../organizations/_org_custom_right1.html.erb | 71 +++++++++++++++ .../organizations/_org_custom_right2.html.erb | 32 +++++++ .../organizations/_org_custom_right3.html.erb | 91 +++++++++++++++++++ app/views/organizations/_show_custom.html.erb | 31 +++++++ app/views/organizations/show.html.erb | 2 +- public/stylesheets/org_custom.css | 2 +- 11 files changed, 348 insertions(+), 43 deletions(-) create mode 100644 app/views/organizations/_show_custom.html.erb diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index cba4fa210..ab3b3715c 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -66,34 +66,26 @@ module OrganizationsHelper option1 << "左一" option1 << "1" type << option1 - # option2 = [] - # option2 << "中一" - # option2 << "2" - # type << option2 + option2 = [] + option2 << "左二" + option2 << "2" + type << option2 option3 = [] - option3 << "左二" - option3 << "3" + option3 << "左三" + option3 << "2" type << option3 option4 = [] - option4 << "左三" - option4 << "4" + option4 << "右一" + option4 << "3" type << option4 option5 = [] - option5 << "左四" + option5 << "右二" option5 << "5" type << option5 option6 = [] - option6 << "右一" + option6 << "右三" option6 << "6" type << option6 - option7 = [] - option7 << "右二" - option7 << "7" - type << option7 - option8 = [] - option8 << "右三" - option8 << "8" - type << option8 type end @@ -104,18 +96,22 @@ module OrganizationsHelper option1 << "左一" option1 << "1" type << option1 + option2 = [] + option2 << "左二" + option2 << "2" + type << option2 option3 = [] - option3 << "左二" - option3 << "3" + option3 << "左三" + option3 << "2" type << option3 option4 = [] - option4 << "左三" - option4 << "4" + option4 << "右一" + option4 << "3" type << option4 - option6 = [] - option6 << "右一" - option6 << "6" - type << option6 + option5 = [] + option5 << "右二" + option5 << "5" + type << option5 type end @@ -128,14 +124,10 @@ module OrganizationsHelper when 3 resulet = "左二" when 4 - resulet = "左三" - when 5 - resulet = "左四" - when 6 resulet = "右一" - when 7 + when 5 resulet = "右二" - when 8 + when 6 resulet = "右三" end end diff --git a/app/views/layouts/base_org_custom.html.erb b/app/views/layouts/base_org_custom.html.erb index 052dea860..0eb764e5e 100644 --- a/app/views/layouts/base_org_custom.html.erb +++ b/app/views/layouts/base_org_custom.html.erb @@ -21,16 +21,15 @@ <%= render :partial => 'org_custom_header', :locals => {:subfield_content => @subfield_content} %> - -
+<%# 内容开始 %> +
<%= render_flash_messages %> <%= yield %> <%= call_hook :view_layouts_base_content %>
- -
- <%= render :partial => "layouts/org_custom_footer" %>
- +<%# 内容结束 %> +<%# 页面底部 %> +
<%= render :partial => "layouts/org_custom_footer" %>
<%# 弹框 %> @@ -42,6 +41,3 @@ - - - diff --git a/app/views/organizations/_org_custom_left1.html.erb b/app/views/organizations/_org_custom_left1.html.erb index e69de29bb..4410f9545 100644 --- a/app/views/organizations/_org_custom_left1.html.erb +++ b/app/views/organizations/_org_custom_left1.html.erb @@ -0,0 +1,27 @@ +
+

网站头条更多>

+
    +
  • + 热门推荐阿里前副总裁:阿里巴巴给我上的10 +

    1分钟前 窦豆

    +

    本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必

    +
  • +
  • + 热门推荐阿里前副总裁:阿里巴巴给我上的10 +

    1分钟前 窦豆

    +

    本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必

    +
  • +
  • + 阿里前副总裁里前副总裁:里前副总裁:里前副总裁::阿里巴巴给我上的10 +

    1分钟前 窦豆

    +

    本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必

    +
  • +
+
+ + 阿里前副总裁里前副总裁:里前副总裁:里前副总裁::阿里巴巴给我上的10 +

1分钟前 窦豆

+

本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必

+
+
+
\ No newline at end of file diff --git a/app/views/organizations/_org_custom_left2.html.erb b/app/views/organizations/_org_custom_left2.html.erb index e69de29bb..649a1dd55 100644 --- a/app/views/organizations/_org_custom_left2.html.erb +++ b/app/views/organizations/_org_custom_left2.html.erb @@ -0,0 +1,28 @@ +
+

精品课程更多>

+
+ 2016春计算机程序设计(Z2算机程序设计(Z2班)算机程序设计(Z2班)班) + +

学习程序设计,要学习语言的语法更重要的是求解问题的算法思想。语法的学习需要多尝试,算法的算机程序设计(Z2班)算机程序设计(Z2班)算机程序设计(Z2班)学习需要多思考。学习程序设计

+ 2016春季学期 +
+
+ 2016春计算机程序设计(Z2班) + +

学习程序设计,要学习语言的语法更重要的是求解问题的算法思想。语法的学习需要多尝试,算法的学习需要多思考。学习程序设计

+ 2016春季学期 +
+
+ 2016春计算机程序设计(Z2班) + +

学习程序设计,要学习语言的语法更重要的是求解问题的算法思想。语法的学习需要多尝试,算法的学习需要多思考。学习程序设计

+ 2016春季学期 +
+
+ 2016春计算机程序设计(Z2班) + +

学习程序设计,要学习语言的语法更重要的是求解问题的算法思想。语法的学习需要多尝试,算法的学习需要多思考。学习程序设计

+ 2016春季学期 +
+
+
\ No newline at end of file diff --git a/app/views/organizations/_org_custom_left3.html.erb b/app/views/organizations/_org_custom_left3.html.erb index e69de29bb..db20d42a1 100644 --- a/app/views/organizations/_org_custom_left3.html.erb +++ b/app/views/organizations/_org_custom_left3.html.erb @@ -0,0 +1,37 @@ +
+

精华帖子更多>

+
+
+ + 阿里前副总裁里前副总裁:里前副总裁:里前副总裁::阿里巴巴给我上的10 +

1分钟前 窦豆

+

本文选自阿本文选自阿里本文选自阿里本文选自阿里本文选自阿里本文选自阿里里巴巴前副总裁、首任美籍高管波特·埃里斯曼《阿里传》在这本书里,波特概括了他在阿里巴巴任职的8年中,学到的40堂课这40堂课简单明了地概括了马云的经营理念,以及阿里终成帝国的必

+
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/app/views/organizations/_org_custom_right1.html.erb b/app/views/organizations/_org_custom_right1.html.erb index e69de29bb..6fc24555f 100644 --- a/app/views/organizations/_org_custom_right1.html.erb +++ b/app/views/organizations/_org_custom_right1.html.erb @@ -0,0 +1,71 @@ +
+

最新动态更多>

+
    +
  • + +
    +

    + 叮当当  :  + Trustie社区新版上线了必须支持一下,比以前好用很多.... +

    +

    1分钟前 500

    +
    +
    +
  • +
  • + +
    +

    + 叮当叮当叮当叮当  :  + Trustie社区新版上线了必须支持一下,比以前好用很多了。Trustie社区新版上线了必须支持一下,比以前好用很多了... +

    +

    1分钟前 500

    +
    +
    +
  • +
  • + +
    +

    + 叮当叮当叮当叮当  :  + Trustie社区新版上线了必须支持一下,比以前好用很多了。Trustie社区新版上线了必须支持一下,比以前好用很多了... +

    +

    1分钟前 500

    +
    +
    +
  • +
  • + +
    +

    + 当叮当  :  + Trustie社区新版上线了必须支持一下,比以前好用很多了。Trustie社区新版上线了必须支持一下,比以前好用很多了... +

    +

    1分钟前 500

    +
    +
    +
  • +
  • + +
    +

    + 叮当叮当叮当叮当  :  + Trustie社区新版上线了必须支持一下很多了... +

    +

    1分钟前 500

    +
    +
    +
  • +
  • + +
    +

    + 叮当叮当叮当叮当  :  + Trustie社区新版上线了必须支持一下,比以前好用很多了。Trustie社区新版上线了必须支持一下,比以前好用很多了... +

    +

    1分钟前 500

    +
    +
    +
  • +
+
\ No newline at end of file diff --git a/app/views/organizations/_org_custom_right2.html.erb b/app/views/organizations/_org_custom_right2.html.erb index e69de29bb..3cef2f622 100644 --- a/app/views/organizations/_org_custom_right2.html.erb +++ b/app/views/organizations/_org_custom_right2.html.erb @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/app/views/organizations/_org_custom_right3.html.erb b/app/views/organizations/_org_custom_right3.html.erb index e69de29bb..698a2ea25 100644 --- a/app/views/organizations/_org_custom_right3.html.erb +++ b/app/views/organizations/_org_custom_right3.html.erb @@ -0,0 +1,91 @@ +
+ +
+ +
+
+ +
+
\ No newline at end of file diff --git a/app/views/organizations/_show_custom.html.erb b/app/views/organizations/_show_custom.html.erb new file mode 100644 index 000000000..fbcc0c5f3 --- /dev/null +++ b/app/views/organizations/_show_custom.html.erb @@ -0,0 +1,31 @@ +
+ <% @subfield_content.each do |field| %> + <% if field.status.to_i == 1 %> + <%= render :partial => 'organizations/org_custom_left1', :locals => {:field => field} %> + <% elsif field.status.to_i == 3 %> + <%#= render :partial => 'organizations/org_subfield_leftM', :locals => {:field => field} %> +
+ <%#= render :partial => 'organizations/org_subfield_leftM1', :locals => {:field => field} %> + <%= render :partial => 'organizations/org_custom_left3', :locals => {:field => field} %> +
+
+ <% elsif field.status.to_i == 2 %> + <%= render :partial => 'organizations/org_custom_left2', :locals => {:field => field} %> + <% end %> + <% end %> +
+ +
+ <% @subfield_content.each do |field| %> + <% if field.status.to_i == 4 %> + <%= render :partial => 'organizations/org_custom_right1', :locals => {:field => field} %> + <% elsif field.status.to_i == 5 %> + <%= render :partial => 'organizations/org_custom_right2', :locals => {:field => field} %> + <% elsif field.status.to_i == 6 %> + <%= render :partial => 'organizations/org_custom_right3', :locals => {:field => field} %> + <%# elsif field.status.to_i == 23 %> + <%#= render :partial => 'organizations/org_subfield_rightM2', :locals => {:field => field} %> + <% end %> + <% end %> +
+
\ No newline at end of file diff --git a/app/views/organizations/show.html.erb b/app/views/organizations/show.html.erb index ba18438e5..72e95ded9 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_custom' %> <% else %> <%= javascript_include_tag "jquery.infinitescroll.js" %> diff --git a/public/stylesheets/org_custom.css b/public/stylesheets/org_custom.css index cb3400031..6f68ba47f 100644 --- a/public/stylesheets/org_custom.css +++ b/public/stylesheets/org_custom.css @@ -78,7 +78,7 @@ a.por_more_teacher{ font-size:12px; } .por_teachers_li{ margin-top:10px;} .por_teachers_li li{ padding:10px 0;border-bottom:1px solid #e8e5e5;} .por_teachers_img{ width:60px; height:60px; -webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;} -a.por_teachers_name{ display:block; width:80px; font-size:18px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +a.por_teachers_name{ display:block; width:75px; font-size:18px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .por_teachers_p{ font-size:14px; color:#999; width:150px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .por_teachers_span{ color:#999;} .por_teachers_span a{ margin:0 5px; color:#999;}