-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check whether all issues are in draft state and pre-select export but…
…ton scope accordingly
- Loading branch information
Showing
2 changed files
with
16 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
<div class="btn-group btn-states" data-behavior="btn-states"> | ||
<button id="export-button" class="btn btn-lg btn-primary">Export <span data-behavior="state-button">Published</span> Records</button> | ||
<button id="export-button" class="btn btn-lg btn-primary">Export <span data-behavior="state-button"><%= @default_button_state.humanize %></span> Records</button> | ||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<span class="visually-hidden">Toggle Dropdown</span> | ||
</button> | ||
<div class="dropdown-menu"> | ||
<%= collection_radio_buttons(nil, :scope, [['published', 'published'], ['all', 'all']], :first, :first) do |b| %> | ||
<span> | ||
<%= b.label class: 'state', for: "#{plugin_name}_scope_#{b.value}" do %> | ||
<%= b.radio_button id: "#{plugin_name}_scope_#{b.value}", class: 'd-none', data: { behavior: 'state-radio'}, checked: b.value == 'published' %> | ||
<%= b.radio_button id: "#{plugin_name}_scope_#{b.value}", class: 'd-none', data: { behavior: 'state-radio'}, checked: b.value == @default_button_state %> | ||
<i class="fa-solid fa-check fa-fw"></i> | ||
<div class="state-label"> | ||
<p data-behavior="state-label"><%= b.text.humanize %></p> | ||
<% case b.value %> | ||
<% when 'published' %> | ||
<span>Only records that have been reviewed and published.</span> | ||
<span>Only records that have been reviewed and published.</span> | ||
<% when 'all' %> | ||
<span>All records, regardless if they are draft, ready for review, or published.</span> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</span> | ||
<% end %> | ||
</div> | ||
<span>All records, regardless if they are draft, ready for review, or published.</span> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</span> | ||
<% end %> | ||
</div> | ||
</div> |