|
Lines 1-19
Link Here
|
| 1 |
[% USE raw %] |
1 |
[% USE raw %] |
| 2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
| 3 |
[% USE Branches %] |
3 |
[% USE Branches %] |
| 4 |
[% PROCESS i18n.inc %] |
|
|
| 5 |
[% SET footerjs = 1 %] |
4 |
[% SET footerjs = 1 %] |
| 6 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
| 7 |
<title>Koha › Administration › |
6 |
<title>Koha › Administration › |
| 8 |
[% IF op =='add_form' %] |
7 |
[% IF op =='add_form' %] |
| 9 |
[% t('Credit types') %] › |
8 |
Credit types › |
| 10 |
[% IF credit_type.code %] |
9 |
[% IF credit_type.code %] |
| 11 |
[% t('Modify credit type') %] |
10 |
Modify credit type |
| 12 |
[% ELSE %] |
11 |
[% ELSE %] |
| 13 |
[% t('New credit type') %] |
12 |
New credit type |
| 14 |
[% END %] |
13 |
[% END %] |
| 15 |
[% ELSE %] |
14 |
[% ELSE %] |
| 16 |
[% t('Credit types') %] |
15 |
Credit types |
| 17 |
[% END %] |
16 |
[% END %] |
| 18 |
</title> |
17 |
</title> |
| 19 |
[% INCLUDE 'doc-head-close.inc' %] |
18 |
[% INCLUDE 'doc-head-close.inc' %] |
|
Lines 24-34
Link Here
|
| 24 |
[% INCLUDE 'prefs-admin-search.inc' %] |
23 |
[% INCLUDE 'prefs-admin-search.inc' %] |
| 25 |
|
24 |
|
| 26 |
<div id="breadcrumbs"> |
25 |
<div id="breadcrumbs"> |
| 27 |
<a href="/cgi-bin/koha/mainpage.pl">[% t('Home') %]</a> |
26 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
| 28 |
› <a href="/cgi-bin/koha/admin/admin-home.pl">[% t('Administration') %]</a> |
27 |
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> |
| 29 |
› <a href="/cgi-bin/koha/admin/credit_types.pl">[% t('Credit types') %]</a> |
28 |
› <a href="/cgi-bin/koha/admin/credit_types.pl">Credit types</a> |
| 30 |
[% IF op == 'add_form' %] |
29 |
[% IF op == 'add_form' %] |
| 31 |
› [% IF credit_type.code %][% t('Modify credit type') %][% ELSE %][% t('New credit type') %][% END %] |
30 |
› [% IF credit_type.code %]Modify credit type[% ELSE %]New credit type[% END %] |
| 32 |
[% END %] |
31 |
[% END %] |
| 33 |
</div> |
32 |
</div> |
| 34 |
|
33 |
|
|
Lines 41-53
Link Here
|
| 41 |
<div class="dialog [% m.type | html %]"> |
40 |
<div class="dialog [% m.type | html %]"> |
| 42 |
[% SWITCH m.code %] |
41 |
[% SWITCH m.code %] |
| 43 |
[% CASE 'success_on_saving' %] |
42 |
[% CASE 'success_on_saving' %] |
| 44 |
[% t('Credit type saved successfully.') %] |
43 |
Credit type saved successfully. |
| 45 |
[% CASE 'error_on_saving' %] |
44 |
[% CASE 'error_on_saving' %] |
| 46 |
[% t('An error occurred when saving this credit type.') %] |
45 |
An error occurred when saving this credit type. |
| 47 |
[% CASE 'success_on_archive' %] |
46 |
[% CASE 'success_on_archive' %] |
| 48 |
[% t('Credit type archived successfully.') %] |
47 |
Credit type archived successfully. |
| 49 |
[% CASE 'success_on_restore' %] |
48 |
[% CASE 'success_on_restore' %] |
| 50 |
[% t('Credit type restored successfully.') %] |
49 |
Credit type restored successfully. |
| 51 |
[% CASE %] |
50 |
[% CASE %] |
| 52 |
[% m.code | html %] |
51 |
[% m.code | html %] |
| 53 |
[% END %] |
52 |
[% END %] |
|
Lines 56-64
Link Here
|
| 56 |
|
55 |
|
| 57 |
[% IF op == 'add_form' %] |
56 |
[% IF op == 'add_form' %] |
| 58 |
[% IF credit_type %] |
57 |
[% IF credit_type %] |
| 59 |
<h3>[% t('Modify a credit type') %]</h3> |
58 |
<h3>Modify a credit type</h3> |
| 60 |
[% ELSE %] |
59 |
[% ELSE %] |
| 61 |
<h3>[% t('New credit type') %]</h3> |
60 |
<h3>New credit type</h3> |
| 62 |
[% END %] |
61 |
[% END %] |
| 63 |
|
62 |
|
| 64 |
<form action="/cgi-bin/koha/admin/credit_types.pl" name="Aform" method="post" class="validated"> |
63 |
<form action="/cgi-bin/koha/admin/credit_types.pl" name="Aform" method="post" class="validated"> |
|
Lines 66-85
Link Here
|
| 66 |
<fieldset class="rows"> |
65 |
<fieldset class="rows"> |
| 67 |
<ol> |
66 |
<ol> |
| 68 |
<li> |
67 |
<li> |
| 69 |
<label for="code" class="required">[% t('Credit type code:') %] </label> |
68 |
<label for="code" class="required">Credit type code: </label> |
| 70 |
[% IF credit_type %] |
69 |
[% IF credit_type %] |
| 71 |
<strong>[% credit_type.code | html %]</strong> |
70 |
<strong>[% credit_type.code | html %]</strong> |
| 72 |
<input type="hidden" name="code" value="[% code | html %]" /> |
71 |
<input type="hidden" name="code" value="[% code | html %]" /> |
| 73 |
[% ELSE %] |
72 |
[% ELSE %] |
| 74 |
<input type="text" name="code" id="code" size="80" maxlength="64" class="required" required="required"><span class="required">[% t('Required. Maximum length is 64 letters') %]</span> |
73 |
<input type="text" name="code" id="code" size="80" maxlength="64" class="required" required="required"><span class="required">Required. Maximum length is 64 letters</span> |
| 75 |
[% END %] |
74 |
[% END %] |
| 76 |
</li> |
75 |
</li> |
| 77 |
<li> |
76 |
<li> |
| 78 |
<label for="description" class="required">[% t('Description:') %] </label> |
77 |
<label for="description" class="required">Description: </label> |
| 79 |
<input type="text" name="description" id="description" required="required" class="required" size="80" maxlength="100" value="[% credit_type.description | html %]" /> <span class="required">[% t('Required') %]</span> |
78 |
<input type="text" name="description" id="description" required="required" class="required" size="80" maxlength="100" value="[% credit_type.description | html %]" /> <span class="required">Required</span> |
| 80 |
</li> |
79 |
</li> |
| 81 |
<li> |
80 |
<li> |
| 82 |
<label for="can_be_added_manually">[% t('Can be manually added ?') %] </label> |
81 |
<label for="can_be_added_manually">Can be manually added ? </label> |
| 83 |
[% IF credit_type.can_be_added_manually %] |
82 |
[% IF credit_type.can_be_added_manually %] |
| 84 |
<input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" checked="checked" value="1" /> |
83 |
<input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" checked="checked" value="1" /> |
| 85 |
[% ELSE %] |
84 |
[% ELSE %] |
|
Lines 87-95
Link Here
|
| 87 |
[% END %] |
86 |
[% END %] |
| 88 |
</li> |
87 |
</li> |
| 89 |
<li> |
88 |
<li> |
| 90 |
<label for="branches">[% t('Libraries limitation:') %] </label> |
89 |
<label for="branches">Libraries limitation: </label> |
| 91 |
<select id="branches" name="branches" multiple size="10"> |
90 |
<select id="branches" name="branches" multiple size="10"> |
| 92 |
<option value="">[% t('All libraries') %]</option> |
91 |
<option value="">All libraries</option> |
| 93 |
[% FOREACH branch IN branches_loop %] |
92 |
[% FOREACH branch IN branches_loop %] |
| 94 |
[% IF ( branch.selected ) %] |
93 |
[% IF ( branch.selected ) %] |
| 95 |
<option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
94 |
<option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
|
Lines 98-131
Link Here
|
| 98 |
[% END %] |
97 |
[% END %] |
| 99 |
[% END %] |
98 |
[% END %] |
| 100 |
</select> |
99 |
</select> |
| 101 |
<span>[% t("Select 'All libraries' if this credit type should be available at all libraries. Otherwise select libraries you want to associate credit type with.") %]</span> |
100 |
<span>Select 'All libraries' if this credit type should be available at all libraries. Otherwise select libraries you want to associate credit type with.</span> |
| 102 |
</li> |
101 |
</li> |
| 103 |
</ol> |
102 |
</ol> |
| 104 |
</fieldset> |
103 |
</fieldset> |
| 105 |
|
104 |
|
| 106 |
<fieldset class="action"> |
105 |
<fieldset class="action"> |
| 107 |
<button id="save_credit_type" class="btn btn-default"><i class="fa fa-save"></i> [% t('Save') %]</button> |
106 |
<button id="save_credit_type" class="btn btn-default"><i class="fa fa-save"></i> Save</button> |
| 108 |
<a class="cancel btn-link" href="/cgi-bin/koha/admin/credit_types.pl"><i class="fa fa-times"></i> [% t('Cancel') %]</a> |
107 |
<a class="cancel btn-link" href="/cgi-bin/koha/admin/credit_types.pl"><i class="fa fa-times"></i> Cancel</a> |
| 109 |
</fieldset> |
108 |
</fieldset> |
| 110 |
</form> |
109 |
</form> |
| 111 |
[% END %] |
110 |
[% END %] |
| 112 |
|
111 |
|
| 113 |
[% IF op == 'list' %] |
112 |
[% IF op == 'list' %] |
| 114 |
<div id="toolbar" class="btn-toolbar"> |
113 |
<div id="toolbar" class="btn-toolbar"> |
| 115 |
<a class="btn btn-default" id="newcredittype" href="/cgi-bin/koha/admin/credit_types.pl?op=add_form"><i class="fa fa-plus"></i> [% t('New credit type') %]</a> |
114 |
<a class="btn btn-default" id="newcredittype" href="/cgi-bin/koha/admin/credit_types.pl?op=add_form"><i class="fa fa-plus"></i> New credit type</a> |
| 116 |
</div> |
115 |
</div> |
| 117 |
|
116 |
|
| 118 |
<h3>[% t('Account credit types') %]</h3> |
117 |
<h3>Account credit types</h3> |
| 119 |
[% IF credit_types.count %] |
118 |
[% IF credit_types.count %] |
| 120 |
<table id="table_credit_types"> |
119 |
<table id="table_credit_types"> |
| 121 |
<thead> |
120 |
<thead> |
| 122 |
<th>[% t('Archived') %]</th> |
121 |
<th>Archived</th> |
| 123 |
<th>[% t('System') %]</th> |
122 |
<th>System</th> |
| 124 |
<th>[% t('Code') %]</th> |
123 |
<th>Code</th> |
| 125 |
<th>[% t('Description') %]</th> |
124 |
<th>Description</th> |
| 126 |
<th>[% t('Available for') %]</th> |
125 |
<th>Available for</th> |
| 127 |
<th>[% t('Library limitations') %]</th> |
126 |
<th>Library limitations</th> |
| 128 |
<th>[% t('Actions') %]</th> |
127 |
<th>Actions</th> |
| 129 |
</thead> |
128 |
</thead> |
| 130 |
<tbody> |
129 |
<tbody> |
| 131 |
[% FOREACH credit_type IN credit_types %] |
130 |
[% FOREACH credit_type IN credit_types %] |
|
Lines 134-140
Link Here
|
| 134 |
<td>[% credit_type.is_system | html %]</td> |
133 |
<td>[% credit_type.is_system | html %]</td> |
| 135 |
<td>[% credit_type.code | html %]</td> |
134 |
<td>[% credit_type.code | html %]</td> |
| 136 |
<td>[% credit_type.description | html %]</td> |
135 |
<td>[% credit_type.description | html %]</td> |
| 137 |
<td>[% IF credit_type.can_be_added_manually %][% t('Manual credit') %][% END %]</td> |
136 |
<td>[% IF credit_type.can_be_added_manually %]Manual credit[% END %]</td> |
| 138 |
<td> |
137 |
<td> |
| 139 |
[% IF credit_type.library_limits.count > 0 %] |
138 |
[% IF credit_type.library_limits.count > 0 %] |
| 140 |
[% library_limits_str = "" %] |
139 |
[% library_limits_str = "" %] |
|
Lines 149-163
Link Here
|
| 149 |
[% limits_count = credit_type.library_limits.count %] |
148 |
[% limits_count = credit_type.library_limits.count %] |
| 150 |
[% tnx('{count} library limitation', '{count} library limitations', limits_count, { count => limits_count }) %] |
149 |
[% tnx('{count} library limitation', '{count} library limitations', limits_count, { count => limits_count }) %] |
| 151 |
[% ELSE %] |
150 |
[% ELSE %] |
| 152 |
[% t('No limitation') %] |
151 |
No limitation |
| 153 |
[% END %] |
152 |
[% END %] |
| 154 |
</td> |
153 |
</td> |
| 155 |
<td class="actions"> |
154 |
<td class="actions"> |
| 156 |
[% IF !credit_type.is_system && !credit_type.archived %] |
155 |
[% IF !credit_type.is_system && !credit_type.archived %] |
| 157 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=[% credit_type.code | uri %]&type=credit"><i class="fa fa-pencil"></i> [% t('Edit') %]</a> |
156 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=[% credit_type.code | uri %]&type=credit"><i class="fa fa-pencil"></i> Edit</a> |
| 158 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=archive&code=[% credit_type.code | uri %]"><i class="fa fa-archive"></i> [% t('Archive') %]</a> |
157 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=archive&code=[% credit_type.code | uri %]"><i class="fa fa-archive"></i> Archive</a> |
| 159 |
[% ELSIF credit_type.archived %] |
158 |
[% ELSIF credit_type.archived %] |
| 160 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=unarchive&code=[% credit_type.code | uri %]"><i class="fa fa-undo"></i> [% t('Restore') %]</a> |
159 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=unarchive&code=[% credit_type.code | uri %]"><i class="fa fa-undo"></i> Restore</a> |
| 161 |
[% END %] |
160 |
[% END %] |
| 162 |
</td> |
161 |
</td> |
| 163 |
</tr> |
162 |
</tr> |
|
Lines 166-173
Link Here
|
| 166 |
</table> |
165 |
</table> |
| 167 |
[% ELSE %] |
166 |
[% ELSE %] |
| 168 |
<div class="dialog message"> |
167 |
<div class="dialog message"> |
| 169 |
[% t('There are no account credit types defined.') %] |
168 |
There are no account credit types defined. |
| 170 |
<a href="/cgi-bin/koha/admin/credit_types.pl?op=add_form">[% t('Create new credit type') %]</a> |
169 |
<a href="/cgi-bin/koha/admin/credit_types.pl?op=add_form">Create new credit type</a> |
| 171 |
</div> |
170 |
</div> |
| 172 |
[% END %] |
171 |
[% END %] |
| 173 |
[% END %] |
172 |
[% END %] |
| 174 |
- |
|
|