51 lines
2.5 KiB
Plaintext
51 lines
2.5 KiB
Plaintext
<% @unapproved_user.each_with_index do |apply_user, index| %>
|
|
<% user = User.find(apply_user.user_id) %>
|
|
<div class="<%= index % 2 == 0 ? 'admin-bg-grey' : '' %> admin-con-box clearfix">
|
|
<a href="<%= user_path(user) %>" target="_blank" class="fl with10 edu-ad-user">
|
|
<%= image_tag(url_to_avatar(user), :class => "fl with10 edu-ad-user", :alt => "头像", :width => "50", :height => "50" ) %>
|
|
</a>
|
|
<div class="fl with90">
|
|
<ul>
|
|
<li class="clearfix mb5">
|
|
<a href="<%= user_path(user) %>" class="fl"><%= user.show_real_name %></a>
|
|
<span class="fl ml30 font-12 color-grey"><%= time_from_now(apply_user.updated_at) %></span>
|
|
<a href="javascript:void(0);" class="<%= apply_user.status == 1 ? 'task-btn-green' : '' %> task-btn fr"><%= apply_user.status == 1 ? "已同意" : "已拒绝" %></a>
|
|
</li>
|
|
<li class="clearfix mb10">
|
|
身份证号:<%= user.ID_number %>
|
|
</li>
|
|
<li class="clearfix mb10">
|
|
<% if !user.user_extensions.school_id.blank? && user.user_extensions.school %>
|
|
<span><%= user.user_extensions.school.name %><%= user.user_extensions.department ? ' - '+user.user_extensions.department.name.to_s : '' %></span>
|
|
<% end %>
|
|
<% if user.user_extensions && user.user_extensions.identity %>
|
|
<span class="ml30"><%= user.identity %></span>
|
|
<% if user.user_extensions.identity == 1 && user.user_extensions.try(:student_id) %>
|
|
<span class="ml30"><%= user.user_extensions.try(:student_id) %></span>
|
|
<% end %>
|
|
<% end %>
|
|
</li>
|
|
<li class="clearfix mb10">
|
|
<%= image_tag(url_to_auth_img(user.id, 'ID'), :width => 200, :height => 150, :class => 'edu-renzheng-img fl mr20') %>
|
|
</li>
|
|
<% if apply_user.status == 2 %>
|
|
<li>原因:<span class="color-orange"><%= apply_user.remarks %></span></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<script>
|
|
$(function(){
|
|
var all_images = $(".edu-renzheng-img");
|
|
if (all_images.length>0) {
|
|
for (var i=0; i<all_images.length; i++){
|
|
var image=$(all_images[i]);
|
|
var element = $("<a></a>").attr("href", image.attr('src')+".png");
|
|
image.wrap(element);
|
|
$(image).parent().colorbox({rel: 'nofollow', close: "关闭", returnFocus: false});
|
|
}
|
|
}
|
|
});
|
|
</script> |