Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a3f90d6f

Von Sven Schöling vor etwa 14 Jahren hinzugefügt

  • ID a3f90d6fa23d0a8d026682511e7624bd847d532f
  • Vorgänger 48c946bd
  • Nachfolger 6326597d

Druckeradministration in die Adminumgebung verschoben.

Printercommands werden mit webuser Rechnten ausgeführt, deshalb darf ein User
keine anlegen. Da die Umgebung da völlig anders ist, geht das mit einem Rewrite
der Masken einher.

Unterschiede anzeigen:

SL/AM.pm
1108 1108
  $main::lxdebug->leave_sub();
1109 1109
}
1110 1110

  
1111
sub printer {
1112
  $main::lxdebug->enter_sub();
1113

  
1114
  my ($self, $myconfig, $form) = @_;
1115

  
1116
  # connect to database
1117
  my $dbh = $form->dbconnect($myconfig);
1118

  
1119
  my $query = qq|SELECT id, printer_description, template_code, printer_command
1120
                 FROM printers
1121
                 ORDER BY 2|;
1122

  
1123
  my $sth = $dbh->prepare($query);
1124
  $sth->execute || $form->dberror($query);
1125

  
1126
  $form->{"ALL"} = [];
1127
  while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
1128
    push @{ $form->{ALL} }, $ref;
1129
  }
1130

  
1131
  $sth->finish;
1132
  $dbh->disconnect;
1133

  
1134
  $main::lxdebug->leave_sub();
1135
}
1136

  
1137
sub get_printer {
1138
  $main::lxdebug->enter_sub();
1139

  
1140
  my ($self, $myconfig, $form) = @_;
1141

  
1142
  # connect to database
1143
  my $dbh = $form->dbconnect($myconfig);
1144

  
1145
  my $query =
1146
    qq|SELECT p.printer_description, p.template_code, p.printer_command
1147
       FROM printers p
1148
       WHERE p.id = ?|;
1149
  my $sth = $dbh->prepare($query);
1150
  $sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
1151

  
1152
  my $ref = $sth->fetchrow_hashref("NAME_lc");
1153

  
1154
  map { $form->{$_} = $ref->{$_} } keys %$ref;
1155

  
1156
  $sth->finish;
1157

  
1158
  $dbh->disconnect;
1159

  
1160
  $main::lxdebug->leave_sub();
1161
}
1162

  
1163
sub save_printer {
1164
  $main::lxdebug->enter_sub();
1165

  
1166
  my ($self, $myconfig, $form) = @_;
1167
  my $query;
1168

  
1169
  # connect to database
1170
  my $dbh = $form->dbconnect($myconfig);
1171

  
1172
  my @values = ($form->{printer_description},
1173
                $form->{template_code},
1174
                $form->{printer_command});
1175

  
1176
  # id is the old record
1177
  if ($form->{id}) {
1178
    $query = qq|UPDATE printers SET
1179
                printer_description = ?, template_code = ?, printer_command = ?
1180
                WHERE id = ?|;
1181
    push(@values, $form->{id});
1182
  } else {
1183
    $query = qq|INSERT INTO printers
1184
                (printer_description, template_code, printer_command)
1185
                VALUES (?, ?, ?)|;
1186
  }
1187
  do_query($form, $dbh, $query, @values);
1188

  
1189
  $dbh->disconnect;
1190

  
1191
  $main::lxdebug->leave_sub();
1192
}
1193

  
1194
sub delete_printer {
1195
  $main::lxdebug->enter_sub();
1196

  
1197
  my ($self, $myconfig, $form) = @_;
1198

  
1199
  # connect to database
1200
  my $dbh = $form->dbconnect($myconfig);
1201

  
1202
  my $query = qq|DELETE FROM printers
1203
              WHERE id = ?|;
1204
  do_query($form, $dbh, $query, $form->{id});
1205

  
1206
  $dbh->disconnect;
1207

  
1208
  $main::lxdebug->leave_sub();
1209
}
1210

  
1211 1111
sub payment {
1212 1112
  $main::lxdebug->enter_sub();
1213 1113

  
SL/Auth.pm
33 33
  return $self;
34 34
}
35 35

  
36
sub get_user_dbh {
37
  my ($self, $login) = @_;
38
  my %user = $self->read_user($login);
39
  my $dbh  = DBI->connect(
40
    $user{dbconnect},
41
    $user{dbuser},
42
    $user{dbpasswd},
43
    {
44
      pg_enable_utf8 => $::locale->is_utf8,
45
      AutoCommit     => 0
46
    }
47
  ) or $::form->dberror;
48

  
49
  if ($user{dboptions}) {
50
    $dbh->do($user{dboptions}) or $::form->dberror($user{dboptions});
51
  }
52

  
53
  return $dbh;
54
}
55

  
36 56
sub DESTROY {
37 57
  my $self = shift;
38 58

  
SL/Printer.pm
1
package SL::Printer;
2

  
3
use SL::DBUtils;
4

  
5
sub all_printers {
6
  $::lxdebug->enter_sub;
7

  
8
  my ($self, %params) = @_;
9

  
10
  my $dbh = $::auth->get_user_dbh($params{login});
11

  
12
  my $query = qq|SELECT * FROM printers ORDER BY printer_description|;
13
  my @printers = selectall_hashref_query($::form, $dbh, $query);
14

  
15
  $::lxdebug->leave_sub;
16

  
17
  return wantarray ? @printers : \@printers;
18
}
19

  
20
sub get_printer {
21
  $::lxdebug->enter_sub;
22

  
23
  my ($self, %params) = @_;
24

  
25
  my $dbh = $::auth->get_user_dbh($params{login});
26

  
27
  my $query = qq|SELECT * FROM printers WHERE id = ?|;
28
  my ($printer) = selectfirst_hashref_query($::form, $dbh, $query, $params{id});
29

  
30
  $::lxdebug->leave_sub;
31

  
32
  return $printer;
33
}
34

  
35
sub save_printer {
36
  $main::lxdebug->enter_sub();
37

  
38
  my ($self, %params) = @_;
39

  
40
  # connect to database
41
  my $dbh = $::auth->get_user_dbh($params{login});
42
  my $printer = $params{printer};
43

  
44
  unless ($printer->{id}) {
45
    ($printer->{id}) = selectfirst_array_query($::form, $dbh, "SELECT nextval('id'::text)");
46
    do_query($::form, $dbh, "INSERT INTO printers (id, printer_description) VALUES (?, '')", $printer->{id});
47
  }
48

  
49
  my $query = <<SQL;
50
    UPDATE printers SET
51
      printer_description = ?,
52
      template_code = ?,
53
      printer_command = ?
54
    WHERE id = ?
55
SQL
56
  do_query($::form, $dbh, $query,
57
    $printer->{printer_description},
58
    $printer->{template_code},
59
    $printer->{printer_command},
60
    $printer->{id},
61
  );
62

  
63
  $dbh->commit;
64

  
65
  $::lxdebug->leave_sub;
66
}
67

  
68
sub delete_printer {
69
  $::lxdebug->enter_sub;
70

  
71
  my ($self, %params) = @_;
72

  
73
  my $dbh = $::auth->get_user_dbh($params{login});
74

  
75
  my $query = qq|DELETE FROM printers WHERE id = ?|;
76
  do_query($::form, $dbh, $query, $params{id});
77

  
78
  $dbh->commit;
79

  
80
  $::lxdebug->leave_sub;
81
}
82

  
83
1;
bin/mozilla/admin.pl
52 52

  
53 53
require "bin/mozilla/common.pl";
54 54
require "bin/mozilla/admin_groups.pl";
55
require "bin/mozilla/admin_printer.pl";
55 56

  
56 57
use strict;
57 58

  
bin/mozilla/admin_printer.pl
1
use strict;
2

  
3
use SL::Printer;
4

  
5
sub get_login {
6
  unless ($::form->{login}) {
7
    get_login_form();
8
    ::end_of_request();
9
  }
10
  return $::form->{login};
11
}
12

  
13
sub get_login_form {
14
  my %users = $::auth->read_all_users;
15

  
16
  $::form->header;
17
  print $::form->parse_html_template('admin_printer/login', {
18
    users => [ values %users ],
19
  });
20
}
21

  
22
sub printer_dispatcher {
23
      $::lxdebug->dump(0,  "testing", $::form);
24
  for (qw(get_login_form list_printers add_printer edit_printer save_printer delete_printer list_users)) {
25
    if ($::form->{$_}) {
26
      ::call_sub($::locale->findsub($_));
27
      ::end_of_request()
28
    }
29
  }
30
  die "cannot find sub";
31
}
32

  
33
sub printer_management {
34
  &list_printers;
35
}
36

  
37
sub add_printer {
38
  $::lxdebug->enter_sub;
39

  
40
  my $login   = get_login();
41
  my %users   = $::auth->read_all_users;
42

  
43
  $::form->header;
44
  print $::form->parse_html_template('admin_printer/edit', {
45
    title   => $::locale->text("Add Printer"),
46
    printer => { },
47
    users   => [ values %users ],
48
  });
49

  
50
  $::lxdebug->leave_sub
51
}
52

  
53
sub edit_printer {
54
  $::lxdebug->enter_sub;
55

  
56
  my $login = get_login();
57
  my $id    = $::form->{id} or $::form->{printer}{id} or &add_printer;
58
  my %users   = $::auth->read_all_users;
59

  
60
  my $printer = SL::Printer->get_printer(id => $id, login => $login);
61

  
62
  $::form->header;
63
  print $::form->parse_html_template('admin_printer/edit', {
64
    title   => $::locale->text("Edit Printer"),
65
    printer => $printer,
66
    users   => [ values %users ],
67
  });
68

  
69
  $::lxdebug->leave_sub;
70
}
71

  
72
sub list_printers {
73
  $::lxdebug->enter_sub;
74

  
75
  my $login    = get_login();
76
  my $printers = SL::Printer->all_printers(login => $login);
77
  my %users   = $::auth->read_all_users;
78

  
79
  $::form->header;
80
  print $::form->parse_html_template('admin_printer/list', {
81
    title        => $::locale->text('Printer'),
82
    all_printers => $printers,
83
    edit_link    => build_std_url("login=$login", 'action=edit_printer', 'id='),
84
    users        => [ values %users ],
85
  });
86

  
87
  $::lxdebug->leave_sub;
88
}
89

  
90

  
91
sub save_printer {
92
  $::lxdebug->enter_sub;
93

  
94
  my $login   = get_login();
95
  my $printer = $::form->{printer} || die 'no printer to save';
96

  
97
  $::form->error($::locale->text('Description missing!'))     unless $printer->{printer_description};
98
  $::form->error($::locale->text('Printer Command missing!')) unless $printer->{printer_command};
99

  
100
  SL::Printer->save_printer(%$::form);
101

  
102
  list_printers();
103
  $::lxdebug->leave_sub;
104
}
105

  
106
sub delete_printer {
107
  $::lxdebug->enter_sub;
108

  
109
  my $login   = get_login();
110
  my $printer = $::form->{printer} || die 'no printer to delete';
111

  
112
  SL::Printer->delete_printer(%$::form);
113
  list_printers();
114

  
115
  $::lxdebug->leave_sub;
116
}
117

  
118
1;
bin/mozilla/am.pl
2014 2014
  $main::lxdebug->leave_sub();
2015 2015
}
2016 2016

  
2017

  
2018
sub add_printer {
2019
  $main::lxdebug->enter_sub();
2020

  
2021
  my $form     = $main::form;
2022

  
2023
  $main::auth->assert('config');
2024

  
2025
  $form->{title} = "Add";
2026

  
2027
  $form->{callback} = "am.pl?action=add_printer" unless $form->{callback};
2028

  
2029
  &printer_header;
2030
  &form_footer;
2031

  
2032
  $main::lxdebug->leave_sub();
2033
}
2034

  
2035
sub edit_printer {
2036
  $main::lxdebug->enter_sub();
2037

  
2038
  my $form     = $main::form;
2039
  my %myconfig = %main::myconfig;
2040

  
2041
  $main::auth->assert('config');
2042

  
2043
  $form->{title} = "Edit";
2044

  
2045
  AM->get_printer(\%myconfig, \%$form);
2046

  
2047
  &printer_header;
2048

  
2049
  $form->{orphaned} = 1;
2050
  &form_footer;
2051

  
2052
  $main::lxdebug->leave_sub();
2053
}
2054

  
2055
sub list_printer {
2056
  $main::lxdebug->enter_sub();
2057

  
2058
  my $form     = $main::form;
2059
  my %myconfig = %main::myconfig;
2060
  my $locale   = $main::locale;
2061

  
2062
  $main::auth->assert('config');
2063

  
2064
  AM->printer(\%myconfig, \%$form);
2065

  
2066
  $form->{callback} = "am.pl?action=list_printer";
2067

  
2068
  my $callback = $form->escape($form->{callback});
2069

  
2070
  $form->{title} = $locale->text('Printer');
2071

  
2072
  my @column_index = qw(printer_description printer_command template_code);
2073
  my %column_header;
2074
  $column_header{printer_description} =
2075
      qq|<th class=listheading width=60%>|
2076
    . $locale->text('Printer Description')
2077
    . qq|</th>|;
2078
  $column_header{printer_command} =
2079
      qq|<th class=listheading width=10%>|
2080
    . $locale->text('Printer Command')
2081
    . qq|</th>|;
2082
  $column_header{template_code} =
2083
      qq|<th class=listheading>|
2084
    . $locale->text('Template Code')
2085
    . qq|</th>|;
2086

  
2087
  $form->header;
2088

  
2089
  print qq|
2090
<body>
2091

  
2092
<table width=100%>
2093
  <tr>
2094
    <th class=listtop>$form->{title}</th>
2095
  </tr>
2096
  <tr height="5"></tr>
2097
  <tr>
2098
    <td>
2099
      <table width=100%>
2100
        <tr class=listheading>
2101
|;
2102

  
2103
  map { print "$column_header{$_}\n" } @column_index;
2104

  
2105
  print qq|
2106
        </tr>
2107
|;
2108

  
2109
  my ($i, %column_data);
2110
  foreach my $ref (@{ $form->{ALL} }) {
2111

  
2112
    $i++;
2113
    $i %= 2;
2114

  
2115
    print qq|
2116
        <tr valign=top class=listrow$i>
2117
|;
2118

  
2119

  
2120
    $column_data{printer_description} = qq|<td><a href="am.pl?action=edit_printer&id=$ref->{id}&callback=$callback">$ref->{printer_description}</td>|;
2121
    $column_data{printer_command}           = qq|<td align=right>$ref->{printer_command}</td>|;
2122
    $column_data{template_code} =
2123
      qq|<td align=right>$ref->{template_code}</td>|;
2124

  
2125
    map { print "$column_data{$_}\n" } @column_index;
2126

  
2127
    print qq|
2128
        </tr>
2129
|;
2130
  }
2131

  
2132
  print qq|
2133
      </table>
2134
    </td>
2135
  </tr>
2136
  <tr>
2137
  <td><hr size=3 noshade></td>
2138
  </tr>
2139
</table>
2140

  
2141
<br>
2142
<form method=post action=am.pl>
2143

  
2144
<input name=callback type=hidden value="$form->{callback}">
2145

  
2146
<input type=hidden name=type value=printer>
2147

  
2148
<input class=submit type=submit name=action value="|
2149
    . $locale->text('Add') . qq|">
2150

  
2151
  </form>
2152

  
2153
  </body>
2154
  </html>
2155
|;
2156

  
2157
  $main::lxdebug->leave_sub();
2158
}
2159

  
2160
sub printer_header {
2161
  $main::lxdebug->enter_sub();
2162

  
2163
  my $form     = $main::form;
2164
  my $locale   = $main::locale;
2165

  
2166
  $main::auth->assert('config');
2167

  
2168
  $form->{title}    = $locale->text("$form->{title} Printer");
2169

  
2170
  # $locale->text('Add Printer')
2171
  # $locale->text('Edit Printer')
2172

  
2173
  $form->{printer_description} =~ s/\"/&quot;/g;
2174
  $form->{template_code} =~ s/\"/&quot;/g;
2175
  $form->{printer_command} =~ s/\"/&quot;/g;
2176

  
2177

  
2178
  $form->header;
2179

  
2180
  print qq|
2181
<body>
2182

  
2183
<form method=post action=am.pl>
2184

  
2185
<input type=hidden name=id value=$form->{id}>
2186
<input type=hidden name=type value=printer>
2187

  
2188
<table width=100%>
2189
  <tr>
2190
    <th class=listtop colspan=2>$form->{title}</th>
2191
  </tr>
2192
  <tr height="5"></tr>
2193
  <tr>
2194
    <th align=right>| . $locale->text('Printer') . qq|</th>
2195
    <td><input name=printer_description size=30 value="$form->{printer_description}"></td>
2196
  <tr>
2197
  <tr>
2198
    <th align=right>| . $locale->text('Printer Command') . qq|</th>
2199
    <td><input name=printer_command size=30 value="$form->{printer_command}"></td>
2200
  </tr>
2201
  <tr>
2202
    <th align=right>| . $locale->text('Template Code') . qq|</th>
2203
    <td><input name=template_code size=5 value="$form->{template_code}"></td>
2204
  </tr>
2205
  <td colspan=2><hr size=3 noshade></td>
2206
  </tr>
2207
</table>
2208
|;
2209

  
2210
  $main::lxdebug->leave_sub();
2211
}
2212

  
2213
sub save_printer {
2214
  $main::lxdebug->enter_sub();
2215

  
2216
  my $form     = $main::form;
2217
  my %myconfig = %main::myconfig;
2218
  my $locale   = $main::locale;
2219

  
2220
  $main::auth->assert('config');
2221

  
2222
  $form->isblank("printer_description", $locale->text('Description missing!'));
2223
  $form->isblank("printer_command", $locale->text('Printer Command missing!'));
2224
  AM->save_printer(\%myconfig, \%$form);
2225
  $form->redirect($locale->text('Printer saved!'));
2226

  
2227
  $main::lxdebug->leave_sub();
2228
}
2229

  
2230
sub delete_printer {
2231
  $main::lxdebug->enter_sub();
2232

  
2233
  my $form     = $main::form;
2234
  my %myconfig = %main::myconfig;
2235
  my $locale   = $main::locale;
2236

  
2237
  $main::auth->assert('config');
2238

  
2239
  AM->delete_printer(\%myconfig, \%$form);
2240
  $form->redirect($locale->text('Printer deleted!'));
2241

  
2242
  $main::lxdebug->leave_sub();
2243
}
2244

  
2245 2017
sub add_payment {
2246 2018
  $main::lxdebug->enter_sub();
2247 2019

  
......
2722 2494
    { 'name' => $locale->text('Queue'),   'value' => 'queue',   'selected' => $selected{queue}, },
2723 2495
    ];
2724 2496

  
2725
  AM->printer(\%myconfig, $form);
2726

  
2727 2497
  $form->{PRINTERS} = [];
2728
  foreach my $printer (@{$form->{"ALL"}}) {
2498
  foreach my $printer (SL::Printer->all_printers(%::myconfig)) {
2729 2499
    push @{ $form->{PRINTERS} }, {
2730 2500
      'name'     => $printer->{printer_description},
2731 2501
      'value'    => $printer->{id},
locale/de/all
1206 1206
  'Please read the file'        => 'Bitte lesen Sie die Datei',
1207 1207
  'Please select a customer from the list below.' => 'Bitte einen Endkunden aus der Liste ausw?hlen',
1208 1208
  'Please select a part from the list below.' => 'Bitte w&auml;hlen Sie einen Artikel aus der Liste aus.',
1209
  'Please select a user'        => 'Bitte w?hlen Sie einen Benutzer aus',
1209 1210
  'Please select a vendor from the list below.' => 'Bitte einen H?ndler aus der Liste ausw?hlen',
1210 1211
  'Please select the chart of accounts this installation is using from the list below.' => 'Bitte w&auml;hlen Sie den Kontenrahmen aus, der bei dieser Installation verwendet wird.',
1211 1212
  'Please select the database you want to backup' => 'Bitte w&auml;hlen Sie die zu sichernde Datenbank gefunden',
......
1249 1250
  'Printer'                     => 'Drucker',
1250 1251
  'Printer Command'             => 'Druckbefehl',
1251 1252
  'Printer Command missing!'    => 'Druckbefehl fehlt',
1252
  'Printer Description'         => 'Druckerbeschreibung',
1253
  'Printer deleted!'            => 'Drucker gel?scht!',
1254
  'Printer saved!'              => 'Drucker gespeichert!',
1253
  'Printer Management'          => 'Druckeradministration',
1254
  'Printers are created for a user database. Please select a user. The associated database will be edited.' => 'Drucker werden f?r eine Benutzerdatenbank erzeugt. Bitte w?hlen Sie einen Benutzer aus. Die Drucker werden in der verkn?pften Datenbank angelegt.',
1255 1255
  'Printing ... '               => 'Es wird gedruckt.',
1256 1256
  'Prior to Lx-Office v2.4.0 the user could enter arbitrary strings as units for parts, services and in invoices, sales quotations etc.' => 'Vor Lx-Office 2.4.0 konnte der Benutzer bei Artikeln, Dienstleistungen und Rechnungen, Angeboten etc beliebige Einheiten angeben.',
1257 1257
  'Prior to Lx-Office v2.4.0 the user had to chose the accounts for each part and service.' => 'Vor Lx-Office 2.4.0 musste der Benutzer die Konten bei jeder Ware und jeder Dienstleistung einzeln ausw&auml;hlen.',
menu.ini
667 667
action=edit_greetings
668 668

  
669 669

  
670
[System--Printer]
671
module=menu.pl
672
action=acc_menu
673
target=acc_menu
674
submenu=1
675

  
676
[System--Printer--Add Printer]
677
module=am.pl
678
action=add_printer
679

  
680
[System--Printer--List Printer]
681
module=am.pl
682
action=list_printer
683

  
684 670
[System--Payment Terms]
685 671
module=menu.pl
686 672
action=acc_menu
templates/webpages/admin/list_users.html
36 36

  
37 37
  <input type="submit" class="submit" name="action" value="[% 'Add User' | $T8 %]">
38 38
  <input type="submit" class="submit" name="action" value="[% 'Edit groups' | $T8 %]">
39
  <input type="submit" class="submit" name="action" value="[% 'Printer Management' | $T8 %]">
39 40
  <input type="submit" class="submit" name="action" value="[% 'Pg Database Administration' | $T8 %]">
40 41
  [% IF LOCKED %]
41 42
   <input type="submit" class="submit" name="action" value="[% 'Unlock System' | $T8 %]">
templates/webpages/admin_printer/_login_form.html
1
[%- USE T8 %]
2
[%- USE L %]
3
<p>[% 'Please select a user' | $T8 %]: [% L.select_tag('login', L.options_for_select(users, value => 'login', title => 'login', default => login)) %]</p>
4

  
templates/webpages/admin_printer/edit.html
1
[%- USE T8 %]
2
<body>
3

  
4
<form method=post>
5

  
6
<h1 class=listtop colspan=2>[% title %]</h1>
7

  
8
[%- PROCESS 'admin_printer/_login_form.html' %]
9

  
10
<input type=hidden name="printer.id" value="[% printer.id | html %]">
11
<table width=100%>
12
  <tr height="5"></tr>
13
  <tr>
14
    <th align=right>[% 'Printer' | $T8 %]</th>
15
    <td><input name="printer.printer_description" size=30 value="[% printer.printer_description | html %]"></td>
16
  <tr>
17
  <tr>
18
    <th align=right>[% 'Printer Command' | $T8 %]</th>
19
    <td><input name="printer.printer_command" size=30 value="[% printer.printer_command | html %]"></td>
20
  </tr>
21
  <tr>
22
    <th align=right>[% 'Template Code' | $T8 %]</th>
23
    <td><input name="printer.template_code" size=5 value="[% printer.template_code | html %]"></td>
24
  </tr>
25
  <td colspan=2><hr size=3 noshade></td>
26
  </tr>
27
</table>
28

  
29
<br>
30
<input type=hidden name=action value="printer_dispatcher">
31
<input type=submit class=submit name=save_printer value="[% 'Save' | $T8 %]">
32

  
33
[%- IF id %]
34
<input type=submit class=submit name=delete_printer value="[% 'Delete' | $T8 %]">
35
[%- END %]
36
<input type=submit class=submit name=list_printers value="[% 'Back' | $T8 %]">
37

  
38
</form>
39

  
40
</body>
41
</html>
templates/webpages/admin_printer/list.html
1
[%- USE T8 %]
2

  
3
<body>
4
<form method='post'>
5

  
6
<h1 class=listtop>[% title %]</h1>
7

  
8
[%- PROCESS 'admin_printer/_login_form.html' %]
9

  
10
<table width=100%>
11
  <tr>
12
    <td>
13
      <table width=100%>
14
        <tr class=listheading>
15
          <th>[% 'Description' | $T8 %]</th>
16
          <th>[% 'Printer Command' | $T8 %]</th>
17
          <th>[% 'Template Code' | $T8 %]</th>
18
        </tr>
19
[%- IF all_printers.size %]
20
[%- FOREACH row = all_printers %]
21
        <tr valign=top class="listrow[% loop.count % 2 %]">
22
          <td><a href="[% edit_link %][% row.id %]">[% row.printer_description %]</a></td>
23
          <td align=right>[% row.printer_command | html %]</td>
24
          <td align=right>[% row.template_code | html %]</td>
25
        </tr>
26
[%- END %]
27
[%- ELSE %]
28
        <tr><td colspan='3'>[% 'No data was found.' | $T8 %]</td></tr>
29
[%- END %]
30
      </table>
31
    </td>
32
  </tr>
33
  <tr>
34
  <td><hr size=3 noshade></td>
35
  </tr>
36
</table>
37

  
38
<br>
39
 <input type="hidden" name="action" value="printer_dispatcher">
40
 <input type="submit" name="add_printer" value ="[% 'Add' | $T8 %]">
41
 <input type="submit" name='get_login_form' value="[% 'Back' | $T8 %]">
42
</form>
43
</body>
44
</html>
templates/webpages/admin_printer/login.html
1
[% USE T8 %]
2
[% USE L %]
3

  
4
<h1 class=listtop>[% 'Printer Management' | $T8 %]</h1>
5
<form method='post'>
6
<p>[% 'Printers are created for a user database. Please select a user. The associated database will be edited.' | $T8 %]</p>
7

  
8
[%- PROCESS 'admin_printer/_login_form.html' %]
9

  
10
<input type='hidden' name='action' value='printer_dispatcher'>
11
<p>
12
<input type='submit' name='list_printers' value='[% 'Continue' | $T8 %]'>
13
<input type='submit' name='list_users' value='[% 'Back' | $T8 %]'>
14
</p>
15

  
16
</form>

Auch abrufbar als: Unified diff