|
| 1 | +<% labels.each_with_index do |label, index| %> |
| 2 | + <div class="form-check"> |
| 3 | + <input type="radio" name="<%= exporter %>" id="<%= label %>" class="form-check-input" <%= 'checked' if index == 0 %>> |
| 4 | + <label class="form-check-label" for="<%= label %>"><%= label %> - |
| 5 | + <small><%= label %>.<%= extension %></small> |
| 6 | + </label> |
| 7 | + </div> |
| 8 | +<% end %> |
| 9 | + |
| 10 | +<div class="mt-4"> |
| 11 | + <div class="btn-group btn-states" data-behavior="btn-states"> |
| 12 | + <a |
| 13 | + href="javascript:void(0)" |
| 14 | + id="export-button" |
| 15 | + class="btn btn-lg btn-primary js-try-pro" |
| 16 | + data-term="<%= exporter %>-reports" |
| 17 | + data-url=<%= url %>> |
| 18 | + Export |
| 19 | + <span data-behavior="state-button"><%= @default_button_state.humanize %></span> |
| 20 | + Records |
| 21 | + </a> |
| 22 | + <button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 23 | + <span class="visually-hidden">Toggle Dropdown</span> |
| 24 | + </button> |
| 25 | + <div class="dropdown-menu"> |
| 26 | + <%= collection_radio_buttons(nil, :scope, [['published', 'published'], ['all', 'all']], :first, :first) do |b| %> |
| 27 | + <span> |
| 28 | + <%= b.label class: 'state', for: "#{exporter}_scope_#{b.value}" do %> |
| 29 | + <%= b.radio_button id: "#{exporter}_scope_#{b.value}", class: 'd-none', name: "#{exporter}-scope", data: { behavior: 'state-radio' }, checked: b.value == @default_button_state %> |
| 30 | + <i class="fa-solid fa-check fa-fw"></i> |
| 31 | + <div class="state-label"> |
| 32 | + <p data-behavior="state-label"><%= b.text.humanize %></p> |
| 33 | + <% case b.value %> |
| 34 | + <% when 'published' %> |
| 35 | + <span>Only records that have been reviewed and published.</span> |
| 36 | + <% when 'all' %> |
| 37 | + <span>All records, regardless if they are draft, ready for review, or published.</span> |
| 38 | + <% end %> |
| 39 | + </div> |
| 40 | + <% end %> |
| 41 | + </span> |
| 42 | + <% end %> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | +</div> |
0 commit comments