From edbe0a6486118215fe2b3eb66447ff8bf71d12d3 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 6 Mar 2014 11:44:15 +0100 Subject: [PATCH] Bug 9032: Follow-up for bootstrap theme Content-Type: text/plain; charset=utf-8 Adds new template opac-shareshelf.tt. Modifies template opac-shelves.tt: Share button, Remove Share button, label "Your lists" instead of "Your private lists", list category Shared. Test plan: Verify if the Share a list-features work in bootstrap by: [1] Switch to bootstrap. Go to Lists. [2] Share one of your private lists. [3] Login as another user and accept the invitation. [4] Remove the share again. [5] Check if Share and Remove share do not popup for public lists. --- .../bootstrap/en/modules/opac-shareshelf.tt | 90 ++++++++++++++++++++ .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 31 ++++++- 2 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt new file mode 100644 index 0000000..433b17a --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt @@ -0,0 +1,90 @@ +[% USE Koha %] +[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Share a list +[% INCLUDE 'doc-head-close.inc' %] +[% BLOCK cssinclude %][% END %] + + + +[% INCLUDE 'masthead.inc' %] +
+ + +
+
+ [% IF ( OpacNav ) %] +
+ +
+ [% END %] + +[%# This section contains the essential code for error messages and three operations: invite, confirm_invite and accept. %] +

Share a list with another patron

+
+
+ + [% IF errcode %] + [% IF errcode==1 && op %]
The operation [% op %] is not supported.
[% END %] + [% IF errcode==1 && !op %]
No operation parameter has been passed.
[% END %] + [% IF errcode==2 %]
Invalid shelf number.
[% END %] + [% IF errcode==3 %]
The feature of sharing lists is not in use in this library.
[% END %] + [% IF errcode==4 %]
You can only share a list if you are the owner.
[% END %] + [% IF errcode==5 %]
You cannot share a public list.
[% END %] + [% IF errcode==6 %]
Sorry, but you did not enter any valid email address.
[% END %] + [% IF errcode==7 %]
Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.
[% END %] + [% IF errcode==8 %]
As owner of a list you cannot accept an invitation for sharing it.
[% END %] + + [% ELSIF op=='invite' %] +
+
+
+
    + + +
  1. [% shelfname %]
  2. +
  3. + + +
  4. +
+
+
+ +
+
+
+ + [% ELSIF op=='conf_invite' %] +
+ [% IF approvedaddress %] +

An invitation to share list [% shelfname %] has been sent to [% approvedaddress %].

+ [% END %] + [% IF failaddress %] +

Something went wrong while processing the following addresses. Please check them. These are: [% failaddress %]

+ [% END %] + [% IF approvedaddress %] +

You will receive an email notification if someone accepts your share within two weeks.

+ [% END %] +

Return to your lists

+
+ + [% ELSIF op=='accept' %] + [%# Nothing to do: we already display an error or we redirect. %] + [% END %] + +
+
+[%# End of essential part %] + +
+
+
+[% INCLUDE 'opac-bottom.inc' %] +[% BLOCK jsinclude %][% END %] 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 eb9f65b..d5ce5d7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -33,6 +33,13 @@  anyone to remove other contributed entries. [% END %] +[% BLOCK remove_share %] + [%# Use: add parameter shelfnumber and add end form tag %] +
+ + + +[% END %] [% INCLUDE 'masthead.inc' %]
@@ -173,6 +180,13 @@ [% END %] + [% IF showprivateshelves && Koha.Preference('OpacAllowSharingPrivateLists') %] + Share list + [% END %] + [% ELSIF showprivateshelves # not manageshelf and private means shared %] + [% INCLUDE remove_share %] + + [% END # / IF manageshelf %]
@@ -584,9 +598,9 @@