rails_ship 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +165 -20
- data/README.md +4 -8
- data/app/{views/ship/admin/home/index.html.erb → assets/config/rails_ship_manifest.js} +0 -0
- data/app/models/rails_ship/address.rb +13 -0
- data/app/models/rails_ship/area.rb +65 -0
- data/app/models/rails_ship/shipment.rb +8 -0
- data/config/routes.rb +0 -64
- data/lib/rails_ship/engine.rb +0 -17
- data/lib/rails_ship/version.rb +3 -0
- data/lib/rails_ship.rb +5 -2
- data/lib/tasks/rails_ship_tasks.rake +4 -0
- metadata +29 -185
- data/app/controllers/ship/admin/addresses_controller.rb +0 -48
- data/app/controllers/ship/admin/base_controller.rb +0 -5
- data/app/controllers/ship/admin/home_controller.rb +0 -8
- data/app/controllers/ship/admin/packages_controller.rb +0 -43
- data/app/controllers/ship/admin/trade_items_controller.rb +0 -72
- data/app/controllers/ship/driver/base_controller.rb +0 -9
- data/app/controllers/ship/driver/favorites_controller.rb +0 -39
- data/app/controllers/ship/my/addresses_controller.rb +0 -58
- data/app/controllers/ship/my/base_controller.rb +0 -5
- data/app/controllers/ship/my/cars_controller.rb +0 -54
- data/app/controllers/ship/my/drivers_controller.rb +0 -38
- data/app/controllers/ship/my/favorites_controller.rb +0 -40
- data/app/controllers/ship/my/lines_controller.rb +0 -71
- data/app/controllers/ship/my/locations_controller.rb +0 -60
- data/app/controllers/ship/my/packages_controller.rb +0 -53
- data/app/controllers/ship/my/principal_addresses_controller.rb +0 -26
- data/app/controllers/ship/panel/base_controller.rb +0 -5
- data/app/controllers/ship/panel/lines_controller.rb +0 -53
- data/app/controllers/ship/panel/similars_controller.rb +0 -61
- data/app/jobs/ship/car_ocr_job.rb +0 -11
- data/app/jobs/ship/driver_ocr_job.rb +0 -11
- data/app/jobs/ship/location_geo_job.rb +0 -10
- data/app/models/ship/address.rb +0 -7
- data/app/models/ship/car.rb +0 -5
- data/app/models/ship/driver.rb +0 -5
- data/app/models/ship/ext/order.rb +0 -7
- data/app/models/ship/ext/trade_item.rb +0 -11
- data/app/models/ship/ext/user.rb +0 -15
- data/app/models/ship/favorite.rb +0 -5
- data/app/models/ship/line.rb +0 -5
- data/app/models/ship/line_similar.rb +0 -5
- data/app/models/ship/location.rb +0 -5
- data/app/models/ship/model/address.rb +0 -10
- data/app/models/ship/model/car.rb +0 -34
- data/app/models/ship/model/driver.rb +0 -45
- data/app/models/ship/model/favorite.rb +0 -14
- data/app/models/ship/model/line.rb +0 -28
- data/app/models/ship/model/line_similar.rb +0 -16
- data/app/models/ship/model/location.rb +0 -53
- data/app/models/ship/model/package.rb +0 -28
- data/app/models/ship/model/packaged.rb +0 -29
- data/app/models/ship/model/shipment.rb +0 -22
- data/app/models/ship/model/shipping.rb +0 -9
- data/app/models/ship/package.rb +0 -6
- data/app/models/ship/packaged.rb +0 -5
- data/app/models/ship/shipment.rb +0 -5
- data/app/models/ship.rb +0 -11
- data/app/views/admin/_ship_nav.html.erb +0 -11
- data/app/views/panel/_ship_nav.html.erb +0 -10
- data/app/views/ship/admin/addresses/_address.html.erb +0 -24
- data/app/views/ship/admin/addresses/_edit_form.html.erb +0 -3
- data/app/views/ship/admin/addresses/_form.html.erb +0 -9
- data/app/views/ship/admin/addresses/index.html.erb +0 -36
- data/app/views/ship/admin/base/_nav.html.erb +0 -3
- data/app/views/ship/admin/packages/_button.html.erb +0 -0
- data/app/views/ship/admin/packages/_edit_form.html.erb +0 -4
- data/app/views/ship/admin/packages/_filter_form.html.erb +0 -9
- data/app/views/ship/admin/packages/_form.html.erb +0 -5
- data/app/views/ship/admin/packages/_index_tbody.html.erb +0 -8
- data/app/views/ship/admin/packages/_index_thead.html.erb +0 -5
- data/app/views/ship/admin/packages/_new_form.html.erb +0 -4
- data/app/views/ship/admin/packages/_show_table.html.erb +0 -16
- data/app/views/ship/admin/packages/index.html.erb +0 -5
- data/app/views/ship/admin/rallies/_filter.html.erb +0 -7
- data/app/views/ship/admin/rallies/_form.html+phone.erb +0 -17
- data/app/views/ship/admin/rallies/_show_table.html+phone.erb +0 -24
- data/app/views/ship/admin/rallies/_show_table.html.erb +0 -12
- data/app/views/ship/admin/rallies/index.html+phone.erb +0 -26
- data/app/views/ship/admin/rallies/show.html.erb +0 -26
- data/app/views/ship/admin/trade_items/_filter.html.erb +0 -9
- data/app/views/ship/admin/trade_items/_form.html.erb +0 -7
- data/app/views/ship/admin/trade_items/_show_table.html.erb +0 -24
- data/app/views/ship/admin/trade_items/index.html.erb +0 -51
- data/app/views/ship/driver/favorites/_button.html+phone.erb +0 -4
- data/app/views/ship/driver/favorites/_edit_form.html.erb +0 -4
- data/app/views/ship/driver/favorites/_filter_form.html+phone.erb +0 -14
- data/app/views/ship/driver/favorites/_filter_form.html.erb +0 -9
- data/app/views/ship/driver/favorites/_form.html.erb +0 -3
- data/app/views/ship/driver/favorites/_index_tbody.html.erb +0 -6
- data/app/views/ship/driver/favorites/_index_thead.html.erb +0 -3
- data/app/views/ship/driver/favorites/_index_tr.html.erb +0 -4
- data/app/views/ship/driver/favorites/_new_form.html.erb +0 -4
- data/app/views/ship/driver/favorites/_show_table.html.erb +0 -8
- data/app/views/ship/driver/favorites/index.html.erb +0 -5
- data/app/views/ship/my/addresses/_edit_form.html.erb +0 -21
- data/app/views/ship/my/addresses/_form.html.erb +0 -23
- data/app/views/ship/my/addresses/index.html.erb +0 -44
- data/app/views/ship/my/cars/_edit_form.html.erb +0 -6
- data/app/views/ship/my/cars/_filter_form.html.erb +0 -9
- data/app/views/ship/my/cars/_index_tbody.html.erb +0 -3
- data/app/views/ship/my/cars/_index_thead.html.erb +0 -4
- data/app/views/ship/my/cars/_new_form.html.erb +0 -4
- data/app/views/ship/my/cars/_show_table.html.erb +0 -16
- data/app/views/ship/my/cars/create.turbo_stream.erb +0 -1
- data/app/views/ship/my/cars/index.html+phone.erb +0 -19
- data/app/views/ship/my/cars/index.html.erb +0 -5
- data/app/views/ship/my/cars/new.html.erb +0 -25
- data/app/views/ship/my/drivers/_edit_form.html.erb +0 -6
- data/app/views/ship/my/drivers/_form.html.erb +0 -4
- data/app/views/ship/my/drivers/_index_tbody.html.erb +0 -3
- data/app/views/ship/my/drivers/_index_thead.html.erb +0 -4
- data/app/views/ship/my/drivers/_new_form.html.erb +0 -4
- data/app/views/ship/my/drivers/_show_table.html.erb +0 -12
- data/app/views/ship/my/drivers/_uploader.html.erb +0 -22
- data/app/views/ship/my/drivers/edit.html.erb +0 -20
- data/app/views/ship/my/drivers/show.html.erb +0 -33
- data/app/views/ship/my/favorites/_button.html+phone.erb +0 -4
- data/app/views/ship/my/favorites/_edit_form.html.erb +0 -4
- data/app/views/ship/my/favorites/_filter_form.html+phone.erb +0 -14
- data/app/views/ship/my/favorites/_filter_form.html.erb +0 -9
- data/app/views/ship/my/favorites/_form.html.erb +0 -3
- data/app/views/ship/my/favorites/_index_tbody.html.erb +0 -6
- data/app/views/ship/my/favorites/_index_thead.html.erb +0 -3
- data/app/views/ship/my/favorites/_new_form.html.erb +0 -4
- data/app/views/ship/my/favorites/_show_table.html.erb +0 -8
- data/app/views/ship/my/favorites/index.html.erb +0 -5
- data/app/views/ship/my/lines/_edit_form.html.erb +0 -4
- data/app/views/ship/my/lines/_filter_form.html.erb +0 -1
- data/app/views/ship/my/lines/_form.html.erb +0 -3
- data/app/views/ship/my/lines/_index_tbody.html.erb +0 -6
- data/app/views/ship/my/lines/_index_tr.html.erb +0 -4
- data/app/views/ship/my/lines/_item_field.html.erb +0 -8
- data/app/views/ship/my/lines/_item_location.html.erb +0 -13
- data/app/views/ship/my/lines/_new_form.html.erb +0 -15
- data/app/views/ship/my/lines/_select/_tab_bar.html.erb +0 -10
- data/app/views/ship/my/lines/_select.html.erb +0 -10
- data/app/views/ship/my/lines/_show/_index_tbody.html.erb +0 -6
- data/app/views/ship/my/lines/_show/_index_tr.html+phone.erb +0 -6
- data/app/views/ship/my/lines/_show_table.html.erb +0 -9
- data/app/views/ship/my/lines/add.turbo_stream.erb +0 -1
- data/app/views/ship/my/lines/index.html.erb +0 -5
- data/app/views/ship/my/lines/new.html.erb +0 -1
- data/app/views/ship/my/lines/requirement.html.erb +0 -5
- data/app/views/ship/my/lines/select.turbo_stream.erb +0 -1
- data/app/views/ship/my/lines/show.html+phone.erb +0 -30
- data/app/views/ship/my/locations/_edit_form.html.erb +0 -4
- data/app/views/ship/my/locations/_filter_form.html.erb +0 -9
- data/app/views/ship/my/locations/_form.html.erb +0 -6
- data/app/views/ship/my/locations/_index_tbody.html.erb +0 -5
- data/app/views/ship/my/locations/_index_thead.html.erb +0 -6
- data/app/views/ship/my/locations/_new_form.html.erb +0 -4
- data/app/views/ship/my/locations/_show_table.html.erb +0 -20
- data/app/views/ship/my/locations/index.html.erb +0 -5
- data/app/views/ship/my/packages/index.html.erb +0 -31
- data/app/views/ship/my/principal_addresses/index.html+phone.erb +0 -32
- data/app/views/ship/my/principal_addresses/plans.html+phone.erb +0 -23
- data/app/views/ship/my/principal_addresses/show.html+phone.erb +0 -27
- data/app/views/ship/panel/base/_nav.html.erb +0 -3
- data/app/views/ship/panel/lines/_edit_form.html.erb +0 -4
- data/app/views/ship/panel/lines/_filter_form.html.erb +0 -9
- data/app/views/ship/panel/lines/_form.html.erb +0 -4
- data/app/views/ship/panel/lines/_index_tbody.html.erb +0 -4
- data/app/views/ship/panel/lines/_index_thead.html.erb +0 -5
- data/app/views/ship/panel/lines/_index_tr.html.erb +0 -19
- data/app/views/ship/panel/lines/_new_form.html.erb +0 -4
- data/app/views/ship/panel/lines/_show_table.html.erb +0 -12
- data/app/views/ship/panel/lines/index.html.erb +0 -5
- data/app/views/ship/panel/similars/_breadcrumb.html.erb +0 -7
- data/app/views/ship/panel/similars/_button.html.erb +0 -3
- data/app/views/ship/panel/similars/_edit_form.html.erb +0 -4
- data/app/views/ship/panel/similars/_filter_form.html.erb +0 -9
- data/app/views/ship/panel/similars/_form.html.erb +0 -4
- data/app/views/ship/panel/similars/_index_tbody.html.erb +0 -3
- data/app/views/ship/panel/similars/_index_thead.html.erb +0 -4
- data/app/views/ship/panel/similars/_new/_button.html.erb +0 -0
- data/app/views/ship/panel/similars/_new/_index_tr.html.erb +0 -10
- data/app/views/ship/panel/similars/_new/_index_tr_remove.html.erb +0 -10
- data/app/views/ship/panel/similars/_new_form.html.erb +0 -4
- data/app/views/ship/panel/similars/_show_table.html.erb +0 -12
- data/app/views/ship/panel/similars/create.turbo_stream.erb +0 -3
- data/app/views/ship/panel/similars/destroy.turbo_stream.erb +0 -3
- data/app/views/ship/panel/similars/index.html.erb +0 -5
- data/app/views/ship/panel/similars/new.html.erb +0 -16
- data/config/locales/zh.attributes.yml +0 -15
- data/config/locales/zh.yml +0 -51
- data/lib/rails_ship/config.rb +0 -11
@@ -1,44 +0,0 @@
|
|
1
|
-
<div class="ui grid">
|
2
|
-
<div class="three wide column">
|
3
|
-
<%= render 'my/base/nav' %>
|
4
|
-
</div>
|
5
|
-
|
6
|
-
<div class="thirteen wide column">
|
7
|
-
<div class="ui segment">
|
8
|
-
<h1>Addresses</h1>
|
9
|
-
<%= link_to 'New Address', new_my_address_path, class: 'ui mini button' %>
|
10
|
-
</div>
|
11
|
-
|
12
|
-
<table class="ui table">
|
13
|
-
<thead>
|
14
|
-
<tr>
|
15
|
-
<th>联系人</th>
|
16
|
-
<th>联系方式</th>
|
17
|
-
<th></th>
|
18
|
-
<th colspan="3"></th>
|
19
|
-
</tr>
|
20
|
-
</thead>
|
21
|
-
|
22
|
-
<tbody>
|
23
|
-
<% @addresses.each do |address| %>
|
24
|
-
<tr>
|
25
|
-
<td><%= address.contact_person %></td>
|
26
|
-
<td><%= address.tel %></td>
|
27
|
-
<td>
|
28
|
-
<%= address.area.nation %>
|
29
|
-
<%= address.area.province %>
|
30
|
-
<%= address.area.city %>
|
31
|
-
</td>
|
32
|
-
<td><%= address.address %></td>
|
33
|
-
<td><%= link_to 'Show', address_path(address) %></td>
|
34
|
-
<td><%= link_to 'Edit', edit_my_address_path(address) %></td>
|
35
|
-
<td><%= link_to 'Destroy', my_address_path(address), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
36
|
-
</tr>
|
37
|
-
<% end %>
|
38
|
-
</tbody>
|
39
|
-
</table>
|
40
|
-
|
41
|
-
</div>
|
42
|
-
|
43
|
-
</div>
|
44
|
-
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<%= form_with theme: 'weui', model: car, url: { controller: 'ship/my/cars', action: 'update', id: car.id } do |f| %>
|
2
|
-
<%= render 'error_messages', target: f.object %>
|
3
|
-
<%= f.text_field :location %>
|
4
|
-
<%= f.text_field :number %>
|
5
|
-
<%= f.submit nil, wrap: { all: nil } %>
|
6
|
-
<% end %>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<%= form_with theme: 'search', model: Ship::Car.new do |f| %>
|
2
|
-
<div class="field-body">
|
3
|
-
<%= f.text_field :name %>
|
4
|
-
<div class="field is-narrow">
|
5
|
-
<%= f.submit %>
|
6
|
-
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
-
</div>
|
8
|
-
</div>
|
9
|
-
<% end %>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<td class="has-text-right"><%= Ship::Car.human_attribute_name(:location) %></td>
|
3
|
-
<td><%= @car.location %></td>
|
4
|
-
</tr>
|
5
|
-
<tr>
|
6
|
-
<td class="has-text-right"><%= Ship::Car.human_attribute_name(:number) %></td>
|
7
|
-
<td><%= @car.number %></td>
|
8
|
-
</tr>
|
9
|
-
<tr>
|
10
|
-
<td class="has-text-right"><%= Ship::Car.human_attribute_name(:detail) %></td>
|
11
|
-
<td><%= simple_format @car.detail %></td>
|
12
|
-
</tr>
|
13
|
-
<tr>
|
14
|
-
<td class="has-text-right"><%= Ship::Car.human_attribute_name(:registration) %></td>
|
15
|
-
<td><%= image_tag @car.registration if @car.registration.attached? %></td>
|
16
|
-
</tr>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= turbo_stream.update 'car_new', partial: 'edit_form' %>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<div class="weui-panel">
|
2
|
-
<div class="weui-panel__hd">
|
3
|
-
<%= t('.title') %>
|
4
|
-
</div>
|
5
|
-
<div class="weui-panel__bd">
|
6
|
-
<% @cars.each do |car| %>
|
7
|
-
<%= link_to({ action: 'show', id: car.id }, class: 'weui-media-box weui-media-box_appmsg') do %>
|
8
|
-
<div class="weui-media-box__hd">
|
9
|
-
<%= image_tag car.registration, class: 'weui-media-box__thumb' if car.registration.attached? %>
|
10
|
-
</div>
|
11
|
-
<div class="weui-media-box__bd">
|
12
|
-
<h4 class="weui-media-box__title"><%= car.number %></h4>
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
<% end %>
|
16
|
-
</div>
|
17
|
-
<div class="weui-panel__ft"></div>
|
18
|
-
</div>
|
19
|
-
<%= render 'button' %>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<%= content_for(:wechat_js) do %>
|
2
|
-
<%= wechat_config_js debug: false, apis: ['chooseImage', 'previewImage', 'uploadImage'] -%>
|
3
|
-
<meta name="turbo-visit-control" content="reload">
|
4
|
-
<% end %>
|
5
|
-
|
6
|
-
<div class="weui-uploader p-4">
|
7
|
-
<div class="weui-uploader__hd">
|
8
|
-
<h1 class="weui-uploader__title">上传行驶证</h1>
|
9
|
-
<div class="weui-uploader__info"></div>
|
10
|
-
</div>
|
11
|
-
<div class="weui-uploader__bd">
|
12
|
-
<div class="weui-uploader__input-box" data-controller="wechat">
|
13
|
-
<%= image_vite_tag 'registration.jpg', data: { wechat_target: 'preview' }, class: 'weui-uploader__preview' %>
|
14
|
-
<div class="weui-uploader__input" data-action="click->wechat#chooseImage"></div>
|
15
|
-
<%= form_with theme: nil, model: Wechat::Media.new, url: { controller: 'wechat/my/medias', action: 'create' } do |f| %>
|
16
|
-
<%= f.hidden_field :source_type, value: @car.class_name %>
|
17
|
-
<%= f.hidden_field :attachment_name, value: 'registration' %>
|
18
|
-
<%= f.hidden_field :media_id, data: { wechat_target: 'media' } %>
|
19
|
-
<% end %>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<%= turbo_stream_from 'car_new' %>
|
25
|
-
<div id="car_update"></div>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<%= form_with theme: 'weui', model: driver, url: { controller: 'ship/my/drivers', action: 'update', id: driver.id }, method: :patch, class: 'weui-form weui-form_normal pt-0' do |f| %>
|
2
|
-
<%= render 'error_messages', target: f.object %>
|
3
|
-
<%= f.text_field :name %>
|
4
|
-
<%= f.text_field :number %>
|
5
|
-
<%= f.submit nil, wrap: { all: nil } %>
|
6
|
-
<% end %>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<td class="has-text-right"><%= Ship::Driver.human_attribute_name(:name) %></td>
|
3
|
-
<td><%= @driver.name %></td>
|
4
|
-
</tr>
|
5
|
-
<tr>
|
6
|
-
<td class="has-text-right"><%= Ship::Driver.human_attribute_name(:number) %></td>
|
7
|
-
<td><%= @driver.number %></td>
|
8
|
-
</tr>
|
9
|
-
<tr>
|
10
|
-
<td class="has-text-right"><%= Ship::Driver.human_attribute_name(:license) %></td>
|
11
|
-
<td><%= @driver.license %></td>
|
12
|
-
</tr>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<%= content_for(:wechat_js) do %>
|
2
|
-
<%= wechat_config_js debug: false, apis: ['chooseImage', 'previewImage', 'uploadImage'] -%>
|
3
|
-
<meta name="turbo-visit-control" content="reload">
|
4
|
-
<% end %>
|
5
|
-
|
6
|
-
<div class="weui-uploader p-4">
|
7
|
-
<div class="weui-uploader__hd">
|
8
|
-
<div class="weui-uploader__title">驾驶证</div>
|
9
|
-
</div>
|
10
|
-
<div class="weui-uploader__bd">
|
11
|
-
<div class="weui-uploader__input-box" data-controller="wechat">
|
12
|
-
<%= image_vite_tag 'license.jpg', data: { wechat_target: 'preview' }, class: 'weui-uploader__preview' %>
|
13
|
-
<div class="weui-uploader__input" data-action="click->wechat#chooseImage"></div>
|
14
|
-
<%= form_with theme: nil, model: Wechat::Media.new, url: { controller: 'wechat/my/medias', action: 'create' } do |f| %>
|
15
|
-
<%= f.hidden_field :source_type, value: @driver.class_name %>
|
16
|
-
<%= f.hidden_field :source_id, value: @driver.id %>
|
17
|
-
<%= f.hidden_field :attachment_name, value: 'license' %>
|
18
|
-
<%= f.hidden_field :media_id, data: { wechat_target: 'media' } %>
|
19
|
-
<% end %>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
</div>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<div class="weui-panel">
|
2
|
-
<div class="weui-panel__hd level is-flex">
|
3
|
-
<div class="level-left">
|
4
|
-
<span class="level-item"><%= t('.title') %></span>
|
5
|
-
</div>
|
6
|
-
<div class="level-right mt-0">
|
7
|
-
<%= link_to({ action: 'show' }, class: 'weui-btn weui-btn_mini weui-btn_default level-item') do %>
|
8
|
-
<span><%= t('.show') %></span>
|
9
|
-
<% end %>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
<div class="weui-panel__bd">
|
13
|
-
<%= render 'uploader' %>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<%= render partial: 'edit_form', locals: { driver: @driver } %>
|
18
|
-
|
19
|
-
<%= turbo_stream_from 'driver_edit' %>
|
20
|
-
<div id="driver_update"></div>
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<div class="weui-panel">
|
2
|
-
<div class="weui-panel__hd level is-flex">
|
3
|
-
<div class="level-left">
|
4
|
-
<span class="level-item"><%= t('.title') %></span>
|
5
|
-
</div>
|
6
|
-
<div class="level-right mt-0">
|
7
|
-
<%= link_to({ action: 'edit' }, class: 'weui-btn weui-btn_mini weui-btn_default level-item') do %>
|
8
|
-
<span><%= t('.edit') %></span>
|
9
|
-
<% end %>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
<div class="weui-panel__bd">
|
13
|
-
<% if @driver.license.attached? %>
|
14
|
-
<%= image_tag @driver.license.url, class: 'image' %>
|
15
|
-
<% else %>
|
16
|
-
<%= render 'uploader' %>
|
17
|
-
<% end %>
|
18
|
-
<div class="weui-form-preview">
|
19
|
-
<div class="weui-form-preview__bd">
|
20
|
-
<div class="weui-form-preview__item">
|
21
|
-
<div class="weui-form-preview__label"><%= Ship::Driver.human_attribute_name(:name) %></div>
|
22
|
-
<div class="weui-form-preview__value"><%= @driver.name %></div>
|
23
|
-
</div>
|
24
|
-
<div class="weui-form-preview__item">
|
25
|
-
<div class="weui-form-preview__label"><%= Ship::Driver.human_attribute_name(:number) %></div>
|
26
|
-
<div class="weui-form-preview__value"><%= @driver.number %></div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
<%= turbo_stream_from 'driver_edit' %>
|
33
|
-
<div id="driver_update"></div>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<div class="weui-search-bar" data-controller="search">
|
2
|
-
<%= form_with theme: nil, class: 'weui-search-bar__form', method: :get, local: true do |f| %>
|
3
|
-
<div class="weui-search-bar__box">
|
4
|
-
<i class="weui-icon-search"></i>
|
5
|
-
<%= f.search_field 'name-like', value: params['name-like'], class: 'weui-search-bar__input', placeholder: '搜索', data: { search_target: 'input' } %>
|
6
|
-
<a class="weui-icon-clear" data-action="search#clear"></a>
|
7
|
-
</div>
|
8
|
-
<label class="weui-search-bar__label" data-search-target="label" data-action="click->search#focus">
|
9
|
-
<i class="weui-icon-search"></i>
|
10
|
-
<span>搜索</span>
|
11
|
-
</label>
|
12
|
-
<% end %>
|
13
|
-
<a class="weui-search-bar__cancel-btn" data-action="search#cancel">取消</a>
|
14
|
-
</div>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<%= form_with theme: 'search', model: Ship::Favorite.new do |f| %>
|
2
|
-
<div class="field-body">
|
3
|
-
<%= f.text_field :name %>
|
4
|
-
<div class="field is-narrow">
|
5
|
-
<%= f.submit %>
|
6
|
-
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
-
</div>
|
8
|
-
</div>
|
9
|
-
<% end %>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<td class="has-text-right"><%= Ship::Favorite.human_attribute_name(:driver_name) %></td>
|
3
|
-
<td><%= @favorite.driver.name %></td>
|
4
|
-
</tr>
|
5
|
-
<tr>
|
6
|
-
<td class="has-text-right"><%= Ship::Favorite.human_attribute_name(:driver_avatar) %></td>
|
7
|
-
<td><%= image_tag @favorite.driver.license if @favorite.driver.license.attached? %></td>
|
8
|
-
</tr>
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<%= f.fields :locations, model: @line.locations.sort_by(&:position) do |ef| %>
|
2
|
-
<%= ef.hidden_field :poiname %>
|
3
|
-
<%= ef.hidden_field :poiaddress %>
|
4
|
-
<%= ef.hidden_field :cityname %>
|
5
|
-
<%= ef.hidden_field :lat %>
|
6
|
-
<%= ef.hidden_field :lng %>
|
7
|
-
<%= ef.hidden_field :position %>
|
8
|
-
<% end %>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<tr id="tr_<%= location.position %>">
|
2
|
-
<td class="has-text-right"><%= location.position_text %></td>
|
3
|
-
<td>
|
4
|
-
<%= button_to({ action: 'select', index: location.position - 1 }, form_class: 'button_box') do %>
|
5
|
-
<span id="<%= location.position - 1 %>_name"><%= location.poiname %></span>
|
6
|
-
<% end %>
|
7
|
-
</td>
|
8
|
-
<td style="width: 5em">
|
9
|
-
<button class="button is-white" data-controller="former" data-former-id-value="new_line" data-former-url-value="<%= url_for({ action: 'add', position: location.position }) %>" data-action="former#submit">
|
10
|
-
<i class="fas fa-plus fa-lg"></i>
|
11
|
-
</button>
|
12
|
-
</td>
|
13
|
-
</tr>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<table class="table is-fullwidth is-hoverable as-show" id="line-table" style="table-layout: fixed">
|
2
|
-
<tbody>
|
3
|
-
<%= render partial: 'item_location', collection: @line.locations.sort_by(&:position), as: :location %>
|
4
|
-
</tbody>
|
5
|
-
<tfoot>
|
6
|
-
<tr>
|
7
|
-
<td colspan="3">
|
8
|
-
<%= form_with model: @line, url: { action: 'create' }, id: 'new_line' do |f| %>
|
9
|
-
<%= render partial: 'item_field', locals: { f: f } %>
|
10
|
-
<button type="submit" form="new_line" class="weui-btn weui-btn_primary">确认</button>
|
11
|
-
<% end %>
|
12
|
-
</td>
|
13
|
-
</tr>
|
14
|
-
</tfoot>
|
15
|
-
</table>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<div class="weui-tabbar weui-tabbar_fixed" data-controller="qq-map" data-qq-map-id-value="qq-map">
|
2
|
-
<div class="weui-tabbar__item">
|
3
|
-
<%= link_to :back, class: 'weui-btn weui-btn_default' do %>
|
4
|
-
<span>取消</span>
|
5
|
-
<% end %>
|
6
|
-
</div>
|
7
|
-
<div class="weui-tabbar__item">
|
8
|
-
<button class="weui-btn weui-btn_primary">确认</button>
|
9
|
-
</div>
|
10
|
-
</div>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<iframe
|
2
|
-
class="as-top"
|
3
|
-
id="qq-map"
|
4
|
-
src="https://apis.map.qq.com/tools/locpicker?type=1&key=<%= SETTING.dig(:qq_map, :key) %>&referer=work_design"
|
5
|
-
data-controller="qq-map"
|
6
|
-
data-action="message@window->qq-map#selected"
|
7
|
-
data-qq-map-name-value="line_locations_attributes"
|
8
|
-
data-qq-map-index-value="<%= params[:index] %>"
|
9
|
-
>
|
10
|
-
</iframe>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= turbo_stream.replace 'line-table', partial: 'new_form' %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render 'new_form' %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= turbo_stream.after 'line-table', partial: 'select' %>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<table class="table is-fullwidth is-hoverable as-show">
|
2
|
-
<thead>
|
3
|
-
<tr>
|
4
|
-
<th class="has-text-left">
|
5
|
-
<%= link_to({ action: 'index' }, class: 'button is-borderless') do %>
|
6
|
-
<i class="fas fa-angle-left fa-lg"></i>
|
7
|
-
<% end %>
|
8
|
-
</th>
|
9
|
-
<th class="has-text-right">
|
10
|
-
<button class="button is-borderless" data-controller="weui-actionsheet" data-weui-actionsheet-id-value="actionsheet" data-action="weui-actionsheet#toggle">
|
11
|
-
<i class="fas fa-ellipsis-h fa-lg"></i>
|
12
|
-
</button>
|
13
|
-
</th>
|
14
|
-
</tr>
|
15
|
-
</thead>
|
16
|
-
<tbody>
|
17
|
-
<%= render 'show_table' %>
|
18
|
-
</tbody>
|
19
|
-
</table>
|
20
|
-
|
21
|
-
<div class="weui-panel">
|
22
|
-
<div class="weui-panel__hd"><%= t('.title') %></div>
|
23
|
-
<div class="weui-panel__bd">
|
24
|
-
<div class="weui-cells mt-0">
|
25
|
-
<%= render partial: 'index_tbody', layout: 'index_tr', collection: @similars, as: :model %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
<%= render 'actionsheet' %>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<%= form_with theme: 'search', model: Ship::Location.new do |f| %>
|
2
|
-
<div class="field-body">
|
3
|
-
<%= f.text_field :name %>
|
4
|
-
<div class="field is-narrow">
|
5
|
-
<%= f.submit %>
|
6
|
-
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
-
</div>
|
8
|
-
</div>
|
9
|
-
<% end %>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<th><%= Ship::Location.human_attribute_name(:poiname) %></th>
|
2
|
-
<th><%= Ship::Location.human_attribute_name(:poiaddress) %></th>
|
3
|
-
<th><%= Ship::Location.human_attribute_name(:cityname) %></th>
|
4
|
-
<th><%= Ship::Location.human_attribute_name(:lat) %></th>
|
5
|
-
<th><%= Ship::Location.human_attribute_name(:lng) %></th>
|
6
|
-
<th></th>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<td class="has-text-right"><%= Ship::Location.human_attribute_name(:poiname) %></td>
|
3
|
-
<td><%= @location.poiname %></td>
|
4
|
-
</tr>
|
5
|
-
<tr>
|
6
|
-
<td class="has-text-right"><%= Ship::Location.human_attribute_name(:poiaddress) %></td>
|
7
|
-
<td><%= @location.poiaddress %></td>
|
8
|
-
</tr>
|
9
|
-
<tr>
|
10
|
-
<td class="has-text-right"><%= Ship::Location.human_attribute_name(:cityname) %></td>
|
11
|
-
<td><%= @location.cityname %></td>
|
12
|
-
</tr>
|
13
|
-
<tr>
|
14
|
-
<td class="has-text-right"><%= Ship::Location.human_attribute_name(:lat) %></td>
|
15
|
-
<td><%= @location.lat %></td>
|
16
|
-
</tr>
|
17
|
-
<tr>
|
18
|
-
<td class="has-text-right"><%= Ship::Location.human_attribute_name(:lng) %></td>
|
19
|
-
<td><%= @location.lng %></td>
|
20
|
-
</tr>
|