initial commit of file from CVS for smeserver-shared-folders on Sat Sep 7 21:04:36 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 21:04:36 +10:00
parent eb9f5d0a97
commit 80a1e6f928
119 changed files with 15333 additions and 2 deletions

View File

@@ -0,0 +1,54 @@
%#
%# Create or Modify shared folder
%#
<div class="shf_create_modify">
<h2>
%= l('shf_ADD_TITLE')
</h2>
%= $c->render_to_string(inline =>l('shf_NAME_FIELD_DESC'))
<br>
% my $btn = $c->l('shf_ADD');
%= form_for '/shared_folders' => (method => 'POST') => begin
%my $name = $c->param("name") || '';
%my $desc = $c->param("desc") || '';
<span class=label>
%=l "shf_NAME_LABEL"
</span>
<span class=data>
%= text_field name =>$name
</span><br>
<span class=label>
%=l "shf_DESCRIPTION"
</span>
<span class=data>
%= text_field description=>$desc
</span><br>
%= l('shf_DESC_SMB_SETTINGS')
<span class=label>
%=l "shf_LABEL_SMB_ACCESS"
</span>
<span class=data>
% param SMBaccess => $shf_datas->{param_details}->{SMBaccess};
%= select_field SMBaccess =>$shf_datas->{SMBaccess}
</span><br>
<span class=label>
%=l "shf_LABEL_RECYCLEBIN"
</span>
<span class=data>
$ param recyclebin => $shf_datas->{param_details}->{recyclebin};
%= select_field recyclebin=>$shf_datas->{recyclebin}
</span><br>
<span class=label>
%=l "shf_LABEL_RETENTION"
</span>
<span class=data>
$ param retention => $shf_datas->{param_details}->{retention};
%= select_field retention=>$shf_datas->{retention}
</span><br>
%= l('shf_DESC_HTTP_SETTINGS')
%= submit_button "$btn", class => 'action'
% end
</div>

View File

@@ -0,0 +1,33 @@
%#
%# Delete shared folder
%#
<div class="shf_delete">
<h2>
%= l('shf_REMOVE_TITLE')
</h2>
%= $c->render_to_string(inline =>l('shf_REMOVE_DESC'))
<br>
% my $btn = $c->l('shf_REMOVE');
%= form_for '/shared_folders' => (method => 'POST') => begin
%my $name = $c->param("name");
%my $desc = $c->param("desc") || '';
<span class=label>
%=l "shf_NAME"
</span>
<span class=data>
%= $name
</span><br>
<span class=label>
%=l "shf_DESCRIPTION"
</span>
<span class=data>
%= $desc
</span><br>
%= hidden_field mode=>"DEL"
%= hidden_field name=>$name
%= hidden_field desc=>$desc
%= submit_button "$btn", class => 'action'
% end
</div>

View File

@@ -0,0 +1,94 @@
<div id='shf_list'>
% my $btn = l('shf_LABEL_ADD_SHARE_BUTTON');
%= form_for '/shared_foldersc' => (method => 'POST') => begin
<br>
%= submit_button "$btn", class => 'action'
<br>
%# Table of shares
% if ($empty){
<div class=sme-error>
%=l 'shf_NO_SHARES'
</div>
% } else {
<table class="sme-border"><tbody>
<tr>
<th class='sme-border'>
%=l 'NAME'
</th>
<th class='sme-border'>
%=l 'DESCRIPTION'
</th>
<th class='sme-border' colspan=3>
%=l 'shf_ACTION'
</th>
</tr>
% foreach my $sharedfolder (@$sharedfolders) {
<tr>
%= t td => (class => 'sme-border') => $sharedfolder->{"Name"}
%= t td => (class => 'sme-border') => $sharedfolder->{"Description"}
<td class=sme-border>
<a href="/smanager/shared_foldersp?mode=PERM&name=<%= $sharedfolder->{"Name"}%>"><%=l 'shf_PERMISSIONS'%></a>
</td>
<td class=sme-border>
<a href="/smanager/shared_foldersc?mode=MOD&name=<%= $sharedfolder->{"Name"}%>"><%=l 'MODIFY'%></a>
</td>
%
<td class=sme-border>
<a href="/smanager/shared_foldersd?mode=DEL&name=<%= $sharedfolder->{"Name"}%>&desc=<%= $sharedfolder->{"Description"}%>"><%=l 'REMOVE'%></a>
</td>
</tr>
%}
</tbody>
</table>
%}
%#Table of encrypted shares
<hr><h2>
%=l 'shf_ENCRYPT_FORM_TITLE'
</h2>
%=l 'shf_ENCRYPT_FIRSTPAGE_DESC'
<br>
% if ($emptye){
<div class=sme-error>
%=l 'shf_ENCRYPT_NO_ENCRYPTED_SHARE'
</div>
% } else {
<table class="sme-border"><tbody>
<tr>
<th class='sme-border'>
%=l 'NAME'
</th>
<th class='sme-border'>
%=l 'DESCRIPTION'
</th>
<th class='sme-border'>
%=l 'shf_ENCRYPT_STATUS'
</th>
<th class='sme-border' colspan=3>
%=l 'shf_ACTION'
</th>
</tr>
% foreach my $encryptedfolder (@$encryptedfolders) {
<tr>
%= t td => (class => 'sme-border') => $encryptedfolder->{"Name"}
%= t td => (class => 'sme-border') => $encryptedfolder->{"Description"}
%= t td => (class => 'sme-border') => $c->l($encryptedfolder->{"Status"})
% my $action = $encryptedfolder->{"Action"};
% my $actiondesc = $c->l("$action");
<td class='sme-border'><a href='/smanager/shared_folderse?name=<%= $encryptedfolder->{"Name"}%>&mode=<%=$actiondesc%>'><%=$actiondesc%></a></td>
</tr>
%}
</tbody>
</table>
% }
% end
</div>

View File

@@ -0,0 +1,59 @@
%#
%# Delete shared folder
%#
<div class="shf_delete">
% my $btn = $c->l('SAVE');
% my $MailServer = $shf_datas->{mailserver};
%= form_for '/shared_folders_save' => (method => 'POST') => begin
<br>
% my $domain = $c->param('domain');
%=$c->render_to_string(inline =>l('shf_Delegate_Domain',$domain))
<br>
<span class=label>
%=l "shf_Server_or_IP"
</span>
<span class=data>
%=text_field 'MailServer' =>$MailServer
</span>
<br><br>
%if ($empty) {
%=$c->l('shf_No_pseudonyms_for',$domain);
<br>
<a href="/smanager/shared_folders3?domain=<%=$domain %>&mode=new"><button type='button'><%= $c->l('shf_Click_Here')%></button></a>
%=$c->render_to_string(inline=>l('shf_Click_Here_first'))
<br>
%} else {
%=$c->l('shf_Current_list_for',$domain);
<br>
<a href="/smanager/shared_folders3?domain=<%=$domain %>&mode=new"><button type='button'><%= $c->l('shf_Click_Here')%></button></a>
%=$c->render_to_string(inline=>l('shf_Click_Here_add'))
<br><br>
%#Table of pseudonyms:
<table class="sme-border"><tbody>
<tr>
<th class='sme-border'>
%=l 'shf_Pseudonyms'
</th>
<th class='sme-border'>
%=l 'shf_Local_User'
</th>
<th class='sme-border'>
</th>
<th class='sme-border' '>
</th>
</tr>
</tbody>
</table>
%}
<br>
%=$c->render_to_string(inline =>l('shf_Need_Save'));
<br>
%= submit_button "$btn", class => 'action'
% end
</div>

View File

@@ -0,0 +1,43 @@
% layout 'default', title => "Sme server 2 - Shared Folders", share_dir => './';
% content_for 'module' => begin
<div id="module">
% if ($config->{debug} == 1) {
<p>
%= dumper $c->current_route
</p>
% }
<h1><%=$title%></h1>
%= $modul
%if ($shf_datas->{first}) {
%=$c->render_to_string(inline =>$c->l($shf_datas->{first}))
%} elsif ($shf_datas->{success}) {
<div class='sme-success'>
<h2> Operation Status Report</h2>
%= $c->l($shf_datas->{success});
</div>
%} elsif ($shf_datas->{error}) {
<div class='sme-error'>
<h2> Operation Status Report - error</h2>
%= $c->l($shf_datas->{error});
</div>
%}
% if ($shf_datas->{trt} eq 'CR_MOD') {
%= include 'partials/_shf_create_modify'
%} elsif ($shf_datas->{trt} eq 'DEL') {
%= include 'partials/_shf_delete'
%} elsif ($shf_datas->{trt} eq 'PERM') {
%= include 'partials/_shf_permissions'
%} else {
%= include 'partials/_shf_list'
%}
</div>
%end