Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2017-01-20 16:59:54 +08:00
commit 7d1dbc1656
4 changed files with 7 additions and 7 deletions

View File

@ -579,19 +579,19 @@ class ApplicationController < ActionController::Base
end
def redirect_back_or_default(default, options={})
back_url = params[:back_url].to_s
back_url = ''#params[:back_url].to_s
if back_url.present?
begin
uri = URI.parse(back_url)
# do not redirect user to another host or to the login or register page
if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
back_url = back_url.gsub(%r{\/users\/(\D+)},"/users/"+default.to_s) if default.is_a?(User)
back_url = back_url.gsub(%r{\/users\/(\w+)},"/users/"+default.to_s) if default.is_a?(:User)
redirect_to(back_url)
return
end
rescue URI::InvalidURIError
logger.warn("Could not redirect to invalid URL #{back_url}")
redirect to default
#redirect to default
end
elsif options[:referer]
redirect_to_referer_or default

View File

@ -237,7 +237,7 @@ class UsersController < ApplicationController
respond_to do |format|
format.html{render :layout => 'static_base'}
format.xls{
filename = "发布的_#{l(:label_issue_list_xls)}.xls"
filename = "收到的Issue#{l(:label_issue_list_xls)}.xls"
send_data(issue_list_xls(@excel_issues), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
format.api

View File

@ -39,9 +39,9 @@
|
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
<% elsif ma.status == 1%> <!-- 同意 -->
<%= Course.find(ma.course_id).teacher.show_name %>已同意
<span title="<%= Course.find(ma.course_id).teacher.show_name %>已同意"><%= Course.find(ma.course_id).teacher.show_name %>已同意</span>
<% elsif ma.status == 2%> <!-- 拒绝 -->
<%= Course.find(ma.course_id).teacher.show_name %>已拒绝
<span title="<%= Course.find(ma.course_id).teacher.show_name %>已拒绝"><%= Course.find(ma.course_id).teacher.show_name %>已拒绝</span>
<% end %>
</span>
</li>

View File

@ -15,7 +15,7 @@
<%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
<% end %>
<% end %>
<% else %>
<% elsif User.current == @user %>
<%= render :partial => "projects/no_data" %>
<% end %>
<% if (jours.count + page * 10) < count %>