Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate secondary-btns to primary #3400

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/assets/stylesheets/spotlight/_curation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
input[type='submit'] {
@extend .btn;
@extend .btn-secondary;
@extend .btn-primary;
@extend .btn-sm;
}
display: none;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/spotlight/_sir-trevor_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@

.st-block-controls__button {
@extend .btn;
@extend .btn-secondary;
@extend .btn-outline-secondary;
@extend .btn-primary;
@extend .btn-outline-primary;

border: 1px solid $gray-700;

Expand Down
2 changes: 1 addition & 1 deletion app/components/spotlight/bulk_action_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Spotlight
# Displays the "Bulk actions" button and dropdown
class BulkActionComponent < ViewComponent::Base
def initialize(bulk_actions:, button_classes: 'btn btn-secondary dropdown-toggle')
def initialize(bulk_actions:, button_classes: 'btn btn-primary dropdown-toggle')
@bulk_actions = bulk_actions
@button_classes = button_classes
super
Expand Down
2 changes: 1 addition & 1 deletion app/components/spotlight/save_search_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Spotlight
# Displays the "Save this search" button and modal
class SaveSearchComponent < ViewComponent::Base
def initialize(button_classes: 'btn btn-secondary')
def initialize(button_classes: 'btn btn-outline-primary')
@button_classes = button_classes
super
end
Expand Down
2 changes: 1 addition & 1 deletion app/jobs/concerns/spotlight/job_tracking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def initialize_job_tracker!(**params)
end

def finalize_job_tracker!
return unless job_tracker.status == 'in_progress' || job_tracker.status == 'enqueued'
return unless %w[in_progress enqueued].include?(job_tracker.status)

job_tracker.update(
status: @failed ? 'failed' : 'completed',
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_site_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
</ul>

<ul class="nav sidenav nav-pills nav-stacked">
<li class="nav-item"><%= link_to t(:'spotlight.exhibits.new.page_title'), spotlight.new_exhibit_path, class: 'btn btn-outline-secondary btn-nav', role: 'button' if can? :create, Spotlight::Exhibit %></li>
<li class="nav-item"><%= link_to t(:'spotlight.exhibits.new.page_title'), spotlight.new_exhibit_path, class: 'btn btn-primary btn-nav', role: 'button' if can? :create, Spotlight::Exhibit %></li>
</ul>
<% end %>
6 changes: 3 additions & 3 deletions app/views/spotlight/admin_users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

<div class="form-actions">
<div class="primary-actions">
<%= link_to(t('.create'), 'javascript:;', class: 'btn btn-secondary', data: { behavior: 'new-user' }) %>
<%= link_to(t('.create'), 'javascript:;', class: 'btn btn-primary', data: { behavior: 'new-user' }) %>
</div>
</div>
</div>
Expand All @@ -54,7 +54,7 @@
<h3 class="instructions"><%= t :'.admins_curators' %></h3>
<div id="admins_curators" class="card card-body bg-light">
<div class='btn-toolbar float-right align-self-end'>
<button class="btn btn-sm btn-secondary copy-email-addresses" data-clipboard-target="#admins_curators">
<button class="btn btn-sm btn-primary copy-email-addresses" data-clipboard-target="#admins_curators">
<%= t('.copy') %>
</button>
</div>
Expand Down Expand Up @@ -89,7 +89,7 @@
<% else %>
<%= link_to(t('.update'), admin_user_path(user),
data: { method: :patch, turbo_method: :patch },
class: 'btn btn-sm btn-secondary') %>
class: 'btn btn-sm btn-primary') %>
<% end %>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spotlight/catalog/_admin_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="float-right float-end">
<%= link_to t('.reindex'), reindex_all_exhibit_resources_path(current_exhibit),
data: { method: :post, turbo_method: :post },
class: 'btn btn-secondary' %>
class: 'btn btn-outline-primary' %>
<% if Spotlight::Engine.config.resource_partials.any? %>
<%= link_to t('.new_resource'), new_exhibit_resource_path(current_exhibit), class: 'btn btn-primary' %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spotlight/exhibits/_delete.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="row">
<p class='col-9'><%= t(:".warning_html", export_link: link_to(t(:'spotlight.exhibits.export.download'), spotlight.edit_exhibit_path(current_exhibit, anchor: 'export'))) %></p>
<div class='col-3'>
<%= delete_link current_exhibit, class: 'btn btn-secondary' %>
<%= delete_link current_exhibit, class: 'btn btn-primary' %>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
<% if default_field_label %>
<div class="restore-default">
<%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn btn-secondary btn-sm #{'d-none' if config.display_label == default_field_label}" %>
<%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn btn-primary btn-sm #{'d-none' if config.display_label == default_field_label}" %>
</div>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spotlight/resources/upload/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="primary-actions">
<%= hidden_field_tag :tab, 'upload', id: nil %>
<%= cancel_link @resource, :back, class: 'btn btn-link', role: 'button' %>
<%= f.submit t('.add_item_and_continue'), name: 'add-and-continue', class: 'btn btn-secondary' %>
<%= f.submit t('.add_item_and_continue'), name: 'add-and-continue', class: 'btn btn-outline-primary' %>
<%= f.submit t('.add_item'), class: 'btn btn-primary' %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spotlight/roles/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<div class="form-actions">
<div class="primary-actions">
<%= exhibit_create_link Spotlight::Role.new, '#', class: 'btn btn-secondary', data: {behavior: 'new-user'} %>
<%= exhibit_create_link Spotlight::Role.new, '#', class: 'btn btn-primary', data: {behavior: 'new-user'} %>
</div>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/spotlight/shared/_dd3_item.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<% if default_value %>
<div class="">
<%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn restore-default btn-secondary btn-sm #{'d-none' if label.blank? || label == default_value}" %>
<%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn restore-default btn-primary btn-sm #{'d-none' if label.blank? || label == default_value}" %>
</div>
<% end %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
<% end %>
<% if solr_documents_block.zpr_link? && block_options[:iiif_tilesource].present? %>
<button class="btn btn-secondary zpr-link" data-iiif-tilesource="<%= block_options[:iiif_tilesource] %>"><%= t('.zpr_link_html', title: doc_presenter.heading) %></button>
<button class="btn btn-primary zpr-link" data-iiif-tilesource="<%= block_options[:iiif_tilesource] %>"><%= t('.zpr_link_html', title: doc_presenter.heading) %></button>
<% end %>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<% end %>

<% if uploaded_items_block.zpr_link? %>
<%= button_tag t('.zpr_link_html', title: file[:caption]), class: 'btn btn-secondary zpr-link', data: { 'iiif-tilesource' => { type: 'image', url: file[:url] }.to_json } %>
<%= button_tag t('.zpr_link_html', title: file[:caption]), class: 'btn btn-primary zpr-link', data: { 'iiif-tilesource' => { type: 'image', url: file[:url] }.to_json } %>
<% end %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/spotlight/scaffold_resource_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_form
<%= f.text_field :url %>
<div class="form-actions">
<div class="primary-actions">
<%= cancel_link @resource, :back, class: 'btn btn-secondary' %>
<%= cancel_link @resource, :back, class: 'btn btn-primary' %>
<%= f.submit t('.add_item'), class: 'btn btn-primary' %>
</div>
</div>
Expand Down
Loading