Lines 87-209
Link Here
|
87 |
|
87 |
|
88 |
<h1>MARC modification templates [% template_id | html %]</h1> |
88 |
<h1>MARC modification templates [% template_id | html %]</h1> |
89 |
|
89 |
|
90 |
<table id="templatest"> |
90 |
<div class="page-section"> |
91 |
<thead> |
91 |
<table id="templatest"> |
92 |
<tr> |
|
|
93 |
<th>Id</th> |
94 |
<th>Template</th> |
95 |
<th class="NoSort noExport">Actions</th> |
96 |
</tr> |
97 |
</thead> |
98 |
<tbody> |
99 |
[% FOREACH TemplatesLoo IN TemplatesLoop %] |
100 |
<tr> |
101 |
<td>[% TemplatesLoo.template_id | html %]</td> |
102 |
<td>[% TemplatesLoo.name | html %]</td> |
103 |
<td class="actions"> |
104 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&op=select_template" ><i class="fa fa-fw fa-pencil"></i> Edit actions</a> |
105 |
<a class="btn btn-default btn-xs duplicate_template" href="#" data-toggle="modal" data-template_id="[% TemplatesLoo.template_id | html %]" data-target="#createTemplate"><i class="fa fa-fw fa-copy"></i> Duplicate</a> |
106 |
<a class="btn btn-default btn-xs delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&op=delete_template"><i class="fa fa-fw fa-trash"></i> Delete</a> |
107 |
</td> |
108 |
</tr> |
109 |
[% END %] |
110 |
</tbody> |
111 |
</table> |
112 |
|
113 |
[% ELSE %] |
114 |
|
115 |
<h1>Actions for <em>[% template_name | html %]</em></h1> |
116 |
|
117 |
[% IF ( ActionsLoop ) %] |
118 |
|
119 |
<table id="template_actions" class="template_actions"> |
120 |
<thead> |
92 |
<thead> |
121 |
<tr> |
93 |
<tr> |
122 |
<th>Change order</th> |
94 |
<th>Id</th> |
123 |
<th>Rank</th> |
95 |
<th>Template</th> |
124 |
<th>Action</th> |
96 |
<th class="NoSort noExport">Actions</th> |
125 |
<th>Description</th> |
|
|
126 |
<th> </th> |
127 |
<th> </th> |
128 |
</tr> |
97 |
</tr> |
129 |
</thead> |
98 |
</thead> |
130 |
<tbody> |
99 |
<tbody> |
131 |
[% FOREACH ActionsLoo IN ActionsLoop %] |
100 |
[% FOREACH TemplatesLoo IN TemplatesLoop %] |
132 |
<tr> |
101 |
<tr> |
|
|
102 |
<td>[% TemplatesLoo.template_id | html %]</td> |
103 |
<td>[% TemplatesLoo.name | html %]</td> |
133 |
<td class="actions"> |
104 |
<td class="actions"> |
134 |
<a title="Move action up" href="marc_modification_templates.pl?op=move_action&where=up&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> |
105 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&op=select_template" ><i class="fa fa-fw fa-pencil"></i> Edit actions</a> |
135 |
<i class="fa fa-arrow-up fa-lg order-control"></i> |
106 |
<a class="btn btn-default btn-xs duplicate_template" href="#" data-toggle="modal" data-template_id="[% TemplatesLoo.template_id | html %]" data-target="#createTemplate"><i class="fa fa-fw fa-copy"></i> Duplicate</a> |
136 |
</a> |
107 |
<a class="btn btn-default btn-xs delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&op=delete_template"><i class="fa fa-fw fa-trash"></i> Delete</a> |
137 |
|
108 |
</td> |
138 |
<a title="Move action to top" href="marc_modification_templates.pl?op=move_action&where=top&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> |
109 |
</tr> |
139 |
<i class="fa fa-arrow-up fa-lg overline order-control"></i> |
110 |
[% END %] |
140 |
</a> |
111 |
</tbody> |
|
|
112 |
</table> |
113 |
</div> <!-- /.page-section --> |
141 |
|
114 |
|
142 |
<a title="Move action to bottom" href="marc_modification_templates.pl?op=move_action&where=bottom&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> |
115 |
[% ELSE %] |
143 |
<i class="fa fa-arrow-down fa-lg underline order-control"></i> |
|
|
144 |
</a> |
145 |
|
116 |
|
146 |
<a title="Move action down" href="marc_modification_templates.pl?op=move_action&where=down&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> |
117 |
<h1>Actions for <em>[% template_name | html %]</em></h1> |
147 |
<i class="fa fa-arrow-down fa-lg order-control"></i> |
|
|
148 |
</a> |
149 |
</td> |
150 |
|
118 |
|
151 |
<td>[% ActionsLoo.ordering | html %]</td> |
119 |
[% IF ( ActionsLoop ) %] |
152 |
<td> |
120 |
<div class="page-section"> |
153 |
[% IF ( ActionsLoo.action_delete_field ) %] <span>Delete</span> [% END %] |
121 |
<table id="template_actions" class="template_actions"> |
154 |
[% IF ( ActionsLoo.action_add_field ) %] <span>Add new</span> [% END %] |
122 |
<thead> |
155 |
[% IF ( ActionsLoo.action_update_field ) %] <span>Update existing or add new</span> [% END %] |
123 |
<tr> |
156 |
[% IF ( ActionsLoo.action_move_field ) %] <span>Move</span> [% END %] |
124 |
<th>Change order</th> |
157 |
[% IF ( ActionsLoo.action_copy_field ) %] <span>Copy</span> [% END %] |
125 |
<th>Rank</th> |
158 |
[% IF ( ActionsLoo.action_copy_and_replace_field ) %] <span>Copy and replace</span> [% END %] |
126 |
<th>Action</th> |
159 |
|
127 |
<th>Description</th> |
160 |
[% UNLESS ( ActionsLoo.action_update_field ) %] |
128 |
<th> </th> |
161 |
[% IF ( ActionsLoo.field_number ) %] |
129 |
<th> </th> |
162 |
<span>1st</span> |
130 |
</tr> |
|
|
131 |
</thead> |
132 |
<tbody> |
133 |
[% FOREACH ActionsLoo IN ActionsLoop %] |
134 |
<tr> |
135 |
<td class="actions"> |
136 |
<a title="Move action up" href="marc_modification_templates.pl?op=move_action&where=up&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> |
137 |
<i class="fa fa-arrow-up fa-lg order-control"></i> |
138 |
</a> |
139 |
|
140 |
<a title="Move action to top" href="marc_modification_templates.pl?op=move_action&where=top&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> |
141 |
<i class="fa fa-arrow-up fa-lg overline order-control"></i> |
142 |
</a> |
143 |
|
144 |
<a title="Move action to bottom" href="marc_modification_templates.pl?op=move_action&where=bottom&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> |
145 |
<i class="fa fa-arrow-down fa-lg underline order-control"></i> |
146 |
</a> |
147 |
|
148 |
<a title="Move action down" href="marc_modification_templates.pl?op=move_action&where=down&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> |
149 |
<i class="fa fa-arrow-down fa-lg order-control"></i> |
150 |
</a> |
151 |
</td> |
152 |
|
153 |
<td>[% ActionsLoo.ordering | html %]</td> |
154 |
<td> |
155 |
[% IF ( ActionsLoo.action_delete_field ) %] <span>Delete</span> [% END %] |
156 |
[% IF ( ActionsLoo.action_add_field ) %] <span>Add new</span> [% END %] |
157 |
[% IF ( ActionsLoo.action_update_field ) %] <span>Update existing or add new</span> [% END %] |
158 |
[% IF ( ActionsLoo.action_move_field ) %] <span>Move</span> [% END %] |
159 |
[% IF ( ActionsLoo.action_copy_field ) %] <span>Copy</span> [% END %] |
160 |
[% IF ( ActionsLoo.action_copy_and_replace_field ) %] <span>Copy and replace</span> [% END %] |
161 |
|
162 |
[% UNLESS ( ActionsLoo.action_update_field ) %] |
163 |
[% IF ( ActionsLoo.field_number ) %] |
164 |
<span>1st</span> |
165 |
[% END %] |
163 |
[% END %] |
166 |
[% END %] |
164 |
[% END %] |
|
|
165 |
|
167 |
|
166 |
<span>field</span> |
168 |
<span>field</span> |
167 |
|
169 |
|
168 |
[% ActionsLoo.from_field | html %][% IF ( ActionsLoo.from_subfield.length ) %]$[% ActionsLoo.from_subfield | html %][% END %] |
170 |
[% ActionsLoo.from_field | html %][% IF ( ActionsLoo.from_subfield.length ) %]$[% ActionsLoo.from_subfield | html %][% END %] |
169 |
|
171 |
|
170 |
[% IF ( ActionsLoo.field_value ) %] |
172 |
[% IF ( ActionsLoo.field_value ) %] |
171 |
<span>with value</span> <em>[% ActionsLoo.field_value | html %]</em> |
173 |
<span>with value</span> <em>[% ActionsLoo.field_value | html %]</em> |
172 |
[% END %] |
174 |
[% END %] |
173 |
|
175 |
|
174 |
[% IF ( ActionsLoo.to_field ) %] |
176 |
[% IF ( ActionsLoo.to_field ) %] |
175 |
<span>to</span> [% ActionsLoo.to_field | html %][% IF ( ActionsLoo.to_subfield.length ) %]$[% ActionsLoo.to_subfield | html %][% END %] |
177 |
<span>to</span> [% ActionsLoo.to_field | html %][% IF ( ActionsLoo.to_subfield.length ) %]$[% ActionsLoo.to_subfield | html %][% END %] |
176 |
|
178 |
|
177 |
[% IF ( ActionsLoo.to_regex_search ) %] |
179 |
[% IF ( ActionsLoo.to_regex_search ) %] |
178 |
<span>using RegEx</span> s<strong>/[% ActionsLoo.to_regex_search | html %]/[% ActionsLoo.to_regex_replace | html %]/[% ActionsLoo.to_regex_modifiers | html %]</strong> |
180 |
<span>using RegEx</span> s<strong>/[% ActionsLoo.to_regex_search | html %]/[% ActionsLoo.to_regex_replace | html %]/[% ActionsLoo.to_regex_modifiers | html %]</strong> |
|
|
181 |
[% END %] |
179 |
[% END %] |
182 |
[% END %] |
180 |
[% END %] |
|
|
181 |
|
183 |
|
182 |
[% IF ( ActionsLoo.conditional ) %] |
184 |
[% IF ( ActionsLoo.conditional ) %] |
183 |
[% IF ( ActionsLoo.conditional_if ) %] <span>if</span> [% END %] |
185 |
[% IF ( ActionsLoo.conditional_if ) %] <span>if</span> [% END %] |
184 |
[% IF ( ActionsLoo.conditional_unless ) %] <span>unless</span> [% END %] |
186 |
[% IF ( ActionsLoo.conditional_unless ) %] <span>unless</span> [% END %] |
185 |
|
187 |
|
186 |
[% ActionsLoo.conditional_field | html %][% IF ( ActionsLoo.conditional_subfield.length ) %]$[% ActionsLoo.conditional_subfield | html %][% END %] |
188 |
[% ActionsLoo.conditional_field | html %][% IF ( ActionsLoo.conditional_subfield.length ) %]$[% ActionsLoo.conditional_subfield | html %][% END %] |
187 |
|
189 |
|
188 |
[% IF ( ActionsLoo.conditional_comparison_exists ) %] <span>exists</span> [% END %] |
190 |
[% IF ( ActionsLoo.conditional_comparison_exists ) %] <span>exists</span> [% END %] |
189 |
[% IF ( ActionsLoo.conditional_comparison_not_exists ) %] <span>does not exist</span> [% END %] |
191 |
[% IF ( ActionsLoo.conditional_comparison_not_exists ) %] <span>does not exist</span> [% END %] |
190 |
[% IF ( ActionsLoo.conditional_comparison_equals ) %] <span>matches</span> [% END %] |
192 |
[% IF ( ActionsLoo.conditional_comparison_equals ) %] <span>matches</span> [% END %] |
191 |
[% IF ( ActionsLoo.conditional_comparison_not_equals ) %] <span>does not match</span> [% END %] |
193 |
[% IF ( ActionsLoo.conditional_comparison_not_equals ) %] <span>does not match</span> [% END %] |
192 |
|
194 |
|
193 |
[% IF ( ActionsLoo.conditional_regex ) %] <span>RegEx</span> m/[% END %]<strong>[% ActionsLoo.conditional_value | html %]</strong>[% IF ( ActionsLoo.conditional_regex ) %]/[% END %] |
195 |
[% IF ( ActionsLoo.conditional_regex ) %] <span>RegEx</span> m/[% END %]<strong>[% ActionsLoo.conditional_value | html %]</strong>[% IF ( ActionsLoo.conditional_regex ) %]/[% END %] |
194 |
[% END %] |
196 |
[% END %] |
195 |
</td> |
197 |
</td> |
196 |
<td>[% ActionsLoo.description | html %]</td> |
198 |
<td>[% ActionsLoo.description | html %]</td> |
197 |
<td> |
199 |
<td> |
198 |
<a class="btn btn-default btn-xs edit_action" href="#modaction" data-mmta_id="[% ActionsLoo.mmta_id | html %]"><i class="fa fa-pencil"></i> Edit</a> |
200 |
<a class="btn btn-default btn-xs edit_action" href="#modaction" data-mmta_id="[% ActionsLoo.mmta_id | html %]"><i class="fa fa-pencil"></i> Edit</a> |
199 |
</td> |
201 |
</td> |
200 |
<td> |
202 |
<td> |
201 |
<a class="btn btn-default btn-xs" href="marc_modification_templates.pl?template_id=[% ActionsLoo.template_id | html %]&op=delete_action&mmta_id=[% ActionsLoo.mmta_id | html %]" onclick="return confirmDeleteAction();"><i class="fa fa-trash"></i> Delete</a> |
203 |
<a class="btn btn-default btn-xs" href="marc_modification_templates.pl?template_id=[% ActionsLoo.template_id | html %]&op=delete_action&mmta_id=[% ActionsLoo.mmta_id | html %]" onclick="return confirmDeleteAction();"><i class="fa fa-trash"></i> Delete</a> |
202 |
</td> |
204 |
</td> |
203 |
</tr> |
205 |
</tr> |
204 |
[% END # /FOREACH ActionsLoo %] |
206 |
[% END # /FOREACH ActionsLoo %] |
205 |
</tbody> |
207 |
</tbody> |
206 |
</table> |
208 |
</table> |
|
|
209 |
</div> <!-- /.page-section --> |
207 |
[% ELSE %] |
210 |
[% ELSE %] |
208 |
<div class="dialog message template_actions"><p>There are no defined actions for this template.</p></div> |
211 |
<div class="dialog message template_actions"><p>There are no defined actions for this template.</p></div> |
209 |
[% END # /IF ActionsLoop %] |
212 |
[% END # /IF ActionsLoop %] |
210 |
- |
|
|