]> git.koha-community.org Git - koha.git/commit
Bug 37732: Update templates to use Bootstrap styles when alert class comes from the...
authorOwen Leonard <oleonard@myacpl.org>
Fri, 30 Aug 2024 11:46:34 +0000 (11:46 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 13 Sep 2024 10:02:52 +0000 (12:02 +0200)
commitff08d49680760fe300b8de08b0e188d6bd19ed54
treec2ef1e8e9545eb664ff36a0a4288108247844990
parentc59247733bed95c6c94464454514faaca214838e
Bug 37732: Update templates to use Bootstrap styles when alert class comes from the perl script

Many pages can have alerts that get their style from a variable passed
by the script, e.g.:

push @messages, { type => 'message', code => 'success_on_update' };

Rather than change these to match Bootstrap 5 styles, I propose we add a
copy of the existing Bootstrap style using the existing vocabulary:

message -> info
alert  -> warning
error -> danger

To test, apply the patch and rebuild CSS for the staff interface and
OPAC: (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)

- Clear your browser cache if necessary.
- Navigate to pages which have been updated by this patch. Many pages
  will implement this kind of alert after saving an edit, especially
  administration pages, e.g.

  Administration -> Libraries -> Edit library -> Save.

- You can test the various alert classes by adding this HTML to
  IntranetMainUserBlock and OpacMainUserBlock and viewing the staff
  interface and OPAC main pages.:

<div class="alert alert-danger">A standard Bootstrap danger alert with
  <a href="#" class="alert-link">an example link</a>.</div>
<div class="alert alert-warning">A standard Bootstrap warning alert with
  <a href="#" class="alert-link">an example link</a>.</div>
<div class="alert alert-info">A standard Bootstrap info alert with
  <a href="#" class="alert-link">an example link</a>.</div>
<div class="alert alert-error">A Koha error alert with
  <a href="#" class="alert-link">an example link</a>.</div>
<div class="alert alert-alert">A Koha alert alert with
  <a href="#" class="alert-link">an example link</a>.</div>
<div class="alert alert-message">A Koha info alert with
  <a href="#" class="alert-link">an example link</a>.</div>

Sponsored-by: Athens County Public Libraries
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
35 files changed:
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendor_issues.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_provider_domains.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_providers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt
koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/preview_letter.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/downloadshelf.tt
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt