-
-
Notifications
You must be signed in to change notification settings - Fork 573
Expand file tree
/
Copy path_details.html.erb
More file actions
266 lines (256 loc) · 10 KB
/
_details.html.erb
File metadata and controls
266 lines (256 loc) · 10 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card card-primary">
<div class="card-header">
<h2 class="card-title">Organization Info</h2>
</div>
<div class="card-body md:flex sm:block">
<h4>Basic information</h4>
<div>
<h6 class="font-weight-bold">Name</h6>
<p><%= current_organization&.name %></p>
</div>
<div>
<h6 class="font-weight-bold">NDBN membership ID</h6>
<p>
<%= @organization.ndbn_member&.full_name || "Not defined" %>
</p>
</div>
<div>
<h6 class="font-weight-bold">URL</h6>
<p>
<% if @organization.url.blank? %>
Not defined
<% else %>
<a href="<%= @organization.url %>">
<%= fa_icon "external-link" %>
<%= @organization.url %></a>
<% end %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Email</h6>
<p>
<%= fa_icon "envelope" %>
<% if @organization.email.blank? %>
Not defined
<% else %>
<%= link_to @organization.email, "mailto:#{@organization.email}",
aria: { label: "Email organization - opens in new tab" } %>
<% end %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Address</h6>
<address class="mb-0"><%= fa_icon "map-marker" %>
<% if @organization.address.blank? %>
Not defined
<% else %>
<%= @organization.address %>
</address>
<% end %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Logo</h6>
<% if @organization.logo.attached? %>
<div>
<p>
<%= image_tag @organization.logo, class: "main_logo" %>
</p>
<p>
<a href="#showTheLogo" class="btn btn-xs btn-info" data-bs-toggle="modal">
View Original
</a>
</p>
<div id="showTheLogo" class="modal fade">
<div class="modal-dialog gap-2">
<%= image_tag @organization.logo, class: "thumbnail" %>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
<% else %>
<p>Not defined</p>
<% end %>
</div>
<hr>
<h4>Storage</h4>
<div>
<h6 class="font-weight-bold">Default intake Storage Location (for Donations and Purchases)</h6>
<p>
<%= fa_icon "building" %>
<%= @intake_storage_location&.name || "Not defined" %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Default Storage Location</h6>
<p>
<%= fa_icon "building-o" %>
<%= @default_storage_location&.name || "Not defined" %>
</p>
</div>
<hr>
<h4>Partner approval process</h4>
<div>
<h6 class="font-weight-bold">Use one-step Partner invite and approve process?</h6>
<p>
<%= humanize_boolean(@organization.one_step_partner_invite) %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Custom Partner invitation message</h6>
<p>
<%= @organization.invitation_text.blank? ? "Not defined" : @organization.invitation_text %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Partner Profile sections</h6>
<% if @organization.partner_form_fields.blank? %>
<p>Not defined</p>
<% else %>
<ul>
<% for partner_form_field in @organization.partner_form_fields %>
<li>
<%= display_partner_fields_value(partner_form_field) %>
</li>
<% end %>
</ul>
<% end %>
</p>
</div>
<hr>
<h4>What kind of Requests can approved Partners make?</h4>
<div>
<h6 class="font-weight-bold">Enable Partners to make child-based Requests?</h6>
<p>
<%= fa_icon "child" %>
<%= humanize_boolean(@organization.enable_child_based_requests) %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Enable Partners to make Requests by indicating number of individuals needing each Item?</h6>
<p>
<%= fa_icon "female" %>
<%= humanize_boolean(@organization.enable_individual_requests) %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Enable Partners to make quantity-based Requests?</h6>
<p>
<%= fa_icon "group" %>
<%= humanize_boolean(@organization.enable_quantity_based_requests) %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Custom Request units used (please use singular form -- e.g. pack, not packs)</h6>
<p>
<% if @organization.request_units.length > 0 %>
<% @organization.request_units.map do |unit| %>
<%= fa_icon "angle-right" %>
<span>
<%= unit.name.titlecase %>
</span> <br>
<% end %>
<% else %>
<%= fa_icon "angle-right" %>
<span> None </span>
<% end %>
</p>
</div>
<hr>
<h4>Other emails</h4>
<div>
<h6 class="font-weight-bold">Default reminder day (day of month an email reminder to submit Requests is sent to Partners)</h6>
<p>
<%= fa_icon "calendar" %>
<%= @organization.reminder_day.blank? ? 'Not defined' : "The #{@organization.reminder_day.ordinalize} of each month" %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Default deadline day (final day of month to submit Requests)</h6>
<p>
<%= fa_icon "calendar" %>
<%= @organization.deadline_day.blank? ? 'Not defined' : "The #{@organization.deadline_day.ordinalize} of each month" %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Additional text for reminder email</h6>
<div class="border rounded p-2 mb-3">
<%= @organization.reminder_email_text.presence || 'Not defined' %>
</div>
</div>
<div>
<h6 class="font-weight-bold">Distribution email content</h6>
<div class="border rounded p-2 mb-3">
<%= @organization.default_email_text.presence || 'Not defined' %>
</div>
</div>
<div class="mb-4">
<h6 class="font-weight-bold">Receive email when Partner makes a Request?</h6>
<p>
<%= humanize_boolean(@organization.receive_email_on_requests) %>
</p>
</div>
<hr>
<h4>Printing</h4>
<div>
<h6 class="font-weight-bold">Show year-to-date values on Distribution printout?</h6>
<p>
<%= humanize_boolean(@organization.ytd_on_distribution_printout) %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Include signature lines on Distribution printout?</h6>
<p>
<%= humanize_boolean(@organization.signature_for_distribution_pdf) %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Hide value columns on Distribution and Donation printout?</h6>
<p>
<%= humanize_boolean(@organization.hide_value_columns_on_receipt) %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Hide package column on Distribution printout?</h6>
<p>
<%= humanize_boolean(@organization.hide_package_column_on_receipt) %>
</p>
</div>
<hr>
<h4>Exports</h4>
<div>
<h6 class='font-weight-bold'>Include in-kind value in donation and distribution exports:</h6>
<p>
<%= humanize_boolean(@organization.include_in_kind_values_in_exported_files) %>
</p>
</div>
<h4>Annual Survey</h4>
<div>
<h6 class="font-weight-bold">Does your Bank repackage essentials?</h6>
<p>
<%= fa_icon "inbox" %>
<%= humanize_boolean(@organization.repackage_essentials) %>
</p>
</div>
<div>
<h6 class="font-weight-bold">Does your Bank distribute monthly?</h6>
<p>
<%= fa_icon "paper-plane" %>
<%= humanize_boolean(@organization.distribute_monthly) %>
</p>
</div>
</div>
<% if can_administrate? %>
<div class="card-footer">
<%= edit_button_to(edit_organization_path, {size: "md"}) %>
</div>
<% end %>
</div>
</div>
</div>
</div>
</section>