Bugzilla – Attachment 140918 Details for
Bug 31605
Improve style of OPAC suggestions search form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31605: Improve style of OPAC suggestions search form
Bug-31605-Improve-style-of-OPAC-suggestions-search.patch (text/plain), 5.76 KB, created by
Lucas Gass (lukeg)
on 2022-09-23 14:24:32 UTC
(
hide
)
Description:
Bug 31605: Improve style of OPAC suggestions search form
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-09-23 14:24:32 UTC
Size:
5.76 KB
patch
obsolete
>From daaeca704c5f064029b215e7b601cfe93cf3c5e4 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 22 Sep 2022 15:48:32 +0000 >Subject: [PATCH] Bug 31605: Improve style of OPAC suggestions search form > >This patch makes minor modifications to the markup for the >OPAC suggestions search form so that the different labels and >form fields display a little more nicely. > >The patch also adds standard Bootstrap alert classes to >several messages which might be displayed on the screen, e.g. >"You have no pending purchase suggestions." > >To test, apply the patch and make sure the "suggestion" system >preference is enabled. > >- With the OPACViewOthersSuggestions preference disabled, log > in to the OPAC and view your suggestions. >- If you have no suggestions you should see a Bootstrap-styled > message box, "You have no pending purchase suggestions." >- If necessary, submit a suggestion. With at least one suggestion > present you should see a search form above the table of > suggestions. The label, form field, and submit button should > line up nicely. >- Test that the search form works correctly to find suggestions > in your system. >- If you search for a suggestion which doesn't exist you should > see a message-style alert, "There are no pending purchase > suggestions matching your search." >- Enable the OPACViewOthersSuggestions system preference. >- Return to the OPAC suggestions page. The form field should > now include a nicely-styled "Suggested by" filter. > >Signed-off-by: George Williams <george@nekls.org> > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../bootstrap/en/modules/opac-suggestions.tt | 20 +++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index 576178db7d..c173a2729b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -313,8 +313,12 @@ > [% SET can_delete_suggestion = 0 %] > <form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline" id="search_suggestions_form" method="get"> > <div class="form-row"> >- <label for="title_filter">Search for:</label> >- <input type="text" name="title_filter" id="title_filter" value="[% title_filter | html %]" /> >+ <div class="col-auto my-1"> >+ <label for="title_filter">Search for:</label> >+ </div> >+ <div class="col-auto my-1"> >+ <input type="text" name="title_filter" id="title_filter" value="[% title_filter | html %]" size="30" class="form-control form-control-sm" /> >+ </div> > [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %] > [% IF loggedinusername %] > <div class="col-auto my-1"> >@@ -460,21 +464,21 @@ > [% ELSE %] > [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) %] > [% IF title_filter %] >- <p>There are no pending purchase suggestions matching your search.</p> >+ <div class="alert alert-info" role="alert">There are no pending purchase suggestions matching your search.</div> > [% ELSIF loggedinusername AND NOT suggested_by_anyone %] >- <p>You have no pending purchase suggestions. <a href="/cgi-bin/koha/opac-suggestions.pl?suggested_by_anyone=1">View all suggestions</a></p> >+ <div class="alert alert-info" role="alert">You have no pending purchase suggestions. <a href="/cgi-bin/koha/opac-suggestions.pl?suggested_by_anyone=1">View all suggestions</a></div> > [% ELSE %] >- <p>There are no pending purchase suggestions.</p> >+ <div class="alert alert-info" role="alert">There are no pending purchase suggestions.</div> > [% END %] > [% ELSE %] > [% IF ( loggedinusername ) %] > [% IF title_filter %] >- <p>There are no pending purchase suggestions matching your search.</p> >+ <div class="alert alert-info" role="alert">There are no pending purchase suggestions matching your search.</div> > [% ELSE %] >- <p>You have no pending purchase suggestions.</p> >+ <div class="alert alert-info" role="alert">You have no pending purchase suggestions.</div> > [% END %] > [% ELSE %] >- <p>You are not authorized to see pending purchase suggestions.</p> >+ <div class="alert alert-warning" role="alert">You are not authorized to see pending purchase suggestions.</div> > [% END %] > [% END %] > [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31605
:
140853
|
140854
|
140855
| 140918