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

Appearance colors #2404

Closed
wants to merge 17 commits into from
Closed
Prev Previous commit
Next Next commit
Set appropriate button tags
Button 'default' has become secondary.
Some primary buttons have changed to secondary in Hyrax, and changing
others to be consistent on a page.
LaRita Robinson committed Dec 9, 2024

Verified

This commit was signed with the committer’s verified signature.
pendo324 Justin
commit b1e0f1bff59f4e9428d786b9c8a65853b0a949bb
2 changes: 1 addition & 1 deletion app/assets/stylesheets/hyku.scss
Original file line number Diff line number Diff line change
@@ -369,7 +369,7 @@ a.restore-default-color {
margin-bottom: 2em;
}

a.btn.btn-default.restore-default-color.with-color-hint {
a.btn.btn-secondary.restore-default-color.with-color-hint {
margin-top: 4em;
}

2 changes: 1 addition & 1 deletion app/assets/stylesheets/themes/scholarly_show.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.scholarly_show {
.show-actions {
.btn.btn-default,
.btn.btn-secondary,
.btn.btn-danger,
.btn-group {
padding: 5px 10px;
2 changes: 1 addition & 1 deletion app/views/hyrax/base/_analytics_button.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% if Hyrax.config.analytics? %>
<% # turbolinks needs to be turned off or the page will use the cache and the %>
<% # analytics graph will not show unless the page is refreshed. %>
<%= link_to t('.analytics'), @presenter.stats_path, id: 'stats', class: 'btn btn-default btn-block center-block', data: { turbolinks: false } %>
<%= link_to t('.analytics'), @presenter.stats_path, id: 'stats', class: 'btn btn-secondary btn-block center-block', data: { turbolinks: false } %>
<% end %>
4 changes: 2 additions & 2 deletions app/views/hyrax/content_blocks/_form.html.erb
Original file line number Diff line number Diff line change
@@ -162,7 +162,7 @@
</div>
</div>
<div class="card-footer">
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right' %>
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-secondary pull-right' %>
<%= f.button :submit, class: 'btn btn-primary pull-right' %>
</div>
<% end %>
@@ -180,7 +180,7 @@
</div>
</div>
<div class="card-footer">
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right' %>
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-secondary pull-right' %>
<%= f.button :submit, class: 'btn btn-primary pull-right' %>
</div>
<% end %>
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
@@ -3,7 +3,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-secondary btn-sm dropdown-toggle" data-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") %> <span class="caret" aria-hidden="true"></span>
</button>
2 changes: 1 addition & 1 deletion app/views/hyrax/my/_work_action_menu.html.erb
Original file line number Diff line number Diff line change
@@ -3,7 +3,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-secondary btn-sm dropdown-toggle" data-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>
2 changes: 1 addition & 1 deletion app/views/hyrax/oers/_form_metadata.html.erb
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
<% if f.object.display_additional_fields? %>
<%= link_to t('hyrax.works.form.additional_fields'),
'#extended-terms',
class: 'btn btn-default additional-fields',
class: 'btn btn-secondary additional-fields',
data: { toggle: 'collapse' },
role: "button",
'aria-expanded'=> "false",
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
<%= t('hyrax.search.button.html') %>
</button>
<%# OVERRIDE here to include the advanced search button in the search bar %>
<%= link_to "Advanced", "/advanced", class: 'btn btn-default', id: 'advanced-top-button' %>
<%= link_to "Advanced", "/advanced", class: 'btn btn-secondary', id: 'advanced-top-button' %>
<% if current_user %>
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">

Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
<% end %>
</ol>
</div>
<%= f.submit("Save order", class: 'btn btn-primary') %>
<%= f.submit("Save order", class: 'btn btn-secondary') %>
<% end %>
<% else %>
<div class="row cultural-repository" id="featured_works">
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
<%= t('hyrax.search.button.html') %>
</button>
<%# OVERRIDE here to include the advanced search button in the search bar %>
<%= link_to "Advanced", "/advanced", class: 'btn btn-default', id: 'advanced-top-button' %>
<%= link_to "Advanced", "/advanced", class: 'btn btn-secondary', id: 'advanced-top-button' %>
<% if current_user %>
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">

Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<% if @presenter.display_share_button? %><%# added share your work button -- made btn-default and added btn-sm per theming, modal code to make the share your work button work is located in themes/cultural_repository/layouts/hyrax.html.erb %>
<% if @presenter.display_share_button? %><%# added share your work button -- made btn-secondary and added btn-sm per theming, modal code to make the share your work button work is located in themes/cultural_repository/layouts/hyrax.html.erb %>
<div class="home_share_work row">
<div class="col-sm-12 text-center">
<% if signed_in? %>
<% if @presenter.create_many_work_types? %>
<%= link_to '#',
class: "btn btn-default btn-sm mt-20",
class: "btn btn-secondary btn-sm mt-20",
data: { behavior: 'select-work', 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 %>
<%= link_to new_polymorphic_path([main_app, @presenter.first_work_type]),
class: "btn btn-default btn-sm mt-20" do %>
class: "btn btn-secondary btn-sm mt-20" do %>
<i class="fa fa-upload" aria-hidden="true"></i> <%= t('hyrax.share_button') %>
<% end %>
<% end %>
<% else %>
<%= link_to hyrax.my_works_path,
class: "btn btn-default btn-sm mt-20" do %>
class: "btn btn-secondary btn-sm mt-20" do %>
<i class="fa fa-upload" aria-hidden="true"></i> <%= t('hyrax.share_button') %>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion config/initializers/simple_form_bootstrap.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
# rubocop:disable Metrics/BlockLength
SimpleForm.setup do |config|
config.error_notification_class = 'alert alert-danger'
config.button_class = 'btn btn-default'
config.button_class = 'btn btn-secondary'
config.boolean_label_class = nil

config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|