Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1c4d3cd5

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID 1c4d3cd500d74096f96a7a1497c8a68b3bedb64d
  • Vorgänger 64c45e8f
  • Nachfolger 0c23c415

ActionBar: Verwendung bei Artikelsuche

Unterschiede anzeigen:

bin/mozilla/ic.pl
94 94
                                                                           'include_prefix' => 'l_',
95 95
                                                                           'include_value'  => 'Y');
96 96

  
97
  setup_ic_search_action_bar();
97 98
  $form->header;
98 99

  
99 100
  $form->get_lists('partsgroup'    => 'ALL_PARTSGROUPS');
......
586 587
    $report->add_data($row);
587 588
  }
588 589

  
589
  $report->generate_with_headers();
590
  setup_ic_generate_report_action_bar();
591
  $report->generate_with_headers(action_bar => 1);
590 592

  
591 593
  $lxdebug->leave_sub();
592 594
}    #end generate_report
593 595

  
594
sub continue { call_sub($form->{"nextsub"}); }
596
sub setup_ic_search_action_bar {
597
  my %params = @_;
598

  
599
  for my $bar ($::request->layout->get('actionbar')) {
600
    $bar->add(
601
      action => [
602
        t8('Continue'),
603
        submit    => [ '#form', { action => 'generate_report' } ],
604
        accesskey => 'enter',
605
      ],
606

  
607
      action => [
608
        t8('TOP100'),
609
        submit => [ '#form', { action => 'top100' } ],
610
      ],
611
    );
612
  }
613
}
614

  
615
sub setup_ic_generate_report_action_bar {
616
  my %params = @_;
617

  
618
  for my $bar ($::request->layout->get('actionbar')) {
619
    $bar->add(
620
      combobox => [
621
        action => [
622
          t8('Add'),
623
        ],
624
        action => [
625
          t8('Add Part'),
626
          submit    => [ '#new_form', { action => 'Part/add_part' } ],
627
          accesskey => 'enter',
628
        ],
629
        action => [
630
          t8('Add Service'),
631
          submit    => [ '#new_form', { action => 'Part/add_service' } ],
632
        ],
633
        action => [
634
          t8('Add Assembly'),
635
          submit    => [ '#new_form', { action => 'Part/add_assembly' } ],
636
        ],
637
        action => [
638
          t8('Add Assortment'),
639
          submit    => [ '#new_form', { action => 'Part/add_assortment' } ],
640
        ],
641
      ], # end of combobox "Add part"
642
    );
643
  }
644
}
templates/webpages/ic/generate_report_bottom.html
47 47
 </table></td></tr>
48 48
</table>
49 49

  
50
<form method="post" action="controller.pl">
51

  
50
<form method="post" action="controller.pl" id="new_form">
52 51
 <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
53

  
54
 <input type="hidden" name="action" id="item_id" value="Part/add_part">
55

  
56
 <input class="submit" type="submit" onclick="$('#item_id').val('Part/add_part');return true;"       value="[%- 'Add Part' | $T8 %]">
57
 <input class="submit" type="submit" onclick="$('#item_id').val('Part/add_service');return true;"    value="[%- 'Add Service' | $T8 %]">
58
 <input class="submit" type="submit" onclick="$('#item_id').val('Part/add_assembly');return true;"   value="[%- 'Add Assembly' | $T8 %]">
59
 <input class="submit" type="submit" onclick="$('#item_id').val('Part/add_assortment');return true;" value="[%- 'Add Assortment' | $T8 %]">
60

  
61 52
</form>
templates/webpages/ic/search.html
6 6
[% SET style="width: 250px" %]
7 7
<h1>[% title %]</h1>
8 8

  
9
 <form method="post" action="ic.pl">
9
 <form method="post" action="ic.pl" id="form">
10 10

  
11 11
  <input type="hidden" name="searchitems" value="[% HTML.escape(searchitems) %]">
12 12
  <input type="hidden" name="title" value="[% HTML.escape(title) %]">
......
14 14
  <input type="hidden" name="revers" value="[% HTML.escape(revers) %]">
15 15
  <input type="hidden" name="lastsort" value="[% HTML.escape(lastsort) %]">
16 16

  
17
  <input type="hidden" name="nextsub" value="generate_report">
18 17
  <input type="hidden" name="sort" value="description">
19 18

  
20 19
  <input type="hidden" name="ndxs_counter" value="[% HTML.escape(ndxs_counter) %]">
......
233 232
   </tr>
234 233
   <tr><td colspan="4"><hr size="3" noshade></td></tr>
235 234
  </table>
236

  
237
  <p>
238
   <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
239
   <input class="submit" type="submit" name="action" value="[% 'TOP100' | $T8 %]">
240
  </p>
241 235
 </form>

Auch abrufbar als: Unified diff