Skip to content
  • Owen Leonard's avatar
    Bug 37732: Update templates to use Bootstrap styles when alert class comes from the perl script · ff08d496
    Owen Leonard authored and Katrin Fischer's avatar Katrin Fischer committed
    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: default avatarJonathan Druart <jonathan.druart@bugs.koha-community.org>
    Signed-off-by: default avatarKatrin Fischer <katrin.fischer@bsz-bw.de>
    ff08d496
Loading