Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a6cf76a2

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID a6cf76a2874a723b04d508c99b30f7fd5a4f6573
  • Vorgänger d281eedf
  • Nachfolger 4a1b6455

ActionBar: Verwendung in Berichtsfunktion in do.pl

Unterschiede anzeigen:

bin/mozilla/do.pl
350 350
  }
351 351
}
352 352

  
353
sub setup_do_search_action_bar {
354
  my %params = @_;
355

  
356
  for my $bar ($::request->layout->get('actionbar')) {
357
    $bar->add(
358
      action => [
359
        t8('Search'),
360
        submit    => [ '#form' ],
361
        accesskey => 'enter',
362
      ],
363
    );
364
  }
365
}
366

  
367
sub setup_do_orders_action_bar {
368
  my %params = @_;
369

  
370
  for my $bar ($::request->layout->get('actionbar')) {
371
    $bar->add(
372
      action => [
373
        t8('New invoice'),
374
        submit    => [ '#orders_form' ],
375
        checks    => [ 'kivi.DeliveryOrder.multi_invoice_check_delivery_orders_selected' ],
376
        accesskey => 'enter',
377
      ],
378
    );
379
  }
380
}
381

  
353 382
sub form_header {
354 383
  $main::lxdebug->enter_sub();
355 384

  
......
606 635
  $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all;
607 636
  $form->{title}             = $locale->text('Delivery Orders');
608 637

  
638
  setup_do_search_action_bar();
639

  
609 640
  $form->header();
610 641

  
611 642
  print $form->parse_html_template('do/search');
......
807 838
    $idx++;
808 839
  }
809 840

  
810
  $report->generate_with_headers();
841
  $::request->layout->add_javascripts('kivi.DeliveryOrder.js');
842

  
843
  setup_do_orders_action_bar();
844

  
845
  $report->generate_with_headers(action_bar => 1);
811 846

  
812 847
  $main::lxdebug->leave_sub();
813 848
}
js/kivi.DeliveryOrder.js
1
namespace('kivi.DeliveryOrder', function(ns) {
2
  ns.multi_invoice_check_delivery_orders_selected = function() {
3
    if ($('#orders_form tbody input[type=checkbox]:checked').length > 0)
4
      return true;
5

  
6
    alert(kivi.t8('You have not selected any delivery order.'));
7

  
8
    return false;
9
  };
10
});
js/locale/de.js
117 117
"Update quotation/order":"Auftrag/Angebot aktualisieren",
118 118
"Version actions":"Aktionen für Versionen",
119 119
"Yes":"Ja",
120
"You have not selected any delivery order.":"Sie haben keinen Lieferschein ausgewählt.",
120 121
"filename has not uploadable characters ":"Bitte Dateinamen ändern. Er hat für den Upload nicht verwendbare Sonderzeichen ",
121 122
"filesize too big: ":"Datei zu groß: ",
122 123
"flat-rate position":"Pauschalposition",
locale/de/all
1297 1297
  'Export Stammdaten'           => 'Export Stammdaten',
1298 1298
  'Export as CSV'               => 'Als CSV exportieren',
1299 1299
  'Export as PDF'               => 'Als PDF exportieren',
1300
  'Export as PDF with attachments' => 'Als PDF mit Anhängen exportieren',
1301 1300
  'Export date'                 => 'Exportdatum',
1302 1301
  'Export date from'            => 'Exportdatum von',
1303 1302
  'Export date to'              => 'Exportdatum bis',
templates/webpages/do/orders_bottom.html
1
[%- USE T8 %]
2
[% USE HTML %]
3
<table  width="100%">
4
   <tr><td width = "200px" >
5
 [% 'New invoice' | $T8 %]</td><td width = "150px">
6
 <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
7
 <input type="hidden" name="nextsub" value="invoice_multi">
1
[% USE HTML %][%- USE T8 -%]
2
 <input type="hidden" name="action" value="invoice_multi">
8 3
 <input type="hidden" name="type" value="[% HTML.escape(type) %]">
9 4
 <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
10 5
 <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
11 6
 <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
12
</td><td></td></tr></table></form>
7
</form>
13 8
<form method="post" id="print_multi_id">
14 9
[% print_options %]
15 10
<div id="mass_print_dialog" style="display: none"></div>
templates/webpages/do/orders_top.html
1 1
[%- INCLUDE 'common/flash.html' %]
2
<form method="post" id="do_id" action="do.pl">
2
<form method="post" action="do.pl" id="orders_form">
templates/webpages/do/search.html
17 17
  }
18 18
 </style>
19 19

  
20
 <form method="post" action="do.pl" name="Form">
20
 <form method="post" action="do.pl" name="Form" id="form">
21 21

  
22 22
  <p>
23 23
   <table>
......
249 249
   </table>
250 250
  </p>
251 251

  
252
  <hr size="3" noshade>
253

  
254
  <p>
255
   <input type="hidden" name="nextsub" value="orders">
252
   <input type="hidden" name="action" value="orders">
256 253
   <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
257 254
   <input type="hidden" name="type" value="[% HTML.escape(type) %]">
258

  
259
   <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
260
  </p>
261 255
 </form>

Auch abrufbar als: Unified diff