From: Moritz Bunkus Date: Tue, 24 Jan 2017 15:59:16 +0000 (+0100) Subject: Entwürfe: nur die eigenen Entwürfe anzeigen X-Git-Tag: release-3.5.4~1647 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bbe298f0358adb884fed753eff67967c09338740;p=kivitendo-erp.git Entwürfe: nur die eigenen Entwürfe anzeigen --- diff --git a/SL/Controller/Draft.pm b/SL/Controller/Draft.pm index a450e2c9f..8ad37ced6 100644 --- a/SL/Controller/Draft.pm +++ b/SL/Controller/Draft.pm @@ -131,11 +131,12 @@ sub _build_form { sub draft_list { my ($self) = @_; - my $result = selectall_hashref_query($::form, $::form->get_standard_dbh, <module, $self->submodule); - SELECT d.*, date(d.itime) AS date, e.name AS employee_name + my $result = selectall_hashref_query($::form, $::form->get_standard_dbh, <module, $self->submodule, SL::DB::Manager::Employee->current->id); + SELECT d.*, date(d.itime) AS date FROM drafts d - LEFT JOIN employee e ON d.employee_id = e.id - WHERE (d.module = ?) AND (d.submodule = ?) + WHERE (d.module = ?) + AND (d.submodule = ?) + AND (d.employee_id = ?) ORDER BY d.itime SQL } diff --git a/templates/webpages/drafts/form.html b/templates/webpages/drafts/form.html index f3cedf8cc..031b0a17c 100644 --- a/templates/webpages/drafts/form.html +++ b/templates/webpages/drafts/form.html @@ -24,7 +24,6 @@ [% 'Date' | $T8 %] [% 'Description' | $T8 %] - [% 'Employee' | $T8 %] [% FOREACH row = drafts_list %] @@ -37,10 +36,8 @@ [% L.link(SELF.url_for(action='load',id=row.id), row.description) %] [%- END %] - [% row.employee_name | html %] [% L.html_tag('span', LxERP.t8('Delete'), class='cursor-pointer interact', onclick="kivi.Draft.delete('" _ row.id _ "')") %] [% END %] [%- END %] -