summaryrefslogtreecommitdiff
path: root/httemplate/browse/upload_target.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/browse/upload_target.html')
-rw-r--r--httemplate/browse/upload_target.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/httemplate/browse/upload_target.html b/httemplate/browse/upload_target.html
new file mode 100644
index 000000000..e166f3520
--- /dev/null
+++ b/httemplate/browse/upload_target.html
@@ -0,0 +1,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>