RT#32892: Monthly Sales Tax Report [fixed names and colors]
[freeside.git] / httemplate / browse / upload_target.html
1 <& elements/browse.html,
2   'title'       => 'Upload targets',
3   'menubar'     => [ 'Add a target' => $p.'edit/upload_target.html', ],
4   'name'        => 'targets',
5   'query'       => { 'table'   => 'upload_target',
6                      'hashref' => {},
7                    },
8   'count_query' => $count_query,
9   'header'      => [ '#',
10                      'Protocol',
11                      'Username',
12                      'Server/Domain',
13                      'Password',
14                      'Path',
15                      '', #handling
16                    ],
17   'fields'      => [ 'targetnum',
18                      sub { 
19                        my $target = shift;
20                        $label{$target->protocol}
21                       },
22                      'username',
23                      'hostname',
24                      'password',
25                      'path',
26                      'handling',
27                    ],
28   'links'       => [ $link, $link, $link, $link, ],
29 &>
30 </TABLE>
31
32 <% include('/elements/footer.html') %>
33
34 <%once>
35
36 my $count_query = 'SELECT COUNT(*) FROM upload_target';
37 my %label = (
38   email => 'Email',
39   ftp => 'FTP',
40   sftp => 'SFTP',
41 );
42 </%once>
43 <%init>
44
45 die "access denied"
46   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
47
48 my $link = [ $p.'edit/upload_target.html?', 'targetnum' ];
49 </%init>