Lines 97-111
Link Here
|
97 |
[% INCLUDE 'messages.inc' %] |
97 |
[% INCLUDE 'messages.inc' %] |
98 |
|
98 |
|
99 |
<div id="toolbar" class="btn-toolbar"> |
99 |
<div id="toolbar" class="btn-toolbar"> |
100 |
<a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit_form&suggestionid=[% suggestionid | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
100 |
[% IF CAN_user_suggestions_suggestions_manage %] |
101 |
<form class="delete_form" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl"> |
101 |
<a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit_form&suggestionid=[% suggestionid | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
102 |
[% INCLUDE 'csrf-token.inc' %] |
102 |
[% END %] |
103 |
<fieldset class="action"> |
103 |
[% IF CAN_user_suggestions_suggestions_delete %] |
104 |
<input type="hidden" name="op" value="cud-delete" /> |
104 |
<form class="delete_form" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl"> |
105 |
<input type="hidden" name="suggestionid" value="[% suggestionid | html %]" /> |
105 |
[% INCLUDE 'csrf-token.inc' %] |
106 |
<button type="submit" class="btn btn-primary">Delete</button> |
106 |
<fieldset class="action"> |
107 |
</fieldset> |
107 |
<input type="hidden" name="op" value="cud-delete" /> |
108 |
</form> |
108 |
<input type="hidden" name="suggestionid" value="[% suggestionid | html %]" /> |
|
|
109 |
<button type="submit" class="btn btn-primary">Delete</button> |
110 |
</fieldset> |
111 |
</form> |
112 |
[% END %] |
109 |
</div> |
113 |
</div> |
110 |
|
114 |
|
111 |
<fieldset class="rows"> |
115 |
<fieldset class="rows"> |
Lines 340-345
Link Here
|
340 |
<span>A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.</span> |
344 |
<span>A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.</span> |
341 |
[% CASE 'manager_not_enough_permissions' %] |
345 |
[% CASE 'manager_not_enough_permissions' %] |
342 |
<span>The manager you selected does not have sufficient permissions.</span> |
346 |
<span>The manager you selected does not have sufficient permissions.</span> |
|
|
347 |
[% CASE 'no_manage_permission' %] |
348 |
<span>You do not have permissions to manage suggestions</span> |
349 |
[% CASE 'no_create_permission' %] |
350 |
<span>You do not have permissions to create suggestions</span> |
351 |
[% CASE 'no_delete_permission' %] |
352 |
<span>You do not have permissions to delete suggestions</span> |
343 |
[% CASE %] |
353 |
[% CASE %] |
344 |
<span>[% m.code | html %]</span> |
354 |
<span>[% m.code | html %]</span> |
345 |
[% END %] |
355 |
[% END %] |
Lines 560-566
Link Here
|
560 |
<label for="managedby_name">by:</label> |
570 |
<label for="managedby_name">by:</label> |
561 |
<div> |
571 |
<div> |
562 |
<span id="managedby_name" name="managedby_name"> |
572 |
<span id="managedby_name" name="managedby_name"> |
563 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a> |
573 |
[% IF CAN_user_suggestions_suggestions_manage %] |
|
|
574 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a> |
575 |
[% ELSE %] |
576 |
Nobody |
577 |
[% END %] |
564 |
</span> |
578 |
</span> |
565 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
579 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
566 |
| Previously was [% INCLUDE 'patron-title.inc' patron=managedby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %]) |
580 |
| Previously was [% INCLUDE 'patron-title.inc' patron=managedby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %]) |
Lines 570-576
Link Here
|
570 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
584 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
571 |
<a id="restore_previous_manager" href="#"><i class="fa fa-trash-can"></i> Keep existing manager</a> |
585 |
<a id="restore_previous_manager" href="#"><i class="fa fa-trash-can"></i> Keep existing manager</a> |
572 |
[% END %] |
586 |
[% END %] |
573 |
<input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" /> |
587 |
|
|
|
588 |
[% IF CAN_user_suggestions_suggestions_manage %] |
589 |
<input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" /> |
590 |
[% END %] |
574 |
|
591 |
|
575 |
<br/> |
592 |
<br/> |
576 |
<label for="notify">Notify manager:</label> |
593 |
<label for="notify">Notify manager:</label> |
Lines 665-671
Link Here
|
665 |
|
682 |
|
666 |
[% IF op == 'else' %] |
683 |
[% IF op == 'else' %] |
667 |
<div id="toolbar" class="btn-toolbar"> |
684 |
<div id="toolbar" class="btn-toolbar"> |
|
|
685 |
<<<<<<< HEAD |
668 |
<a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add_form&branchcode=[% branchcode | uri %]"><i class="fa fa-plus"></i> New purchase suggestion</a> |
686 |
<a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add_form&branchcode=[% branchcode | uri %]"><i class="fa fa-plus"></i> New purchase suggestion</a> |
|
|
687 |
======= |
688 |
[% IF CAN_user_suggestions_suggestions_create %] |
689 |
<a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add&branchcode=[% branchcode | uri %]"><i class="fa fa-plus"></i> New purchase suggestion</a> |
690 |
[% END %] |
691 |
>>>>>>> 3c401bd9c7d (Bug 33363: Add separate permissions for creating and deleting suggestions) |
669 |
</div> |
692 |
</div> |
670 |
|
693 |
|
671 |
<h1>Suggestions management</h1> |
694 |
<h1>Suggestions management</h1> |
Lines 860-865
Link Here
|
860 |
</td> |
883 |
</td> |
861 |
<td class="actions"> |
884 |
<td class="actions"> |
862 |
<div class="btn-group dropup"> |
885 |
<div class="btn-group dropup"> |
|
|
886 |
<<<<<<< HEAD |
863 |
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&op=edit_form"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a> |
887 |
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&op=edit_form"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a> |
864 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]"> |
888 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]"> |
865 |
<li> |
889 |
<li> |
Lines 873-878
Link Here
|
873 |
<li> |
897 |
<li> |
874 |
<button class="btn btn-default trigger_action" data-op="cud-unarchive" data-suggestionid="[% s.suggestionid | html %]">Unarchive</button> |
898 |
<button class="btn btn-default trigger_action" data-op="cud-unarchive" data-suggestionid="[% s.suggestionid | html %]">Unarchive</button> |
875 |
</li> |
899 |
</li> |
|
|
900 |
======= |
901 |
[% IF CAN_user_suggestions_suggestions_manage %] |
902 |
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&csrf_token=[% csrf_token | html %]&op=edit"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a> |
903 |
[% ELSIF CAN_user_suggestions_suggestions_delete %] |
904 |
<a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]&csrf_token=[% csrf_token | html %]"><i class="fa fa-trash-can"></i> Delete</a> |
905 |
[% END %] |
906 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]"> |
907 |
[% IF CAN_user_suggestions_suggestions_delete %] |
908 |
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]&csrf_token=[% csrf_token | html %]"><i class="fa fa-trash-can"></i> Delete</a></li> |
909 |
[% END %] |
910 |
[% IF CAN_user_suggestions_suggestions_manage %] |
911 |
[% UNLESS s.archived %] |
912 |
<li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li> |
913 |
[% ELSE %] |
914 |
<li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li> |
915 |
[% END %] |
916 |
>>>>>>> 3c401bd9c7d (Bug 33363: Add separate permissions for creating and deleting suggestions) |
876 |
[% END %] |
917 |
[% END %] |
877 |
</ul> |
918 |
</ul> |
878 |
</div> |
919 |
</div> |
Lines 887-935
Link Here
|
887 |
<h2>Change selected suggestions</h2> |
928 |
<h2>Change selected suggestions</h2> |
888 |
</div> |
929 |
</div> |
889 |
</div> |
930 |
</div> |
890 |
<div class="suggestions_batch_ops row"> |
|
|
891 |
<div class="col-sm-4"> |
892 |
<fieldset class="brief"> |
893 |
<div id="select-reason[% loop.index | html %]"> |
894 |
<label for="STATUSreason[% loop.index | html %]">Mark selected as: </label> |
895 |
<select name="STATUS" id="STATUSreason[% loop.index | html %]"> |
896 |
<option value=""> -- Choose a status --</option> |
897 |
|
931 |
|
898 |
[% IF (statusselected_ASKED ) %] |
932 |
<div class="suggestions_batch_ops row"> |
899 |
<option value="ASKED" selected="selected">Pending</option> |
933 |
[% IF CAN_user_suggestions_suggestions_manage %] |
900 |
[% ELSE %] |
934 |
<div class="col-sm-4"> |
901 |
<option value="ASKED">Pending</option> |
935 |
<fieldset class="brief"> |
902 |
[% END %] |
936 |
<div id="select-reason[% loop.index | html %]"> |
903 |
|
937 |
<label for="STATUSreason[% loop.index | html %]">Mark selected as: </label> |
904 |
[% IF (statusselected_ACCEPTED ) %] |
938 |
<select name="STATUS" id="STATUSreason[% loop.index | html %]"> |
905 |
<option value="ACCEPTED" selected="selected">Accepted</option> |
939 |
<option value=""> -- Choose a status --</option> |
906 |
[% ELSE %] |
940 |
|
907 |
<option value="ACCEPTED">Accepted</option> |
941 |
[% IF (statusselected_ASKED ) %] |
908 |
[% END %] |
942 |
<option value="ASKED" selected="selected">Pending</option> |
909 |
|
943 |
[% ELSE %] |
910 |
[% IF (statusselected_CHECKED ) %] |
944 |
<option value="ASKED">Pending</option> |
911 |
<option value="CHECKED" selected="selected">Checked</option> |
945 |
[% END %] |
912 |
[% ELSE %] |
946 |
|
913 |
<option value="CHECKED">Checked</option> |
947 |
[% IF (statusselected_ACCEPTED ) %] |
914 |
[% END %] |
948 |
<option value="ACCEPTED" selected="selected">Accepted</option> |
915 |
|
949 |
[% ELSE %] |
916 |
[% IF ( statusselected_REJECTED ) %] |
950 |
<option value="ACCEPTED">Accepted</option> |
917 |
<option value="REJECTED" selected="selected">Rejected</option> |
951 |
[% END %] |
918 |
[% ELSE %] |
952 |
|
919 |
<option value="REJECTED">Rejected</option> |
953 |
[% IF (statusselected_CHECKED ) %] |
920 |
[% END %] |
954 |
<option value="CHECKED" selected="selected">Checked</option> |
921 |
|
955 |
[% ELSE %] |
922 |
[% IF ( statusselected_ORDERED ) %] |
956 |
<option value="CHECKED">Checked</option> |
923 |
<option value="ORDERED" selected="selected">Ordered</option> |
957 |
[% END %] |
924 |
[% ELSE %] |
958 |
|
925 |
<option value="ORDERED">Ordered</option> |
959 |
[% IF ( statusselected_REJECTED ) %] |
926 |
[% END %] |
960 |
<option value="REJECTED" selected="selected">Rejected</option> |
|
|
961 |
[% ELSE %] |
962 |
<option value="REJECTED">Rejected</option> |
963 |
[% END %] |
964 |
|
965 |
[% IF ( statusselected_ORDERED ) %] |
966 |
<option value="ORDERED" selected="selected">Ordered</option> |
967 |
[% ELSE %] |
968 |
<option value="ORDERED">Ordered</option> |
969 |
[% END %] |
970 |
|
971 |
[% FOREACH s IN SuggestionStatuses %] |
972 |
<option value="[% s.authorised_value | html %]">[% s.lib | html %]</option> |
973 |
[% END %] |
974 |
</select> |
975 |
|
976 |
<label for="choosereason[% loop.index | html %]">with this reason:</label> |
977 |
<select name="reason" id="choosereason[% loop.index | html %]"> |
978 |
<option value=""> -- Choose a reason -- </option> |
979 |
[% FOREACH reasonsloo IN suggestion.reasonsloop %] |
980 |
<option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option> |
981 |
[% END %] |
982 |
<option value="other">Others...</option> |
983 |
</select> |
984 |
|
985 |
<span class="other_reason"> |
986 |
<input type="text" size="31" name="other_reason" placeholder="please note your reason here..." /> |
987 |
<a href="#" class="cancel_note">Cancel</a> |
988 |
</span> |
989 |
</div> |
927 |
|
990 |
|
928 |
[% FOREACH s IN SuggestionStatuses %] |
991 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
929 |
<option value="[% s.authorised_value | html %]">[% s.lib | html %]</option> |
992 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
930 |
[% END %] |
993 |
</fieldset> |
931 |
</select> |
994 |
<fieldset class="action"> |
|
|
995 |
<button type="submit" class="btn btn-primary" value="update_status">Submit</button> |
996 |
</fieldset> |
997 |
</div> <!-- /.col-sm-4 --> |
998 |
|
999 |
<div class="col-sm-2"> |
1000 |
<fieldset class="brief"> |
1001 |
<label id="suggestion_itemtype"> |
1002 |
Update item types with: |
1003 |
</label> |
1004 |
[% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %] |
1005 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
1006 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
1007 |
</fieldset> |
1008 |
<fieldset class="action"> |
1009 |
<button type="submit" class="btn btn-primary" value="update_itemtype">Submit</button> |
1010 |
</fieldset> |
1011 |
</div> <!-- /.col-sm-4 --> |
1012 |
|
1013 |
<div class="col-sm-2"> |
1014 |
<fieldset class="brief"> |
1015 |
<span class="label">Update manager</span> |
1016 |
<a id="set_manager_[% loop.count | html %]" data-tab="[% loop.count | html %]" class="set_manager" href="#"><i class="fa fa-search"></i> Select manager</a> |
1017 |
<span id="managedby_name[% loop.count | html %]"></span> |
1018 |
<input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" /> |
1019 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
1020 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
1021 |
</fieldset> |
1022 |
<fieldset class="action"> |
1023 |
<button type="submit" class="btn btn-primary" value="update_manager">Submit</button> |
1024 |
</fieldset> |
1025 |
</div> <!-- /.col-sm-2 --> |
1026 |
[% END %] |
932 |
|
1027 |
|
|
|
1028 |
<<<<<<< HEAD |
933 |
<label for="choosereason[% loop.index | html %]">with this reason:</label> |
1029 |
<label for="choosereason[% loop.index | html %]">with this reason:</label> |
934 |
<select name="reason" id="choosereason[% loop.index | html %]"> |
1030 |
<select name="reason" id="choosereason[% loop.index | html %]"> |
935 |
<option value=""> -- Choose a reason -- </option> |
1031 |
<option value=""> -- Choose a reason -- </option> |
Lines 998-1006
Link Here
|
998 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
1094 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
999 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
1095 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
1000 |
<button type="submit" data-op="cud-archive" class="btn btn-primary">Archive</button> |
1096 |
<button type="submit" data-op="cud-archive" class="btn btn-primary">Archive</button> |
|
|
1097 |
======= |
1098 |
[% IF CAN_user_suggestions_suggestions_delete %] |
1099 |
<div class="col-sm-2"> |
1100 |
<fieldset class="brief"> |
1101 |
<span class="label">Delete selected</span> |
1102 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
1103 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
1001 |
</fieldset> |
1104 |
</fieldset> |
1002 |
</fieldset> |
1105 |
<fieldset class="action"> |
1003 |
</div> <!-- /.col-sm-2 --> |
1106 |
<button type="submit" class="btn btn-primary" value="delete">Delete</button> |
|
|
1107 |
>>>>>>> 3c401bd9c7d (Bug 33363: Add separate permissions for creating and deleting suggestions) |
1108 |
</fieldset> |
1109 |
</div> <!-- /.col-sm-2 --> |
1110 |
[% END %] |
1111 |
[% IF CAN_user_suggestions_suggestions_manage %] |
1112 |
<div class="col-sm-2"> |
1113 |
<fieldset class="brief"> |
1114 |
<span class="label">Archive selected</span> |
1115 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
1116 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
1117 |
<fieldset class="action"> |
1118 |
<button type="submit" class="btn btn-primary" value="archive">Archive</button> |
1119 |
</fieldset> |
1120 |
</fieldset> |
1121 |
</div> <!-- /.col-sm-2 --> |
1122 |
[% END %] |
1004 |
</div> <!-- /.row --> |
1123 |
</div> <!-- /.row --> |
1005 |
|
1124 |
|
1006 |
[% ELSE %] |
1125 |
[% ELSE %] |