Lines 96-103
Link Here
|
96 |
<div class="col-md-8 col-md-offset-2"> |
96 |
<div class="col-md-8 col-md-offset-2"> |
97 |
|
97 |
|
98 |
<div id="toolbar" class="btn-toolbar"> |
98 |
<div id="toolbar" class="btn-toolbar"> |
99 |
<a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil-alt"></i> Edit</a> |
99 |
[% IF CAN_user_suggestions_suggestions_manage %] |
100 |
<a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash-can"></i> Delete</a> |
100 |
<a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil-alt"></i> Edit</a> |
|
|
101 |
[% END %] |
102 |
[% IF CAN_user_suggestions_suggestions_delete %] |
103 |
<a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash-can"></i> Delete</a> |
104 |
[% END %] |
101 |
</div> |
105 |
</div> |
102 |
|
106 |
|
103 |
<fieldset class="rows"> |
107 |
<fieldset class="rows"> |
Lines 330-335
Link Here
|
330 |
<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> |
334 |
<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> |
331 |
[% CASE 'manager_not_enough_permissions' %] |
335 |
[% CASE 'manager_not_enough_permissions' %] |
332 |
<span>The manager you selected does not have sufficient permissions.</span> |
336 |
<span>The manager you selected does not have sufficient permissions.</span> |
|
|
337 |
[% CASE 'no_manage_permission' %] |
338 |
<span>You do not have permissions to manage suggestions</span> |
339 |
[% CASE 'no_create_permission' %] |
340 |
<span>You do not have permissions to create suggestions</span> |
341 |
[% CASE 'no_delete_permission' %] |
342 |
<span>You do not have permissions to delete suggestions</span> |
333 |
[% CASE %] |
343 |
[% CASE %] |
334 |
<span>[% m.code | html %]</span> |
344 |
<span>[% m.code | html %]</span> |
335 |
[% END %] |
345 |
[% END %] |
Lines 549-555
Link Here
|
549 |
<label for="managedby_name">by:</label> |
559 |
<label for="managedby_name">by:</label> |
550 |
<div> |
560 |
<div> |
551 |
<span id="managedby_name" name="managedby_name"> |
561 |
<span id="managedby_name" name="managedby_name"> |
552 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a> |
562 |
[% IF CAN_user_suggestions_suggestions_manage %] |
|
|
563 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a> |
564 |
[% ELSE %] |
565 |
Nobody |
566 |
[% END %] |
553 |
</span> |
567 |
</span> |
554 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
568 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
555 |
| 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 %]) |
569 |
| 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 559-565
Link Here
|
559 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
573 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
560 |
<a id="restore_previous_manager" href="#"><i class="fa fa-trash-can"></i> Keep existing manager</a> |
574 |
<a id="restore_previous_manager" href="#"><i class="fa fa-trash-can"></i> Keep existing manager</a> |
561 |
[% END %] |
575 |
[% END %] |
562 |
<input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" /> |
576 |
|
|
|
577 |
[% IF CAN_user_suggestions_suggestions_manage %] |
578 |
<input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" /> |
579 |
[% END %] |
563 |
|
580 |
|
564 |
<br/> |
581 |
<br/> |
565 |
<label for="notify">Notify manager:</label> |
582 |
<label for="notify">Notify manager:</label> |
Lines 653-659
Link Here
|
653 |
|
670 |
|
654 |
[% IF op == 'else' %] |
671 |
[% IF op == 'else' %] |
655 |
<div id="toolbar" class="btn-toolbar"> |
672 |
<div id="toolbar" class="btn-toolbar"> |
656 |
<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> |
673 |
[% IF CAN_user_suggestions_suggestions_create %] |
|
|
674 |
<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> |
675 |
[% END %] |
657 |
</div> |
676 |
</div> |
658 |
|
677 |
|
659 |
<h1>Suggestions management</h1> |
678 |
<h1>Suggestions management</h1> |
Lines 841-853
Link Here
|
841 |
</td> |
860 |
</td> |
842 |
<td class="actions"> |
861 |
<td class="actions"> |
843 |
<div class="btn-group dropup"> |
862 |
<div class="btn-group dropup"> |
844 |
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&op=edit"><i class="fa fa-pencil-alt"></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> |
863 |
[% IF CAN_user_suggestions_suggestions_manage %] |
|
|
864 |
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&op=edit"><i class="fa fa-pencil-alt"></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> |
865 |
[% ELSIF CAN_user_suggestions_suggestions_delete %] |
866 |
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-trash"></i>Delete</a> |
867 |
[% END %] |
845 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]"> |
868 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]"> |
846 |
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-trash-can"></i> Delete</a></li> |
869 |
[% IF CAN_user_suggestions_suggestions_delete %] |
847 |
[% UNLESS s.archived %] |
870 |
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-trash-can"></i> Delete</a></li> |
848 |
<li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li> |
871 |
[% END %] |
849 |
[% ELSE %] |
872 |
[% IF CAN_user_suggestions_suggestions_manage %] |
850 |
<li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li> |
873 |
[% UNLESS s.archived %] |
|
|
874 |
<li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li> |
875 |
[% ELSE %] |
876 |
<li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li> |
877 |
[% END %] |
851 |
[% END %] |
878 |
[% END %] |
852 |
</ul> |
879 |
</ul> |
853 |
</div> |
880 |
</div> |
Lines 862-981
Link Here
|
862 |
<h2>Change selected suggestions</h2> |
889 |
<h2>Change selected suggestions</h2> |
863 |
</div> |
890 |
</div> |
864 |
</div> |
891 |
</div> |
865 |
<div class="suggestions_batch_ops row"> |
|
|
866 |
<div class="col-sm-4"> |
867 |
<fieldset class="brief"> |
868 |
<div id="select-reason[% loop.index | html %]"> |
869 |
<label for="STATUSreason[% loop.index | html %]">Mark selected as: </label> |
870 |
<select name="STATUS" id="STATUSreason[% loop.index | html %]"> |
871 |
<option value=""> -- Choose a status --</option> |
872 |
|
873 |
[% IF (statusselected_ASKED ) %] |
874 |
<option value="ASKED" selected="selected">Pending</option> |
875 |
[% ELSE %] |
876 |
<option value="ASKED">Pending</option> |
877 |
[% END %] |
878 |
|
892 |
|
879 |
[% IF (statusselected_ACCEPTED ) %] |
893 |
<div class="suggestions_batch_ops row"> |
880 |
<option value="ACCEPTED" selected="selected">Accepted</option> |
894 |
[% IF CAN_user_suggestions_suggestions_manage %] |
881 |
[% ELSE %] |
895 |
<div class="col-sm-4"> |
882 |
<option value="ACCEPTED">Accepted</option> |
896 |
<fieldset class="brief"> |
883 |
[% END %] |
897 |
<div id="select-reason[% loop.index | html %]"> |
884 |
|
898 |
<label for="STATUSreason[% loop.index | html %]">Mark selected as: </label> |
885 |
[% IF (statusselected_CHECKED ) %] |
899 |
<select name="STATUS" id="STATUSreason[% loop.index | html %]"> |
886 |
<option value="CHECKED" selected="selected">Checked</option> |
900 |
<option value=""> -- Choose a status --</option> |
887 |
[% ELSE %] |
901 |
|
888 |
<option value="CHECKED">Checked</option> |
902 |
[% IF (statusselected_ASKED ) %] |
889 |
[% END %] |
903 |
<option value="ASKED" selected="selected">Pending</option> |
890 |
|
904 |
[% ELSE %] |
891 |
[% IF ( statusselected_REJECTED ) %] |
905 |
<option value="ASKED">Pending</option> |
892 |
<option value="REJECTED" selected="selected">Rejected</option> |
906 |
[% END %] |
893 |
[% ELSE %] |
907 |
|
894 |
<option value="REJECTED">Rejected</option> |
908 |
[% IF (statusselected_ACCEPTED ) %] |
895 |
[% END %] |
909 |
<option value="ACCEPTED" selected="selected">Accepted</option> |
896 |
|
910 |
[% ELSE %] |
897 |
[% IF ( statusselected_ORDERED ) %] |
911 |
<option value="ACCEPTED">Accepted</option> |
898 |
<option value="ORDERED" selected="selected">Ordered</option> |
912 |
[% END %] |
899 |
[% ELSE %] |
913 |
|
900 |
<option value="ORDERED">Ordered</option> |
914 |
[% IF (statusselected_CHECKED ) %] |
901 |
[% END %] |
915 |
<option value="CHECKED" selected="selected">Checked</option> |
902 |
|
916 |
[% ELSE %] |
903 |
[% FOREACH s IN SuggestionStatuses %] |
917 |
<option value="CHECKED">Checked</option> |
904 |
<option value="[% s.authorised_value | html %]">[% s.lib | html %]</option> |
918 |
[% END %] |
905 |
[% END %] |
919 |
|
906 |
</select> |
920 |
[% IF ( statusselected_REJECTED ) %] |
|
|
921 |
<option value="REJECTED" selected="selected">Rejected</option> |
922 |
[% ELSE %] |
923 |
<option value="REJECTED">Rejected</option> |
924 |
[% END %] |
925 |
|
926 |
[% IF ( statusselected_ORDERED ) %] |
927 |
<option value="ORDERED" selected="selected">Ordered</option> |
928 |
[% ELSE %] |
929 |
<option value="ORDERED">Ordered</option> |
930 |
[% END %] |
931 |
|
932 |
[% FOREACH s IN SuggestionStatuses %] |
933 |
<option value="[% s.authorised_value | html %]">[% s.lib | html %]</option> |
934 |
[% END %] |
935 |
</select> |
936 |
|
937 |
<label for="choosereason[% loop.index | html %]">with this reason:</label> |
938 |
<select name="reason" id="choosereason[% loop.index | html %]"> |
939 |
<option value=""> -- Choose a reason -- </option> |
940 |
[% FOREACH reasonsloo IN suggestion.reasonsloop %] |
941 |
<option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option> |
942 |
[% END %] |
943 |
<option value="other">Others...</option> |
944 |
</select> |
945 |
|
946 |
<span class="other_reason"> |
947 |
<input type="text" size="31" name="other_reason" placeholder="please note your reason here..." /> |
948 |
<a href="#" class="cancel_note">Cancel</a> |
949 |
</span> |
950 |
</div> |
951 |
|
952 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
953 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
954 |
</fieldset> |
955 |
<fieldset class="action"> |
956 |
<button type="submit" class="btn btn-primary" value="update_status">Submit</button> |
957 |
</fieldset> |
958 |
</div> <!-- /.col-sm-4 --> |
959 |
|
960 |
<div class="col-sm-2"> |
961 |
<fieldset class="brief"> |
962 |
<label id="suggestion_itemtype"> |
963 |
Update item types with: |
964 |
</label> |
965 |
[% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %] |
966 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
967 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
968 |
</fieldset> |
969 |
<fieldset class="action"> |
970 |
<button type="submit" class="btn btn-primary" value="update_itemtype">Submit</button> |
971 |
</fieldset> |
972 |
</div> <!-- /.col-sm-4 --> |
973 |
|
974 |
<div class="col-sm-2"> |
975 |
<fieldset class="brief"> |
976 |
<span class="label">Update manager</span> |
977 |
<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> |
978 |
<span id="managedby_name[% loop.count | html %]"></span> |
979 |
<input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" /> |
980 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
981 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
982 |
</fieldset> |
983 |
<fieldset class="action"> |
984 |
<button type="submit" class="btn btn-primary" value="update_manager">Submit</button> |
985 |
</fieldset> |
986 |
</div> <!-- /.col-sm-2 --> |
987 |
[% END %] |
907 |
|
988 |
|
908 |
<label for="choosereason[% loop.index | html %]">with this reason:</label> |
989 |
[% IF CAN_user_suggestions_suggestions_delete %] |
909 |
<select name="reason" id="choosereason[% loop.index | html %]"> |
990 |
<div class="col-sm-2"> |
910 |
<option value=""> -- Choose a reason -- </option> |
991 |
<fieldset class="brief"> |
911 |
[% FOREACH reasonsloo IN suggestion.reasonsloop %] |
992 |
<span class="label">Delete selected</span> |
912 |
<option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option> |
993 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
913 |
[% END %] |
994 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
914 |
<option value="other">Others...</option> |
995 |
</fieldset> |
915 |
</select> |
|
|
916 |
|
917 |
<span class="other_reason"> |
918 |
<input type="text" size="31" name="other_reason" placeholder="please note your reason here..." /> |
919 |
<a href="#" class="cancel_note">Cancel</a> |
920 |
</span> |
921 |
</div> |
922 |
|
923 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
924 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
925 |
</fieldset> |
926 |
<fieldset class="action"> |
927 |
<button type="submit" class="btn btn-primary" value="update_status">Submit</button> |
928 |
</fieldset> |
929 |
</div> <!-- /.col-sm-4 --> |
930 |
|
931 |
<div class="col-sm-2"> |
932 |
<fieldset class="brief"> |
933 |
<label id="suggestion_itemtype"> |
934 |
Update item types with: |
935 |
</label> |
936 |
[% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %] |
937 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
938 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
939 |
</fieldset> |
940 |
<fieldset class="action"> |
941 |
<button type="submit" class="btn btn-primary" value="update_itemtype">Submit</button> |
942 |
</fieldset> |
943 |
</div> <!-- /.col-sm-4 --> |
944 |
|
945 |
<div class="col-sm-2"> |
946 |
<fieldset class="brief"> |
947 |
<span class="label">Update manager</span> |
948 |
<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> |
949 |
<span id="managedby_name[% loop.count | html %]"></span> |
950 |
<input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" /> |
951 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
952 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
953 |
</fieldset> |
954 |
<fieldset class="action"> |
955 |
<button type="submit" class="btn btn-primary" value="update_manager">Submit</button> |
956 |
</fieldset> |
957 |
</div> <!-- /.col-sm-2 --> |
958 |
|
959 |
<div class="col-sm-2"> |
960 |
<fieldset class="brief"> |
961 |
<span class="label">Delete selected</span> |
962 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
963 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
964 |
</fieldset> |
965 |
<fieldset class="action"> |
966 |
<button type="submit" class="btn btn-primary" value="delete">Delete</button> |
967 |
</fieldset> |
968 |
</div> <!-- /.col-sm-2 --> |
969 |
<div class="col-sm-2"> |
970 |
<fieldset class="brief"> |
971 |
<span class="label">Archive selected</span> |
972 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
973 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
974 |
<fieldset class="action"> |
996 |
<fieldset class="action"> |
975 |
<button type="submit" class="btn btn-primary" value="archive">Archive</button> |
997 |
<button type="submit" class="btn btn-primary" value="delete">Delete</button> |
976 |
</fieldset> |
998 |
</fieldset> |
977 |
</fieldset> |
999 |
</div> <!-- /.col-sm-2 --> |
978 |
</div> <!-- /.col-sm-2 --> |
1000 |
[% END %] |
|
|
1001 |
[% IF CAN_user_suggestions_suggestions_manage %] |
1002 |
<div class="col-sm-2"> |
1003 |
<fieldset class="brief"> |
1004 |
<span class="label">Archive selected</span> |
1005 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
1006 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
1007 |
<fieldset class="action"> |
1008 |
<button type="submit" class="btn btn-primary" value="archive">Archive</button> |
1009 |
</fieldset> |
1010 |
</fieldset> |
1011 |
</div> <!-- /.col-sm-2 --> |
1012 |
[% END %] |
979 |
</div> <!-- /.row --> |
1013 |
</div> <!-- /.row --> |
980 |
|
1014 |
|
981 |
[% ELSE %] |
1015 |
[% ELSE %] |