Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3a755957

Von Sven Schöling vor fast 11 Jahren hinzugefügt

  • ID 3a75595770104d5884cab26c57f00e33535ba050
  • Vorgänger 35bd55ae
  • Nachfolger bcb43619

Status in der Projektverwaltung

Unterschiede anzeigen:

SL/Controller/Project.pm
15 15
use SL::DB::Invoice;
16 16
use SL::DB::Order;
17 17
use SL::DB::Project;
18
use SL::DB::ProjectType;
19
use SL::DB::ProjectStatus;
18 20
use SL::DB::PurchaseInvoice;
19 21
use SL::DB::ProjectType;
20 22
use SL::Helper::Flash;
......
27 29
);
28 30

  
29 31
__PACKAGE__->run_before('check_auth');
30
__PACKAGE__->run_before('load_project',       only => [ qw(edit update destroy) ]);
32
__PACKAGE__->run_before('load_project',        only => [ qw(edit update destroy) ]);
33
__PACKAGE__->run_before('load_project_types',  only => [ qw(search edit new) ]);
34
__PACKAGE__->run_before('load_project_status', only => [ qw(search edit new) ]);
31 35

  
32 36
#
33 37
# actions
......
38 42

  
39 43
  my %params;
40 44

  
41
  $params{ALL_PROJECT_TYPES} = SL::DB::Manager::ProjectType->get_all_sorted;
42 45
  $params{CUSTOM_VARIABLES}  = CVar->get_configs(module => 'Projects');
43 46
  ($params{CUSTOM_VARIABLES_FILTER_CODE}, $params{CUSTOM_VARIABLES_INCLUSION_CODE})
44 47
    = CVar->render_search_options(variables      => $params{CUSTOM_VARIABLES},
......
116 119
  my ($self, %params) = @_;
117 120

  
118 121
  $params{ALL_CUSTOMERS}     = SL::DB::Manager::Customer->get_all_sorted(where => [ or => [ obsolete => 0, obsolete => undef, id => $self->project->customer_id ]]);
119
  $params{ALL_PROJECT_TYPES} = SL::DB::Manager::ProjectType->get_all_sorted;
120 122
  $params{CUSTOM_VARIABLES}  = CVar->get_custom_variables(module => 'Projects', trans_id => $self->project->id);
121 123

  
122 124
  if ($params{keep_cvars}) {
......
202 204
  my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
203 205
  $self->{report} = $report;
204 206

  
205
  my @columns     = qw(projectnumber description customer active valid project_type);
206
  my @sortable    = qw(projectnumber description customer              project_type);
207
  my @columns     = qw(projectnumber description customer active valid project_type project_status);
208
  my @sortable    = qw(projectnumber description customer              project_type project_status);
207 209

  
208 210
  my %column_defs = (
209 211
    projectnumber => { obj_link => sub { $self->url_for(action => 'edit', id => $_[0]->id, callback => $callback) } },
210 212
    description   => { obj_link => sub { $self->url_for(action => 'edit', id => $_[0]->id, callback => $callback) } },
211 213
    project_type  => { sub  => sub { $_[0]->project_type->description } },
214
    project_status => { sub  => sub { $_[0]->project_status->description }, text => t8('Project Status') },
212 215
    customer      => { sub  => sub { $_[0]->customer ? $_[0]->customer->name     : '' } },
213 216
    active        => { sub  => sub { $_[0]->active   ? $::locale->text('Active') : $::locale->text('Inactive') },
214 217
                       text => $::locale->text('Active') },
......
259 262
  );
260 263
}
261 264

  
265
sub load_project_types {
266
  $_[0]{ALL_PROJECT_TYPES} = SL::DB::Manager::ProjectType->get_all_sorted;
267
}
268

  
269
sub load_project_status {
270
  $_[0]{ALL_PROJECT_STATUS} = SL::DB::Manager::ProjectStatus->get_all_sorted;
271
}
272

  
262 273
1;
locale/de/all
1761 1761
  'Project Description'         => 'Projektbeschreibung',
1762 1762
  'Project Number'              => 'Projektnummer',
1763 1763
  'Project Numbers'             => 'Projektnummern',
1764
  'Project Status'              => 'Projektstatus',
1764 1765
  'Project Transactions'        => 'Projektbuchungen',
1765 1766
  'Project Type'                => 'Projekttyp',
1766 1767
  'Project Types'               => 'Projekttypen',
templates/webpages/project/_basic_data.html
23 23

  
24 24
 <tr>
25 25
  <th align="right">[% 'Project Type' | $T8 %]</th>
26
  <td>[% L.select_tag('project.project_type_id', ALL_PROJECT_TYPES, default=SELF.project.project_type_id, title_key='description', style='width: 300px') %]</td>
26
  <td>[% L.select_tag('project.project_type_id', SELF.ALL_PROJECT_TYPES, default=SELF.project.project_type_id, title_key='description', style='width: 300px') %]</td>
27
 </tr>
28

  
29
 <tr>
30
  <th align="right">[% 'Project Status' | $T8 %]</th>
31
  <td>[% L.select_tag('project.project_status_id', SELF.ALL_PROJECT_STATUS, default=SELF.project.project_status_id, title_key='description', style='width: 300px') %]</td>
27 32
 </tr>
28 33

  
29 34
 <tr>
templates/webpages/project/search.html
28 28

  
29 29
    <tr>
30 30
     <th align="right">[% 'Project Type' | $T8 %]</th>
31
     <td>[% L.select_tag('filter.project_type_id', ALL_PROJECT_TYPES, default=filter.project_type_id, title_key='description', with_empty=1) %]</td>
31
     <td>[% L.select_tag('filter.project_type_id', SELF.ALL_PROJECT_TYPES, default=filter.project_type_id, title_key='description', with_empty=1) %]</td>
32
    </tr>
33

  
34
    <tr>
35
     <th align="right">[% 'Project Status' | $T8 %]</th>
36
     <td>[% L.select_tag('filter.project_status_id', SELF.ALL_PROJECT_STATUS, default=filter.project_status_id, title_key='description', with_empty=1) %]</td>
32 37
    </tr>
33 38

  
34 39
    [% CUSTOM_VARIABLES_FILTER_CODE %]

Auch abrufbar als: Unified diff