diff --git a/Gemfile b/Gemfile index 05e309f44..fc889f707 100644 --- a/Gemfile +++ b/Gemfile @@ -27,6 +27,7 @@ group :test do gem 'capybara', '~> 2.4.1' gem 'nokogiri', '~> 1.6.3' gem 'factory_girl', '~> 4.4.0' + gem 'selenium-webdriver', '~> 2.42.0' platforms :mri, :mingw do group :rmagick do diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6412eb5e4..34745709b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -151,7 +151,7 @@ class UsersController < ApplicationController # added by fq def user_activities - redirect_to user_path(@user) + redirect_to user_path(@user, type: params[:type]) return # useless abort. @watcher = User.watched_by_id(@user) diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 55f515a11..dec8e92eb 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -2,8 +2,8 @@ @nav_dispaly_forum_label = 1 @nav_dispaly_course_label = nil @nav_dispaly_store_all_label = 1 %> -<%= labelled_form_for @course do |f| %>

<%=l(:label_course_new)%>

+<%= labelled_form_for @course do |f| %>
<%= render :partial => 'course_form', :locals => { :f => f } %> <%= submit_tag l(:button_create), :class => "enterprise"%> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index f121b66e9..6270b5f50 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -383,13 +383,13 @@ $(document).ready(function ($) { $("#content .menu-div:first~ div").first().find("a").attr("target", "_blank"); $('[mode=all]').click(function (event) { - window.location.href = '<%=user_activities_url%>'; + window.location.href = '<%=user_url(@user)%>'; }); $('[mode=myself]').click(function (event) { - window.location.href = '<%=user_activities_url(type: 1)%>'; + window.location.href = '<%=user_url(@user, type: 1)%>'; }); $('[mode=respond]').click(function (event) { - window.location.href = '<%=user_activities_url(type: 2)%>'; + window.location.href = '<%=user_url(@user, type: 2)%>'; }); }); - \ No newline at end of file +