next_sges 0.1.0
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/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +36 -0
- data/app/assets/config/next_sges_manifest.js +2 -0
- data/app/assets/javascripts/next_sges/administrators.js +2 -0
- data/app/assets/javascripts/next_sges/application.js +13 -0
- data/app/assets/javascripts/next_sges/collection_note_items.js +2 -0
- data/app/assets/javascripts/next_sges/collection_notes.js +2 -0
- data/app/assets/javascripts/next_sges/collection_types.js +2 -0
- data/app/assets/javascripts/next_sges/deposits.js +2 -0
- data/app/assets/javascripts/next_sges/inscriptions.js +2 -0
- data/app/assets/javascripts/next_sges/parents.js +2 -0
- data/app/assets/javascripts/next_sges/responsible_others.js +2 -0
- data/app/assets/javascripts/next_sges/school_admins.js +2 -0
- data/app/assets/javascripts/next_sges/schools.js +2 -0
- data/app/assets/javascripts/next_sges/students.js +2 -0
- data/app/assets/stylesheets/next_sges/administrators.css +4 -0
- data/app/assets/stylesheets/next_sges/application.css +15 -0
- data/app/assets/stylesheets/next_sges/collection_note_items.css +4 -0
- data/app/assets/stylesheets/next_sges/collection_notes.css +4 -0
- data/app/assets/stylesheets/next_sges/collection_types.css +4 -0
- data/app/assets/stylesheets/next_sges/deposits.css +4 -0
- data/app/assets/stylesheets/next_sges/inscriptions.css +4 -0
- data/app/assets/stylesheets/next_sges/parents.css +4 -0
- data/app/assets/stylesheets/next_sges/responsible_others.css +4 -0
- data/app/assets/stylesheets/next_sges/school_admins.css +4 -0
- data/app/assets/stylesheets/next_sges/schools.css +4 -0
- data/app/assets/stylesheets/next_sges/students.css +4 -0
- data/app/assets/stylesheets/scaffold.css +80 -0
- data/app/controllers/next_sges/administrators_controller.rb +62 -0
- data/app/controllers/next_sges/application_controller.rb +5 -0
- data/app/controllers/next_sges/collection_note_items_controller.rb +62 -0
- data/app/controllers/next_sges/collection_notes_controller.rb +62 -0
- data/app/controllers/next_sges/collection_types_controller.rb +62 -0
- data/app/controllers/next_sges/deposits_controller.rb +62 -0
- data/app/controllers/next_sges/inscriptions_controller.rb +62 -0
- data/app/controllers/next_sges/parents_controller.rb +62 -0
- data/app/controllers/next_sges/responsible_others_controller.rb +62 -0
- data/app/controllers/next_sges/school_admins_controller.rb +62 -0
- data/app/controllers/next_sges/schools_controller.rb +62 -0
- data/app/controllers/next_sges/students_controller.rb +62 -0
- data/app/helpers/next_sges/administrators_helper.rb +4 -0
- data/app/helpers/next_sges/application_helper.rb +4 -0
- data/app/helpers/next_sges/collection_note_items_helper.rb +4 -0
- data/app/helpers/next_sges/collection_notes_helper.rb +4 -0
- data/app/helpers/next_sges/collection_types_helper.rb +4 -0
- data/app/helpers/next_sges/deposits_helper.rb +4 -0
- data/app/helpers/next_sges/inscriptions_helper.rb +4 -0
- data/app/helpers/next_sges/parents_helper.rb +4 -0
- data/app/helpers/next_sges/responsible_others_helper.rb +4 -0
- data/app/helpers/next_sges/school_admins_helper.rb +4 -0
- data/app/helpers/next_sges/schools_helper.rb +4 -0
- data/app/helpers/next_sges/students_helper.rb +4 -0
- data/app/jobs/next_sges/application_job.rb +4 -0
- data/app/mailers/next_sges/application_mailer.rb +6 -0
- data/app/models/next_sges/administrator.rb +19 -0
- data/app/models/next_sges/application_record.rb +33 -0
- data/app/models/next_sges/collection_note.rb +68 -0
- data/app/models/next_sges/collection_note_item.rb +173 -0
- data/app/models/next_sges/collection_type.rb +36 -0
- data/app/models/next_sges/deposit.rb +31 -0
- data/app/models/next_sges/inscription.rb +5 -0
- data/app/models/next_sges/parent.rb +37 -0
- data/app/models/next_sges/responsible_other.rb +20 -0
- data/app/models/next_sges/school.rb +21 -0
- data/app/models/next_sges/school_admin.rb +10 -0
- data/app/models/next_sges/student.rb +39 -0
- data/app/views/layouts/next_sges/application.html.erb +14 -0
- data/app/views/next_sges/administrators/_form.html.erb +27 -0
- data/app/views/next_sges/administrators/edit.html.erb +6 -0
- data/app/views/next_sges/administrators/index.html.erb +29 -0
- data/app/views/next_sges/administrators/new.html.erb +5 -0
- data/app/views/next_sges/administrators/show.html.erb +14 -0
- data/app/views/next_sges/collection_note_items/_form.html.erb +107 -0
- data/app/views/next_sges/collection_note_items/edit.html.erb +6 -0
- data/app/views/next_sges/collection_note_items/index.html.erb +61 -0
- data/app/views/next_sges/collection_note_items/new.html.erb +5 -0
- data/app/views/next_sges/collection_note_items/show.html.erb +94 -0
- data/app/views/next_sges/collection_notes/_form.html.erb +37 -0
- data/app/views/next_sges/collection_notes/edit.html.erb +6 -0
- data/app/views/next_sges/collection_notes/index.html.erb +33 -0
- data/app/views/next_sges/collection_notes/new.html.erb +5 -0
- data/app/views/next_sges/collection_notes/show.html.erb +24 -0
- data/app/views/next_sges/collection_types/_form.html.erb +37 -0
- data/app/views/next_sges/collection_types/edit.html.erb +6 -0
- data/app/views/next_sges/collection_types/index.html.erb +33 -0
- data/app/views/next_sges/collection_types/new.html.erb +5 -0
- data/app/views/next_sges/collection_types/show.html.erb +24 -0
- data/app/views/next_sges/deposits/_form.html.erb +37 -0
- data/app/views/next_sges/deposits/edit.html.erb +6 -0
- data/app/views/next_sges/deposits/index.html.erb +33 -0
- data/app/views/next_sges/deposits/new.html.erb +5 -0
- data/app/views/next_sges/deposits/show.html.erb +24 -0
- data/app/views/next_sges/inscriptions/_form.html.erb +102 -0
- data/app/views/next_sges/inscriptions/edit.html.erb +6 -0
- data/app/views/next_sges/inscriptions/index.html.erb +59 -0
- data/app/views/next_sges/inscriptions/new.html.erb +5 -0
- data/app/views/next_sges/inscriptions/show.html.erb +89 -0
- data/app/views/next_sges/parents/_form.html.erb +42 -0
- data/app/views/next_sges/parents/edit.html.erb +6 -0
- data/app/views/next_sges/parents/index.html.erb +35 -0
- data/app/views/next_sges/parents/new.html.erb +5 -0
- data/app/views/next_sges/parents/show.html.erb +29 -0
- data/app/views/next_sges/responsible_others/_form.html.erb +97 -0
- data/app/views/next_sges/responsible_others/edit.html.erb +6 -0
- data/app/views/next_sges/responsible_others/index.html.erb +57 -0
- data/app/views/next_sges/responsible_others/new.html.erb +5 -0
- data/app/views/next_sges/responsible_others/show.html.erb +84 -0
- data/app/views/next_sges/school_admins/_form.html.erb +32 -0
- data/app/views/next_sges/school_admins/edit.html.erb +6 -0
- data/app/views/next_sges/school_admins/index.html.erb +31 -0
- data/app/views/next_sges/school_admins/new.html.erb +5 -0
- data/app/views/next_sges/school_admins/show.html.erb +19 -0
- data/app/views/next_sges/schools/_form.html.erb +62 -0
- data/app/views/next_sges/schools/edit.html.erb +6 -0
- data/app/views/next_sges/schools/index.html.erb +43 -0
- data/app/views/next_sges/schools/new.html.erb +5 -0
- data/app/views/next_sges/schools/show.html.erb +49 -0
- data/app/views/next_sges/students/_form.html.erb +42 -0
- data/app/views/next_sges/students/edit.html.erb +6 -0
- data/app/views/next_sges/students/index.html.erb +35 -0
- data/app/views/next_sges/students/new.html.erb +5 -0
- data/app/views/next_sges/students/show.html.erb +29 -0
- data/config/routes.rb +13 -0
- data/db/migrate/20171209090042_create_next_sges_schools.rb +17 -0
- data/db/migrate/20171209093554_create_next_sges_parents.rb +17 -0
- data/db/migrate/20171209093716_create_next_sges_collection_types.rb +13 -0
- data/db/migrate/20171209095546_create_next_sges_students.rb +17 -0
- data/db/migrate/20171209100114_create_next_sges_collection_notes.rb +14 -0
- data/db/migrate/20171209104046_create_next_sges_deposits.rb +13 -0
- data/db/migrate/20171209110844_create_next_sges_administrators.rb +10 -0
- data/db/migrate/20171209111036_create_next_sges_school_admins.rb +12 -0
- data/db/migrate/20171209213002_create_next_sges_inscriptions.rb +25 -0
- data/db/migrate/20171209213302_create_join_table_inscription_collection_type.rb +8 -0
- data/db/migrate/20171211132659_create_join_table_student_collection_type.rb +8 -0
- data/db/migrate/20171211140033_add_value_to_collection_types.rb +5 -0
- data/db/migrate/20171213141321_create_next_sges_collection_note_items.rb +26 -0
- data/db/migrate/20171213160012_add_discount_ad_fine_to_collection_type.rb +13 -0
- data/db/migrate/20171214154917_rename_anual_payment_discount_from_next_sges_collection_types.rb +5 -0
- data/db/migrate/20171214204406_add_account_balance_to_next_sges_parents.rb +17 -0
- data/db/migrate/20171215120306_remove_student_from_deposit.rb +6 -0
- data/db/migrate/20171215133634_add_type_to_next_sges_deposits.rb +5 -0
- data/db/migrate/20171215144509_add_documents_to_next_sgad_parents.rb +6 -0
- data/db/migrate/20171215175025_add_avatar_to_next_sges_schools.rb +5 -0
- data/db/migrate/20171218082424_add_nif_to_next_sges_schools.rb +11 -0
- data/db/migrate/20171221224739_create_next_sges_responsible_others.rb +24 -0
- data/db/migrate/20171227221731_add_birthday_to_next_sgad_students.rb +7 -0
- data/db/migrate/20180216140129_add_collection_note_to_deposits.rb +5 -0
- data/lib/next_sges.rb +5 -0
- data/lib/next_sges/engine.rb +5 -0
- data/lib/next_sges/version.rb +3 -0
- data/lib/tasks/next_sges_tasks.rake +4 -0
- metadata +224 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<h1>Responsible Others</h1>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>First name</th>
|
|
9
|
+
<th>Middle name</th>
|
|
10
|
+
<th>Last name</th>
|
|
11
|
+
<th>Avatar</th>
|
|
12
|
+
<th>Documents</th>
|
|
13
|
+
<th>Relation to parent</th>
|
|
14
|
+
<th>Parent</th>
|
|
15
|
+
<th>Status</th>
|
|
16
|
+
<th>School</th>
|
|
17
|
+
<th>Birthdate</th>
|
|
18
|
+
<th>Identification type</th>
|
|
19
|
+
<th>Identification number</th>
|
|
20
|
+
<th>Email</th>
|
|
21
|
+
<th>Cellphone</th>
|
|
22
|
+
<th>Address</th>
|
|
23
|
+
<th>Number</th>
|
|
24
|
+
<th colspan="3"></th>
|
|
25
|
+
</tr>
|
|
26
|
+
</thead>
|
|
27
|
+
|
|
28
|
+
<tbody>
|
|
29
|
+
<% @responsible_others.each do |responsible_other| %>
|
|
30
|
+
<tr>
|
|
31
|
+
<td><%= responsible_other.first_name %></td>
|
|
32
|
+
<td><%= responsible_other.middle_name %></td>
|
|
33
|
+
<td><%= responsible_other.last_name %></td>
|
|
34
|
+
<td><%= responsible_other.avatar %></td>
|
|
35
|
+
<td><%= responsible_other.documents %></td>
|
|
36
|
+
<td><%= responsible_other.relation_to_parent %></td>
|
|
37
|
+
<td><%= responsible_other.parent %></td>
|
|
38
|
+
<td><%= responsible_other.status %></td>
|
|
39
|
+
<td><%= responsible_other.school %></td>
|
|
40
|
+
<td><%= responsible_other.birthdate %></td>
|
|
41
|
+
<td><%= responsible_other.identification_type %></td>
|
|
42
|
+
<td><%= responsible_other.identification_number %></td>
|
|
43
|
+
<td><%= responsible_other.email %></td>
|
|
44
|
+
<td><%= responsible_other.cellphone %></td>
|
|
45
|
+
<td><%= responsible_other.address %></td>
|
|
46
|
+
<td><%= responsible_other.number %></td>
|
|
47
|
+
<td><%= link_to 'Show', responsible_other %></td>
|
|
48
|
+
<td><%= link_to 'Edit', edit_responsible_other_path(responsible_other) %></td>
|
|
49
|
+
<td><%= link_to 'Destroy', responsible_other, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
50
|
+
</tr>
|
|
51
|
+
<% end %>
|
|
52
|
+
</tbody>
|
|
53
|
+
</table>
|
|
54
|
+
|
|
55
|
+
<br>
|
|
56
|
+
|
|
57
|
+
<%= link_to 'New Responsible Other', new_responsible_other_path %>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>First name:</strong>
|
|
5
|
+
<%= @responsible_other.first_name %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Middle name:</strong>
|
|
10
|
+
<%= @responsible_other.middle_name %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Last name:</strong>
|
|
15
|
+
<%= @responsible_other.last_name %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Avatar:</strong>
|
|
20
|
+
<%= @responsible_other.avatar %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p>
|
|
24
|
+
<strong>Documents:</strong>
|
|
25
|
+
<%= @responsible_other.documents %>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p>
|
|
29
|
+
<strong>Relation to parent:</strong>
|
|
30
|
+
<%= @responsible_other.relation_to_parent %>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p>
|
|
34
|
+
<strong>Parent:</strong>
|
|
35
|
+
<%= @responsible_other.parent %>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
<p>
|
|
39
|
+
<strong>Status:</strong>
|
|
40
|
+
<%= @responsible_other.status %>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p>
|
|
44
|
+
<strong>School:</strong>
|
|
45
|
+
<%= @responsible_other.school %>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
<p>
|
|
49
|
+
<strong>Birthdate:</strong>
|
|
50
|
+
<%= @responsible_other.birthdate %>
|
|
51
|
+
</p>
|
|
52
|
+
|
|
53
|
+
<p>
|
|
54
|
+
<strong>Identification type:</strong>
|
|
55
|
+
<%= @responsible_other.identification_type %>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<p>
|
|
59
|
+
<strong>Identification number:</strong>
|
|
60
|
+
<%= @responsible_other.identification_number %>
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
<p>
|
|
64
|
+
<strong>Email:</strong>
|
|
65
|
+
<%= @responsible_other.email %>
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<p>
|
|
69
|
+
<strong>Cellphone:</strong>
|
|
70
|
+
<%= @responsible_other.cellphone %>
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
<p>
|
|
74
|
+
<strong>Address:</strong>
|
|
75
|
+
<%= @responsible_other.address %>
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
<p>
|
|
79
|
+
<strong>Number:</strong>
|
|
80
|
+
<%= @responsible_other.number %>
|
|
81
|
+
</p>
|
|
82
|
+
|
|
83
|
+
<%= link_to 'Edit', edit_responsible_other_path(@responsible_other) %> |
|
|
84
|
+
<%= link_to 'Back', responsible_others_path %>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<%= form_with(model: school_admin, local: true) do |form| %>
|
|
2
|
+
<% if school_admin.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%= pluralize(school_admin.errors.count, "error") %> prohibited this school_admin from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<% school_admin.errors.full_messages.each do |message| %>
|
|
8
|
+
<li><%= message %></li>
|
|
9
|
+
<% end %>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
13
|
+
|
|
14
|
+
<div class="field">
|
|
15
|
+
<%= form.label :number %>
|
|
16
|
+
<%= form.text_field :number, id: :school_admin_number %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="field">
|
|
20
|
+
<%= form.label :user_id %>
|
|
21
|
+
<%= form.text_field :user_id, id: :school_admin_user_id %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<%= form.label :school_id %>
|
|
26
|
+
<%= form.text_field :school_id, id: :school_admin_school_id %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="actions">
|
|
30
|
+
<%= form.submit %>
|
|
31
|
+
</div>
|
|
32
|
+
<% end %>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<h1>School Admins</h1>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Number</th>
|
|
9
|
+
<th>User</th>
|
|
10
|
+
<th>School</th>
|
|
11
|
+
<th colspan="3"></th>
|
|
12
|
+
</tr>
|
|
13
|
+
</thead>
|
|
14
|
+
|
|
15
|
+
<tbody>
|
|
16
|
+
<% @school_admins.each do |school_admin| %>
|
|
17
|
+
<tr>
|
|
18
|
+
<td><%= school_admin.number %></td>
|
|
19
|
+
<td><%= school_admin.user %></td>
|
|
20
|
+
<td><%= school_admin.school %></td>
|
|
21
|
+
<td><%= link_to 'Show', school_admin %></td>
|
|
22
|
+
<td><%= link_to 'Edit', edit_school_admin_path(school_admin) %></td>
|
|
23
|
+
<td><%= link_to 'Destroy', school_admin, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
24
|
+
</tr>
|
|
25
|
+
<% end %>
|
|
26
|
+
</tbody>
|
|
27
|
+
</table>
|
|
28
|
+
|
|
29
|
+
<br>
|
|
30
|
+
|
|
31
|
+
<%= link_to 'New School Admin', new_school_admin_path %>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Number:</strong>
|
|
5
|
+
<%= @school_admin.number %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>User:</strong>
|
|
10
|
+
<%= @school_admin.user %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>School:</strong>
|
|
15
|
+
<%= @school_admin.school %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<%= link_to 'Edit', edit_school_admin_path(@school_admin) %> |
|
|
19
|
+
<%= link_to 'Back', school_admins_path %>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<%= form_with(model: school, local: true) do |form| %>
|
|
2
|
+
<% if school.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%= pluralize(school.errors.count, "error") %> prohibited this school from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<% school.errors.full_messages.each do |message| %>
|
|
8
|
+
<li><%= message %></li>
|
|
9
|
+
<% end %>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
13
|
+
|
|
14
|
+
<div class="field">
|
|
15
|
+
<%= form.label :name %>
|
|
16
|
+
<%= form.text_field :name, id: :school_name %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="field">
|
|
20
|
+
<%= form.label :number %>
|
|
21
|
+
<%= form.text_field :number, id: :school_number %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<%= form.label :latitude %>
|
|
26
|
+
<%= form.text_field :latitude, id: :school_latitude %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="field">
|
|
30
|
+
<%= form.label :longitude %>
|
|
31
|
+
<%= form.text_field :longitude, id: :school_longitude %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="field">
|
|
35
|
+
<%= form.label :address %>
|
|
36
|
+
<%= form.text_field :address, id: :school_address %>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="field">
|
|
40
|
+
<%= form.label :email %>
|
|
41
|
+
<%= form.text_field :email, id: :school_email %>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="field">
|
|
45
|
+
<%= form.label :email2 %>
|
|
46
|
+
<%= form.text_field :email2, id: :school_email2 %>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="field">
|
|
50
|
+
<%= form.label :phone %>
|
|
51
|
+
<%= form.text_field :phone, id: :school_phone %>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="field">
|
|
55
|
+
<%= form.label :phone %>
|
|
56
|
+
<%= form.text_field :phone, id: :school_phone %>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="actions">
|
|
60
|
+
<%= form.submit %>
|
|
61
|
+
</div>
|
|
62
|
+
<% end %>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<h1>Schools</h1>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Name</th>
|
|
9
|
+
<th>Number</th>
|
|
10
|
+
<th>Latitude</th>
|
|
11
|
+
<th>Longitude</th>
|
|
12
|
+
<th>Address</th>
|
|
13
|
+
<th>Email</th>
|
|
14
|
+
<th>Email2</th>
|
|
15
|
+
<th>Phone</th>
|
|
16
|
+
<th>Phone</th>
|
|
17
|
+
<th colspan="3"></th>
|
|
18
|
+
</tr>
|
|
19
|
+
</thead>
|
|
20
|
+
|
|
21
|
+
<tbody>
|
|
22
|
+
<% @schools.each do |school| %>
|
|
23
|
+
<tr>
|
|
24
|
+
<td><%= school.name %></td>
|
|
25
|
+
<td><%= school.number %></td>
|
|
26
|
+
<td><%= school.latitude %></td>
|
|
27
|
+
<td><%= school.longitude %></td>
|
|
28
|
+
<td><%= school.address %></td>
|
|
29
|
+
<td><%= school.email %></td>
|
|
30
|
+
<td><%= school.email2 %></td>
|
|
31
|
+
<td><%= school.phone %></td>
|
|
32
|
+
<td><%= school.phone %></td>
|
|
33
|
+
<td><%= link_to 'Show', school %></td>
|
|
34
|
+
<td><%= link_to 'Edit', edit_school_path(school) %></td>
|
|
35
|
+
<td><%= link_to 'Destroy', school, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
36
|
+
</tr>
|
|
37
|
+
<% end %>
|
|
38
|
+
</tbody>
|
|
39
|
+
</table>
|
|
40
|
+
|
|
41
|
+
<br>
|
|
42
|
+
|
|
43
|
+
<%= link_to 'New School', new_school_path %>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Name:</strong>
|
|
5
|
+
<%= @school.name %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Number:</strong>
|
|
10
|
+
<%= @school.number %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Latitude:</strong>
|
|
15
|
+
<%= @school.latitude %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Longitude:</strong>
|
|
20
|
+
<%= @school.longitude %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p>
|
|
24
|
+
<strong>Address:</strong>
|
|
25
|
+
<%= @school.address %>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p>
|
|
29
|
+
<strong>Email:</strong>
|
|
30
|
+
<%= @school.email %>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p>
|
|
34
|
+
<strong>Email2:</strong>
|
|
35
|
+
<%= @school.email2 %>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
<p>
|
|
39
|
+
<strong>Phone:</strong>
|
|
40
|
+
<%= @school.phone %>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p>
|
|
44
|
+
<strong>Phone:</strong>
|
|
45
|
+
<%= @school.phone %>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
<%= link_to 'Edit', edit_school_path(@school) %> |
|
|
49
|
+
<%= link_to 'Back', schools_path %>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<%= form_with(model: student, local: true) do |form| %>
|
|
2
|
+
<% if student.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%= pluralize(student.errors.count, "error") %> prohibited this student from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<% student.errors.full_messages.each do |message| %>
|
|
8
|
+
<li><%= message %></li>
|
|
9
|
+
<% end %>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
13
|
+
|
|
14
|
+
<div class="field">
|
|
15
|
+
<%= form.label :name %>
|
|
16
|
+
<%= form.text_field :name, id: :student_name %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="field">
|
|
20
|
+
<%= form.label :number %>
|
|
21
|
+
<%= form.text_field :number, id: :student_number %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<%= form.label :status %>
|
|
26
|
+
<%= form.number_field :status, id: :student_status %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="field">
|
|
30
|
+
<%= form.label :parent_id %>
|
|
31
|
+
<%= form.text_field :parent_id, id: :student_parent_id %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="field">
|
|
35
|
+
<%= form.label :account_balance %>
|
|
36
|
+
<%= form.text_field :account_balance, id: :student_account_balance %>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="actions">
|
|
40
|
+
<%= form.submit %>
|
|
41
|
+
</div>
|
|
42
|
+
<% end %>
|