mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-09 06:24:04 +08:00
init project
This commit is contained in:
18
app/views/admins/unit_applies/shared/_apply_item.html.erb
Normal file
18
app/views/admins/unit_applies/shared/_apply_item.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
|
||||
<td><%= apply.id %></td>
|
||||
<td class="text-left"><%= overflow_hidden_span apply.name %></td>
|
||||
<td class="text-left">
|
||||
<%= "#{apply&.province.to_s}"+"#{apply&.city.to_s}" %>
|
||||
</td>
|
||||
<td class="text-left"><%= overflow_hidden_span apply.address %></td>
|
||||
<td><%= link_to apply&.user&.real_name, "/users/#{apply&.user&.login}", target: "_blank" %></td>
|
||||
<td><%= format_time apply.created_at %></td>
|
||||
<td class="action-container">
|
||||
<%= agree_link '批准', agree_admins_unit_apply_path(apply, element: ".unit-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %>
|
||||
<%= javascript_void_link('删除', class: 'action refuse-action',
|
||||
data: {
|
||||
toggle: 'modal', target: '.admin-common-refuse-modal', id: apply.id, title: "删除原因", type: "delete",
|
||||
url: admins_unit_apply_path(apply, tip: "unapplied", element: ".unit-apply-#{apply.id}")
|
||||
}) %>
|
||||
<%= link_to "更改",edit_admins_unit_apply_path(apply), remote: true, class:"action",'data-disable-with': '打开中...' %>
|
||||
</td>
|
||||
43
app/views/admins/unit_applies/shared/_edit_modal.html.erb
Normal file
43
app/views/admins/unit_applies/shared/_edit_modal.html.erb
Normal file
@@ -0,0 +1,43 @@
|
||||
<div class="modal fade admin-unit-edit-modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">修改申请</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<%= form_tag(admins_unit_apply_path, method: :put, remote: true) do %>
|
||||
<div class="modal-body">
|
||||
<div class="form-group d-flex">
|
||||
<label for="school_id" class="col-form-label">更改学校:</label>
|
||||
<div class="d-flex flex-column-reverse w-75">
|
||||
<%= select_tag :school_id, [apply&.school_id], class: 'form-control school-select optional',id: "all-schools" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group d-flex">
|
||||
<label for="school_id" class="col-form-label">更改城市:</label>
|
||||
<div class="d-flex w-75 province-city-select">
|
||||
<div class="w-50 mr-3">
|
||||
<%= select_tag('province', [], class: 'form-control province-select optional', 'data-value': apply.province, 'data-first-title': '请选择', id:"show-province-#{apply.id}") %>
|
||||
</div>
|
||||
<div class="w-50">
|
||||
<%= select_tag('city', [], class: 'form-control city-select optional', 'data-value': apply.city, id: "schoolCity_#{apply.id}") %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group d-flex">
|
||||
<label for="school_id" class="col-form-label">更改地址:</label>
|
||||
<div class="d-flex w-75 flex-column-reverse">
|
||||
<%= text_field_tag :address,apply.address,class:"form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
|
||||
<%= submit_tag "确认",class:"btn btn-primary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
27
app/views/admins/unit_applies/shared/_list.html.erb
Normal file
27
app/views/admins/unit_applies/shared/_list.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<table class="table table-hover text-center unit-applies-list-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="4%">序号</th>
|
||||
<th width="8%">ID</th>
|
||||
<th width="20%" class="text-left">单位名称</th>
|
||||
<th width="8%" class="text-left">地区</th>
|
||||
<th width="20%" class="text-left">详细地址</th>
|
||||
<th width="10%">申请者</th>
|
||||
<th width="15%"><%= sort_tag('创建于', name: 'created_at', path: admins_unit_applies_path) %></th>
|
||||
<th width="15%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if applies.present? %>
|
||||
<% applies.each_with_index do |apply, index| %>
|
||||
<tr class="unit-apply-<%= apply.id %>">
|
||||
<%= render partial: "admins/unit_applies/shared/apply_item", locals: {apply: apply, index: index} %>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'admins/shared/no_data_for_table' %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: applies } %>
|
||||
Reference in New Issue
Block a user