Merge remote-tracking branch 'origin/develop' into develop

dev_aliyun
杨树明 5 years ago
commit 204f437969

@ -42,13 +42,16 @@ class WelcomeController < ApplicationController
# 运营引流个人数据展示
def user_agents
@user_agents = UserAgent.find_by_key(params[:edu])
@user_agents = UserAgent.where(key: params[:edu])
@agents_count = @user_agents.count
limit = 20
@agents_pages = Paginator.new @agents_count, limit, params['page'] || 1
@offset ||= @agents_pages.offset
@user_agents = paginateHelper @user_agents, limit
respond_to do |format|
format.js
format.html{ render :layout=>'users_base'}
end
end

@ -15,7 +15,7 @@
<td class="edu-txt-left"><span><%= link_to ua.key, user_path(ua.key), :target => "_blank" %></span></td>
<td><%= link_to user.try(:show_real_name), user_path(user), target:'_blank' %></td>
<td><%= register_info(ua) %></td>
<td><%= user.agent_type.to_i == UserAgent::USER_COMPETITION ? "已报名" : "未报名" %></td>
<td><%= ua.agent_type.to_i == UserAgent::USER_COMPETITION ? "已报名" : "未报名" %></td>
<td><%= ua.ip %></td>
</tr>
<% end %>

@ -297,6 +297,7 @@ RedmineApp::Application.routes.draw do ## oauth相关
get 'welcome/shixun_to_local' => 'welcome#shixun_to_local'
get 'welcome/local_to_shixun' => 'welcome#local_to_shixun'
get 'welcome/local_init' => 'welcome#local_init'
get 'welcome/user_agents' => 'welcome#user_agents'
# get 'competitions/home' => 'competitions#home'
# get 'competitions/hn' => 'competitions#index'

Loading…
Cancel
Save