管理员界面单位申请修改
This commit is contained in:
parent
1f47eb5ea8
commit
1704462986
|
@ -229,7 +229,7 @@ class SchoolController < ApplicationController
|
|||
status = 0
|
||||
end
|
||||
|
||||
render :json=>{:status=>status,:id=>params[:id],:address=>name}
|
||||
render :json=>{:status=>status,:id=>params[:id],:name=>name}
|
||||
end
|
||||
|
||||
def edit_apply_address
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<%= apply.id %>
|
||||
</td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=apply.name%>' >
|
||||
<span title="双击可编辑" ondblclick = "show_edit_school_name('<%= apply.id %>');" id="apply_title_<%= apply.id %>"><%= apply.name %></span>
|
||||
<span title="双击可编辑" id="apply_title_<%= apply.id %>"><%= apply.name %></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_name_edit_<%=apply.id%>" onblur="edit_school_name('<%= edit_apply_name_school_path(apply.id)%>','<%= apply.id %>');"><%= apply.name %></textarea>
|
||||
</td>
|
||||
<td class="center">
|
||||
|
|
|
@ -53,10 +53,11 @@
|
|||
<td style="text-align: center;">
|
||||
<%= apply.id %>
|
||||
</td>
|
||||
<td ondblclick = "show_edit_school_name('<%= apply.id %>');" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=apply.name%>' id="apply_title_<%= apply.id %>">
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=apply.name%>' >
|
||||
<% unless apply.school_id.nil? %>
|
||||
<% school_name = School.where("id=?", apply.school_id).first %>
|
||||
<%= school_name.name %>
|
||||
<span title="双击可编辑" ondblclick = "show_edit_school_name('<%= apply.id %>');" id="apply_title_<%= apply.id %>"><%= school_name %></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_name_edit_<%=apply.id%>" onblur="edit_school_name('<%= edit_apply_name_school_path(apply.id)%>','<%= apply.id %>');"><%= school_name %></textarea>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="center">
|
||||
|
@ -66,13 +67,51 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<% unless apply.school_id.nil? %>
|
||||
<% school_province = School.where("id=?", apply.school_id).first %>
|
||||
<%= school_province.province %>
|
||||
<% end %>
|
||||
<span ondblclick = "show_edit_school_province('<%= apply.id %>');" id="apply_province_<%= apply.id %>">
|
||||
<%= (apply.province.nil? ? "" : apply.province) + (apply.city.nil? ? "" : apply.city) %>
|
||||
</span>
|
||||
<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:50px; height:18px; display: none">
|
||||
<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>
|
||||
<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:50px; height:18px; display: none"></select>
|
||||
</td>
|
||||
<td align="left" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%= apply.address %>
|
||||
<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>
|
||||
</td>
|
||||
<td class="center">
|
||||
<%= apply.name %>
|
||||
|
@ -84,6 +123,9 @@
|
|||
<%= link_to( l(:button_delete), { :controller => 'admin', :action => 'delete_applied_schools', :id => apply.id, :tip => 'applied' },:method => :delete, :confirm => l(:text_are_you_sure) ) %>
|
||||
</td>
|
||||
</tr>
|
||||
<script>
|
||||
init_province_and_city(document.getElementById('school_province_edit_<%=apply.id%>'), '<%=apply.province%>', document.getElementById('schoolCity_<%=apply.id%>'), '<%=apply.city%>');
|
||||
</script>
|
||||
<% unless apply.remarks.blank? %>
|
||||
<tr class="odd">
|
||||
<td>
|
||||
|
|
Loading…
Reference in New Issue