Skip to content

Commit

Permalink
More bs
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpierce committed Oct 10, 2024
1 parent 1e49eaf commit d3f7031
Show file tree
Hide file tree
Showing 28 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion app/views/_flash_msg.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% { notice: 'alert-success', error: 'alert-danger', alert: 'alert-warning' }.each do |type, flash_dom_class| %>
<% if flash[type].present? %>
<div class="alert <%= flash_dom_class %> alert-dismissable" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<%= sanitize Array.wrap(flash[type]).join(tag(:br)) %>
</div>
<% flash.delete(type) %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/base/_citations.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= link_to t(".citations"), hyrax.citations_work_path(presenter), id: 'citations', class: 'btn btn-secondary btn-sm mr-2' %>
<% end %>
<div class="btn-group">
<button type="button" class="btn btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" class="btn btn-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= t('.header') %>
</button>
<ul class="dropdown-menu">
Expand Down
4 changes: 2 additions & 2 deletions app/views/hyrax/base/_form_files.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
</div>
<% if Hyrax.config.browse_everything? %>
<%= button_tag(type: 'button', class: 'btn btn-success', id: "browse-btn",
'data-toggle' => 'browse-everything', 'data-route' => browse_everything_engine.root_path,
'data-target' => "#{f.object.persisted? ? "#edit_#{f.object.model.model_name.param_key}_#{f.object.model.id}" : "#new_#{f.object.model.model_name.param_key}"}" ) do %>
'data-bs-toggle' => 'browse-everything', 'data-bs-route' => browse_everything_engine.root_path,
'data-bs-target' => "#{f.object.persisted? ? "#edit_#{f.object.model.model_name.param_key}_#{f.object.model.id}" : "#new_#{f.object.model.model_name.param_key}"}" ) do %>
<span class="fa fa-plus"></span>
<%= t('hyrax.upload.browse_everything.browse_files_button') %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/base/_guts4form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ul class="nav nav-tabs" role="tablist">
<% (tabs - ['share']).each_with_index do | tab, i | %>
<li role="presentation" class="nav-item">
<a class="nav-link <% if i == 0 %>active<% end %>" href="#<%= tab %>" aria-controls="<%= tab %>" role="tab" data-toggle="tab">
<a class="nav-link <% if i == 0 %>active<% end %>" href="#<%= tab %>" aria-controls="<%= tab %>" role="tab" data-bs-toggle="tab">
<%= form_tab_label_for(form: f.object, tab: tab) %>
</a>
</li>
Expand Down
6 changes: 3 additions & 3 deletions app/views/hyrax/base/_show_actions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<input type="checkbox" aria-label="Batch Documents" style="display:none" name="batch_document_ids[]" id="batch_document_<%= presenter.id %>" value="<%= presenter.id %>" class="batch_document_selector" checked="checked" />
<%= button_tag t('hyrax.dashboard.my.action.add_to_collection'),
class: 'btn btn-secondary submits-batches submits-batches-add',
data: { toggle: "modal", target: "#collection-list-container" } %>
data: { 'bs-toggle': "modal", 'bs-target': "#collection-list-container" } %>
<% end %>
<% if presenter.work_featurable? %>
<%= link_to t('.feature'), hyrax.featured_work_path(presenter, format: :json),
Expand All @@ -32,7 +32,7 @@
<% end %>
<% if presenter.valid_child_concerns.length > 0 %>
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" type="button" id="dropdown-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" class="btn btn-secondary dropdown-toggle" type="button" id="dropdown-menu" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= t('.attach_child') %>
</button>
<div class="dropdown-menu">
Expand All @@ -42,7 +42,7 @@
</div>
</div>
<% end %>
<%= link_to t('.delete'), [main_app, presenter], class: 'btn btn-danger', data: { confirm: t('.confirm_delete', work_type: presenter.human_readable_type) }, method: :delete %>
<%= link_to t('.delete'), [main_app, presenter], class: 'btn btn-danger', data: { 'bs-confirm': t('.confirm_delete', work_type: presenter.human_readable_type) }, method: :delete %>
<% end %>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/views/hyrax/base/_work_button_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<% end %>
<% if presenter.valid_child_concerns.length > 0 %>
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" type="button" id="dropdown-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" class="btn btn-secondary dropdown-toggle" type="button" id="dropdown-menu" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= t('.attach_child') %>
</button>
<ul class="dropdown-menu">
Expand All @@ -19,15 +19,15 @@
</ul>
</div>
<% end %>
<%= link_to t(".delete"), [main_app, presenter], class: 'btn btn-danger', data: { confirm: t(".delete_type", type: {presenter.human_readable_type}) }, method: :delete %>
<%= link_to t(".delete"), [main_app, presenter], class: 'btn btn-danger', data: { 'bs-confirm': t(".delete_type", type: {presenter.human_readable_type}) }, method: :delete %>
<% end %>
</div>
<div class="col-sm-6 text-right">
<% if presenter.show_deposit_for?(collections: @user_collections) %>
<input type="checkbox" style="display:none" name="batch_document_ids[]" id="batch_document_<%= presenter.id %>" value="<%= presenter.id %>" class="batch_document_selector" checked="checked" />
<%= button_tag t('hyrax.dashboard.my.action.add_to_collection'),
class: 'btn btn-secondary submits-batches submits-batches-add',
data: { toggle: "modal", target: "#collection-list-container" } %>
data: { 'bs-toggle': "modal", 'bs-target': "#collection-list-container" } %>
<% end %>
<% if presenter.work_featurable? %>
<%= link_to t(".feature"), hyrax.featured_work_path(presenter, format: :json),
Expand Down
6 changes: 3 additions & 3 deletions app/views/hyrax/content_blocks/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<div class="card tabs">
<ul class="nav nav-tabs" role="tablist">
<li id="announcement-nav-item" class="nav-item">
<a href="#announcement_text" role="tab" data-toggle="tab" class="nav-link active nav-safety-confirm">
<a href="#announcement_text" role="tab" data-bs-toggle="tab" class="nav-link active nav-safety-confirm">
<%= t(:'hyrax.content_blocks.tabs.announcement_text') %>
</a>
</li>
<li id="marketing-nav-item" class="nav-item">
<a href="#marketing" role="tab" data-toggle="tab" class="nav-link nav-safety-confirm">
<a href="#marketing" role="tab" data-bs-toggle="tab" class="nav-link nav-safety-confirm">
<%= t(:'hyrax.content_blocks.tabs.marketing_text') %>
</a>
</li>
<li id="researcher-nav-item" class="nav-item">
<a href="#researcher" role="tab" data-toggle="tab" class="nav-link nav-safety-confirm">
<a href="#researcher" role="tab" data-bs-toggle="tab" class="nav-link nav-safety-confirm">
<%= t(:'hyrax.content_blocks.tabs.featured_researcher') %>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/homepage/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<% if @presenter.create_many_work_types? %>
<%= link_to '#',
class: "btn btn-primary btn-lg",
data: { 'bs-behavior': 'select-work', 'bs-toggle': 'modal', 'bs-target': '#worktypes-to-create', 'create-type' => 'single' } do %>
data: { 'behavior': 'select-work', 'bs-toggle': 'modal', 'bs-target': '#worktypes-to-create', 'create-type' => 'single' } do %>
<i class="fa fa-upload" aria-hidden="true"></i> <%= t('hyrax.share_button') %>
<% end %>
<% else # simple link to the first work type %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/my/_admin_set_action_menu.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% ul_id = 'admin-set-action-dropdown-ul-' + id %>

<div class="btn-group">
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= id %>" aria-haspopup="true" aria-expanded="false" aria-controls="<%= ul_id %>">
<button class="btn btn-default btn-sm dropdown-toggle" data-bs-toggle="dropdown" type="button" id="dropdownMenu_<%= id %>" aria-haspopup="true" aria-expanded="false" aria-controls="<%= ul_id %>">
<span class="sr-only"><%= t("hyrax.dashboard.my.sr.press_to") %> </span>
<%= t("hyrax.dashboard.my.action.select") %>
</button>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/my/_collection_action_menu.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% ul_id = 'collection-action-dropdown-ul-' + id %>

<div class="btn-group">
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= id %>" aria-haspopup="true" aria-expanded="false" aria-controls="<%= ul_id %>">
<button class="btn btn-default btn-sm dropdown-toggle" data-bs-toggle="dropdown" type="button" id="dropdownMenu_<%= id %>" aria-haspopup="true" aria-expanded="false" aria-controls="<%= ul_id %>">
<span class="sr-only"><%= t("hyrax.dashboard.my.sr.press_to") %> </span>
<%= t("hyrax.dashboard.my.action.select") %>
</button>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/my/_facet_selected.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<% v.each do |selected_facet| %>
<% link_options = remove_facet_params(k, selected_facet, params).merge(action: :index) %>
<div class="alert alert-warning">
<%= link_to "X", hyrax.url_for(link_options), { class: "close", data: { dismiss: "alert" } } %>
<%= link_to "X", hyrax.url_for(link_options), { class: "close", data: { 'bs-dismiss': "alert" } } %>
<i class="fa fa-check"></i> <strong><%= selected_facet %></strong>
</div>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/hyrax/my/_work_action_menu.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="btn-group">

<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= document.id %>" aria-haspopup="true" aria-expanded="false" aria-controls="<%= ul_id %>">
<button class="btn btn-default btn-sm dropdown-toggle" data-bs-toggle="dropdown" type="button" id="dropdownMenu_<%= document.id %>" aria-haspopup="true" aria-expanded="false" aria-controls="<%= ul_id %>">
<span class="sr-only"><%= t("hyrax.dashboard.my.sr.press_to") %> </span>
<%= t("hyrax.dashboard.my.action.select") %>
</button>
Expand All @@ -22,7 +22,7 @@
method: :delete,
id: 'action-delete-work',
data: {
confirm: t("hyrax.dashboard.my.action.work_confirmation", application_name: application_name) } do %>
'bs-confirm': t("hyrax.dashboard.my.action.work_confirmation", application_name: application_name) } do %>
<%= t("hyrax.dashboard.my.action.delete_work") %>
<% end %>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="modal-header">
<h4 class="modal-title" id="add-subcollection-label"><%= t('hyrax.collection.actions.nest_collections.modal_title') %></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('hyrax.dashboard.heading_actions.close') %>"><span aria-hidden="true">&times;</span></button>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="<%= t('hyrax.dashboard.heading_actions.close') %>"><span aria-hidden="true">&times;</span></button>
</div>

<div class="modal-body">
Expand All @@ -20,7 +20,7 @@
</div>

<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<% # '.modal-add-button' and '.modal-submit-button' classes applied below are used for JavaScript targeting %>
<button
disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="modal-header">
<h4 class="modal-title" id="add-to-collection-label"><%= t('hyrax.collection.actions.nested_subcollection.modal_title') %></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('hyrax.dashboard.heading_actions.close') %>"><span aria-hidden="true">&times;</span></button>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="<%= t('hyrax.dashboard.heading_actions.close') %>"><span aria-hidden="true">&times;</span></button>
</div>

<div class="modal-body">
Expand All @@ -19,7 +19,7 @@
</div>

<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<button
disabled
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p><%= t('hyrax.dashboard.my.action.nesting_not_allowed') %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t('helpers.action.close') %></button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><%= t('helpers.action.close') %></button>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p><%= t('hyrax.dashboard.my.action.nesting_permission_denied') %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t('helpers.action.close') %></button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><%= t('helpers.action.close') %></button>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="modal-header">
<h4 class="modal-title" id="select-collectiontype-label"><%= t('hyrax.dashboard.collection_type_actions.select_type_of_collection') %></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('hyrax.dashboard.collection_type_actions.close') %>"><span aria-hidden="true">&times;</span></button>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="<%= t('hyrax.dashboard.collection_type_actions.close') %>"><span aria-hidden="true">&times;</span></button>
</div>

<div class="modal-body">
Expand All @@ -26,7 +26,7 @@
</div>

<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('hyrax.dashboard.collection_type_actions.close') %>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><%= t('hyrax.dashboard.collection_type_actions.close') %>
</button>
<input type="submit" class="btn btn-primary" value="<%= t('hyrax.dashboard.collection_type_actions.create_collection') %>" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p><%= t('hyrax.dashboard.my.action.delete_admin_set_deny') %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t('helpers.action.close') %></button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><%= t('helpers.action.close') %></button>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="modal-footer">
<button type="button"
class="btn btn-secondary"
data-dismiss="modal"><%= t('helpers.action.cancel') %></button>
data-bs-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<button type="button"
class="btn btn-danger modal-delete-button"
title="<%= t("hyrax.dashboard.my.action.delete_collection") %>"><%= t('helpers.action.delete') %></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p><%= t('hyrax.dashboard.my.action.delete_collection_deny') %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t('helpers.action.close') %></button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><%= t('helpers.action.close') %></button>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p><%= t('hyrax.dashboard.my.action.delete_collections_deny') %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t('helpers.action.close') %></button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><%= t('helpers.action.close') %></button>
</div>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/my/collections/_modal_delete_deny.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p><%= t('hyrax.dashboard.my.action.delete_collections_deny') %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t('helpers.action.close') %></button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><%= t('helpers.action.close') %></button>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p><%= t('hyrax.dashboard.my.action.collections_confirmation_no_items_html') %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<button type="button"
class="btn btn-danger modal-delete-button"
title="<%= t("hyrax.dashboard.my.action.delete_collection") %>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<div class="modal-footer">
<div style="text-align: right; display: inline-block">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><%= t('helpers.action.cancel') %></button>
<div style="float: right; margin-left: 10px;">
<%= render 'hyrax/dashboard/collections/button_for_batch_delete_collection', label: t('helpers.action.delete') %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/my/collections/_modal_edit_deny.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p><%= t('hyrax.dashboard.my.action.edit_collection_deny') %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t('helpers.action.close') %></button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><%= t('helpers.action.close') %></button>
</div>
</form>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/hyrax/my/collections/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<button type="button"
id="add-new-collection-button"
class="btn btn-primary"
data-toggle="modal"
data-target="#collectiontypes-to-create"
data-bs-toggle="modal"
data-bs-target="#collectiontypes-to-create"
data-behavior="select-collection">
<%= t(:'helpers.action.collection.new') %>
</button>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/my/works/_batch_actions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<%= batch_delete %>
<%= button_tag t('hyrax.dashboard.my.action.add_to_collection'),
class: 'btn btn-primary submits-batches submits-batches-add',
data: { toggle: "modal", target: "#collection-list-container" } %>
data: { 'bs-toggle': "modal", 'bs-target': "#collection-list-container" } %>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/hyrax/my/works/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
<%= link_to(
t(:'helpers.action.batch.new'),
'#',
data: { behavior: "select-work", toggle: 'modal', target: "#worktypes-to-create", 'create-type' => 'batch' },
data: { behavior: "select-work", 'bs-toggle': 'modal', 'bs-target': "#worktypes-to-create", 'create-type' => 'batch' },
class: 'btn btn-primary'
) %>
<% end %>
<%= link_to(
t(:'helpers.action.work.new'),
'#',
data: { behavior: "select-work", toggle: 'modal', target: "#worktypes-to-create", 'create-type' => 'single' },
data: { behavior: "select-work", 'bs-toggle': 'modal', 'bs-target': "#worktypes-to-create", 'create-type' => 'single' },
id: 'add-new-work-button',
class: 'btn btn-primary'
) %>
Expand Down

0 comments on commit d3f7031

Please sign in to comment.