Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fdbdd0b1

Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt

  • ID fdbdd0b1dbcae7c3b86a9ab532cb3377a4fcfd90
  • Vorgänger 4a1b6455
  • Nachfolger 665dd6ea

ActionBar: Verwendung in MassInvoiceCreatePrint-Controller (nur Rechnungsliste)

Unterschiede anzeigen:

SL/Controller/MassInvoiceCreatePrint.pm
95 95

  
96 96
  $::form->{printer_id} ||= $self->default_printer_id;
97 97

  
98
  $self->setup_list_invoices_action_bar(num_rows => scalar(@{ $self->invoice_models->get }));
99

  
98 100
  $self->render('mass_invoice_create_print_from_do/list_invoices',
99 101
                title        => $::locale->text('Open invoice'),
100 102
                noshow       => $show,
......
332 334

  
333 335
  $self->{filter_summary} = join ', ', @filter_strings;
334 336
}
337

  
338
sub setup_list_invoices_action_bar {
339
  my ($self, %params) = @_;
340

  
341
  for my $bar ($::request->layout->get('actionbar')) {
342
    $bar->add(
343
      action => [
344
        t8('Search'),
345
        submit    => [ '#search_form', { action => 'MassInvoiceCreatePrint/list_invoices' } ],
346
        accesskey => 'enter',
347
      ],
348
      action => [
349
        t8('Reset'),
350
        call => [ 'kivi.Project.reset_search_form' ],
351
      ],
352
      action => [
353
        $::locale->text('Print'),
354
        call     => [ 'kivi.MassInvoiceCreatePrint.showMassPrintOptionsOrDownloadDirectly' ],
355
        disabled => !$params{num_rows} ? $::locale->text('The report doesn\'t contain entries.') : undef,
356
      ],
357
    );
358
  }
359
}
360

  
335 361
1;
336 362

  
337 363
__END__
js/kivi.MassInvoiceCreatePrint.js
115 115

  
116 116
    return true;
117 117
  };
118

  
119
  this.resetSearchForm = function() {
120
    $("#filter_table input").val("");
121
  };
118 122
});
119 123

  
120 124
$(kivi.MassInvoiceCreatePrint.setup);
templates/webpages/mass_invoice_create_print_from_do/_filter.html
1 1
[%- USE L %][%- USE LxERP %][%- USE HTML %]
2 2
<div>
3
 <form action="controller.pl" method="post">
3
 <form action="controller.pl" method="post" id="search_form">
4 4
  <div class="filter_toggle" [% IF noshow == 0 %]style="display:none"[% END %]>
5 5
   <a href="#" onClick="javascript:$('.filter_toggle').toggle()">[% LxERP.t8('Show Filter') %]</a>
6 6
      [% SELF.filter_summary %]
......
22 22
    </tr>
23 23
  </table>
24 24

  
25
   [% L.hidden_tag('action', 'MassInvoiceCreatePrint/dispatch') %]
25
   [% L.hidden_tag('action', 'MassInvoiceCreatePrint/' _ LIST_ACTION, id='filter_action') %]
26 26
   [% L.hidden_tag('sort_by', FORM.sort_by) %]
27 27
   [% L.hidden_tag('sort_dir', FORM.sort_dir) %]
28 28
   [% L.hidden_tag('page', FORM.page) %]
29
   [% L.submit_tag(LIST_ACTION, LxERP.t8('Continue'))%]
30

  
31
   <a href="#" onClick="javascript:$('#filter_table input,#filter_table select').val('');">[% LxERP.t8('Reset') %]</a>
32

  
33 29
  </div>
34 30

  
35 31
 </form>
templates/webpages/mass_invoice_create_print_from_do/list_invoices.html
4 4

  
5 5
[%- INCLUDE "common/flash.html" %]
6 6

  
7
[% LIST_ACTION     = 'action_list_invoices' %]
8
[%- PROCESS 'mass_invoice_create_print_from_do/_filter.html' filter=SELF.filter %]
7
[% LIST_ACTION     = 'list_invoices' %]
8
[%- PROCESS 'mass_invoice_create_print_from_do/_filter.html' filter=SELF.invoice_models.filtered.laundered %]
9 9

  
10 10
[% IF noshow == 1 %]
11 11
[% invoices = SELF.invoice_models.get;
......
16 16
 </p>
17 17
[%- ELSE %]
18 18

  
19
 <form method="post" action="controller.pl">
19
 <form method="post" action="controller.pl" id="report_form">
20 20
  <table width="100%">
21 21
   <thead>
22 22
    <tr class="listheading">
......
57 57
   [% L.paginate_controls %]
58 58
  [% END %]
59 59

  
60
  <hr size="3" noshade>
60
  [% L.hidden_tag("action", "MassInvoiceCreatePrint/dispatch") %]
61
  [% L.hidden_tag("printer_id") %]
62
 </form>
61 63

  
62
  [% IF SELF.printers.size %]
64
 [% IF SELF.printers.size %]
65
  <div id="print_options" class="hidden">
63 66
   <p>
64 67
    [% LxERP.t8("Print destination") %]:
65 68
    [% SET  printers = [ { description=LxERP.t8("Download PDF, do not print") } ] ;
66 69
       CALL printers.import(SELF.printers);
67
       L.select_tag("printer_id", printers, title_key="description", default=FORM.printer_id) %]
70
       L.select_tag("", printers, id="print_options_printer_id", title_key="description", default=FORM.printer_id) %]
68 71
   </p>
69
  [% END %]
70 72

  
71
  <p>
72
   [% L.hidden_tag("action", "MassInvoiceCreatePrint/dispatch") %]
73
   [% L.submit_tag("action_print", LxERP.t8("Print")) %]
74
  </p>
75
 </form>
73
   <p>
74
    [% L.button_tag("kivi.MassInvoiceCreatePrint.massPrint()", LxERP.t8('Print')) %]
75
   </p>
76
  </div>
77
 [% END %]
76 78
[%- END %]
77 79
[%- END %]
templates/webpages/mass_invoice_create_print_from_do/list_sales_delivery_orders.html
5 5

  
6 6
[%- INCLUDE "common/flash.html" %]
7 7

  
8
[% LIST_ACTION  = 'action_list_sales_delivery_orders' %]
8
[% LIST_ACTION  = 'list_sales_delivery_orders' %]
9 9
[% SET MODELS = SELF.sales_delivery_order_models;
10 10
       dummy  = MODELS.finalize %]
11 11

  

Auch abrufbar als: Unified diff