Revision 3a4d4d4f
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/CustomerVendor.pm | ||
---|---|---|
use SL::Controller::Helper::ReportGenerator;
|
||
use SL::Controller::Helper::ParseFilter;
|
||
|
||
use SL::DB::AuthGroup;
|
||
use SL::DB::Customer;
|
||
use SL::DB::Vendor;
|
||
use SL::DB::Business;
|
||
... | ... | |
|
||
$self->{all_business} = SL::DB::Manager::Business->get_all();
|
||
|
||
$self->{all_employees} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
|
||
$self->{all_employees} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
|
||
$self->{all_auth_groups} = SL::DB::Manager::AuthGroup->get_all_sorted;
|
||
|
||
$self->{all_greetings} = SL::DB::Manager::Greeting->get_all_sorted();
|
||
if ($self->{cv}->id && $self->{cv}->greeting && !grep {$self->{cv}->greeting eq $_->description} @{$self->{all_greetings}}) {
|
||
... | ... | |
|
||
$self->{template_args} ||= {};
|
||
|
||
$::request->{layout}->add_javascripts("$_.js") for qw (kivi.CustomerVendor kivi.File kivi.CustomerVendorTurnover ckeditor/ckeditor ckeditor/adapters/jquery jquery.selectboxes jquery.multiselect2side);
|
||
$::request->{layout}->add_javascripts("$_.js") for qw (kivi.CustomerVendor kivi.File kivi.CustomerVendorTurnover ckeditor/ckeditor ckeditor/adapters/jquery follow_up);
|
||
|
||
$self->_setup_form_action_bar;
|
||
}
|
bin/mozilla/fu.pl | ||
---|---|---|
use SL::FU;
|
||
use SL::Locale::String qw(t8);
|
||
use SL::ReportGenerator;
|
||
use SL::DB::AuthGroup;
|
||
use SL::DB::Employee;
|
||
|
||
require "bin/mozilla/reportgenerator.pl";
|
||
... | ... | |
|
||
my $form = $main::form;
|
||
|
||
$form->{all_employees} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
|
||
$form->{all_employees} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
|
||
$form->{all_auth_groups} = SL::DB::Manager::AuthGroup->get_all_sorted;
|
||
|
||
my %params;
|
||
$params{not_id} = $form->{id} if ($form->{id});
|
||
... | ... | |
setup_fu_display_form_action_bar() unless $::form->{POPUP_MODE};
|
||
|
||
$form->header(no_layout => $::form->{POPUP_MODE},
|
||
use_javascripts => [ qw(jquery.selectboxes jquery.multiselect2side) ],
|
||
use_javascripts => [ qw(follow_up) ],
|
||
);
|
||
print $form->parse_html_template('fu/add_edit');
|
||
|
js/follow_up.js | ||
---|---|---|
//alert(url);
|
||
window.open(url, "_new_generic", parm);
|
||
}
|
||
|
||
function follow_up_do_select(target) {
|
||
let ids = ($(target).data('ids')+'').split(',');
|
||
$('.employee_check').each(function(check_idx, check_elt) {
|
||
if (ids.indexOf($(check_elt).val()) !== -1) {
|
||
$(check_elt).prop('checked', true);
|
||
}
|
||
});
|
||
}
|
locale/de/all | ||
---|---|---|
'chart_of_accounts' => 'kontenuebersicht',
|
||
'cleared' => 'Abgeglichen',
|
||
'click here to edit cvars' => 'Klicken Sie hier, um nach benutzerdefinierten Variablen zu suchen',
|
||
'click on a group to add the group\'s users' => 'auf eine Gruppe klicken, um alle Gruppenmitglieder auszuwählen',
|
||
'close' => 'schließen',
|
||
'closed' => 'geschlossen',
|
||
'companylogo_subtitle' => 'Lizenziert für',
|
locale/en/all | ||
---|---|---|
'chart_of_accounts' => '',
|
||
'cleared' => '',
|
||
'click here to edit cvars' => '',
|
||
'click on a group to add the group\'s users' => '',
|
||
'close' => '',
|
||
'closed' => '',
|
||
'companylogo_subtitle' => '',
|
templates/webpages/customer_vendor/tabs/vcnotes.html | ||
---|---|---|
<tr>
|
||
<td valign="right">[% 'Subject' | $T8 %]</td>
|
||
|
||
<td>
|
||
<td colspan="3">
|
||
[% L.input_tag('note.subject', SELF.note.subject, size = 50) %]
|
||
</td>
|
||
</tr>
|
||
... | ... | |
<tr>
|
||
<td valign="right" align="top">[% 'Body' | $T8 %]</td>
|
||
|
||
<td align="top">
|
||
<td align="top" colspan="3">
|
||
[% L.textarea_tag('note.body', SELF.note.body, cols = 50 rows = 10) %]
|
||
</td>
|
||
</tr>
|
||
... | ... | |
<tr>
|
||
<td valign="right">[% 'Follow-Up On' | $T8 %]</td>
|
||
|
||
<td>
|
||
<td colspan="3">
|
||
[% L.date_tag('note_followup.follow_up_date', SELF.note_followup.follow_up_date) %]
|
||
<td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="right" align="top">[% 'for' | $T8 %]</td>
|
||
<td align="top">
|
||
[% L.select_tag(
|
||
'note_followup.created_for_employees[]',
|
||
SELF.all_employees,
|
||
id => 'note_followup_created_for_employees',
|
||
value_key => 'id',
|
||
title_key => 'safe_name',
|
||
default => SELF.note_followup.created_for_employees,
|
||
default_value_key => 'id',
|
||
multiple => 1)
|
||
%]
|
||
[% L.multiselect2side(
|
||
'note_followup_created_for_employees',
|
||
labelsx => LxERP.t8('All users'),
|
||
labeldx => LxERP.t8('Wiedervorlage für Benutzer'))
|
||
%]
|
||
</td>
|
||
<td valign="top">
|
||
<table>
|
||
<tr class="listheading">
|
||
<th>[% L.checkbox_tag('checkall_checkboxes', label='', id='ckeckall', checkall="[data-checkall=1]") %]</th>
|
||
<th>[% LxERP.t8('All users') %]</th>
|
||
</tr>
|
||
|
||
[% FOREACH employee = SELF.all_employees %]
|
||
[% SET checked = 0 %]
|
||
[% FOREACH cfe = SELF.note_followup.created_for_employees %]
|
||
[% IF cfe.id == employee.id %][% SET checked = 1 %][% LAST %][% END %]
|
||
[% END %]
|
||
<tr class="listrow">
|
||
<td>[% L.checkbox_tag('note_followup.created_for_employees[]', value=employee.id, checked=checked, "data-checkall"=1, class="employee_check") %]</td>
|
||
<td><label for='created_for_employees[]'>[% HTML.escape(employee.safe_name) %]</label><td>
|
||
</tr>
|
||
[% END %]
|
||
</table>
|
||
<td>
|
||
<td valign="top">
|
||
<table>
|
||
<tr class="listheading"><th>[% LxERP.t8('Users that are a member in this group') %] ([% LxERP.t8('Click group to add the group\'s users') %])</th></tr>
|
||
[% FOREACH auth_group = SELF.all_auth_groups %]
|
||
<tr onclick="follow_up_do_select(this)" data-ids='[% FOREACH employee = auth_group.get_employees %][% employee.id %][% IF !loop.last %],[% END%][% END%]' class="interactive cursor-pointer">
|
||
<td class="listrow1"><b>← [% auth_group.name %]</b>: [% auth_group.description %]</td>
|
||
</tr>
|
||
[% FOREACH employee = auth_group.get_employees %]
|
||
<tr class="listrow0"><td> [% employee.safe_name %]</td></tr>
|
||
[% END %]
|
||
[% END %]
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
templates/webpages/fu/add_edit.html | ||
---|---|---|
|
||
<table>
|
||
<tr>
|
||
<td valign="top">[% 'Follow-Up for user' | $T8 %]</td>
|
||
<td align="top">
|
||
[% L.select_tag(
|
||
'created_for_employees[]',
|
||
all_employees,
|
||
id => 'created_for_employees',
|
||
value_key => 'id',
|
||
title_key => 'safe_name',
|
||
default => created_for_employees,
|
||
default_value_key => 'id',
|
||
multiple => 1)
|
||
%]
|
||
[% L.multiselect2side(
|
||
'created_for_employees',
|
||
labelsx => LxERP.t8('All users'),
|
||
labeldx => LxERP.t8('Wiedervorlage für Benutzer'))
|
||
-%]
|
||
<td align="top">[% 'Follow-Up for user' | $T8 %]</td>
|
||
<td valign="top">
|
||
<table>
|
||
<tr class="listheading">
|
||
<th>[% L.checkbox_tag('checkall_checkboxes', label='', id='ckeckall', checkall="[data-checkall=1]") %]</th>
|
||
<th>[% LxERP.t8('All users') %]</th>
|
||
</tr>
|
||
|
||
[% FOREACH employee = all_employees %]
|
||
[% SET checked = 0 %]
|
||
[% FOREACH cfe = created_for_employees %]
|
||
[% IF cfe.id == employee.id %][% SET checked = 1 %][% LAST %][% END %]
|
||
[% END %]
|
||
<tr class="listrow">
|
||
<td>[% L.checkbox_tag('created_for_employees[]', value=employee.id, checked=checked, "data-checkall"=1, class="employee_check") %]</td>
|
||
<td><label for='created_for_employees[]'>[% HTML.escape(employee.safe_name) %]</label><td>
|
||
</tr>
|
||
[% END %]
|
||
</table>
|
||
<td>
|
||
<td valign="top">
|
||
<table>
|
||
<tr class="listheading"><th>[% LxERP.t8('Users that are a member in this group') %] ([% LxERP.t8('Click group to add the group\'s users') %])</th></tr>
|
||
[% FOREACH auth_group = all_auth_groups %]
|
||
<tr onclick="follow_up_do_select(this)" data-ids='[% FOREACH employee = auth_group.get_employees %][% employee.id %][% IF !loop.last %],[% END%][% END%]' class="interactive cursor-pointer">
|
||
<td class="listrow1"><b>← [% auth_group.name %]</b>: [% auth_group.description %]</td>
|
||
</tr>
|
||
[% FOREACH employee = auth_group.get_employees %]
|
||
<tr class="listrow0"><td> [% employee.safe_name %]</td></tr>
|
||
[% END %]
|
||
[% END %]
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="right">[% 'Follow-Up Date' | $T8 %]</td>
|
||
<td>
|
||
<td colspan="3">
|
||
[% L.date_tag('follow_up_date', follow_up_date) %]
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="right">[% 'Subject' | $T8 %]</td>
|
||
<td><input name="subject" value="[% HTML.escape(subject) %]" size="50"></td>
|
||
<td colspan="3"><input name="subject" value="[% HTML.escape(subject) %]" size="50"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="right" align="top">[% 'Body' | $T8 %]</td>
|
||
<td align="top"><textarea cols="50" rows="10" name="body">[% HTML.escape(body) %]</textarea></td>
|
||
<td colspan="3" align="top"><textarea cols="50" rows="10" name="body">[% HTML.escape(body) %]</textarea></td>
|
||
</tr>
|
||
</table>
|
||
|
Auch abrufbar als: Unified diff
Wiedervorlage: Benutzer aus Gruppen hinzufügen können