From 8d7c58fc247e620ba5c6c20db709178f8e4aaa12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 17 Jul 2019 16:37:58 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/competitions/_header.html.erb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/views/competitions/_header.html.erb b/app/views/competitions/_header.html.erb index 18e284ec..d8956ee7 100644 --- a/app/views/competitions/_header.html.erb +++ b/app/views/competitions/_header.html.erb @@ -64,11 +64,31 @@ +
<% if User.current.logged? %> <%= link_to (image_tag(url_to_avatar(User.current), :width =>"34", :height => "34", :class => "radius", :nhname => "avatar_image", :alt=>"头像", :id => "nh_user_logo")), user_path(User.current),:class => "fr mt15 ml40" %> <% else %> 登录/注册 <% end %> + + +
\ No newline at end of file diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index a716e275..db0bbd45 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -1211,18 +1211,18 @@ html>body #ajax-indicator { position: fixed; } } .surfacePlot{ - width:120px; - height:90px; + cursor: pointer; + width:122px; + height:92px; background:rgba(250,250,250,1); border:1px solid rgba(221,221,221,1); } .marginuploading{ - margin: 27px 42px; -} - -.roundedRectangles{ + padding: 28px 43px; position: absolute; - top: 10px; - right: -22px; + z-index: 10; +} +.surfacePlot:hover .marginuploading.hidden{ + background: rgba(0,0,0, 0.1); } \ No newline at end of file From 29c8a654e253a211bf8010ed2866d315bec62a0e Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 17 Jul 2019 17:28:15 +0800 Subject: [PATCH 4/8] fix --- app/views/libraries/index.html.erb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/libraries/index.html.erb b/app/views/libraries/index.html.erb index 08495304..087ae03c 100644 --- a/app/views/libraries/index.html.erb +++ b/app/views/libraries/index.html.erb @@ -6,16 +6,14 @@ <%= link_to '发布案例', new_library_path, class: 'white-btn edu-filter-btn-blue fr mr10 mt8', style: 'color: #4CACFF' %>

- <% if User.current.logged? %> + <% if User.current.try(:logged?) %> <% end %>
From cacf256da3d4e4c73b878fb7aadff7aab4b9db6b Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 17 Jul 2019 17:32:16 +0800 Subject: [PATCH 5/8] fix --- app/controllers/libraries_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 27e55975..b7bbf836 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -8,7 +8,7 @@ class LibrariesController < ApplicationController libraries = Library.where(nil) libraries = - if current_user.logged? && params[:type] == 'mine' + if User.current.logged? && params[:type] == 'mine' libraries.where(user_id: current_user.id).order('created_at desc') else libraries.where(status: :published).order('visited_count desc') From 17242a02da5dd859209d25990550fd538080296b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 17 Jul 2019 17:45:35 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/educoder/edu-main.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index db0bbd45..fd8e737f 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -1225,4 +1225,10 @@ html>body #ajax-indicator { position: fixed; } } .surfacePlot:hover .marginuploading.hidden{ background: rgba(0,0,0, 0.1); +} + +.roundedRectangles { + position: absolute; + top: 10px; + right: -22px; } \ No newline at end of file From e2b48a52a32fa821ed31215a8740967843450a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 17 Jul 2019 17:55:09 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/competitions/_header.html.erb | 2 +- public/stylesheets/educoder/edu-main.css | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/competitions/_header.html.erb b/app/views/competitions/_header.html.erb index d8956ee7..1739ed7d 100644 --- a/app/views/competitions/_header.html.erb +++ b/app/views/competitions/_header.html.erb @@ -71,7 +71,7 @@ 登录/注册 <% end %> -
    +
      <%= User.current.show_name %>
    • <%= link_to '我的课堂', user_path(User.current) %>
    • <%= link_to '我的实训', user_path(User.current, :type => 'a_shixun') %>
    • diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index fd8e737f..81ce5b90 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -1231,4 +1231,13 @@ html>body #ajax-indicator { position: fixed; } position: absolute; top: 10px; right: -22px; +} + + +.edu-menu-lists currentName{ + text-align: left; +} + +.edu-menu-lists li{ + text-align: left; } \ No newline at end of file From e480e06d1b84f2c3e8530457de8d57fcaaebe0d9 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 17 Jul 2019 18:01:53 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/competitions/_header.html.erb | 41 ++++++++++++------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/app/views/competitions/_header.html.erb b/app/views/competitions/_header.html.erb index 1739ed7d..698238cb 100644 --- a/app/views/competitions/_header.html.erb +++ b/app/views/competitions/_header.html.erb @@ -65,29 +65,28 @@
    - <% if User.current.logged? %> + <% if User.current.logged? %> <%= link_to (image_tag(url_to_avatar(User.current), :width =>"34", :height => "34", :class => "radius", :nhname => "avatar_image", :alt=>"头像", :id => "nh_user_logo")), user_path(User.current),:class => "fr mt15 ml40" %> - <% else %> - 登录/注册 - <% end %> - -
      - <%= User.current.show_name %> -
    • <%= link_to '我的课堂', user_path(User.current) %>
    • -
    • <%= link_to '我的实训', user_path(User.current, :type => 'a_shixun') %>
    • -
    • <%= link_to '我的实践课程', user_path(User.current, :type => 'a_path') %>
    • - <% if User.current.partner.present? %> -
    • <%= link_to '客户管理', partner_list_cooperate_path(User.current.partner) %>
    • - <% end %> -
    • <%= link_to '我的项目', user_path(User.current, :type => 'a_project') %>
    • -
    • <%= link_to '我的众包', user_path(User.current, :type => 'a_package') %>
    • +
        + <%= User.current.show_name %> +
      • <%= link_to '我的课堂', user_path(User.current) %>
      • +
      • <%= link_to '我的实训', user_path(User.current, :type => 'a_shixun') %>
      • +
      • <%= link_to '我的实践课程', user_path(User.current, :type => 'a_path') %>
      • + <% if User.current.partner.present? %> +
      • <%= link_to '客户管理', partner_list_cooperate_path(User.current.partner) %>
      • + <% end %> +
      • <%= link_to '我的项目', user_path(User.current, :type => 'a_project') %>
      • +
      • <%= link_to '我的众包', user_path(User.current, :type => 'a_package') %>
      • - <% if User.current.department_members.count > 0 %> -
      • <%= link_to '学院统计', statistics_college_path(User.current.department_members.first.try(:department)) %>
      • - <% end %> -
      • <%= link_to '账号管理', my_account_path %>
      • -
      • <%= link_to '退出', signout_path %>
      • -
      + <% if User.current.department_members.count > 0 %> +
    • <%= link_to '学院统计', statistics_college_path(User.current.department_members.first.try(:department)) %>
    • + <% end %> +
    • <%= link_to '账号管理', my_account_path %>
    • +
    • <%= link_to '退出', signout_path %>
    • +
    + <% else %> + 登录/注册 + <% end %>