Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5c5c1eef

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 5c5c1eef2ef26aa166f612d0718770488809b74b
  • Vorgänger ee04154a
  • Nachfolger 7f8599c0

Projekt: neue Spalten (Kunde, Typ, gültig)

Unterschiede anzeigen:

bin/mozilla/projects.pl
118 118

  
119 119
  my $report       = SL::ReportGenerator->new(\%myconfig, $form);
120 120

  
121
  my @columns      = qw(projectnumber description active);
121
  my @columns      = qw(projectnumber description customer type active valid);
122 122

  
123 123
  my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
124 124
  my @searchable_custom_variables  = grep { $_->{searchable} }  @{ $cvar_configs };
......
144 144
  my %column_defs  = (
145 145
    'projectnumber'            => { 'text' => $locale->text('Number'), },
146 146
    'description'              => { 'text' => $locale->text('Description'), },
147
    'customer'                 => { 'text' => $locale->text('Customer'), },
148
    'type'                     => { 'text' => $locale->text('Type'), },
147 149
    'active'                   => { 'text' => $locale->text('Active'), 'visible' => 'both' eq $filter->{active}, },
150
    'valid'                    => { 'text' => $locale->text('Valid'),  'visible' => 'both' eq $filter->{active}, },
148 151
    %column_defs_cvars,
149 152
    );
150 153

  
151
  foreach (qw(projectnumber description)) {
154
  foreach (qw(projectnumber description customer type)) {
152 155
    $column_defs{$_}->{link}    = $href . "&sort=$_";
153 156
    $column_defs{$_}->{visible} = 1;
154 157
  }
......
171 174
  push @options, $locale->text('All')                                            if ($filter->{all});
172 175
  push @options, $locale->text('Orphaned')                                       if ($filter->{orphaned});
173 176
  push @options, $locale->text('Project Number') . " : $filter->{projectnumber}" if ($filter->{projectnumber});
174
  push @options, $locale->text('Description') . " : $filter->{description}"      if ($filter->{description});
177
  push @options, $locale->text('Description')    . " : $filter->{description}"   if ($filter->{description});
178
  push @options, $locale->text('Customer')       . " : $filter->{customer}"      if ($filter->{customer});
179
  push @options, $locale->text('Type')           . " : $filter->{type}"          if ($filter->{type});
175 180
  push @options, $locale->text('Active')                                         if ($filter->{active} eq 'active');
176 181
  push @options, $locale->text('Inactive')                                       if ($filter->{active} eq 'inactive');
177 182
  push @options, $locale->text('Orphaned')                                       if ($filter->{status} eq 'orphaned');
......
197 202

  
198 203
  foreach my $project (@{ $form->{project_list} }) {
199 204
    $project->{active} = $project->{active} ? $locale->text('Yes')  : $locale->text('No');
205
    $project->{valid}  = $project->{valid} ? $locale->text('Yes')  : $locale->text('No');
200 206

  
201 207
    my $row = { map { $_ => { 'data' => $project->{$_} } } keys %{ $project } };
202 208

  
......
222 228

  
223 229
  $form->{title}     = $form->{project}->{id} ? $locale->text("Edit Project") : $locale->text("Add Project");
224 230

  
231
  $form->{ALL_CUSTOMERS}    = SL::DB::Manager::Customer->get_all_sorted(where => [ or => [ obsolete => 0, obsolete => undef, id => $form->{project}->{customer_id} ]]);
225 232
  $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'Projects', 'trans_id' => $form->{project}->{id});
226 233
#  $main::lxdebug->dump(0, "cv", $form->{CUSTOM_VARIABLES});
227 234
  CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}) if (scalar @{ $form->{CUSTOM_VARIABLES} });

Auch abrufbar als: Unified diff