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.bookings @bookings, partial: 'booking', as: :booking
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<div class="ui top attached segment">
|
2
|
+
<%= render 'filter' %>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<table class="table is-hoverable is-fullwidth">
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th>
|
9
|
+
<%= link_to new_admin_crowd_member_path, class: 'button is-link is-small' do %>
|
10
|
+
<i class="fas fa-plus"></i><%= t('.new') %>
|
11
|
+
<% end %>
|
12
|
+
</th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<% @crowd_members.each do |crowd_member| %>
|
17
|
+
<tr>
|
18
|
+
<td>
|
19
|
+
<%= link_to admin_crowd_member_path(crowd_member), aria: { label: t('.show') }, class: 'button is-small is-rounded is-light' do %>
|
20
|
+
<i class="fas fa-info"></i>
|
21
|
+
<% end %>
|
22
|
+
<%= link_to edit_admin_crowd_member_path(crowd_member), aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light' do %>
|
23
|
+
<i class="fas fa-pencil-alt"></i>
|
24
|
+
<% end %>
|
25
|
+
<%= link_to admin_crowd_member_path(crowd_member), method: :delete, aria: { label: t('.destroy') }, data: { confirm: t('.confirm') }, class: 'button is-small is-rounded is-light' do %>
|
26
|
+
<i class="fas fa-trash-alt"></i>
|
27
|
+
<% end %>
|
28
|
+
</td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
|
34
|
+
<%= paginate @crowd_members %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Eventual::Crowd.new(params.permit(:name)) 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 %>
|
10
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
json.crowd @crowd, partial: 'crowd', as: :crowd
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= Crowd.human_attribute_name(:name) %></td>
|
3
|
+
<td><%= @crowd.name %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right">学生</td>
|
7
|
+
<td>
|
8
|
+
<table class="ui very basic table">
|
9
|
+
<% @crowd_members.each do |crowd_member| %>
|
10
|
+
<tr>
|
11
|
+
<td>
|
12
|
+
<span class="ui label"><%= crowd_member.state_i18n %></span>
|
13
|
+
</td>
|
14
|
+
<td><%= crowd_member.member.real_name %></td>
|
15
|
+
<td><%= crowd_member.member.nick_name %></td>
|
16
|
+
</tr>
|
17
|
+
<% end %>
|
18
|
+
</table>
|
19
|
+
</td>
|
20
|
+
</tr>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.crowds @crowds, partial: 'crowd', as: :crowd
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<table class="ui very basic table">
|
2
|
+
<% event_crowd.crowd_members.each do |crowd_member| %>
|
3
|
+
<tr>
|
4
|
+
<td class="eight wide">
|
5
|
+
<%= crowd_member.member.real_name %>
|
6
|
+
</td>
|
7
|
+
<td class="eight wide">
|
8
|
+
<div class="ui toggle checkbox">
|
9
|
+
<% if @event.event_participants.pluck(:member_id).include?(crowd_member.member_id) %>
|
10
|
+
<%= check_box_tag :crowd_member_id, crowd_member.id, true, data: { method: :delete, url: admin_event_event_participants_path(@event), submit: true }, id: nil %>
|
11
|
+
<% else %>
|
12
|
+
<%= check_box_tag :crowd_member_id, crowd_member.id, false, data: { method: :post, url: admin_event_event_participants_path(@event, event_crowd_id: event_crowd.id), submit: true }, id: nil %>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
</td>
|
16
|
+
</tr>
|
17
|
+
<% end %>
|
18
|
+
</table>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= form_with model: @event_crowd, url: admin_event_event_crowd_path(@event, @event_crowd), method: :patch do |f| %>
|
2
|
+
<%= render 'error_messages', target: @event_crowd %>
|
3
|
+
<% if params[:item] == 'teacher' %>
|
4
|
+
<div class="inline fields">
|
5
|
+
<%= f.collection_members_select :teacher_id, :id, :name, can: { wrap_all: false } %>
|
6
|
+
<%= link_to admin_department_grants_path('EventCrowd', 'teacher_id', return_to: request.url), aria: { label: '老师部门设置' }, target: '_blank' do %>
|
7
|
+
<i class="fas fa-cog"></i>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
<% if params[:item] == 'room' %>
|
12
|
+
<%= f.collection_select :room_id, @rooms, :id, :name, { include_blank: true } %>
|
13
|
+
<% end %>
|
14
|
+
<%= f.submit %>
|
15
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<tr>
|
2
|
+
<td><%= event_crowd.crowd.name %></td>
|
3
|
+
<td>
|
4
|
+
<%= render partial: 'crowd_member', locals: { event_crowd: event_crowd } %>
|
5
|
+
</td>
|
6
|
+
<td>
|
7
|
+
<%= link_to edit_admin_event_event_crowd_path(@event, event_crowd, item: 'teacher'), aria: { label: '设置老师' }, class: 'button is-small is-rounded is-light' do %>
|
8
|
+
<i class="green male icon"></i>
|
9
|
+
<% end %>
|
10
|
+
<%= event_crowd.teacher&.name %>
|
11
|
+
</td>
|
12
|
+
<td>
|
13
|
+
<%= link_to edit_admin_event_event_crowd_path(@event, event_crowd, item: 'room'), aria: { label: '设置教室' }, class: 'button is-small is-rounded is-light' do %>
|
14
|
+
<i class="fas fa-building"></i>
|
15
|
+
<% end %>
|
16
|
+
<%= event_crowd.room&.name %>
|
17
|
+
</td>
|
18
|
+
<td></td>
|
19
|
+
</tr>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<th><%= Eventual::Crowd.human_attribute_name(:name) %></th>
|
2
|
+
<th><%= Eventual::EventCrowd.human_attribute_name(:members) %></th>
|
3
|
+
<th><%= Eventual::EventCrowd.human_attribute_name(:teacher_id) %></th>
|
4
|
+
<th>
|
5
|
+
<%= EventCrowd.human_attribute_name(:room_id) %>
|
6
|
+
<%= link_to admin_rooms_path, aria: { label: '教室设置' }, target: '_blank' do %>
|
7
|
+
<i class="fas fa-cog"></i>
|
8
|
+
<% end %>
|
9
|
+
</th>
|
10
|
+
<th></th>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= form_with model: @event_crowd, url: admin_event_event_crowds_path(@event) do |f| %>
|
2
|
+
<%= render 'error_messages', target: @event_crowd %>
|
3
|
+
<%= f.collection_select :crowd_id, @crowds, :id, :name %>
|
4
|
+
<%= f.collection_select :room_id, @rooms, :id, :name %>
|
5
|
+
<%= f.submit %>
|
6
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
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_crowd_path(@event_crowd), class: 'ui mini blue right floated button' %>
|
6
|
+
</th>
|
7
|
+
<th class="ten wide"></th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
</tbody>
|
12
|
+
</table>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
json.extract!(
|
2
|
+
event_item,
|
3
|
+
:id,
|
4
|
+
:name
|
5
|
+
)
|
6
|
+
json.event event_item.event, :id, :name
|
7
|
+
json.videos event_item.videos do |video|
|
8
|
+
json.extract! video, :id, :service_url, :filename
|
9
|
+
end
|
10
|
+
json.documents event_item.documents do |document|
|
11
|
+
json.extract! document, :id, :service_url, :filename
|
12
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Eventual::EventItem.new(params.permit(:title)) do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :title %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:title]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= render 'error_messages', target: @event_item %>
|
2
|
+
<%= f.text_field :name %>
|
3
|
+
<%= f.file_field :videos, multiple: true %>
|
4
|
+
<%= render 'com/attachments/list_field', target: @event_item.videos %>
|
5
|
+
<%= f.file_field :documents, multiple: true %>
|
6
|
+
<%= render 'com/attachments/list_field', target: @event_item.documents %>
|
7
|
+
<div class="field is-horizontal">
|
8
|
+
<%= f.collection_members_select :author_id, :id, :name, wrap: { all: false } %>
|
9
|
+
<%= link_to admin_department_grants_path('EventItem', 'author_id', return_to: request.url), aria: { label: '老师部门设置' }, target: '_blank' do %>
|
10
|
+
<i class="fas fa-cog"></i>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<th><%= Eventual::EventItem.human_attribute_name(:name) %></th>
|
2
|
+
<th><%= Eventual::EventItem.human_attribute_name(:videos) %></th>
|
3
|
+
<th><%= Eventual::EventItem.human_attribute_name(:documents) %></th>
|
4
|
+
<th><%= Eventual::EventItem.human_attribute_name(:author_id) %></th>
|
5
|
+
<th></th>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.event_item @event_item, partial: 'event_item', as: :event_item
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= EventItem.human_attribute_name(:title) %></td>
|
3
|
+
<td><%= @event_item.title %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= EventItem.human_attribute_name(:videos) %></td>
|
7
|
+
<td><%= @event_item.videos %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= EventItem.human_attribute_name(:documents) %></td>
|
11
|
+
<td><%= @event_item.documents %></td>
|
12
|
+
</tr>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'nav_event' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.event_items @event_items, partial: 'event_item', as: :event_item
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Eventual::Member.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 %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<table class="as-search">
|
2
|
+
<tr>
|
3
|
+
<th><%= Eventual::EventParticipant.human_attribute_name(:state) %></th>
|
4
|
+
<td>
|
5
|
+
<%= link_to t('.all'), filter_params(except: ['state']), class: active_params(state: '', active: 'button is-info', item: 'button is-light') %>
|
6
|
+
<% EventParticipant.options_i18n(:state).each do |text, state| %>
|
7
|
+
<%= link_to text, filter_params(state: state), class: active_params(state: state, active: 'button is-info', item: 'button is-light') %>
|
8
|
+
<% end %>
|
9
|
+
</td>
|
10
|
+
</tr>
|
11
|
+
</table>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<td><%= model.member.real_name %></td>
|
2
|
+
<td><time data-controller="time"><%= model.created_at.to_s(:rfc822) %></time></td>
|
3
|
+
<td>
|
4
|
+
<span><%= model.state_i18n %></span>
|
5
|
+
<% if model.request_quit? %>
|
6
|
+
<%= link_to 'Approve', quit_admin_event_event_participant_path(@event, model), method: :patch %>
|
7
|
+
<% end %>
|
8
|
+
<% if ['request_quit', 'quit'].include? model.state %>
|
9
|
+
<span class="grey text">(<%= model.quit_note %>)</span>
|
10
|
+
<% end %>
|
11
|
+
</td>
|
12
|
+
<td>
|
13
|
+
<%= model.score %>
|
14
|
+
</td>
|
15
|
+
<td></td>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<th><%= Eventual::Profile.human_attribute_name(:name) %></th>
|
2
|
+
<th><%= Eventual::EventParticipant.human_attribute_name(:created_at) %></th>
|
3
|
+
<th><%= Eventual::EventParticipant.human_attribute_name(:state) %></th>
|
4
|
+
<th><%= Eventual::EventParticipant.human_attribute_name(:score) %></th>
|
5
|
+
<th></th>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'nav_event' %>
|