|
Lines 75-103
Link Here
|
| 75 |
</li> |
75 |
</li> |
| 76 |
<li> |
76 |
<li> |
| 77 |
<label for="description" class="required">Description: </label> |
77 |
<label for="description" class="required">Description: </label> |
| 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> |
78 |
[% IF credit_type && credit_type.is_system %] |
|
|
79 |
<span>[% credit_type.description | html %]</span> |
| 80 |
[% ELSE %] |
| 81 |
<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> |
| 82 |
[% END %] |
| 79 |
</li> |
83 |
</li> |
| 80 |
<li> |
84 |
<li> |
| 81 |
<label for="can_be_added_manually">Can be manually added ? </label> |
85 |
<label for="can_be_added_manually">Can be manually added ? </label> |
| 82 |
[% IF credit_type.can_be_added_manually %] |
86 |
[% IF credit_type && credit_type.is_system %] |
|
|
87 |
[% IF credit_type.can_be_added_manually %]Yes[% ELSE %]No[% END %] |
| 88 |
[% ELSIF credit_type.can_be_added_manually %] |
| 83 |
<input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" checked="checked" value="1" /> |
89 |
<input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" checked="checked" value="1" /> |
| 84 |
[% ELSE %] |
90 |
[% ELSE %] |
| 85 |
<input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" value="1" /> |
91 |
<input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" value="1" /> |
| 86 |
[% END %] |
92 |
[% END %] |
| 87 |
</li> |
93 |
</li> |
|
|
94 |
<li> |
| 95 |
<label for="credit_number_enabled">Enable credit number</label> |
| 96 |
[% IF credit_type.credit_number_enabled %] |
| 97 |
<input type="checkbox" name="credit_number_enabled" id="credit_number_enabled" checked="checked" value="1" /> |
| 98 |
[% ELSE %] |
| 99 |
<input type="checkbox" name="credit_number_enabled" id="credit_number_enabled" value="1" /> |
| 100 |
[% END %] |
| 101 |
<span>Enable automatic generation of credit number (see <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoCreditNumber">AutoCreditNumber</a>)</span> |
| 102 |
</li> |
| 88 |
<li> |
103 |
<li> |
| 89 |
<label for="branches">Libraries limitation: </label> |
104 |
<label for="branches">Libraries limitation: </label> |
| 90 |
<select id="branches" name="branches" multiple size="10"> |
105 |
[% IF credit_type && credit_type.is_system %] |
| 91 |
<option value="">All libraries</option> |
106 |
No library limitation |
| 92 |
[% FOREACH branch IN branches_loop %] |
107 |
[% ELSE %] |
| 93 |
[% IF ( branch.selected ) %] |
108 |
<select id="branches" name="branches" multiple size="10"> |
| 94 |
<option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
109 |
<option value="">All libraries</option> |
| 95 |
[% ELSE %] |
110 |
[% FOREACH branch IN branches_loop %] |
| 96 |
<option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
111 |
[% IF ( branch.selected ) %] |
| 97 |
[% END %] |
112 |
<option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
| 98 |
[% END %] |
113 |
[% ELSE %] |
| 99 |
</select> |
114 |
<option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
| 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> |
115 |
[% END %] |
|
|
116 |
[% END %] |
| 117 |
</select> |
| 118 |
<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> |
| 119 |
[% END %] |
| 101 |
</li> |
120 |
</li> |
| 102 |
</ol> |
121 |
</ol> |
| 103 |
</fieldset> |
122 |
</fieldset> |
|
Lines 123-128
Link Here
|
| 123 |
<th>Code</th> |
142 |
<th>Code</th> |
| 124 |
<th>Description</th> |
143 |
<th>Description</th> |
| 125 |
<th>Available for</th> |
144 |
<th>Available for</th> |
|
|
145 |
<th>Credit number enabled</th> |
| 126 |
<th>Library limitations</th> |
146 |
<th>Library limitations</th> |
| 127 |
<th>Actions</th> |
147 |
<th>Actions</th> |
| 128 |
</thead> |
148 |
</thead> |
|
Lines 134-139
Link Here
|
| 134 |
<td>[% credit_type.code | html %]</td> |
154 |
<td>[% credit_type.code | html %]</td> |
| 135 |
<td>[% credit_type.description | html %]</td> |
155 |
<td>[% credit_type.description | html %]</td> |
| 136 |
<td>[% IF credit_type.can_be_added_manually %]Manual credit[% END %]</td> |
156 |
<td>[% IF credit_type.can_be_added_manually %]Manual credit[% END %]</td> |
|
|
157 |
<td>[% IF credit_type.credit_number_enabled %]Yes[% ELSE %]No[% END %]</td> |
| 137 |
<td> |
158 |
<td> |
| 138 |
[% IF credit_type.library_limits.count > 0 %] |
159 |
[% IF credit_type.library_limits.count > 0 %] |
| 139 |
[% library_limits_str = "" %] |
160 |
[% library_limits_str = "" %] |
|
Lines 152-162
Link Here
|
| 152 |
[% END %] |
173 |
[% END %] |
| 153 |
</td> |
174 |
</td> |
| 154 |
<td class="actions"> |
175 |
<td class="actions"> |
|
|
176 |
[% IF !credit_type.archived %] |
| 177 |
<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> |
| 178 |
[% END %] |
| 155 |
[% IF !credit_type.is_system && !credit_type.archived %] |
179 |
[% IF !credit_type.is_system && !credit_type.archived %] |
| 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> |
180 |
<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> |
| 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> |
181 |
[% END %] |
| 158 |
[% ELSIF credit_type.archived %] |
182 |
|
| 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> |
183 |
[% IF !credit_type.is_system && credit_type.archived %] |
|
|
184 |
<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> |
| 160 |
[% END %] |
185 |
[% END %] |
| 161 |
</td> |
186 |
</td> |
| 162 |
</tr> |
187 |
</tr> |