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,94 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Name:</strong>
|
|
5
|
+
<%= @collection_note_item.name %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Description:</strong>
|
|
10
|
+
<%= @collection_note_item.description %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Base value:</strong>
|
|
15
|
+
<%= @collection_note_item.base_value %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Value:</strong>
|
|
20
|
+
<%= @collection_note_item.value %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p>
|
|
24
|
+
<strong>Quantity:</strong>
|
|
25
|
+
<%= @collection_note_item.quantity %>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p>
|
|
29
|
+
<strong>Collection note:</strong>
|
|
30
|
+
<%= @collection_note_item.collection_note %>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p>
|
|
34
|
+
<strong>Date:</strong>
|
|
35
|
+
<%= @collection_note_item.date %>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
<p>
|
|
39
|
+
<strong>Collection type:</strong>
|
|
40
|
+
<%= @collection_note_item.collection_type %>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p>
|
|
44
|
+
<strong>Discount description:</strong>
|
|
45
|
+
<%= @collection_note_item.discount_description %>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
<p>
|
|
49
|
+
<strong>Discount percentage:</strong>
|
|
50
|
+
<%= @collection_note_item.discount_percentage %>
|
|
51
|
+
</p>
|
|
52
|
+
|
|
53
|
+
<p>
|
|
54
|
+
<strong>Discount value:</strong>
|
|
55
|
+
<%= @collection_note_item.discount_value %>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<p>
|
|
59
|
+
<strong>Student:</strong>
|
|
60
|
+
<%= @collection_note_item.student %>
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
<p>
|
|
64
|
+
<strong>Fine description:</strong>
|
|
65
|
+
<%= @collection_note_item.fine_description %>
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<p>
|
|
69
|
+
<strong>Fine percentage:</strong>
|
|
70
|
+
<%= @collection_note_item.fine_percentage %>
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
<p>
|
|
74
|
+
<strong>Fine value:</strong>
|
|
75
|
+
<%= @collection_note_item.fine_value %>
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
<p>
|
|
79
|
+
<strong>Collection type frequency:</strong>
|
|
80
|
+
<%= @collection_note_item.collection_type_frequency %>
|
|
81
|
+
</p>
|
|
82
|
+
|
|
83
|
+
<p>
|
|
84
|
+
<strong>Collection type category:</strong>
|
|
85
|
+
<%= @collection_note_item.collection_type_category %>
|
|
86
|
+
</p>
|
|
87
|
+
|
|
88
|
+
<p>
|
|
89
|
+
<strong>School:</strong>
|
|
90
|
+
<%= @collection_note_item.school %>
|
|
91
|
+
</p>
|
|
92
|
+
|
|
93
|
+
<%= link_to 'Edit', edit_collection_note_item_path(@collection_note_item) %> |
|
|
94
|
+
<%= link_to 'Back', collection_note_items_path %>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<%= form_with(model: collection_note, local: true) do |form| %>
|
|
2
|
+
<% if collection_note.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%= pluralize(collection_note.errors.count, "error") %> prohibited this collection_note from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<% collection_note.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: :collection_note_number %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="field">
|
|
20
|
+
<%= form.label :value %>
|
|
21
|
+
<%= form.text_field :value, id: :collection_note_value %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<%= form.label :status %>
|
|
26
|
+
<%= form.number_field :status, id: :collection_note_status %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="field">
|
|
30
|
+
<%= form.label :student_id %>
|
|
31
|
+
<%= form.text_field :student_id, id: :collection_note_student_id %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="actions">
|
|
35
|
+
<%= form.submit %>
|
|
36
|
+
</div>
|
|
37
|
+
<% end %>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<h1>Collection Notes</h1>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Number</th>
|
|
9
|
+
<th>Value</th>
|
|
10
|
+
<th>Status</th>
|
|
11
|
+
<th>Student</th>
|
|
12
|
+
<th colspan="3"></th>
|
|
13
|
+
</tr>
|
|
14
|
+
</thead>
|
|
15
|
+
|
|
16
|
+
<tbody>
|
|
17
|
+
<% @collection_notes.each do |collection_note| %>
|
|
18
|
+
<tr>
|
|
19
|
+
<td><%= collection_note.number %></td>
|
|
20
|
+
<td><%= collection_note.value %></td>
|
|
21
|
+
<td><%= collection_note.status %></td>
|
|
22
|
+
<td><%= collection_note.student %></td>
|
|
23
|
+
<td><%= link_to 'Show', collection_note %></td>
|
|
24
|
+
<td><%= link_to 'Edit', edit_collection_note_path(collection_note) %></td>
|
|
25
|
+
<td><%= link_to 'Destroy', collection_note, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
26
|
+
</tr>
|
|
27
|
+
<% end %>
|
|
28
|
+
</tbody>
|
|
29
|
+
</table>
|
|
30
|
+
|
|
31
|
+
<br>
|
|
32
|
+
|
|
33
|
+
<%= link_to 'New Collection Note', new_collection_note_path %>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Number:</strong>
|
|
5
|
+
<%= @collection_note.number %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Value:</strong>
|
|
10
|
+
<%= @collection_note.value %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Status:</strong>
|
|
15
|
+
<%= @collection_note.status %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Student:</strong>
|
|
20
|
+
<%= @collection_note.student %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<%= link_to 'Edit', edit_collection_note_path(@collection_note) %> |
|
|
24
|
+
<%= link_to 'Back', collection_notes_path %>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<%= form_with(model: collection_type, local: true) do |form| %>
|
|
2
|
+
<% if collection_type.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%= pluralize(collection_type.errors.count, "error") %> prohibited this collection_type from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<% collection_type.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: :collection_type_name %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="field">
|
|
20
|
+
<%= form.label :description %>
|
|
21
|
+
<%= form.text_area :description, id: :collection_type_description %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<%= form.label :frequency %>
|
|
26
|
+
<%= form.number_field :frequency, id: :collection_type_frequency %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="field">
|
|
30
|
+
<%= form.label :category %>
|
|
31
|
+
<%= form.number_field :category, id: :collection_type_category %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="actions">
|
|
35
|
+
<%= form.submit %>
|
|
36
|
+
</div>
|
|
37
|
+
<% end %>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<h1>Collection Types</h1>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Name</th>
|
|
9
|
+
<th>Description</th>
|
|
10
|
+
<th>Frequency</th>
|
|
11
|
+
<th>Category</th>
|
|
12
|
+
<th colspan="3"></th>
|
|
13
|
+
</tr>
|
|
14
|
+
</thead>
|
|
15
|
+
|
|
16
|
+
<tbody>
|
|
17
|
+
<% @collection_types.each do |collection_type| %>
|
|
18
|
+
<tr>
|
|
19
|
+
<td><%= collection_type.name %></td>
|
|
20
|
+
<td><%= collection_type.description %></td>
|
|
21
|
+
<td><%= collection_type.frequency %></td>
|
|
22
|
+
<td><%= collection_type.category %></td>
|
|
23
|
+
<td><%= link_to 'Show', collection_type %></td>
|
|
24
|
+
<td><%= link_to 'Edit', edit_collection_type_path(collection_type) %></td>
|
|
25
|
+
<td><%= link_to 'Destroy', collection_type, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
26
|
+
</tr>
|
|
27
|
+
<% end %>
|
|
28
|
+
</tbody>
|
|
29
|
+
</table>
|
|
30
|
+
|
|
31
|
+
<br>
|
|
32
|
+
|
|
33
|
+
<%= link_to 'New Collection Type', new_collection_type_path %>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Name:</strong>
|
|
5
|
+
<%= @collection_type.name %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Description:</strong>
|
|
10
|
+
<%= @collection_type.description %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Frequency:</strong>
|
|
15
|
+
<%= @collection_type.frequency %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Category:</strong>
|
|
20
|
+
<%= @collection_type.category %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<%= link_to 'Edit', edit_collection_type_path(@collection_type) %> |
|
|
24
|
+
<%= link_to 'Back', collection_types_path %>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<%= form_with(model: deposit, local: true) do |form| %>
|
|
2
|
+
<% if deposit.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%= pluralize(deposit.errors.count, "error") %> prohibited this deposit from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<% deposit.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: :deposit_number %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="field">
|
|
20
|
+
<%= form.label :value %>
|
|
21
|
+
<%= form.text_field :value, id: :deposit_value %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<%= form.label :status %>
|
|
26
|
+
<%= form.number_field :status, id: :deposit_status %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="field">
|
|
30
|
+
<%= form.label :student_id %>
|
|
31
|
+
<%= form.text_field :student_id, id: :deposit_student_id %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="actions">
|
|
35
|
+
<%= form.submit %>
|
|
36
|
+
</div>
|
|
37
|
+
<% end %>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<h1>Deposits</h1>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Number</th>
|
|
9
|
+
<th>Value</th>
|
|
10
|
+
<th>Status</th>
|
|
11
|
+
<th>Student</th>
|
|
12
|
+
<th colspan="3"></th>
|
|
13
|
+
</tr>
|
|
14
|
+
</thead>
|
|
15
|
+
|
|
16
|
+
<tbody>
|
|
17
|
+
<% @deposits.each do |deposit| %>
|
|
18
|
+
<tr>
|
|
19
|
+
<td><%= deposit.number %></td>
|
|
20
|
+
<td><%= deposit.value %></td>
|
|
21
|
+
<td><%= deposit.status %></td>
|
|
22
|
+
<td><%= deposit.student %></td>
|
|
23
|
+
<td><%= link_to 'Show', deposit %></td>
|
|
24
|
+
<td><%= link_to 'Edit', edit_deposit_path(deposit) %></td>
|
|
25
|
+
<td><%= link_to 'Destroy', deposit, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
26
|
+
</tr>
|
|
27
|
+
<% end %>
|
|
28
|
+
</tbody>
|
|
29
|
+
</table>
|
|
30
|
+
|
|
31
|
+
<br>
|
|
32
|
+
|
|
33
|
+
<%= link_to 'New Deposit', new_deposit_path %>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Number:</strong>
|
|
5
|
+
<%= @deposit.number %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Value:</strong>
|
|
10
|
+
<%= @deposit.value %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Status:</strong>
|
|
15
|
+
<%= @deposit.status %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Student:</strong>
|
|
20
|
+
<%= @deposit.student %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<%= link_to 'Edit', edit_deposit_path(@deposit) %> |
|
|
24
|
+
<%= link_to 'Back', deposits_path %>
|