summaryrefslogtreecommitdiff
path: root/httemplate/browse/upload_target.html
blob: e166f3520470e10bc8428e56592b70de81db8855 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<& elements/browse.html,
  'title'       => 'Upload targets',
  'menubar'     => [ 'Add a target' => $p.'edit/upload_target.html', ],
  'name'        => 'targets',
  'query'       => { 'table'   => 'upload_target',
                     'hashref' => {},
                   },
  'count_query' => $count_query,
  'header'      => [ '#',
                     'Protocol',
                     'Username',
                     'Server/Domain',
                     'Password',
                     'Path',
                     '', #handling
                   ],
  'fields'      => [ 'targetnum',
                     sub { 
                       my $target = shift;
                       $label{$target->protocol}
                      },
                     'username',
                     'hostname',
                     'password',
                     'path',
                     'handling',
                   ],
  'links'       => [ $link, $link, $link, $link, ],
&>
</TABLE>

<% include('/elements/footer.html') %>

<%once>

my $count_query = 'SELECT COUNT(*) FROM upload_target';
my %label = (
  email => 'Email',
  ftp => 'FTP',
  sftp => 'SFTP',
);
</%once>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my $link = [ $p.'edit/upload_target.html?', 'targetnum' ];
</%init>