Lines 114-121
Link Here
|
114 |
<div class="col-md-8 col-md-offset-2"> |
114 |
<div class="col-md-8 col-md-offset-2"> |
115 |
|
115 |
|
116 |
<div id="toolbar" class="btn-toolbar"> |
116 |
<div id="toolbar" class="btn-toolbar"> |
117 |
<a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a> |
117 |
[% IF CAN_user_suggestions_suggestions_manage %] |
118 |
<a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a> |
118 |
<a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a> |
|
|
119 |
[% END %] |
120 |
[% IF CAN_user_suggestions_suggestions_delete %] |
121 |
<a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a> |
122 |
[% END %] |
119 |
</div> |
123 |
</div> |
120 |
|
124 |
|
121 |
<fieldset class="rows"> |
125 |
<fieldset class="rows"> |
Lines 348-353
Link Here
|
348 |
<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> |
352 |
<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> |
349 |
[% CASE 'manager_not_enough_permissions' %] |
353 |
[% CASE 'manager_not_enough_permissions' %] |
350 |
<span>The manager you selected does not have sufficient permissions.</span> |
354 |
<span>The manager you selected does not have sufficient permissions.</span> |
|
|
355 |
[% CASE 'no_manage_permission' %] |
356 |
<span>You do not have permissions to manage suggestions</span> |
357 |
[% CASE 'no_create_permission' %] |
358 |
<span>You do not have permissions to create suggestions</span> |
359 |
[% CASE 'no_delete_permission' %] |
360 |
<span>You do not have permissions to delete suggestions</span> |
351 |
[% CASE %] |
361 |
[% CASE %] |
352 |
<span>[% m.code | html %]</span> |
362 |
<span>[% m.code | html %]</span> |
353 |
[% END %] |
363 |
[% END %] |
Lines 567-573
Link Here
|
567 |
<label for="managedby_name">by:</label> |
577 |
<label for="managedby_name">by:</label> |
568 |
<div> |
578 |
<div> |
569 |
<span id="managedby_name" name="managedby_name"> |
579 |
<span id="managedby_name" name="managedby_name"> |
570 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a> |
580 |
[% IF CAN_user_suggestions_suggestions_manage %] |
|
|
581 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a> |
582 |
[% ELSE %] |
583 |
Nobody |
584 |
[% END %] |
571 |
</span> |
585 |
</span> |
572 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
586 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
573 |
| 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 %]) |
587 |
| 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 577-583
Link Here
|
577 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
591 |
[% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %] |
578 |
<a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a> |
592 |
<a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a> |
579 |
[% END %] |
593 |
[% END %] |
580 |
<input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" /> |
594 |
|
|
|
595 |
[% IF CAN_user_suggestions_suggestions_manage %] |
596 |
<input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" /> |
597 |
[% END %] |
581 |
|
598 |
|
582 |
<br/> |
599 |
<br/> |
583 |
<label for="notify">Notify manager:</label> |
600 |
<label for="notify">Notify manager:</label> |
Lines 671-677
Link Here
|
671 |
|
688 |
|
672 |
[% IF op == 'else' %] |
689 |
[% IF op == 'else' %] |
673 |
<div id="toolbar" class="btn-toolbar"> |
690 |
<div id="toolbar" class="btn-toolbar"> |
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> |
691 |
[% IF CAN_user_suggestions_suggestions_create %] |
|
|
692 |
<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> |
693 |
[% END %] |
675 |
</div> |
694 |
</div> |
676 |
|
695 |
|
677 |
<h1>Suggestions management</h1> |
696 |
<h1>Suggestions management</h1> |
Lines 859-871
Link Here
|
859 |
</td> |
878 |
</td> |
860 |
<td class="actions"> |
879 |
<td class="actions"> |
861 |
<div class="btn-group dropup"> |
880 |
<div class="btn-group dropup"> |
862 |
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&op=edit"><i class="fa fa-pencil"></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> |
881 |
[% IF CAN_user_suggestions_suggestions_manage %] |
|
|
882 |
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&op=edit"><i class="fa fa-pencil"></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> |
883 |
[% ELSIF CAN_user_suggestions_suggestions_delete %] |
884 |
<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> |
885 |
[% END %] |
863 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]"> |
886 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]"> |
864 |
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li> |
887 |
[% IF CAN_user_suggestions_suggestions_delete %] |
865 |
[% UNLESS s.archived %] |
888 |
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li> |
866 |
<li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li> |
889 |
[% END %] |
867 |
[% ELSE %] |
890 |
[% IF CAN_user_suggestions_suggestions_manage %] |
868 |
<li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li> |
891 |
[% UNLESS s.archived %] |
|
|
892 |
<li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li> |
893 |
[% ELSE %] |
894 |
<li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li> |
895 |
[% END %] |
869 |
[% END %] |
896 |
[% END %] |
870 |
</ul> |
897 |
</ul> |
871 |
</div> |
898 |
</div> |
Lines 881-999
Link Here
|
881 |
</div> |
908 |
</div> |
882 |
</div> |
909 |
</div> |
883 |
<div id="suggestions_batch_ops" class="row"> |
910 |
<div id="suggestions_batch_ops" class="row"> |
884 |
<div class="col-sm-4"> |
911 |
[% IF CAN_user_suggestions_suggestions_manage %] |
885 |
<fieldset class="brief"> |
912 |
<div class="col-sm-4"> |
886 |
<div id="select-reason[% loop.index | html %]"> |
913 |
<fieldset class="brief"> |
887 |
<label for="STATUSreason[% loop.index | html %]">Mark selected as: </label> |
914 |
<div id="select-reason[% loop.index | html %]"> |
888 |
<select name="STATUS" id="STATUSreason[% loop.index | html %]"> |
915 |
<label for="STATUSreason[% loop.index | html %]">Mark selected as: </label> |
889 |
<option value=""> -- Choose a status --</option> |
916 |
<select name="STATUS" id="STATUSreason[% loop.index | html %]"> |
890 |
|
917 |
<option value=""> -- Choose a status --</option> |
891 |
[% IF (statusselected_ASKED ) %] |
918 |
|
892 |
<option value="ASKED" selected="selected">Pending</option> |
919 |
[% IF (statusselected_ASKED ) %] |
893 |
[% ELSE %] |
920 |
<option value="ASKED" selected="selected">Pending</option> |
894 |
<option value="ASKED">Pending</option> |
921 |
[% ELSE %] |
895 |
[% END %] |
922 |
<option value="ASKED">Pending</option> |
896 |
|
923 |
[% END %] |
897 |
[% IF (statusselected_ACCEPTED ) %] |
924 |
|
898 |
<option value="ACCEPTED" selected="selected">Accepted</option> |
925 |
[% IF (statusselected_ACCEPTED ) %] |
899 |
[% ELSE %] |
926 |
<option value="ACCEPTED" selected="selected">Accepted</option> |
900 |
<option value="ACCEPTED">Accepted</option> |
927 |
[% ELSE %] |
901 |
[% END %] |
928 |
<option value="ACCEPTED">Accepted</option> |
902 |
|
929 |
[% END %] |
903 |
[% IF (statusselected_CHECKED ) %] |
930 |
|
904 |
<option value="CHECKED" selected="selected">Checked</option> |
931 |
[% IF (statusselected_CHECKED ) %] |
905 |
[% ELSE %] |
932 |
<option value="CHECKED" selected="selected">Checked</option> |
906 |
<option value="CHECKED">Checked</option> |
933 |
[% ELSE %] |
907 |
[% END %] |
934 |
<option value="CHECKED">Checked</option> |
908 |
|
935 |
[% END %] |
909 |
[% IF ( statusselected_REJECTED ) %] |
936 |
|
910 |
<option value="REJECTED" selected="selected">Rejected</option> |
937 |
[% IF ( statusselected_REJECTED ) %] |
911 |
[% ELSE %] |
938 |
<option value="REJECTED" selected="selected">Rejected</option> |
912 |
<option value="REJECTED">Rejected</option> |
939 |
[% ELSE %] |
913 |
[% END %] |
940 |
<option value="REJECTED">Rejected</option> |
914 |
|
941 |
[% END %] |
915 |
[% IF ( statusselected_ORDERED ) %] |
942 |
|
916 |
<option value="ORDERED" selected="selected">Ordered</option> |
943 |
[% IF ( statusselected_ORDERED ) %] |
917 |
[% ELSE %] |
944 |
<option value="ORDERED" selected="selected">Ordered</option> |
918 |
<option value="ORDERED">Ordered</option> |
945 |
[% ELSE %] |
919 |
[% END %] |
946 |
<option value="ORDERED">Ordered</option> |
920 |
|
947 |
[% END %] |
921 |
[% FOREACH s IN SuggestionStatuses %] |
948 |
|
922 |
<option value="[% s.authorised_value | html %]">[% s.lib | html %]</option> |
949 |
[% FOREACH s IN SuggestionStatuses %] |
923 |
[% END %] |
950 |
<option value="[% s.authorised_value | html %]">[% s.lib | html %]</option> |
924 |
</select> |
951 |
[% END %] |
|
|
952 |
</select> |
953 |
|
954 |
<label for="choosereason[% loop.index | html %]">with this reason:</label> |
955 |
<select name="reason" id="choosereason[% loop.index | html %]"> |
956 |
<option value=""> -- Choose a reason -- </option> |
957 |
[% FOREACH reasonsloo IN suggestion.reasonsloop %] |
958 |
<option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option> |
959 |
[% END %] |
960 |
<option value="other">Others...</option> |
961 |
</select> |
962 |
|
963 |
<span class="other_reason"> |
964 |
<input type="text" size="31" name="other_reason" placeholder="please note your reason here..." /> |
965 |
<a href="#" class="cancel_note">Cancel</a> |
966 |
</span> |
967 |
</div> |
968 |
|
969 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
970 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
971 |
</fieldset> |
972 |
<fieldset class="action"> |
973 |
<button type="submit" class="btn btn-primary" value="update_status">Submit</button> |
974 |
</fieldset> |
975 |
</div> <!-- /.col-sm-4 --> |
976 |
|
977 |
<div class="col-sm-2"> |
978 |
<fieldset class="brief"> |
979 |
<label id="suggestion_itemtype"> |
980 |
Update item types with: |
981 |
</label> |
982 |
[% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %] |
983 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
984 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
985 |
</fieldset> |
986 |
<fieldset class="action"> |
987 |
<button type="submit" class="btn btn-primary" value="update_itemtype">Submit</button> |
988 |
</fieldset> |
989 |
</div> <!-- /.col-sm-4 --> |
990 |
|
991 |
<div class="col-sm-2"> |
992 |
<fieldset class="brief"> |
993 |
<span class="label">Update manager</span> |
994 |
<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> |
995 |
<span id="managedby_name[% loop.count | html %]"></span> |
996 |
<input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" /> |
997 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
998 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
999 |
</fieldset> |
1000 |
<fieldset class="action"> |
1001 |
<button type="submit" class="btn btn-primary" value="update_manager">Submit</button> |
1002 |
</fieldset> |
1003 |
</div> <!-- /.col-sm-2 --> |
1004 |
[% END %] |
925 |
|
1005 |
|
926 |
<label for="choosereason[% loop.index | html %]">with this reason:</label> |
1006 |
[% IF CAN_user_suggestions_suggestions_delete %] |
927 |
<select name="reason" id="choosereason[% loop.index | html %]"> |
1007 |
<div class="col-sm-2"> |
928 |
<option value=""> -- Choose a reason -- </option> |
1008 |
<fieldset class="brief"> |
929 |
[% FOREACH reasonsloo IN suggestion.reasonsloop %] |
1009 |
<span class="label">Delete selected</span> |
930 |
<option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option> |
1010 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
931 |
[% END %] |
1011 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
932 |
<option value="other">Others...</option> |
1012 |
</fieldset> |
933 |
</select> |
|
|
934 |
|
935 |
<span class="other_reason"> |
936 |
<input type="text" size="31" name="other_reason" placeholder="please note your reason here..." /> |
937 |
<a href="#" class="cancel_note">Cancel</a> |
938 |
</span> |
939 |
</div> |
940 |
|
941 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
942 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
943 |
</fieldset> |
944 |
<fieldset class="action"> |
945 |
<button type="submit" class="btn btn-primary" value="update_status">Submit</button> |
946 |
</fieldset> |
947 |
</div> <!-- /.col-sm-4 --> |
948 |
|
949 |
<div class="col-sm-2"> |
950 |
<fieldset class="brief"> |
951 |
<label id="suggestion_itemtype"> |
952 |
Update item types with: |
953 |
</label> |
954 |
[% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %] |
955 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
956 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
957 |
</fieldset> |
958 |
<fieldset class="action"> |
959 |
<button type="submit" class="btn btn-primary" value="update_itemtype">Submit</button> |
960 |
</fieldset> |
961 |
</div> <!-- /.col-sm-4 --> |
962 |
|
963 |
<div class="col-sm-2"> |
964 |
<fieldset class="brief"> |
965 |
<span class="label">Update manager</span> |
966 |
<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> |
967 |
<span id="managedby_name[% loop.count | html %]"></span> |
968 |
<input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" /> |
969 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
970 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
971 |
</fieldset> |
972 |
<fieldset class="action"> |
973 |
<button type="submit" class="btn btn-primary" value="update_manager">Submit</button> |
974 |
</fieldset> |
975 |
</div> <!-- /.col-sm-2 --> |
976 |
|
977 |
<div class="col-sm-2"> |
978 |
<fieldset class="brief"> |
979 |
<span class="label">Delete selected</span> |
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="delete">Delete</button> |
985 |
</fieldset> |
986 |
</div> <!-- /.col-sm-2 --> |
987 |
<div class="col-sm-2"> |
988 |
<fieldset class="brief"> |
989 |
<span class="label">Archive selected</span> |
990 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
991 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
992 |
<fieldset class="action"> |
1013 |
<fieldset class="action"> |
993 |
<button type="submit" class="btn btn-primary" value="archive">Archive</button> |
1014 |
<button type="submit" class="btn btn-primary" value="delete">Delete</button> |
|
|
1015 |
</fieldset> |
1016 |
</div> <!-- /.col-sm-2 --> |
1017 |
[% END %] |
1018 |
[% IF CAN_user_suggestions_suggestions_manage %] |
1019 |
<div class="col-sm-2"> |
1020 |
<fieldset class="brief"> |
1021 |
<span class="label">Archive selected</span> |
1022 |
<input type="hidden" name="branchcode" value="[% branchfilter | html %]" /> |
1023 |
<input type="hidden" name="filter_archived" value="[% filter_archived | html %]" /> |
1024 |
<fieldset class="action"> |
1025 |
<button type="submit" class="btn btn-primary" value="archive">Archive</button> |
1026 |
</fieldset> |
994 |
</fieldset> |
1027 |
</fieldset> |
995 |
</fieldset> |
1028 |
</div> <!-- /.col-sm-2 --> |
996 |
</div> <!-- /.col-sm-2 --> |
1029 |
[% END %] |
997 |
</div> <!-- /.row --> |
1030 |
</div> <!-- /.row --> |
998 |
|
1031 |
|
999 |
[% ELSE %] |
1032 |
[% ELSE %] |