From bbe298f0358adb884fed753eff67967c09338740 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 24 Jan 2017 16:59:16 +0100 Subject: [PATCH] =?utf8?q?Entw=C3=BCrfe:=20nur=20die=20eigenen=20Entw?= =?utf8?q?=C3=BCrfe=20anzeigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Draft.pm | 9 +++++---- templates/webpages/drafts/form.html | 3 --- 2 files changed, 5 insertions(+), 7 deletions(-) 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 %] - -- 2.20.1