Bug 26758: Correct OPAC ILL requests page markup
authorOwen Leonard <oleonard@myacpl.org>
Wed, 21 Oct 2020 01:49:08 +0000 (01:49 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 2 Nov 2020 10:03:08 +0000 (11:03 +0100)
This patch makes some corrections to the OPAC ILL page which should have
been included in the upgrade to Bootstrap 4.

To test you must have Interlibrary loan configured and enabled in the
OPAC. Enter some text in the ILLModuleCopyrightClearance system
preference.

- Log in to the OPAC and go to the "your interlibrary loan requests"
  page.
- If you have only one ILL backend set up you should see a "Create a new
  request" button which is styled correctly.
  - This patch makes corrections to the menu which displays if you have
    more than one ILL backend set up, so it would be ideal to be able to
    test it.
- Upon clickng the "new request" button (or selecting a backend from the
  new request menu) you should be prompted to choose Yes or No in
  response to the ILLModuleCopyrightClearance text. The buttons should
  be styled green and red, respectively.
- On the new request entry page the "Add new field" and "Create" buttons
  should be styled in the "secondary" grey style.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt

index f358542..22edcc4 100644 (file)
@@ -78,9 +78,9 @@
                                     </p>
                                     [% USE link_url = url('/cgi-bin/koha/opac-illrequests.pl', whole.value.other) %]
                                     <a href="[% link_url _ '&amp;stage=copyrightclearance' | $raw %]"
-                                    class="btn btn-sm btn-default"><i class="fa fa-check" aria-hidden="true"></i> Yes</a>
+                                    class="btn btn-sm btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Yes</a>
                                     <a href="/cgi-bin/koha/opac-illrequests.pl"
-                                    class="btn btn-sm btn-default"><i class="fa fa-times" aria-hidden="true"></i> No</a>
+                                    class="btn btn-sm btn-danger"><i class="fa fa-times" aria-hidden="true"></i> No</a>
                                 </div>
                             [% ELSE %]
                                 [% INCLUDE messages %]
 
                             <div id="illrequests-create-button" class="dropdown btn-group">
                                 [% IF backends.size > 1 %]
-                                        <button class="btn btn-default dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
+                                        <button class="btn btn-primary dropdown-toggle" type="button" id="ill-backend-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                             <i class="fa fa-plus" aria-hidden="true"></i> Create a new request <span class="caret"></span>
                                         </button>
-                                        <ul id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
+                                        <div id="backend-dropdown-options" class="dropdown-menu nojs" aria-labelledby="ill-backend-dropdown">
                                             [% FOREACH backend IN backends %]
-                                                <li><a href="/cgi-bin/koha/opac-illrequests.pl?method=create&amp;backend=[% backend | uri %]">[% backend | html %]</a></li>
+                                                <a class="dropdown-item" href="/cgi-bin/koha/opac-illrequests.pl?method=create&amp;backend=[% backend | uri %]">[% backend | html %]</a>
                                             [% END %]
-                                        </ul>
+                                        </div>
                                 [% ELSE %]
-                                    <a id="ill-new" class="btn btn-default" href="/cgi-bin/koha/opac-illrequests.pl?method=create&amp;backend=[% backends.0 | html %]">
+                                    <a id="ill-new" class="btn btn-primary" href="/cgi-bin/koha/opac-illrequests.pl?method=create&amp;backend=[% backends.0 | html %]">
                                         <i class="fa fa-plus" aria-hidden="true"></i> Create a new request
                                     </a>
                                 [% END %]
                                         [% IF request.status == "NEW" %]
                                             <a class="cancel-illrequest btn btn-danger" href="/cgi-bin/koha/opac-illrequests.pl?method=cancreq&amp;illrequest_id=[% request.illrequest_id | html %]">Request cancellation</a>
                                         [% END %]
-                                        <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications" />
+                                        <input type="submit" class="update-illrequest btn btn-primary" value="Submit modifications" />
                                     [% END %]
                                     <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span>
                                 </fieldset>