From 333518bf02818e31d610a1d4c7ad6e31eda59e5c Mon Sep 17 00:00:00 2001 From: Solene Desvaux Date: Thu, 31 Mar 2022 11:33:22 +0200 Subject: [PATCH] Bug 30952: Virtualshelves Module --- .../modules/virtualshelves/sendshelfform.tt | 25 +-- .../prog/en/modules/virtualshelves/shelves.tt | 143 ++++++++++-------- .../virtualshelves/tables/shelves_results.tt | 4 +- 3 files changed, 94 insertions(+), 78 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelfform.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelfform.tt index 919ff4275b..5422e28982 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelfform.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelfform.tt @@ -7,7 +7,7 @@
[% IF ( email ) %] [% IF ( SENT ) %] -

Message sent

+

Message sent

The list was sent to: [% email | html %]

Close window

[% END %] @@ -19,20 +19,21 @@
-
-

Sending your list

-
  1. +
    +

    Sending your list

    +

      - - -

    1. + +

      +

      - -

    2. -
    3. + +

      +

      -

    -
    Cancel
    +

+ + Cancel
[% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 3fa48ea555..e276200d1f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -3,6 +3,9 @@ [% USE Koha %] [% USE KohaDates %] [% SET footerjs = 1 %] +[% formulaire = BLOCK %] + [% INCLUDE 'circ-search.inc' %] +[% END %] [% INCLUDE 'doc-head-open.inc' %] [% IF op == 'view' %] @@ -43,8 +46,7 @@ </head> <body id="lists_shelves" class="lists"> -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] +[% INCLUDE 'header.inc' form=formulaire %] <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> <ol> @@ -115,6 +117,14 @@ </li> [% END %] </ol> + + <ol> + [% IF Koha.Preference('showLastPatron') %][% INCLUDE 'last-borrower.inc' %][% END %] + </ol> + + <ol> + <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper"><i class="fa fa-question-circle"></i> <span>Help</span></a> + </ol> </nav> <div class="main container-fluid"> @@ -122,7 +132,9 @@ <div class="col-sm-10 col-sm-push-1"> <main> - [% INCLUDE 'virtualshelves-toolbar.inc' %] + +<h2>Lists</h2> +[% INCLUDE 'virtualshelves-toolbar.inc' %] [% FOR m IN messages %] <div class="dialog [% m.type | html %]"> @@ -316,80 +328,82 @@ [% IF op == 'add_form' OR op == 'edit_form' %] <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated"> - <fieldset class="rows"> + <fieldset class="brief"> - [% IF op == 'add_form' %] - <legend><h1>Create a new list</h1></legend> - <input type="hidden" name="op" value="add" /> - [% ELSE %] - <legend><h1>Edit list <em>[% shelf.shelfname | html %]</em></h1></legend> - <input type="hidden" name="op" value="edit" /> - [% END %] - <input type="hidden" name="referer" value="[% referer | html %]" /> - <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> - <ol> - <li> - <label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname | html %]" required="required" class="focus required" /> - <span class="required">Required</span> - </li> - <li> - <span class="label">Owner: </span> - [% IF op == 'add_form' %] - <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %] - [% ELSE %] - [% IF owner %] - <input type="hidden" id="owner" name="owner" value="[% owner.borrowernumber | html %]" />[% owner.firstname _ ' ' _ owner.surname | html %] + [% IF op == 'add_form' %] + <h3>Create a new list</h3> + <input type="hidden" name="op" value="add" /> + [% ELSE %] + <h3>Edit list <em>[% shelf.shelfname | html %]</em></h3> + <input type="hidden" name="op" value="edit" /> + [% END %] + <input type="hidden" name="referer" value="[% referer | html %]" /> + <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> + <ol> + <li> + <label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname | html %]" required="required" class="focus required" /> + <span class="required">Required</span> + </li> + <li> + <label>Owner: </label> + [% IF op == 'add_form' %] + <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" /><span class="label">[% logged_in_user.userid | html %]</span> [% ELSE %] - <input type="hidden" id="owner" name="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %] + [% IF owner %] + <input type="hidden" id="owner" name="owner" value="[% owner.borrowernumber | html %]" /><span class="label">[% owner.firstname _ ' ' _ owner.surname | html %]</span> + [% ELSE %] + <input type="hidden" id="owner" name="owner" value="[% loggedinusernumber | html %]" />[<span class="label">% logged_in_user.userid | html %]</span> + [% END %] [% END %] - [% END %] - </li> - <li><label for="sortfield" >Sort this list by: </label> - <select name="sortfield"> - [% IF shelf.sortfield == "title" %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %] - [% IF shelf.sortfield == "author" %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %] - [% IF shelf.sortfield == "copyrightdate" %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %] - [% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] - [% IF shelf.sortfield == "dateadded" %]<option value="dateadded" selected="selected">Date added</option>[% ELSE %]<option value="dateadded">Date added</option>[% END %] - </select></li> - <li><label for="public">Public: </label> - <select id="public" name="public" onchange="AdjustRemark()"> - [% IF shelf.is_private %] - <option value="0" selected="selected">Private</option> - [% ELSE %] - <option value="0">Private</option> - [% END %] - [% IF shelf.is_public %] - <option value="1" selected="selected">Public</option> - [% ELSE %] - <option value="1">Public</option> - [% END %] - </select></li> + </li> + <li><label for="sortfield" >Sort this list by: </label> + <select name="sortfield"> + [% IF shelf.sortfield == "title" %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %] + [% IF shelf.sortfield == "author" %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %] + [% IF shelf.sortfield == "copyrightdate" %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %] + [% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] + [% IF shelf.sortfield == "dateadded" %]<option value="dateadded" selected="selected">Date added</option>[% ELSE %]<option value="dateadded">Date added</option>[% END %] + </select></li> + <li><label for="public">Public: </label> + <select id="public" name="public" onchange="AdjustRemark()"> + [% IF shelf.is_private %] + <option value="0" selected="selected">Private</option> + [% ELSE %] + <option value="0">Private</option> + [% END %] + [% IF shelf.is_public %] + <option value="1" selected="selected">Public</option> + [% ELSE %] + <option value="1">Public</option> + [% END %] + </select></li> - [% INCLUDE list_permissions %] + [% INCLUDE list_permissions %] - </ol> - </fieldset> + </ol> - <fieldset class="action"> - <input type="submit" value="Save" class="submit" /> - [% IF referer == 'view' %] - <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a> - [% ELSE %] - [% IF public %] - <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1" class="cancel">Cancel</a> - [% ELSE %] - <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0" class="cancel">Cancel</a> + <input type="submit" value="Save" class="principal" /> + [% IF referer == 'view' %] + <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a> + [% ELSE %] + [% IF public %] + <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1" class="cancel">Cancel</a> + [% ELSE %] + <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0" class="cancel">Cancel</a> + [% END %] [% END %] - [% END %] - </fieldset> + </fieldset> </form> [% END %] [% IF op == 'list' %] - <h1>Lists</h1> +<<<<<<< HEAD + <h2>Lists</h2> +======= +>>>>>>> Bug 30952: Virtualshelves Module <div id="tabs" class="toptabs"> + <fieldset class="briefgr"> <ul> <li id="privateshelves_tab" class="active"><a href="#tab_content">Your lists</a></li> <li id="publicshelves_tab" class="active"><a href="#tab_content">Public lists</a></li> @@ -433,6 +447,7 @@ <tbody></tbody> </table> </div> + </fieldset> </div> [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt index fa89225653..4de1c59164 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt @@ -43,7 +43,7 @@ [%~ action_block = action_block _ '<input type="hidden" name="op" value="edit_form" />' ~%] [%~ action_block = action_block _ '<input type="hidden" name="public" value="' _ public _ '" />' ~%] [%~ action_block = action_block _ '<input type="hidden" name="referer" value="list" />' ~%] - [%~ action_block = action_block _ '<button class="editshelf btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</button>' ~%] + [%~ action_block = action_block _ '<button id="lientype">Edit</button>' ~%] [%~ action_block = action_block _ '</form> ' ~%] [%~ END ~%] [%~ IF can_manage_shelf OR can_delete_shelf ~%] @@ -53,7 +53,7 @@ [%~ action_block = action_block _ '<input type="hidden" name="shelfnumber" value="' _ shelfnumber _ '" />' ~%] [%~ action_block = action_block _ '<input type="hidden" name="public" value="' _ public _ '" />' ~%] [%~ action_block = action_block _ '<input type="hidden" name="referer" value="list" />' ~%] - [%~ action_block = action_block _ '<button type="submit" class="deleteshelf btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</button>' ~%] + [%~ action_block = action_block _ '<button type="submit" id="lientype">Delete</button>' ~%] [%~ action_block = action_block _ '</form>' ~%] [%~ END ~%] [%~ ELSE ~%] -- 2.17.1