This commit is contained in:
nwb 2014-07-21 17:00:36 +08:00
commit 5e462f1ae7
4 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -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| %>
<h3><%=l(:label_course_new)%></h3>
<%= labelled_form_for @course do |f| %>
<div class="box tabular">
<%= render :partial => 'course_form', :locals => { :f => f } %>
<span style="padding-left: 60px"><%= submit_tag l(:button_create), :class => "enterprise"%></span>

View File

@ -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)%>';
});
});
</script>
</script>