Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 64c45e8f

Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt

  • ID 64c45e8f07f84b9f83c2eeb807b5113789a7802d
  • Vorgänger 10852277
  • Nachfolger 1c4d3cd5

ActionBar: Verwendung bei Kunden-/Lieferanten/Ansprechpersonensuche

Unterschiede anzeigen:

bin/mozilla/ct.pl
56 56
use SL::DB::Default;
57 57
use SL::DB::DeliveryTerm;
58 58
use SL::ReportGenerator;
59
use SL::Locale::String qw(t8);
59 60
use SL::MoreCommon qw(uri_encode);
60 61

  
61 62
require "bin/mozilla/common.pl";
......
88 89

  
89 90
  $form->{title}    = $form->{IS_CUSTOMER} ? $locale->text('Customers') : $locale->text('Vendors');
90 91

  
92
  setup_ct_search_action_bar();
93

  
91 94
  $form->header();
92 95
  print $form->parse_html_template('ct/search');
93 96

  
......
106 109
                                                                           'include_value'  => 'Y');
107 110

  
108 111
  $::form->{title} = $::locale->text('Search contacts');
112

  
113
  setup_ct_search_contact_action_bar();
109 114
  $::form->header;
110 115
  print $::form->parse_html_template('ct/search_contact');
111 116

  
......
295 300
    $report->add_data($row);
296 301
  }
297 302

  
298
  $report->generate_with_headers();
303
  setup_ct_list_names_action_bar();
304
  $report->generate_with_headers(action_bar => 1);
299 305

  
300 306
  $main::lxdebug->leave_sub();
301 307
}
......
426 432
    $report->add_data($row);
427 433
  }
428 434

  
429
  $report->generate_with_headers;
435
  $report->generate_with_headers(action_bar => 1);
430 436

  
431 437
  $::lxdebug->leave_sub;
432 438
}
433 439

  
440
sub setup_ct_search_action_bar {
441
  my %params = @_;
442

  
443
  for my $bar ($::request->layout->get('actionbar')) {
444
    $bar->add(
445
      action => [
446
        t8('Continue'),
447
        submit    => [ '#form', { action => 'list_names' } ],
448
        accesskey => 'enter',
449
      ],
450
    );
451
  }
452
}
453

  
454
sub setup_ct_list_names_action_bar {
455
  my %params = @_;
456

  
457
  for my $bar ($::request->layout->get('actionbar')) {
458
    $bar->add(
459
      action => [
460
        $::form->{db} eq 'customer' ? t8('New customer') : t8('New vendor'),
461
        submit    => [ '#new_form', { action => 'CustomerVendor/add' } ],
462
        accesskey => 'enter',
463
      ],
464
    );
465
  }
466
}
467

  
468
sub setup_ct_search_contact_action_bar {
469
  my %params = @_;
470

  
471
  for my $bar ($::request->layout->get('actionbar')) {
472
    $bar->add(
473
      action => [
474
        t8('Continue'),
475
        submit    => [ '#form', { action => 'list_contacts' } ],
476
        accesskey => 'enter',
477
      ],
478
    );
479
  }
480
}
481

  
434 482
sub continue { call_sub($main::form->{nextsub}); }

Auch abrufbar als: Unified diff