2016-07-25 18:31:28 +08:00
|
|
|
<h3>
|
|
|
|
<%=l(:label_applied_shcools)%>
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
<%= render 'tab_has_applied_applied' %>
|
|
|
|
|
|
|
|
<%= form_tag({}, :method => :get) do %>
|
|
|
|
<fieldset>
|
|
|
|
<label for='name'>
|
|
|
|
单位名称:
|
|
|
|
</label>
|
|
|
|
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder => '输入单位名称进行搜索' %>
|
|
|
|
<%= submit_tag l(:button_apply ), :class => "small", :name => nil %>
|
2016-08-03 10:36:03 +08:00
|
|
|
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'applied_schools'}, :class => 'icon icon-reload' %>
|
2016-07-25 18:31:28 +08:00
|
|
|
</fieldset>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
2016-07-28 20:01:22 +08:00
|
|
|
<div class="autoscroll" id = "applied_school">
|
2016-07-25 18:31:28 +08:00
|
|
|
<table class="list" style="width: 100%;table-layout: fixed">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 20px;">
|
|
|
|
序号
|
|
|
|
</th>
|
2016-07-29 16:11:26 +08:00
|
|
|
<th style="width: 85px;" class = "<%= @order == 'name' ? (@sort == 'desc' ? 'st_up' : (@sort == 'asc' ? 'st_down' : '')) : '' %>">
|
|
|
|
<%= link_to '单位名称', apply_shcool_sort_path(:sort=> @sort == "desc" ? 'asc' : 'desc', :order => 'name', :tip=>'unapplied') %>
|
|
|
|
</th>
|
|
|
|
<th style="width: 30px;">
|
|
|
|
申请者
|
2016-07-25 18:31:28 +08:00
|
|
|
</th>
|
2016-08-01 15:44:18 +08:00
|
|
|
<th style="width: 85px;">
|
2016-07-25 18:31:28 +08:00
|
|
|
地区
|
|
|
|
</th>
|
|
|
|
<th style="width: 75px;">
|
|
|
|
详细地址
|
|
|
|
</th>
|
2016-07-28 20:01:22 +08:00
|
|
|
<th style="width: 30px;">
|
2016-07-25 18:31:28 +08:00
|
|
|
用户
|
|
|
|
</th>
|
|
|
|
<th style="width: 60px;">
|
|
|
|
创建时间
|
|
|
|
</th>
|
|
|
|
<th style="width: 75px;">
|
|
|
|
操作
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @apply_status.each do |apply| %>
|
2016-07-27 10:46:48 +08:00
|
|
|
<% if apply.status == 0 %>
|
2016-07-29 16:11:26 +08:00
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
2016-07-25 18:31:28 +08:00
|
|
|
<td style="text-align: center;">
|
|
|
|
<%= apply.id %>
|
|
|
|
</td>
|
2016-07-29 23:22:32 +08:00
|
|
|
<td class="name" title='<%=apply.name%>' >
|
|
|
|
<span id="apply_title_<%= apply.id %>"><%= apply.name %></span>
|
2016-08-01 16:10:57 +08:00
|
|
|
<textarea style="display: none; width:100px; height:16px; border:1px solid #ddd; outline:none; padding:0 0 0 5px; resize:none; overflow:hidden;" placeholder="请编辑单位名称" id="school_name_edit_<%=apply.id%>" onblur="edit_school_name('<%= edit_apply_name_school_path(apply.id)%>','<%= apply.id %>');"></textarea>
|
2016-07-25 18:31:28 +08:00
|
|
|
</td>
|
|
|
|
<td class="center">
|
2016-07-29 16:11:26 +08:00
|
|
|
<% user = User.where("id=?", apply.user_id).first %>
|
|
|
|
<% unless user.nil? %>
|
2016-08-05 16:14:26 +08:00
|
|
|
<%=link_to user.show_name, user_path(user),:target => '_blank', :class => "application-default-link" %>
|
2016-07-29 16:11:26 +08:00
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td class="center">
|
2016-07-29 21:19:09 +08:00
|
|
|
<span ondblclick = "show_edit_school_province('<%= apply.id %>');" id="apply_province_<%= apply.id %>">
|
2016-07-29 16:11:26 +08:00
|
|
|
<%= (apply.province.nil? ? "" : apply.province) + (apply.city.nil? ? "" : apply.city) %>
|
2016-07-29 21:19:09 +08:00
|
|
|
</span>
|
2016-08-01 15:44:18 +08:00
|
|
|
<select onchange="showcity(this.value, document.getElementById('schoolCity_<%=apply.id%>'));edit_school_province('<%= edit_apply_province_school_path(apply.id)%>','<%= apply.id %>');" name="province" id="school_province_edit_<%=apply.id%>" class="fl" style="width:55px; height:18px; display: none">
|
2016-07-29 21:19:09 +08:00
|
|
|
<option value="北京">北京</option>
|
|
|
|
<option value="上海">上海</option>
|
|
|
|
<option value="广东">广东</option>
|
|
|
|
<option value="江苏">江苏</option>
|
|
|
|
<option value="浙江">浙江</option>
|
|
|
|
<option value="重庆">重庆</option>
|
|
|
|
<option value="安徽">安徽</option>
|
|
|
|
<option value="福建">福建</option>
|
|
|
|
<option value="甘肃">甘肃</option>
|
|
|
|
<option value="广西">广西</option>
|
|
|
|
<option value="贵州">贵州</option>
|
|
|
|
<option value="海南">海南</option>
|
|
|
|
<option value="河北">河北</option>
|
|
|
|
<option value="黑龙江">黑龙江</option>
|
|
|
|
<option value="河南">河南</option>
|
|
|
|
<option value="湖北">湖北</option>
|
|
|
|
<option value="湖南">湖南</option>
|
|
|
|
<option value="江西">江西</option>
|
|
|
|
<option value="吉林">吉林</option>
|
|
|
|
<option value="辽宁">辽宁</option>
|
|
|
|
<option value="内蒙古">内蒙古</option>
|
|
|
|
<option value="宁夏">宁夏</option>
|
|
|
|
<option value="青海">青海</option>
|
|
|
|
<option value="山东">山东</option>
|
|
|
|
<option value="山西">山西</option>
|
|
|
|
<option value="陕西">陕西</option>
|
|
|
|
<option value="四川">四川</option>
|
|
|
|
<option value="天津">天津</option>
|
|
|
|
<option value="新疆">新疆</option>
|
|
|
|
<option value="西藏">西藏</option>
|
|
|
|
<option value="云南">云南</option>
|
|
|
|
<option value="香港">香港特别行政区</option>
|
|
|
|
<option value="澳门">澳门特别行政区</option>
|
|
|
|
<option value="台湾">台湾</option>
|
|
|
|
<option value="海外">海外</option>
|
|
|
|
</select>
|
2016-08-01 15:44:18 +08:00
|
|
|
<select onchange="edit_school_province('<%= edit_apply_province_school_path(apply.id)%>','<%= apply.id %>');" name="city" id="schoolCity_<%=apply.id%>" class="fl ml5" style="width:55px; height:18px; display: none"></select>
|
2016-07-25 18:31:28 +08:00
|
|
|
</td>
|
2016-07-29 20:48:36 +08:00
|
|
|
<td class="center">
|
2016-07-29 21:19:09 +08:00
|
|
|
<span title="双击可编辑" ondblclick = "show_edit_school_address('<%= apply.id %>');" id="apply_address_<%= apply.id %>"><%= apply.address %></span>
|
|
|
|
<textarea style="display: none; width:100px; height:16px; border:1px solid #ddd; outline:none; padding:0 0 0 5px; resize:none; overflow:hidden;" placeholder="请编辑单位地址" id="school_address_edit_<%=apply.id%>" onblur="edit_school_address('<%= edit_apply_address_school_path(apply.id)%>','<%= apply.id %>');"><%= apply.address %></textarea>
|
2016-07-25 18:31:28 +08:00
|
|
|
</td>
|
|
|
|
<td class="center">
|
2016-07-28 20:01:22 +08:00
|
|
|
<% count = UserExtensions.where("school_id = #{apply.school_id}").count %>
|
|
|
|
<%= count %>
|
2016-07-25 18:31:28 +08:00
|
|
|
</td>
|
|
|
|
<td class="center">
|
|
|
|
<%= format_date(apply.created_at) %>
|
|
|
|
</td>
|
|
|
|
<td class="center">
|
2016-07-29 20:48:36 +08:00
|
|
|
<%= link_to( l(:label_approve), { :controller => 'admin', :action => 'approve_applied_schools', :id => apply.id }, :class => "application-default-link" ) %>
|
|
|
|
<%= link_to( l(:button_delete), { :controller => 'admin', :action => 'delete_applied_schools', :id => apply.id, :tip => 'unapplied' },:method => :delete, :confirm => l(:text_are_you_sure), :class => "application-default-link") %>
|
|
|
|
<%=link_to '更改', admin_all_schools_path(:school_id =>apply.id), :remote => true, :class => "application-default-link" %>
|
2016-07-28 20:01:22 +08:00
|
|
|
|
2016-07-25 18:31:28 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
2016-07-29 21:19:09 +08:00
|
|
|
<script>
|
|
|
|
init_province_and_city(document.getElementById('school_province_edit_<%=apply.id%>'), '<%=apply.province%>', document.getElementById('schoolCity_<%=apply.id%>'), '<%=apply.city%>');
|
|
|
|
</script>
|
2016-07-29 16:11:26 +08:00
|
|
|
<% unless apply.remarks.blank? %>
|
2016-07-28 20:01:22 +08:00
|
|
|
<tr class="odd">
|
|
|
|
<td>
|
|
|
|
|
|
|
|
</td>
|
2016-08-03 10:36:03 +08:00
|
|
|
<td style="text-align: left;" colspan="7">
|
2016-07-28 20:01:22 +08:00
|
|
|
<%= apply.remarks %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
2016-07-25 18:31:28 +08:00
|
|
|
<% end %>
|
2016-07-27 10:46:48 +08:00
|
|
|
<% end %>
|
2016-07-25 18:31:28 +08:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2016-07-29 23:22:32 +08:00
|
|
|
</div>
|
|
|
|
<ul class="wlist" id="pages" style="float: right;margin-top: 10px;">
|
|
|
|
<%= pagination_links_full @apply_pages, @apply_count ,:per_page_links => true, :remote => false, :flag => true %>
|
|
|
|
</ul>
|