diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 55cd14c9..30ef0658 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -6,8 +6,25 @@
  • "><%= link_to "翻转课堂", courses_path %>
  • "><%= link_to "开发社区", shixuns_path %>
  • + + <% careers = Career.published.order("created_at asc") %> + <% if careers.present? %> +
  • " style="cursor: auto;"> +

    职业路径

    + +
  • + <% end %>
  • "><%= link_to "竞赛", competitions_path %>
  • "><%= link_to "问答", forums_path %>
  • + <% if User.current.ec_school.present? %> +
  • " id="ec_banner"> + <%= link_to "认证", department_ecs_path(:school_id => User.current.ec_school) %> +
  • + <% end %> - <% if User.current.logged? %> -
    - <%= link_to (image_tag(url_to_avatar(User.current), :width =>"34", :height => "34", :class => "radius mt13", :nhname => "avatar_image", :alt=>"头像", :id => "nh_user_logo")), user_path(User.current),:class => "fl" %> - -
    - <% else %> - - <%= link_to '登录', signin_path, :class => "mr5 color-white" %> - - <%= link_to '注册', user_join_path, :class => "ml5 color-white" %> - - <% end %> +
    + <%= link_to (image_tag(url_to_avatar(User.current), :width =>"34", :height => "34", :class => "radius mt13", :nhname => "avatar_image", :alt=>"头像", :id => "nh_user_logo")), user_path(User.current),:class => "fl" %> + +
    @@ -58,9 +73,7 @@
      - <% unless User.current.user_extensions.try(:identity) == 1 %> -
    • <%= link_to '新建课堂', new_course_path() %>
    • - <% end %> +
    • <%= link_to '新建课堂', new_course_path() %>
    • <%= link_to '新建实训', new_shixun_path() %>
    • <%= link_to '新建实训课程', new_subject_path() %>
    • <%= link_to '新建项目', new_project_path() %>
    • @@ -72,6 +85,22 @@
    + +
    + + + + + <% new_tidings_count = User.current.tidings.where("created_at > '#{User.current.onclick_time.onclick_time}'").count %> + <% new_pri_message_count = User.current.private_messages.where("created_at > '#{User.current.onclick_time.onclick_time}'").count %> + <% count = new_tidings_count + new_pri_message_count %> + <% if count > 0 %> + <%= count > 99 ? "99+" : count %> +
    + 您有<%= count %>条新消息,点击查看 +
    + <% end %> +
    diff --git a/app/views/layouts/_unlogin_header.html.erb b/app/views/layouts/_unlogin_header.html.erb index 72dd2731..f38a1dce 100644 --- a/app/views/layouts/_unlogin_header.html.erb +++ b/app/views/layouts/_unlogin_header.html.erb @@ -8,36 +8,47 @@
  • "><%= link_to "开发社区", shixuns_path %>
  • + <% careers = Career.published.order("created_at asc") %> + <% if careers.present? %> +
  • " style="cursor: auto;"> +

    职业路径

    + +
  • + <% end %>
  • "><%= link_to "竞赛", competitions_path %>
  • "><%= link_to "问答", forums_path %>
  • - + <%= link_to '登录', signin_path, :class => "mr5 color-white" %> - - <%= link_to '注册', user_join_path, :class => "ml5 color-white" %> + + <%= link_to '注册', user_join_path, :class => "ml5 color-white" %>
    @@ -55,8 +66,8 @@
  • <%= link_to '新建项目', new_project_path() %>
    • -
    • <%= link_to "加入课堂", signin_path, :remote => true %>
    • -
    • <%= link_to "加入项目", applied_join_project_path, :remote => true %>
    • +
    • <%= link_to "加入课堂", signin_path, :remote => true %>
    • +
    • <%= link_to "加入项目", applied_join_project_path, :remote => true %>
    diff --git a/app/views/layouts/base_management.html.erb b/app/views/layouts/base_management.html.erb index 9d1d77c8..e038f1c2 100644 --- a/app/views/layouts/base_management.html.erb +++ b/app/views/layouts/base_management.html.erb @@ -113,9 +113,9 @@
  • 审批