Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
commit
ccbb8b9674
@ -1,4 +1,4 @@
|
||||
class UserActions < ActiveRecord::Base
|
||||
attr_accessible :action_id, :action_type, :user_id
|
||||
attr_accessible :action_id, :action_type, :user_id, :ip
|
||||
has_many :users
|
||||
end
|
||||
|
@ -0,0 +1,42 @@
|
||||
<style>
|
||||
/*//登录弹窗*/
|
||||
.newLogipopup{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-size: 100% 100%;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
</style>
|
||||
<div class="educontent newLogipopup" id="backImg" >
|
||||
<div class="pr edu-txt-center height-100 pt110">
|
||||
<div class="login_reg pr login_regs">
|
||||
<div style="position: relative;">
|
||||
|
||||
<a href="javascript:void(0)" onclick="competitionfun();" id="closeIcon" style="position: absolute;right: -20px;top: 36px;">
|
||||
<i class="iconfont icon-shanchudiao"></i>
|
||||
</a>
|
||||
|
||||
<img src="/images/educoder/competitionslog.png" height="580px" width="637px" />
|
||||
|
||||
<a style="position: absolute;left:42%; bottom:18px;" onclick="setcompetitionfun();" >
|
||||
<img height="40px" width="150px" src="/images/educoder/applys.png" />
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function competitionfun(){
|
||||
localStorage.setItem('competition_uid', true);
|
||||
hideModal();
|
||||
}
|
||||
|
||||
function setcompetitionfun(){
|
||||
competitionfun();
|
||||
window.location.href="/competitions"
|
||||
}
|
||||
</script>
|
@ -1,24 +0,0 @@
|
||||
<style>
|
||||
/*//登录弹窗*/
|
||||
.newLogipopup{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-size: 100% 100%;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
</style>
|
||||
<div class="educontent newLogipopup" id="backImg" >
|
||||
<div class="pr edu-txt-center height-100 pt110">
|
||||
<div class="login_reg pr login_regs">
|
||||
<div>
|
||||
<a href="javascript:void(0)" onclick="hideModal();" id="closeIcon" style="position: absolute;right: 0px;"><i class="iconfont icon-shanchudiao"></i></a>
|
||||
<img src="/images/educoder/competitionslog.png" height="600px" width="600px" />
|
||||
<img height="600px" width="600px" src="/images/educoder/applys.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,54 +1,54 @@
|
||||
<img src="/images/educoder/teach_ex.jpg" width="100%"/>
|
||||
<div class="educontent">
|
||||
<div class="edu-back-white mb30 mt30">
|
||||
<p class="padding20-30 clearfix bor-bottom-greyE">
|
||||
<span class="font-18 fl color-grey-3">教学案例</span>
|
||||
<%= link_to '发布案例', new_library_path, class: 'white-btn edu-filter-btn-blue fr mr10 mt8', style: 'color: #4CACFF' %>
|
||||
</p>
|
||||
<div class="clearfix pl30 pr30">
|
||||
<% if User.current.try(:logged?) %>
|
||||
<ul class="fl library_nav mt20">
|
||||
<li class="<%= params[:type] == 'mine' ? '' : 'active' %>">
|
||||
<%= link_to '全部', libraries_path(search: params[:search]), remote: true %>
|
||||
</li>
|
||||
<li class="<%= params[:type] == 'mine' ? 'active' : '' %>">
|
||||
<%= link_to '我的', libraries_path(search: params[:search], type: 'mine'), remote: true %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<div class="edu-position fr mt12">
|
||||
<%= hidden_field_tag(:type, params[:type]) %>
|
||||
<input class="winput-300-35 panel-box-sizing" placeholder="输入教学案例标题、编号进行检索" type="text" id="search_name">
|
||||
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey" id="search"><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="library-list-container">
|
||||
<%= render partial: 'library_list' %>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$(".library_nav").on("click","li",function(){
|
||||
$(".library_nav li").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
});
|
||||
|
||||
var searchFunc = function() {
|
||||
var search = $("#search_name").val();
|
||||
var type = $("input[name='type']").val();
|
||||
$.ajax({
|
||||
url: "<%= libraries_path %>",
|
||||
dataType: 'script',
|
||||
data: {search: search, type: type}
|
||||
});
|
||||
};
|
||||
|
||||
$("#search").live("click", searchFunc);
|
||||
$('#search_name').bind('keypress',function(event) {
|
||||
if (event.keyCode == "13") {
|
||||
searchFunc();
|
||||
}
|
||||
});
|
||||
})
|
||||
<img src="/images/educoder/teach_ex.jpg" width="100%"/>
|
||||
<div class="educontent">
|
||||
<div class="edu-back-white mb30 mt30">
|
||||
<p class="padding20-30 clearfix bor-bottom-greyE">
|
||||
<span class="font-18 fl color-grey-3">教学案例</span>
|
||||
<%= link_to '发布案例', new_library_path, class: 'white-btn edu-filter-btn-blue fr mr10 mt8', style: 'color: #4CACFF' %>
|
||||
</p>
|
||||
<div class="clearfix pl30 pr30">
|
||||
<ul class="fl library_nav mt20">
|
||||
<li class="<%= params[:type] == 'mine' ? '' : 'active' %>">
|
||||
<%= link_to '全部', libraries_path(search: params[:search]), remote: true %>
|
||||
</li>
|
||||
<% if User.current.try(:logged?) %>
|
||||
<li class="<%= params[:type] == 'mine' ? 'active' : '' %>">
|
||||
<%= link_to '我的', libraries_path(search: params[:search], type: 'mine'), remote: true %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="edu-position fr mt12 mb10">
|
||||
<%= hidden_field_tag(:type, params[:type]) %>
|
||||
<input class="winput-300-35 panel-box-sizing" placeholder="输入教学案例标题、编号进行检索" type="text" id="search_name">
|
||||
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey" id="search"><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="library-list-container">
|
||||
<%= render partial: 'library_list' %>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$(".library_nav").on("click","li",function(){
|
||||
$(".library_nav li").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
});
|
||||
|
||||
var searchFunc = function() {
|
||||
var search = $("#search_name").val();
|
||||
var type = $("input[name='type']").val();
|
||||
$.ajax({
|
||||
url: "<%= libraries_path %>",
|
||||
dataType: 'script',
|
||||
data: {search: search, type: type}
|
||||
});
|
||||
};
|
||||
|
||||
$("#search").live("click", searchFunc);
|
||||
$('#search_name').bind('keypress',function(event) {
|
||||
if (event.keyCode == "13") {
|
||||
searchFunc();
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
@ -0,0 +1,32 @@
|
||||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="10%">ID</th>
|
||||
<th width="15%">代理人登录名</th>
|
||||
<th width="15%">代理人姓名</th>
|
||||
<th width="20%">注册情况</th>
|
||||
<th width="20%">竞赛报名</th>
|
||||
<th width="20%">ip</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @user_agents.each_with_index do |ua, index| %>
|
||||
<% user = User.find_by_login(ua.key) %>
|
||||
<tr>
|
||||
<td><%= index+1 %></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><%= register_info(ua) %></td>
|
||||
<td><%= ua.agent_type.to_i == UserAgent::USER_COMPETITION ? "已报名" : "未报名" %></td>
|
||||
<td><%= ua.ip %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="cl"></div>
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @agents_pages, @agents_count, :per_page_links => false, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,9 @@
|
||||
<div class="edu-con-bg01 clearfix mt10 bor-grey-e pt10 pb10">
|
||||
<div class="pl15">
|
||||
统计总计:
|
||||
引流总人数<span class="color-red"><%= @agents_count %></span>人,
|
||||
</div>
|
||||
</div>
|
||||
<div class="edu-con-bg01 mt15" id="managements_department_part_list">
|
||||
<%= render :partial => "welcome/user_agent_list" %>
|
||||
</div>
|
@ -0,0 +1,10 @@
|
||||
class AddIpForUserActions < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :user_actions, :ip, :string
|
||||
|
||||
UserAgent.where("agent_type is null").update_all(:agent_type => 1)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
class AddIndexForUserActions < ActiveRecord::Migration
|
||||
def up
|
||||
add_index :user_actions, :ip
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Before Width: | Height: | Size: 469 KiB After Width: | Height: | Size: 894 KiB |
After Width: | Height: | Size: 58 KiB |
Loading…
Reference in new issue