Revision 0dc16516
Von Hans P. Schlaepfer vor mehr als 4 Jahren hinzugefügt
templates/webpages/presenter/record/grouped_record_list.html | ||
---|---|---|
<div id="record_links_list">
|
||
[%- IF output %]
|
||
[% output %]
|
||
[%- ELSE %]
|
||
<p class="message_hint">[% LxERP.t8('No data was found.') %]</p>
|
||
[%- END %]
|
||
|
||
[%- IF edit_record_links %]
|
||
<div>
|
||
[% L.button_tag('record_links_add()', LxERP.t8('Add links')) %]
|
||
[% IF output %]
|
||
[% L.button_tag('record_links_delete()', LxERP.t8('Delete links')) %]
|
||
[%- END %]
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
<!--
|
||
function record_links_add() {
|
||
kivi.popup_dialog({ url: 'controller.pl',
|
||
data: { action: 'RecordLinks/ajax_add_filter',
|
||
object_model: '[% JavaScript.escape(object_model) %]',
|
||
object_id: '[% JavaScript.escape(object_id) %]'
|
||
},
|
||
id: 'record_links_add',
|
||
dialog: { title: kivi.t8("Add linked record") } });
|
||
return true;
|
||
}
|
||
|
||
function record_links_delete() {
|
||
var checkboxes = $('.record_links_delete').filter(function () { return $(this).prop('checked'); });
|
||
|
||
if ((checkboxes.size() == 0) || !confirm('[% LxERP.t8('Do you really want to delete the selected links?') %]'))
|
||
[% USE LxERP %]
|
||
[% USE L %]
|
||
[% USE HTML %]
|
||
[% USE JavaScript %]
|
||
|
||
<div id="record_links_list" class="wrapper">
|
||
[% IF output %]
|
||
[% output %]
|
||
[% ELSE %]
|
||
<p class="message message_hint">[% LxERP.t8('No data was found.') %]</p>
|
||
[% END %]
|
||
|
||
[% IF edit_record_links %]
|
||
<div class="buttons">
|
||
[% L.button_tag('record_links_add()', LxERP.t8('Add links')) %]
|
||
[% IF output %]
|
||
[% L.button_tag('record_links_delete()', LxERP.t8('Delete links')) %]
|
||
[% END %]
|
||
</div>
|
||
|
||
<script type="text/javascript"><!--
|
||
function record_links_add() {
|
||
kivi.popup_dialog({ url: 'controller.pl',
|
||
data: { action: 'RecordLinks/ajax_add_filter',
|
||
object_model: '[% JavaScript.escape(object_model) %]',
|
||
object_id: '[% JavaScript.escape(object_id) %]'
|
||
},
|
||
id: 'record_links_add',
|
||
dialog: { title: kivi.t8("Add linked record") } });
|
||
return true;
|
||
}
|
||
|
||
function record_links_delete() {
|
||
var checkboxes = $('.record_links_delete').filter(function () { return $(this).prop('checked'); });
|
||
|
||
if ((checkboxes.size() == 0) || !confirm('[% LxERP.t8('Do you really want to delete the selected links?') %]'))
|
||
return false;
|
||
|
||
var data = {
|
||
action: 'RecordLinks/ajax_delete',
|
||
object_model: '[% JavaScript.escape(object_model) %]',
|
||
object_id: '[% JavaScript.escape(object_id) %]'
|
||
};
|
||
|
||
$.ajax({
|
||
url: "controller.pl?" + checkboxes.serialize(),
|
||
data: data,
|
||
success: function(new_data) { $('#record_links_list').replaceWith(new_data); }
|
||
});
|
||
|
||
return false;
|
||
}
|
||
|
||
var data = {
|
||
action: 'RecordLinks/ajax_delete',
|
||
object_model: '[% JavaScript.escape(object_model) %]',
|
||
object_id: '[% JavaScript.escape(object_id) %]'
|
||
};
|
||
|
||
$.ajax({
|
||
url: "controller.pl?" + checkboxes.serialize(),
|
||
data: data,
|
||
success: function(new_data) { $('#record_links_list').replaceWith(new_data); }
|
||
});
|
||
|
||
return false;
|
||
}
|
||
|
||
-->
|
||
</script>
|
||
[%- END %]
|
||
</div>
|
||
--></script>
|
||
[% END %]
|
||
</div><!-- /#record_links_list /.wrapper -->
|
Auch abrufbar als: Unified diff
Neues Design 2019 Standard-Code templates/webpages/presenter/record/grouped_record_list.html