Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b755a636

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID b755a636043b110ad180bb0e6b331e4fbe0cc68c
  • Vorgänger ee41b99d
  • Nachfolger 9ea32302

ActionBar: Verwendung bei »Einkauf« → »Berichte« → »Einkaufsrechnungen…«

Unterschiede anzeigen:

bin/mozilla/ap.pl
915 915

  
916 916
  $::request->layout->add_javascripts("autocomplete_project.js");
917 917

  
918
  setup_ap_search_action_bar();
919

  
918 920
  $form->header;
919 921
  print $form->parse_html_template('ap/search', { %myconfig });
920 922

  
......
1030 1032
  push @options, $locale->text('Closed')                                                                 if ($form->{closed});
1031 1033

  
1032 1034
  $report->set_options('top_info_text'        => join("\n", @options),
1033
                       'raw_bottom_info_text' => $form->parse_html_template('ap/ap_transactions_bottom'),
1034 1035
                       'output_format'        => 'HTML',
1035 1036
                       'title'                => $form->{title},
1036 1037
                       'attachment_basename'  => $locale->text('vendor_invoice_list') . strftime('_%Y%m%d', localtime time),
......
1105 1106
  $report->add_separator();
1106 1107
  $report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal'));
1107 1108

  
1109
  setup_ap_transactions_action_bar();
1108 1110
  $report->generate_with_headers();
1109 1111

  
1110 1112
  $main::lxdebug->leave_sub();
......
1143 1145
  $main::lxdebug->leave_sub();
1144 1146
}
1145 1147

  
1148
sub setup_ap_search_action_bar {
1149
  my %params = @_;
1150

  
1151
  for my $bar ($::request->layout->get('actionbar')) {
1152
    $bar->add(
1153
      action => [
1154
        $::locale->text('Search'),
1155
        submit    => [ '#form', { action => "ap_transactions" } ],
1156
        accesskey => 'enter',
1157
      ],
1158
    );
1159
  }
1160
}
1161

  
1162
sub setup_ap_transactions_action_bar {
1163
  my %params = @_;
1164

  
1165
  for my $bar ($::request->layout->get('actionbar')) {
1166
    $bar->add(
1167
      combobox => [
1168
        action => [ t8('Add') ],
1169
        link => [
1170
          t8('Purchase Invoice'),
1171
          link => [ 'ir.pl?action=add' ],
1172
        ],
1173
        link => [
1174
          t8('AP Transaction'),
1175
          link => [ 'ap.pl?action=add' ],
1176
        ],
1177
      ], # end of combobox "Add"
1178
    );
1179
  }
1180
}
1181

  
1146 1182
sub setup_ap_display_form_action_bar {
1147 1183
  my $transdate               = $::form->datetonum($::form->{transdate}, \%::myconfig);
1148 1184
  my $closedto                = $::form->datetonum($::form->{closedto},  \%::myconfig);
menus/user/00-erp.yaml
459 459
  module: ap.pl
460 460
  params:
461 461
    action: search
462
    nextsub: ap_transactions
463 462
- parent: ap_reports
464 463
  id: ap_reports_delivery_plan
465 464
  name: Delivery Plan
templates/webpages/ap/ap_transactions_bottom.html
1
[% USE T8 %][% USE HTML %] <form method="post" action="dispatcher.pl?M=ap">
2

  
3
  <input name="callback" type="hidden" value="[% callback %]">
4

  
5
  [% 'Create new' | $T8 %]<br>
6

  
7
  <input class="submit" type="submit" name="A_ap_transaction" value="[%- 'AP Transaction' | $T8 %]">
8
  <input class="submit" type="submit" name="A_vendor_invoice" value="[%- 'Vendor Invoice' | $T8 %]">
9

  
10
 </form>
11

  
templates/webpages/ap/search.html
3 3
[% SET style="width: 250px" %]
4 4
<h1>[% title %]</h1>
5 5

  
6
 <form method=post name="search" action=[% script %]>
6
 <form method="post" name="search" action="ap.pl" id="form">
7 7

  
8 8
  <table width=100%>
9 9
  <tr>
......
137 137
      </table>
138 138
     </td>
139 139
    </tr>
140
    <tr>
141
     <td><hr size=3 noshade></td>
142
    </tr>
143 140
   </table>
144
   <input type=hidden name=nextsub value=[% nextsub %]>
145
   <br>
146
   <input class=submit type=submit name=action value="[% 'Continue' | $T8 %]">
147 141
  </form>

Auch abrufbar als: Unified diff