rails_event 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +20 -0
- data/README.md +36 -0
- data/Rakefile +32 -0
- data/app/controllers/eventual/admin/base_controller.rb +4 -0
- data/app/controllers/eventual/admin/bookings_controller.rb +43 -0
- data/app/controllers/eventual/admin/crowd_members_controller.rb +43 -0
- data/app/controllers/eventual/admin/crowds_controller.rb +58 -0
- data/app/controllers/eventual/admin/event_crowds_controller.rb +71 -0
- data/app/controllers/eventual/admin/event_items_controller.rb +58 -0
- data/app/controllers/eventual/admin/event_participants_controller.rb +101 -0
- data/app/controllers/eventual/admin/event_taxons_controller.rb +55 -0
- data/app/controllers/eventual/admin/events_controller.rb +91 -0
- data/app/controllers/eventual/admin/place_taxons_controller.rb +57 -0
- data/app/controllers/eventual/admin/places_controller.rb +59 -0
- data/app/controllers/eventual/admin/plan_attenders_controller.rb +65 -0
- data/app/controllers/eventual/admin/plan_items_controller.rb +84 -0
- data/app/controllers/eventual/admin/plans_controller.rb +127 -0
- data/app/controllers/eventual/admin/seats_controller.rb +58 -0
- data/app/controllers/eventual/admin/time_items_controller.rb +82 -0
- data/app/controllers/eventual/admin/time_lists_controller.rb +72 -0
- data/app/controllers/eventual/base_controller.rb +4 -0
- data/app/controllers/eventual/me/base_controller.rb +4 -0
- data/app/controllers/eventual/me/plan_items_controller.rb +58 -0
- data/app/controllers/eventual/my/base_controller.rb +4 -0
- data/app/controllers/eventual/my/plan_items_controller.rb +55 -0
- data/app/controllers/eventual/places_controller.rb +27 -0
- data/app/controllers/eventual/time_controller.rb +14 -0
- data/app/models/eventual/application_record.rb +5 -0
- data/app/models/eventual/booking.rb +5 -0
- data/app/models/eventual/crowd.rb +5 -0
- data/app/models/eventual/crowd_member.rb +5 -0
- data/app/models/eventual/event.rb +6 -0
- data/app/models/eventual/event_crowd.rb +5 -0
- data/app/models/eventual/event_grant.rb +5 -0
- data/app/models/eventual/event_item.rb +5 -0
- data/app/models/eventual/event_participant.rb +6 -0
- data/app/models/eventual/event_taxon.rb +5 -0
- data/app/models/eventual/ext/recurrence.rb +86 -0
- data/app/models/eventual/model/agency.rb +18 -0
- data/app/models/eventual/model/booked.rb +10 -0
- data/app/models/eventual/model/booker.rb +15 -0
- data/app/models/eventual/model/booking.rb +37 -0
- data/app/models/eventual/model/crowd.rb +21 -0
- data/app/models/eventual/model/crowd_member.rb +20 -0
- data/app/models/eventual/model/event.rb +48 -0
- data/app/models/eventual/model/event_crowd.rb +54 -0
- data/app/models/eventual/model/event_grant.rb +14 -0
- data/app/models/eventual/model/event_item.rb +30 -0
- data/app/models/eventual/model/event_participant.rb +63 -0
- data/app/models/eventual/model/event_taxon.rb +13 -0
- data/app/models/eventual/model/member.rb +18 -0
- data/app/models/eventual/model/occurrence.rb +62 -0
- data/app/models/eventual/model/place.rb +25 -0
- data/app/models/eventual/model/place_taxon.rb +18 -0
- data/app/models/eventual/model/plan.rb +147 -0
- data/app/models/eventual/model/plan_attender.rb +31 -0
- data/app/models/eventual/model/plan_item.rb +84 -0
- data/app/models/eventual/model/plan_participant/crowd_participant.rb +17 -0
- data/app/models/eventual/model/plan_participant/normal_participant.rb +9 -0
- data/app/models/eventual/model/plan_participant.rb +30 -0
- data/app/models/eventual/model/planned.rb +11 -0
- data/app/models/eventual/model/planning.rb +44 -0
- data/app/models/eventual/model/recurrence.rb +64 -0
- data/app/models/eventual/model/seat.rb +17 -0
- data/app/models/eventual/model/time_item.rb +46 -0
- data/app/models/eventual/model/time_list.rb +57 -0
- data/app/models/eventual/place.rb +5 -0
- data/app/models/eventual/place_taxon.rb +6 -0
- data/app/models/eventual/plan.rb +7 -0
- data/app/models/eventual/plan_attender.rb +5 -0
- data/app/models/eventual/plan_item.rb +6 -0
- data/app/models/eventual/plan_participant.rb +5 -0
- data/app/models/eventual/seat.rb +5 -0
- data/app/models/eventual/time_item.rb +5 -0
- data/app/models/eventual/time_list.rb +5 -0
- data/app/models/eventual.rb +11 -0
- data/app/models/plan_participant/eventual/crowd_participant.rb +5 -0
- data/app/models/plan_participant/eventual/normal_participant.rb +5 -0
- data/app/views/admin/_event_nav.html.erb +14 -0
- data/app/views/admin/_nav_event.html.erb +9 -0
- data/app/views/eventual/admin/base/_nav.html.erb +3 -0
- data/app/views/eventual/admin/bookings/_booking.json.jbuilder +12 -0
- data/app/views/eventual/admin/bookings/_filter.html.erb +6 -0
- data/app/views/eventual/admin/bookings/_form.html.erb +8 -0
- data/app/views/eventual/admin/bookings/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/bookings/_show_table.html.erb +28 -0
- data/app/views/eventual/admin/bookings/index.html.erb +43 -0
- data/app/views/eventual/admin/bookings/index.json.jbuilder +1 -0
- data/app/views/eventual/admin/crowd_members/_filter_form.html.erb +7 -0
- data/app/views/eventual/admin/crowd_members/_form.html.erb +4 -0
- data/app/views/eventual/admin/crowd_members/index.html.erb +34 -0
- data/app/views/eventual/admin/crowds/_crowd.json.jbuilder +8 -0
- data/app/views/eventual/admin/crowds/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/crowds/_filter_form.html.erb +10 -0
- data/app/views/eventual/admin/crowds/_form.html.erb +4 -0
- data/app/views/eventual/admin/crowds/_index_tbody.html.erb +5 -0
- data/app/views/eventual/admin/crowds/_index_thead.html.erb +3 -0
- data/app/views/eventual/admin/crowds/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/crowds/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/crowds/_show_table.html.erb +20 -0
- data/app/views/eventual/admin/crowds/index.html.erb +5 -0
- data/app/views/eventual/admin/crowds/index.json.jbuilder +1 -0
- data/app/views/eventual/admin/event_crowds/_breadcrumb.html.erb +7 -0
- data/app/views/eventual/admin/event_crowds/_crowd_student.html.erb +18 -0
- data/app/views/eventual/admin/event_crowds/_edit_form.html.erb +15 -0
- data/app/views/eventual/admin/event_crowds/_index_tbody.html.erb +19 -0
- data/app/views/eventual/admin/event_crowds/_index_thead.html.erb +10 -0
- data/app/views/eventual/admin/event_crowds/_new_form.html.erb +6 -0
- data/app/views/eventual/admin/event_crowds/_show_table.html.erb +12 -0
- data/app/views/eventual/admin/event_crowds/index.html.erb +2 -0
- data/app/views/eventual/admin/event_items/_breadcrumb.html.erb +7 -0
- data/app/views/eventual/admin/event_items/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/event_items/_event_item.json.jbuilder +12 -0
- data/app/views/eventual/admin/event_items/_filter_form.html.erb +9 -0
- data/app/views/eventual/admin/event_items/_form.html.erb +12 -0
- data/app/views/eventual/admin/event_items/_index_tbody.html.erb +8 -0
- data/app/views/eventual/admin/event_items/_index_thead.html.erb +5 -0
- data/app/views/eventual/admin/event_items/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/event_items/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/event_items/_show_table.html.erb +12 -0
- data/app/views/eventual/admin/event_items/index.html.erb +1 -0
- data/app/views/eventual/admin/event_items/index.json.jbuilder +1 -0
- data/app/views/eventual/admin/event_participants/_breadcrumb.html.erb +7 -0
- data/app/views/eventual/admin/event_participants/_button.html.erb +3 -0
- data/app/views/eventual/admin/event_participants/_filter_form.html.erb +9 -0
- data/app/views/eventual/admin/event_participants/_filter_table.html.erb +11 -0
- data/app/views/eventual/admin/event_participants/_form.html.erb +4 -0
- data/app/views/eventual/admin/event_participants/_index_tbody.html.erb +15 -0
- data/app/views/eventual/admin/event_participants/_index_thead.html.erb +5 -0
- data/app/views/eventual/admin/event_participants/index.html.erb +1 -0
- data/app/views/eventual/admin/event_taxons/_breadcrumb.html.erb +6 -0
- data/app/views/eventual/admin/event_taxons/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/event_taxons/_event_taxon.json.jbuilder +5 -0
- data/app/views/eventual/admin/event_taxons/_filter_form.html.erb +10 -0
- data/app/views/eventual/admin/event_taxons/_form.html.erb +2 -0
- data/app/views/eventual/admin/event_taxons/_index_tbody.html.erb +1 -0
- data/app/views/eventual/admin/event_taxons/_index_thead.html.erb +2 -0
- data/app/views/eventual/admin/event_taxons/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/event_taxons/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/event_taxons/index.html.erb +5 -0
- data/app/views/eventual/admin/event_taxons/index.json.jbuilder +1 -0
- data/app/views/eventual/admin/events/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/events/_event.json.jbuilder +17 -0
- data/app/views/eventual/admin/events/_filter_form.html.erb +9 -0
- data/app/views/eventual/admin/events/_filter_table.html.erb +15 -0
- data/app/views/eventual/admin/events/_form.html.erb +11 -0
- data/app/views/eventual/admin/events/_index_tbody.html.erb +11 -0
- data/app/views/eventual/admin/events/_index_thead.html.erb +10 -0
- data/app/views/eventual/admin/events/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/events/_show/_breadcrumb.html.erb +7 -0
- data/app/views/eventual/admin/events/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/events/create.json.jbuilder +1 -0
- data/app/views/eventual/admin/events/index.html.erb +5 -0
- data/app/views/eventual/admin/events/index.json.jbuilder +1 -0
- data/app/views/eventual/admin/events/repeat_form.js.erb +14 -0
- data/app/views/eventual/admin/events/show.html.erb +16 -0
- data/app/views/eventual/admin/place_taxons/_breadcrumb.html.erb +6 -0
- data/app/views/eventual/admin/place_taxons/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/place_taxons/_filter_form.html.erb +9 -0
- data/app/views/eventual/admin/place_taxons/_form.html.erb +6 -0
- data/app/views/eventual/admin/place_taxons/_index_tbody.html.erb +17 -0
- data/app/views/eventual/admin/place_taxons/_index_thead.html.erb +4 -0
- data/app/views/eventual/admin/place_taxons/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/place_taxons/_show_table.html.erb +12 -0
- data/app/views/eventual/admin/place_taxons/index.html.erb +5 -0
- data/app/views/eventual/admin/places/_breadcrumb.html.erb +5 -0
- data/app/views/eventual/admin/places/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/places/_filter_form.html.erb +10 -0
- data/app/views/eventual/admin/places/_form.html.erb +4 -0
- data/app/views/eventual/admin/places/_index_tbody.html.erb +6 -0
- data/app/views/eventual/admin/places/_index_thead.html.erb +10 -0
- data/app/views/eventual/admin/places/_index_tr.html.erb +19 -0
- data/app/views/eventual/admin/places/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/places/_place.json.jbuilder +6 -0
- data/app/views/eventual/admin/places/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/places/_show_table.html.erb +8 -0
- data/app/views/eventual/admin/places/index.html.erb +5 -0
- data/app/views/eventual/admin/places/index.json.jbuilder +1 -0
- data/app/views/eventual/admin/plan_attenders/_breadcrumb.html.erb +9 -0
- data/app/views/eventual/admin/plan_attenders/_course_student.json.jbuilder +11 -0
- data/app/views/eventual/admin/plan_attenders/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/plan_attenders/_filter.html.erb +6 -0
- data/app/views/eventual/admin/plan_attenders/_form.html.erb +5 -0
- data/app/views/eventual/admin/plan_attenders/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/plan_attenders/_plan_attender.json.jbuilder +9 -0
- data/app/views/eventual/admin/plan_attenders/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/plan_attenders/_show_table.html.erb +16 -0
- data/app/views/eventual/admin/plan_attenders/absent.json.jbuilder +0 -0
- data/app/views/eventual/admin/plan_attenders/attend.json.jbuilder +0 -0
- data/app/views/eventual/admin/plan_attenders/index.html.erb +51 -0
- data/app/views/eventual/admin/plan_attenders/index.json.jbuilder +2 -0
- data/app/views/eventual/admin/plan_attenders/indexs.json.jbuilder +6 -0
- data/app/views/eventual/admin/plan_items/_breadcrumb.html.erb +8 -0
- data/app/views/eventual/admin/plan_items/_edit.html.erb +23 -0
- data/app/views/eventual/admin/plan_items/_filter.html.erb +11 -0
- data/app/views/eventual/admin/plan_items/_menu.html.erb +4 -0
- data/app/views/eventual/admin/plan_items/_plan.html.erb +6 -0
- data/app/views/eventual/admin/plan_items/_plan_item.json.jbuilder +12 -0
- data/app/views/eventual/admin/plan_items/_plan_items.json.jbuilder +13 -0
- data/app/views/eventual/admin/plan_items/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/plan_items/_show_table.html.erb +20 -0
- data/app/views/eventual/admin/plan_items/index.html.erb +72 -0
- data/app/views/eventual/admin/plan_items/index.json.jbuilder +3 -0
- data/app/views/eventual/admin/plan_items/qrcode.js.erb +1 -0
- data/app/views/eventual/admin/plans/_edit_item.html.erb +24 -0
- data/app/views/eventual/admin/plans/_filter.html.erb +8 -0
- data/app/views/eventual/admin/plans/_index.html.erb +31 -0
- data/app/views/eventual/admin/plans/_plan.json.jbuilder +12 -0
- data/app/views/eventual/admin/plans/_select_table.html.erb +30 -0
- data/app/views/eventual/admin/plans/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/plans/_show_item.html.erb +22 -0
- data/app/views/eventual/admin/plans/_show_table.html.erb +20 -0
- data/app/views/eventual/admin/plans/_table.html.erb +34 -0
- data/app/views/eventual/admin/plans/calendar.js.erb +12 -0
- data/app/views/eventual/admin/plans/index.html.erb +3 -0
- data/app/views/eventual/admin/plans/index.js.erb +42 -0
- data/app/views/eventual/admin/plans/index.json.jbuilder +1 -0
- data/app/views/eventual/admin/plans/show.html.erb +3 -0
- data/app/views/eventual/admin/seats/_breadcrumb.html.erb +0 -0
- data/app/views/eventual/admin/seats/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/seats/_filter_form.html.erb +9 -0
- data/app/views/eventual/admin/seats/_form.html.erb +4 -0
- data/app/views/eventual/admin/seats/_index_tbody.html.erb +3 -0
- data/app/views/eventual/admin/seats/_index_thead.html.erb +4 -0
- data/app/views/eventual/admin/seats/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/seats/_show_table.html.erb +12 -0
- data/app/views/eventual/admin/seats/index.html.erb +5 -0
- data/app/views/eventual/admin/time_items/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/time_items/_form.html.erb +3 -0
- data/app/views/eventual/admin/time_items/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/time_items/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/time_items/_show_table.html.erb +12 -0
- data/app/views/eventual/admin/time_items/_time_item.json.jbuilder +3 -0
- data/app/views/eventual/admin/time_items/_time_items_options.html.erb +1 -0
- data/app/views/eventual/admin/time_items/default.json.jbuilder +1 -0
- data/app/views/eventual/admin/time_items/index.json.jbuilder +1 -0
- data/app/views/eventual/admin/time_items/select.js.erb +3 -0
- data/app/views/eventual/admin/time_lists/_edit_form.html.erb +4 -0
- data/app/views/eventual/admin/time_lists/_filter.html.erb +8 -0
- data/app/views/eventual/admin/time_lists/_form.html.erb +4 -0
- data/app/views/eventual/admin/time_lists/_index_tbody.html.erb +14 -0
- data/app/views/eventual/admin/time_lists/_index_thead.html.erb +8 -0
- data/app/views/eventual/admin/time_lists/_index_tr.html.erb +13 -0
- data/app/views/eventual/admin/time_lists/_new_form.html.erb +4 -0
- data/app/views/eventual/admin/time_lists/_show.json.jbuilder +1 -0
- data/app/views/eventual/admin/time_lists/_show_table.html.erb +8 -0
- data/app/views/eventual/admin/time_lists/_time_items.html.erb +27 -0
- data/app/views/eventual/admin/time_lists/_time_list.json.jbuilder +10 -0
- data/app/views/eventual/admin/time_lists/index.html.erb +5 -0
- data/app/views/eventual/admin/time_lists/index.json.jbuilder +1 -0
- data/app/views/eventual/me/plan_items/_plan_item.json.jbuilder +14 -0
- data/app/views/eventual/me/plan_items/index.json.jbuilder +3 -0
- data/app/views/eventual/my/plans/_show_table.html.erb +32 -0
- data/app/views/eventual/my/plans/_table.html.erb +34 -0
- data/app/views/eventual/my/plans/_time_plan.json.jbuilder +8 -0
- data/app/views/eventual/my/plans/calendar.js.erb +12 -0
- data/app/views/eventual/my/plans/edit.html.erb +9 -0
- data/app/views/eventual/my/plans/edit.js.erb +3 -0
- data/app/views/eventual/my/plans/index-ready.js +11 -0
- data/app/views/eventual/my/plans/index.html.erb +26 -0
- data/app/views/eventual/my/plans/index.js +35 -0
- data/app/views/eventual/my/plans/index.json.jbuilder +1 -0
- data/app/views/eventual/my/plans/new.html.erb +9 -0
- data/app/views/eventual/my/plans/show.html.erb +7 -0
- data/app/views/eventual/my/plans/show.js.erb +12 -0
- data/app/views/eventual/my/plans/show.json.jbuilder +1 -0
- data/app/views/eventual/places/_filter_table.html.erb +11 -0
- data/app/views/eventual/places/index.html.erb +35 -0
- data/app/views/eventual/places/show.html.erb +0 -0
- data/app/views/eventual/time/_finish_at.html.erb +1 -0
- data/app/views/eventual/time/_finish_at_once.html.erb +1 -0
- data/app/views/eventual/time/_form.html.erb +15 -0
- data/app/views/eventual/time/_monthly_checkboxes.html.erb +1 -0
- data/app/views/eventual/time/_once_date.html.erb +1 -0
- data/app/views/eventual/time/_start_at.html.erb +1 -0
- data/app/views/eventual/time/_start_at_once.html.erb +1 -0
- data/app/views/eventual/time/_weekly_checkboxes.html.erb +1 -0
- data/app/views/eventual/time/index.css +5 -0
- data/app/views/eventual/time/repeat_form.js.erb +14 -0
- data/app/views/eventual/time/show.css +3 -0
- data/config/locales/en.enum.yml +8 -0
- data/config/locales/zh.attributes.yml +50 -0
- data/config/locales/zh.controller.yml +59 -0
- data/config/locales/zh.enum.yml +12 -0
- data/config/routes.rb +98 -0
- data/lib/rails_event/config.rb +13 -0
- data/lib/rails_event/engine.rb +29 -0
- data/lib/rails_event/version.rb +5 -0
- data/lib/rails_event.rb +4 -0
- metadata +346 -0
@@ -0,0 +1 @@
|
|
1
|
+
json.plan_attender @plan_attender, partial: 'plan_attender', as: :plan_attender
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= PlanAttender.human_attribute_name(:member) %></td>
|
3
|
+
<td><%= @plan_attender.member %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= PlanAttender.human_attribute_name(:state) %></td>
|
7
|
+
<td><%= @plan_attender.state %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= PlanAttender.human_attribute_name(:attended) %></td>
|
11
|
+
<td><%= @plan_attender.attended %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td class="has-text-right"><%= PlanAttender.human_attribute_name(:created_at) %></td>
|
15
|
+
<td><%= @plan_attender.created_at %></td>
|
16
|
+
</tr>
|
File without changes
|
File without changes
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<table class="table is-hoverable is-fullwidth">
|
2
|
+
<tr>
|
3
|
+
<td class="has-text-right"><%= PlanItem.human_attribute_name(:qrcode) %></td>
|
4
|
+
<td>
|
5
|
+
<% if @plan_item.wechat_response %>
|
6
|
+
<%= image_tag @plan_item.qrcode_url, class: 'ui small image' %>
|
7
|
+
<% else %>
|
8
|
+
<%= link_to qrcode_plan_item_path(@plan_item.plan_type, @plan_item.plan_id, @plan_item), method: :patch, aria: { label: t('.qrcode') }, class: 'button is-small is-rounded is-light' do %>
|
9
|
+
<i class="fas fa-qrcode"></i>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
</td>
|
13
|
+
</tr>
|
14
|
+
</table>
|
15
|
+
|
16
|
+
<div class="ui top attached segment">
|
17
|
+
<%= render 'filter' %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<table class="table is-hoverable is-fullwidth">
|
21
|
+
<thead>
|
22
|
+
<tr>
|
23
|
+
<th><%= Eventual::PlanAttender.human_attribute_name(:attender_id) %></th>
|
24
|
+
<th><%= Eventual::PlanAttender.human_attribute_name(:state) %></th>
|
25
|
+
<th><%= Eventual::PlanAttender.human_attribute_name(:created_at) %></th>
|
26
|
+
<th>
|
27
|
+
<%= PlanAttender.human_attribute_name(:attended) %>
|
28
|
+
</th>
|
29
|
+
</tr>
|
30
|
+
</thead>
|
31
|
+
<tbody>
|
32
|
+
<% @plan_participants.each do |plan_participant| %>
|
33
|
+
<tr>
|
34
|
+
<td><%= plan_participant.member.real_name %></td>
|
35
|
+
<td><%= plan_participant.state %></td>
|
36
|
+
<td><time data-controller="time"><%= plan_participant.created_at.to_s(:rfc822) %></time></td>
|
37
|
+
<td>
|
38
|
+
<div class="ui toggle checkbox">
|
39
|
+
<% if @plan_item.attenders.include?("#{plan_participant.participant_type}_#{plan_participant.participant_id}") %>
|
40
|
+
<%= check_box_tag :plan_participant_id, plan_participant.id, true, data: { method: :delete, url: admin_plan_item_plan_attenders_path(@plan_item), submit: true }, id: nil %>
|
41
|
+
<% else %>
|
42
|
+
<%= check_box_tag :plan_participant_id, plan_participant.id, false, data: { method: :post, url: admin_plan_item_plan_attenders_path(@plan_item), submit: true }, id: nil %>
|
43
|
+
<% end %>
|
44
|
+
</div>
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</tbody>
|
49
|
+
</table>
|
50
|
+
|
51
|
+
<%= paginate @plan_participants %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
json.plan_item @plan_item, partial: 'event/admin/plan_items/plan_item', as: :plan_item
|
2
|
+
json.event @plan_item.planned, :id, :title
|
3
|
+
json.event_participants @event_participants, partial: 'event_participant', as: :event_participant
|
4
|
+
if @plan_item&.event_item
|
5
|
+
json.event_item @plan_item.event_item, :id, :title
|
6
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="breadcrumb has-succeeds-separator">
|
2
|
+
<ul>
|
3
|
+
<li><%= link_to t('event.admin.events.index.title'), admin_events_path %></li>
|
4
|
+
<li><%= @event_crowd.event.title %></li>
|
5
|
+
<li><%= link_to t('event.admin.event_crowds.index.title'), admin_event_event_crowds_path(@event_crowd.event_id) %></li>
|
6
|
+
<li class="is-active"><%= t('.title') %></li>
|
7
|
+
</ul>
|
8
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class="ui modal" id="modal">
|
2
|
+
<i class="fas fa-times close"></i>
|
3
|
+
<div class="content">
|
4
|
+
<%= form_with model: @event_plan, url: admin_event_crowd_plan_path(@event_crowd, @event_plan) do |f| %>
|
5
|
+
<%= render 'error_messages', target: @event_plan %>
|
6
|
+
<% if params[:item] == 'event_item' %>
|
7
|
+
<%= f.collection_select :event_item_id, @event_crowd.event_items, :id, :title %>
|
8
|
+
<% end %>
|
9
|
+
<% if params[:item] == 'teacher' %>
|
10
|
+
<%= f.collection_members_select :teacher_id, :id, :name, { include_blank: true } %>
|
11
|
+
<% end %>
|
12
|
+
<% if params[:item] == 'place' %>
|
13
|
+
<div class="inline fields">
|
14
|
+
<%= f.collection_select :place_id, @places, :id, :name, { include_blank: true, can: { wrap_all: false } } %>
|
15
|
+
<%= link_to admin_organ_places_path(default_params), aria: { label: '教室设置' }, target: '_blank' do %>
|
16
|
+
<i class="fas fa-cog"></i>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
<%= f.submit %>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="ui attached segment">
|
2
|
+
<%= form_with theme: 'search', model: EventPlan.new(params.permit('booking_on')) do |f| %>
|
3
|
+
<div class="fields">
|
4
|
+
<%= f.date_field 'booking_on-gte' %>
|
5
|
+
<%= f.date_field 'booking_on-lte' %>
|
6
|
+
<%= f.submit %>
|
7
|
+
<%= link_to t('.clear'), filter_params(except: ['booking_on-gte', 'booking_on-lte']), class: 'ui button' %>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
11
|
+
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<div class="ui top attached tabular menu">
|
2
|
+
<%= link_to t('event.admin.event_plans.index.title'), admin_event_crowd_plans_path(@event_crowd), class: active_helper(action: 'index') %>
|
3
|
+
<%= link_to t('event.admin.event_plans.plan.title'), plan_admin_event_crowd_plans_path(@event_crowd), class: active_helper(action: 'plan') %>
|
4
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
json.extract! plan_item,
|
2
|
+
:id,
|
3
|
+
:planned_type,
|
4
|
+
:planned_id,
|
5
|
+
:plan_on,
|
6
|
+
:place_id,
|
7
|
+
:start_at,
|
8
|
+
:finish_at,
|
9
|
+
:qrcode_url
|
10
|
+
json.plan_participants plan_item.plan_participants do |plan_participant|
|
11
|
+
json.extract! plan_participant, :id, :participant_type, :participant_id
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
json.date date
|
2
|
+
json.time_items items do |time_item, plan_items|
|
3
|
+
json.id time_item.id
|
4
|
+
json.start_at time_item.start_at.to_s(:time)
|
5
|
+
json.finish_at time_item.finish_at.to_s(:time)
|
6
|
+
json.plan_items plan_items do |plan_item|
|
7
|
+
json.present_number plan_item.present_members
|
8
|
+
json.place plan_item.place&.as_json(only: [:id, :name, :max_members])
|
9
|
+
json.planned plan_item.plan.planned.as_json(only: [:id, :title])
|
10
|
+
json.participants plan_item.plan_participants.as_json(only: [:participant_type])
|
11
|
+
json.booked @booked_ids.include?(plan_item.id)
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
json.plan_item @plan_item, partial: 'plan_item', as: :plan_item
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<table class="table is-hoverable is-fullwidth">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th class="six wide">
|
5
|
+
<%= link_to t('.edit'), edit_admin_event_plan_path(@event_plan), class: 'ui mini blue right floated button' %>
|
6
|
+
</th>
|
7
|
+
<th class="ten wide"></th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<tr>
|
12
|
+
<td class="has-text-right"><%= EventPlan.human_attribute_name(:event_item) %></td>
|
13
|
+
<td><%= @event_plan.event_item %></td>
|
14
|
+
</tr>
|
15
|
+
<tr>
|
16
|
+
<td class="has-text-right"><%= EventPlan.human_attribute_name(:booking_on) %></td>
|
17
|
+
<td><%= @event_plan.booking_on %></td>
|
18
|
+
</tr>
|
19
|
+
</tbody>
|
20
|
+
</table>
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<%= render 'menu' %>
|
2
|
+
<%= render 'filter' %>
|
3
|
+
|
4
|
+
<table class="table is-hoverable is-fullwidth">
|
5
|
+
<thead>
|
6
|
+
<tr>
|
7
|
+
<th><%= Eventual::EventPlan.human_attribute_name(:booking_on) %></th>
|
8
|
+
<th><%= Eventual::EventPlan.human_attribute_name(:time_item) %></th>
|
9
|
+
<th>
|
10
|
+
<%= EventPlan.human_attribute_name(:place_id) %>
|
11
|
+
<%= link_to admin_organ_places_path(default_params), aria: { label: '教室设置' }, target: '_blank' do %>
|
12
|
+
<i class="fas fa-cog"></i>
|
13
|
+
<% end %>
|
14
|
+
</th>
|
15
|
+
<th><%= Eventual::EventPlan.human_attribute_name(:event_item_id) %></th>
|
16
|
+
<th><%= Eventual::EventPlan.human_attribute_name(:teacher_id) %></th>
|
17
|
+
<th><%= Eventual::EventPlan.human_attribute_name(:qrcode) %></th>
|
18
|
+
<th></th>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<% @event_plans.each do |event_plan| %>
|
23
|
+
<tr>
|
24
|
+
<td>
|
25
|
+
<%= event_plan.booking_on %>
|
26
|
+
<span class="grey text">(<%= event_plan.booking_on.to_s(:week) %>)</span>
|
27
|
+
</td>
|
28
|
+
<td>
|
29
|
+
<span class="ui label"><%= event_plan.time_item.start_at.to_s(:time) %></span>
|
30
|
+
<span class="ui label"><%= event_plan.time_item.finish_at.to_s(:time) %></span>
|
31
|
+
</td>
|
32
|
+
<td>
|
33
|
+
<%= link_to edit_admin_event_crowd_plan_path(@event_crowd, event_plan, item: 'place'), aria: { label: '设置教室' }, class: 'button is-small is-rounded is-light' do %>
|
34
|
+
<i class="fas fa-building"></i>
|
35
|
+
<% end %>
|
36
|
+
<%= event_plan.place&.name %>
|
37
|
+
</td>
|
38
|
+
<td>
|
39
|
+
<%= link_to edit_admin_event_crowd_plan_path(@event_crowd, event_plan, item: 'event_item'), aria: { label: '设置课节' }, class: 'button is-small is-rounded is-light' do %>
|
40
|
+
<i class="fas fa-rss"></i>
|
41
|
+
<% end %>
|
42
|
+
<%= event_plan.event_item&.title %>
|
43
|
+
</td>
|
44
|
+
<td>
|
45
|
+
<%= link_to edit_admin_event_crowd_plan_path(@event_crowd, event_plan, item: 'teacher'), aria: { label: '设置老师' }, class: 'button is-small is-rounded is-light' do %>
|
46
|
+
<i class="green male icon"></i>
|
47
|
+
<% end %>
|
48
|
+
<%= event_plan.teacher&.name %>
|
49
|
+
</td>
|
50
|
+
<td>
|
51
|
+
<% if event_plan.wechat_response %>
|
52
|
+
<%= image_tag event_plan.wechat_response.qrcode_file, class: 'ui small image' if event_plan.wechat_response.qrcode_file.attached? %>
|
53
|
+
<% else %>
|
54
|
+
<%= link_to qrcode_admin_event_crowd_plan_path(@event_crowd, event_plan), method: :patch, aria: { label: t('.qrcode') }, class: 'button is-small is-rounded is-light' do %>
|
55
|
+
<i class="fas fa-qrcode"></i>
|
56
|
+
<% end %>
|
57
|
+
<% end %>
|
58
|
+
<%= link_to admin_event_plan_event_item_members_path(event_plan), aria: { label: '点名' }, class: 'button is-small is-rounded is-light' do %>
|
59
|
+
<i class="users icon"></i>
|
60
|
+
<% end %>
|
61
|
+
</td>
|
62
|
+
<td>
|
63
|
+
<%= link_to admin_event_crowd_plan_path(@event_crowd, event_plan), method: :delete, aria: { label: t('.destroy') }, data: { confirm: t('.confirm') }, class: 'button is-small is-rounded is-light' do %>
|
64
|
+
<i class="fas fa-trash-alt"></i>
|
65
|
+
<% end %>
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
<% end %>
|
69
|
+
</tbody>
|
70
|
+
</table>
|
71
|
+
|
72
|
+
<%= paginate @event_plans %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Turbolinks.visit(location);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<tr id="time_plan_<%= @plan.id %>">
|
2
|
+
<td>
|
3
|
+
<% if @plan.id %>
|
4
|
+
<%= form_tag time_plan_path(@plan.plan_type, @plan.plan_id, @plan), method: :patch, id: 'time_plan_form' do %><% end %>
|
5
|
+
<% else %>
|
6
|
+
<%= form_tag time_plans_path(@plan.plan_type, @plan.plan_id), id: 'time_plan_form' do %><% end %>
|
7
|
+
<% end %>
|
8
|
+
</td>
|
9
|
+
<td>
|
10
|
+
<div class="ui input">
|
11
|
+
<%= date_field_tag :'plan[begin_on]', @plan.begin_on, form: 'time_plan_form', data: { url: time_plans_path(@plan.plan_type, @plan.plan_id) } %>
|
12
|
+
</div>
|
13
|
+
</td>
|
14
|
+
<td>
|
15
|
+
<%= select_tag :'plan[repeat_type]', options_for_select(TimePlan.options_i18n(:repeat_type), @plan.repeat_type || 'once'), { form: 'time_plan_form' } %>
|
16
|
+
</td>
|
17
|
+
<td>
|
18
|
+
<%= select_tag :'plan[time_list_id]', options_from_collection_for_select(@time_lists, :id, :name, @plan.time_list_id), form: 'time_plan_form' %>
|
19
|
+
</td>
|
20
|
+
<td>
|
21
|
+
<%= submit_tag t('.confirm'), class: 'button is-link is-small', form: 'time_plan_form' %>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<table class="table is-hoverable is-fullwidth">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th class="one wide"></th>
|
5
|
+
<th class="three wide"><%= PlanTime.human_attribute_name(:begin_on) %></th>
|
6
|
+
<th class="three wide"><%= PlanTime.human_attribute_name(:repeat_type) %></th>
|
7
|
+
<th class="three wide">
|
8
|
+
<%= Plan.human_attribute_name(:time_list_id) %>
|
9
|
+
<%= link_to admin_time_lists_path, aria: { label: '设置' }, target: '_blank' do %>
|
10
|
+
<i class="fas fa-cog"></i>
|
11
|
+
<% end %>
|
12
|
+
</th>
|
13
|
+
<th></th>
|
14
|
+
</tr>
|
15
|
+
</thead>
|
16
|
+
<tbody id="time_plan_tbody">
|
17
|
+
<% @time_plans.each do |plan| %>
|
18
|
+
<%= render partial: 'booking/time_plans/show_item', locals: { plan: plan } %>
|
19
|
+
<% end %>
|
20
|
+
<tr id="time_plan_new">
|
21
|
+
<td colspan="6">
|
22
|
+
<%= link_to new_time_plan_path(@plan.plan_type, @plan.plan_id), aria: { label: t('.new') }, class: 'button is-small is-rounded is-light' do %>
|
23
|
+
<i class="fas fa-plus"></i>
|
24
|
+
<% end %>
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
<% if @time_plans.blank? %>
|
28
|
+
<%= render partial: 'booking/time_plans/edit_item', locals: { plan: @plan } %>
|
29
|
+
<% end %>
|
30
|
+
</tbody>
|
31
|
+
</table>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
json.extract! plan,
|
2
|
+
:id,
|
3
|
+
:planned_type,
|
4
|
+
:planned_id,
|
5
|
+
:begin_on,
|
6
|
+
:end_on,
|
7
|
+
:place_id,
|
8
|
+
:repeat_type,
|
9
|
+
:repeat_days
|
10
|
+
json.plan_participants plan.plan_participants do |plan_participant|
|
11
|
+
json.extract! plan_participant, :id, :participant_type, :participant_id
|
12
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<table class="table is-fullwidth">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th class="one wide"></th>
|
5
|
+
<% Eventual::Plan.xx.each do |index, name| %>
|
6
|
+
<th class="two wide"><%= name %></th>
|
7
|
+
<% end %>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<% @time_list.time_items.each do |time_item| %>
|
12
|
+
<tr>
|
13
|
+
<td>
|
14
|
+
<time data-controller="time" data-format="HH:mm"><%= time_item.start_at.to_s(:rfc822) %></time>
|
15
|
+
<span>~</span>
|
16
|
+
<time data-controller="time" data-format="HH:mm"><%= time_item.finish_at.to_s(:rfc822) %></time>
|
17
|
+
</td>
|
18
|
+
<% @plan_items.each do |items| %>
|
19
|
+
<td>
|
20
|
+
<div>
|
21
|
+
<% @plan_items.each do |plan_item| %>
|
22
|
+
<span class="button is-small"><%= link_to plan_item.plan_on, admin_plan_item_plan_attenders_path(plan_item), text: true %></span>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
</td>
|
26
|
+
<% end %>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.plan @plan, partial: 'plan', as: :plan
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<tr id="time_plan_<%= plan.id %>" class="<%= plan.id == @plan.id ? 'active' : '' %>">
|
2
|
+
<td>
|
3
|
+
<%= form_tag time_plan_path(plan.plan_type, plan.plan_id, plan), method: :patch, id: "time_plan_form_#{plan.id}" do %><% end %>
|
4
|
+
</td>
|
5
|
+
<td>
|
6
|
+
<%= plan.begin_on %>
|
7
|
+
</td>
|
8
|
+
<td>
|
9
|
+
<%= plan.repeat_type_i18n %>
|
10
|
+
</td>
|
11
|
+
<td>
|
12
|
+
<%= plan.time_list&.name %>
|
13
|
+
</td>
|
14
|
+
<td>
|
15
|
+
<%= link_to edit_time_plan_path(plan.plan_type, plan.plan_id, plan.id), aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light' do %>
|
16
|
+
<i class="fas fa-pencil-alt"></i>
|
17
|
+
<% end %>
|
18
|
+
<%= link_to time_plan_path(plan.plan_type, plan.plan_id, plan.id), aria: { label: '切换' }, class: 'button is-small is-rounded is-light' do %>
|
19
|
+
<i class="fas fa-hand-point-right"></i>
|
20
|
+
<% end %>
|
21
|
+
</td>
|
22
|
+
</tr>
|