From 006e4ae45e731ef3113234df6f4443ebb067b159 Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 29 May 2014 18:34:34 +0800 Subject: [PATCH] user tab bar --- app/helpers/users_helper.rb | 44 ++++++++++--------- .../users/_course_list_have_entity.html.erb | 2 +- app/views/users/_my_joinedcourse.html.erb | 2 +- app/views/users/show.html.erb | 26 ++++++++++- app/views/users/user_projects.html.erb | 17 ++++++- app/views/users/watch_projects.html.erb | 22 +++++++++- public/stylesheets/nyan.css | 18 ++++---- 7 files changed, 93 insertions(+), 38 deletions(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index f412e0c8e..87b495f00 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -69,28 +69,30 @@ module UsersHelper #
  • <%= link_to("所有反馈", {:controller => 'users', :action => 'show', :type => 2}) %>
  • # - def show_activity(state) - content = ''.html_safe - case state - when 0 - s = content_tag('span', l(:label_user_all_activity), :class => "current-page") - content << content_tag('li', s) - content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1})) - content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2})) - when 1 - s = content_tag('span', l(:label_user_activity_myself), :class => "current-page") - content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'})) - content << content_tag('li', s, :class => "current-page") - content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2})) - when 2 - s = content_tag('span', l(:label_user_all_respond), :class => "current-page") - content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'})) - content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1})) - content << content_tag('li', s, :class => "current-page") - end - content_tag('div', content, :class => "pagination") - end + # TODO: 待删 + # def show_activity(state) + # content = ''.html_safe + # case state + # when 0 + # s = content_tag('span', l(:label_user_all_activity), :class => "current-page") + # content << content_tag('li', s) + # content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1})) + # content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2})) + # when 1 + # s = content_tag('span', l(:label_user_activity_myself), :class => "current-page") + # content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'})) + # content << content_tag('li', s, :class => "current-page") + # content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2})) + # when 2 + # s = content_tag('span', l(:label_user_all_respond), :class => "current-page") + # content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'})) + # content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1})) + # content << content_tag('li', s, :class => "current-page") + # end + # content_tag('div', content, :class => "pagination") + # end + #TODO: 待删 def watch_projects(state) content = ''.html_safe case state diff --git a/app/views/users/_course_list_have_entity.html.erb b/app/views/users/_course_list_have_entity.html.erb index 87dd52635..19fb88a6a 100644 --- a/app/views/users/_course_list_have_entity.html.erb +++ b/app/views/users/_course_list_have_entity.html.erb @@ -1,4 +1,4 @@ -
    +