From e5c8056bdb9276b3ad4ac8a700562216f09e6cc7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 7 May 2021 12:40:37 +0200 Subject: [PATCH] Zeiterfassung: Bei Projekten nur Projektnummer und Beschreibung anzeigen --- SL/Controller/TimeRecording.pm | 6 +++--- templates/webpages/time_recording/_filter.html | 2 +- templates/webpages/time_recording/form.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SL/Controller/TimeRecording.pm b/SL/Controller/TimeRecording.pm index 45c58cd44..f87c4d24d 100644 --- a/SL/Controller/TimeRecording.pm +++ b/SL/Controller/TimeRecording.pm @@ -276,7 +276,7 @@ sub prepare_report { order => { text => t8('Sales Order'), sub => sub { $_[0]->order && $_[0]->order->number } }, customer => { text => t8('Customer'), sub => sub { $_[0]->customer->displayable_name } }, part => { text => t8('Article'), sub => sub { $_[0]->part && $_[0]->part->displayable_name } }, - project => { text => t8('Project'), sub => sub { $_[0]->project && $_[0]->project->displayable_name } }, + project => { text => t8('Project'), sub => sub { $_[0]->project && $_[0]->project->full_description(sytle => 'both') } }, description => { text => t8('Description'), sub => sub { $_[0]->description_as_stripped_html }, raw_data => sub { $_[0]->description_as_restricted_html }, # raw_data only used for html(?) obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) } }, @@ -321,8 +321,8 @@ sub make_filter_summary { my $filter = $::form->{filter} || {}; my @filter_strings; - my $staff_member = $filter->{staff_member_id} ? SL::DB::Employee->new(id => $filter->{staff_member_id})->load->safe_name : ''; - my $project = $filter->{project_id} ? SL::DB::Project->new (id => $filter->{project_id}) ->load->displayable_name : ''; + my $staff_member = $filter->{staff_member_id} ? SL::DB::Employee->new(id => $filter->{staff_member_id})->load->safe_name : ''; + my $project = $filter->{project_id} ? SL::DB::Project->new (id => $filter->{project_id}) ->load->full_description(sytle => 'both') : ''; my @filters = ( [ $filter->{"date:date::ge"}, t8('From Date') ], diff --git a/templates/webpages/time_recording/_filter.html b/templates/webpages/time_recording/_filter.html index e2e6415e1..16fbe6da9 100644 --- a/templates/webpages/time_recording/_filter.html +++ b/templates/webpages/time_recording/_filter.html @@ -33,7 +33,7 @@ [% 'Project' | $T8 %] - [% P.project.picker('filter.project_id', filter.project_id, active="both", valid="both", size = 20) %] + [% P.project.picker('filter.project_id', filter.project_id, active="both", valid="both", description_style='both', size = 20) %] [% 'Description' | $T8 %] diff --git a/templates/webpages/time_recording/form.html b/templates/webpages/time_recording/form.html index cc262703e..337f3c718 100644 --- a/templates/webpages/time_recording/form.html +++ b/templates/webpages/time_recording/form.html @@ -58,7 +58,7 @@ [% 'Project' | $T8 %] - [% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px', onchange='kivi.TimeRecording.project_changed()') %] + [% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, description_style='both', style='width: 300px', onchange='kivi.TimeRecording.project_changed()') %] -- 2.20.1