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 def user_agents
@user_agents = UserAgent.find_by_key(params[:edu]) @user_agents = UserAgent.where(key: params[:edu])
@agents_count = @user_agents.count @agents_count = @user_agents.count
limit = 20 limit = 20
@agents_pages = Paginator.new @agents_count, limit, params['page'] || 1 @agents_pages = Paginator.new @agents_count, limit, params['page'] || 1
@offset ||= @agents_pages.offset @offset ||= @agents_pages.offset
@user_agents = paginateHelper @user_agents, limit @user_agents = paginateHelper @user_agents, limit
respond_to do |format|
format.js
format.html{ render :layout=>'users_base'}
end
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 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><%= link_to user.try(:show_real_name), user_path(user), target:'_blank' %></td>
<td><%= register_info(ua) %></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> <td><%= ua.ip %></td>
</tr> </tr>
<% end %> <% end %>

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

Loading…
Cancel
Save