From d0caa724542029838dc2f9ab795eb5926e55148a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 21 Feb 2023 19:52:28 +0000 Subject: [PATCH] Bug 33031: Update OPAC lists page to use Bootstrap markup for tabs This patch updates the OPAC lists page with Bootstrap markup for the static tabs used to link to private and public shelves. These tabs are not dependent on JavaScript. To test, apply the patch and click "Lists" -> "Public lists" in the OPAC. The "Your lists" and "Public lists" tabs should look correct, and each should link to the correct view. Signed-off-by: Jacob O'Mara Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 65374826d2c749973c08722e94e7647251bbf4da) Signed-off-by: Matt Blenkinsop --- .../bootstrap/en/modules/opac-shelves.tt | 196 +++++++++--------- 1 file changed, 103 insertions(+), 93 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index 93a35b7225..2a21e875e6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -670,115 +670,125 @@ [% ELSIF op == 'list' %]

Lists

-
-
    +
    + - [% IF !public %] -
    - [% ELSE %] -
    - [% END %] - - [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %] - [% IF loggedinusername %] - +
    + [% IF !public %] +
    [% ELSE %] - [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] - - [% END %] +
    [% END %] - [% END %] - [% IF shelves.count %] - - [% IF !public %] - - [% ELSIF public %] - + [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %] + [% IF loggedinusername %] + + [% ELSE %] + [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] + + [% END %] [% END %] - - - - - - - - - - [% FOREACH s IN shelves %] - [% SET contents = s.get_contents %] + [% END %] + + [% IF shelves.count %] +
    Your listsPublic lists
    List nameContentsType 
    + [% IF !public %] + + [% ELSIF public %] + + [% END %] + - - - - + + + + - [% END %] - -
    Your listsPublic lists
    [% s.shelfname | html %][% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %] - [% IF s.is_private %] - [% IF s.is_shared %]Shared[% ELSE %]Private[% END %] - [% ELSE %] - Public - [% END %] - - [% IF s.can_be_managed( loggedinusernumber ) %] -
    - - - - - -
    - [% END %] - [% IF s.can_be_deleted( loggedinusernumber ) %] - [% PROCESS delete_shelf shelf = s context = "list" %] - [% END %] - [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %] - Share - [% END %] - [% IF s.is_shared AND s.can_be_managed( loggedinusernumber ) %] -
    - - - - - -
    - [% END %] - [% IF s.is_shared_with( loggedinusernumber ) %] -
    - - - - - -
    - [% END %]  -
    List nameContentsType 
    -
    [% pagination_bar | $raw %]
    - [% ELSE %] - [% IF public %] -

    No public lists.

    - [% ELSIF loggedinusernumber %] -

    No private lists.

    - [% END %] - [% END # /IF shelves.count %] -
    + + + [% FOREACH s IN shelves %] + [% SET contents = s.get_contents %] + + [% s.shelfname | html %] + [% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %] + + [% IF s.is_private %] + [% IF s.is_shared %]Shared[% ELSE %]Private[% END %] + [% ELSE %] + Public + [% END %] + + + [% IF s.can_be_managed( loggedinusernumber ) %] +
    + + + + + +
    + [% END %] + [% IF s.can_be_deleted( loggedinusernumber ) %] + [% PROCESS delete_shelf shelf = s context = "list" %] + [% END %] + [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %] + Share + [% END %] + [% IF s.is_shared AND s.can_be_managed( loggedinusernumber ) %] +
    + + + + + +
    + [% END %] + [% IF s.is_shared_with( loggedinusernumber ) %] +
    + + + + + +
    + [% END %]  + + + [% END %] + + +
    [% pagination_bar | $raw %]
    + [% ELSE %] + [% IF public %] +

    No public lists.

    + [% ELSIF loggedinusernumber %] +

    No private lists.

    + [% END %] + [% END # /IF shelves.count %] +
    +
    [% ELSIF NOT loggedinusernumber %] [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] -- 2.39.5