|
2 | 2 | <div class="row" id="<%= dom_id(phase) %>"> |
3 | 3 | <div class="col-md-12"> |
4 | 4 | <div> |
5 | | - <h3> |
6 | | - <%= phase.title %> |
7 | | - <div class="float-end"> |
8 | | - <% if template.customization_of.present? && template.latest? %> |
9 | | - <%= link_to _('Customise phase'), org_admin_template_phase_path(template.id, phase.id), { class: "btn btn-secondary", role: 'button' } %> |
10 | | - <% elsif modifiable %> |
11 | | - <%= link_to _('Edit phase'), edit_org_admin_template_phase_path(template.id, phase.id), { class: "btn btn-secondary", role: 'button' } %> |
12 | | - <% else %> |
13 | | - <%= link_to _('Show phase'), org_admin_template_phase_path(template.id, phase.id), { class: "btn btn-secondary", role: 'button' } %> |
14 | | - <% end %> |
15 | | - <% if template.latest? && phase.modifiable %> |
16 | | - <%= link_to _('Delete phase'), org_admin_template_phase_path(template.id, phase.id), |
17 | | - data: { confirm: _("You are about to delete the '%{phase_title}' phase. This will remove all of the sections and questions listed below. Are you sure?") % { phase_title: phase.title }, |
18 | | - length: 20, omission: _('... (continued)') }, method: :delete, class: 'btn btn-secondary', role: 'button' %> |
19 | | - <% end %> |
20 | | - </div> |
21 | | - </h3> |
| 5 | + <div class="float-end"> |
| 6 | + <!-- Question identifiers list button --> |
| 7 | + <% org = Org.find(template.org_id)%> |
| 8 | + <% if org.can_add_question_identifiers? %> |
| 9 | + <% if template.template_has_any_question_identifiers(template.id) == true %> |
| 10 | + <%= link_to _('Download question identifiers list'), download_pdf_list_org_admin_question_identifier_path(), class: "btn btn-primary", id: "download_pdf_list_link" %> |
| 11 | + <% end %> |
| 12 | + <% end %> |
| 13 | + <% if template.customization_of.present? && template.latest? %> |
| 14 | + <%= link_to _('Customise phase'), org_admin_template_phase_path(template.id, phase.id), { class: "btn btn-secondary", role: 'button' } %> |
| 15 | + <% elsif modifiable %> |
| 16 | + <%= link_to _('Edit phase'), edit_org_admin_template_phase_path(template.id, phase.id), { class: "btn btn-secondary", role: 'button' } %> |
| 17 | + <% else %> |
| 18 | + <%= link_to _('Show phase'), org_admin_template_phase_path(template.id, phase.id), { class: "btn btn-secondary", role: 'button' } %> |
| 19 | + <% end %> |
| 20 | + <% if template.latest? && phase.modifiable %> |
| 21 | + <%= link_to _('Delete phase'), org_admin_template_phase_path(template.id, phase.id), |
| 22 | + data: { confirm: _("You are about to delete the '%{phase_title}' phase. This will remove all of the sections and questions listed below. Are you sure?") % { phase_title: phase.title }, |
| 23 | + length: 20, omission: _('... (continued)') }, method: :delete, class: 'btn btn-secondary', role: 'button' %> |
| 24 | + <% end %> |
| 25 | + </div> |
22 | 26 | <p class="float-start"> |
23 | 27 | <div class="display-readonly-textarea-content"> |
24 | 28 | <%= sanitize phase.description %> |
|
0 commit comments