Revision 5270d1b4
Von Hans P. Schlaepfer vor fast 5 Jahren hinzugefügt
templates/webpages/presenter/record/grouped_record_list.html | ||
---|---|---|
1 |
<div id="record_links_list"> |
|
2 |
[%- IF output %] |
|
3 |
[% output %] |
|
4 |
[%- ELSE %] |
|
5 |
<p class="message_hint">[% LxERP.t8('No data was found.') %]</p> |
|
6 |
[%- END %] |
|
7 |
|
|
8 |
[%- IF edit_record_links %] |
|
9 |
<div> |
|
10 |
[% L.button_tag('record_links_add()', LxERP.t8('Add links')) %] |
|
11 |
[% IF output %] |
|
12 |
[% L.button_tag('record_links_delete()', LxERP.t8('Delete links')) %] |
|
13 |
[%- END %] |
|
14 |
</div> |
|
15 |
|
|
16 |
<script type="text/javascript"> |
|
17 |
<!-- |
|
18 |
function record_links_add() { |
|
19 |
kivi.popup_dialog({ url: 'controller.pl', |
|
20 |
data: { action: 'RecordLinks/ajax_add_filter', |
|
21 |
object_model: '[% JavaScript.escape(object_model) %]', |
|
22 |
object_id: '[% JavaScript.escape(object_id) %]' |
|
23 |
}, |
|
24 |
id: 'record_links_add', |
|
25 |
dialog: { title: kivi.t8("Add linked record") } }); |
|
26 |
return true; |
|
27 |
} |
|
28 |
|
|
29 |
function record_links_delete() { |
|
30 |
var checkboxes = $('.record_links_delete').filter(function () { return $(this).prop('checked'); }); |
|
31 |
|
|
32 |
if ((checkboxes.size() == 0) || !confirm('[% LxERP.t8('Do you really want to delete the selected links?') %]')) |
|
33 | 1 |
[% USE LxERP %] |
34 | 2 |
[% USE L %] |
35 | 3 |
[% USE HTML %] |
36 | 4 |
[% USE JavaScript %] |
37 | 5 |
|
6 |
<div id="record_links_list" class="wrapper"> |
|
7 |
[% IF output %] |
|
8 |
[% output %] |
|
9 |
[% ELSE %] |
|
10 |
<p class="message message_hint">[% LxERP.t8('No data was found.') %]</p> |
|
11 |
[% END %] |
|
12 |
|
|
13 |
[% IF edit_record_links %] |
|
14 |
<div class="buttons"> |
|
15 |
[% L.button_tag('record_links_add()', LxERP.t8('Add links')) %] |
|
16 |
[% IF output %] |
|
17 |
[% L.button_tag('record_links_delete()', LxERP.t8('Delete links')) %] |
|
18 |
[% END %] |
|
19 |
</div> |
|
20 |
|
|
21 |
<script type="text/javascript"><!-- |
|
22 |
function record_links_add() { |
|
23 |
kivi.popup_dialog({ url: 'controller.pl', |
|
24 |
data: { action: 'RecordLinks/ajax_add_filter', |
|
25 |
object_model: '[% JavaScript.escape(object_model) %]', |
|
26 |
object_id: '[% JavaScript.escape(object_id) %]' |
|
27 |
}, |
|
28 |
id: 'record_links_add', |
|
29 |
dialog: { title: kivi.t8("Add linked record") } }); |
|
30 |
return true; |
|
31 |
} |
|
32 |
|
|
33 |
function record_links_delete() { |
|
34 |
var checkboxes = $('.record_links_delete').filter(function () { return $(this).prop('checked'); }); |
|
35 |
|
|
36 |
if ((checkboxes.size() == 0) || !confirm('[% LxERP.t8('Do you really want to delete the selected links?') %]')) |
|
37 |
return false; |
|
38 |
|
|
39 |
var data = { |
|
40 |
action: 'RecordLinks/ajax_delete', |
|
41 |
object_model: '[% JavaScript.escape(object_model) %]', |
|
42 |
object_id: '[% JavaScript.escape(object_id) %]' |
|
43 |
}; |
|
44 |
|
|
45 |
$.ajax({ |
|
46 |
url: "controller.pl?" + checkboxes.serialize(), |
|
47 |
data: data, |
|
48 |
success: function(new_data) { $('#record_links_list').replaceWith(new_data); } |
|
49 |
}); |
|
50 |
|
|
38 | 51 |
return false; |
52 |
} |
|
39 | 53 |
|
40 |
var data = { |
|
41 |
action: 'RecordLinks/ajax_delete', |
|
42 |
object_model: '[% JavaScript.escape(object_model) %]', |
|
43 |
object_id: '[% JavaScript.escape(object_id) %]' |
|
44 |
}; |
|
45 |
|
|
46 |
$.ajax({ |
|
47 |
url: "controller.pl?" + checkboxes.serialize(), |
|
48 |
data: data, |
|
49 |
success: function(new_data) { $('#record_links_list').replaceWith(new_data); } |
|
50 |
}); |
|
51 |
|
|
52 |
return false; |
|
53 |
} |
|
54 |
|
|
55 |
--> |
|
56 |
</script> |
|
57 |
[%- END %] |
|
58 |
</div> |
|
54 |
--></script> |
|
55 |
[% END %] |
|
56 |
</div><!-- /#record_links_list /.wrapper --> |
Auch abrufbar als: Unified diff
Neues Design 2019 Standard-Code templates/webpages/presenter/record/grouped_record_list.html