Zeiterfassung: Bei Projekten nur Projektnummer und Beschreibung anzeigen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 7 May 2021 10:40:37 +0000 (12:40 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 7 May 2021 10:40:37 +0000 (12:40 +0200)
SL/Controller/TimeRecording.pm
templates/webpages/time_recording/_filter.html
templates/webpages/time_recording/form.html

index 45c58cd..f87c4d2 100644 (file)
@@ -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')       ],
index e2e6415..16fbe6d 100644 (file)
@@ -33,7 +33,7 @@
   </tr>
   <tr>
     <th align="right">[% 'Project' | $T8 %]</th>
-    <td>[% P.project.picker('filter.project_id', filter.project_id, active="both", valid="both", size = 20) %]</td>
+    <td>[% P.project.picker('filter.project_id', filter.project_id, active="both", valid="both", description_style='both', size = 20) %]</td>
   </tr>
   <tr>
     <th align="right">[% 'Description' | $T8 %]</th>
index cc26270..337f3c7 100644 (file)
@@ -58,7 +58,7 @@
     </tr>
     <tr>
       <th align="right">[% 'Project' | $T8 %]</th>
-      <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px', onchange='kivi.TimeRecording.project_changed()') %]</td>
+      <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, description_style='both', style='width: 300px', onchange='kivi.TimeRecording.project_changed()') %]</td>
     </tr>
     <tr></tr><tr></tr>
     <tr>