d"
+# Expects ?trt=PANEL&selected="TableRowName" plus any other required
+#
+# OR it maybe a post from the main panel to add a new record
+#
+#load up all supplied params into prefix_data hash
+#call get-selected-PANEL() - returns hash of all relevent parameters
+#load up returned hash into prefix_data
+#render - to called panel
+
+ my ($c,$trt) = @_;
+ $c->app->log->info($c->log_req);
+
+ #The most common ones - you might want to comment out any not used.
+ $cdb = esmith::ConfigDB->open() || die("Couldn't open config db");
+ $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db");
+ $ndb = esmith::NetworksDB->open() || die("Couldn't open Network db");
+ $hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db");
+ $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
+
+ my $title = $c->l('sf_Shared_Folders');
+ my $modul = "";
+
+ # Accessing all parameters
+ my $params = $c->req->params->to_hash;
+
+ # Get number of parameters
+ my $num_params = keys %$params;
+
+ #Tag as Post or Get (ie. create new entry or edit existing one
+ my $is_new_record = ($c->req->method() eq 'POST');
+
+ #Params are available in the hash "params" - copy to the prefix_data hash
+ #while (my ($key, $value) = each %{$c->req->params->to_hash}) {
+ # $sf_data{$key} = $value;
+ #}
+
+ # the value of trt will tell you which panel has returned
+ if (! $trt){
+ $trt = $c->param('trt') || 'LIST'; #Indicates where to go now
+ }
+
+ # Now add in the params from the selected row from the table
+
+ my %selectedrow;
+
+ if ($trt eq 'LIST'){
+ #Validate Get selected row (if applicable) LIST
+ %selectedrow = $c->get_selected_LIST($sf_data{'Selected'},$is_new_record);
+ }
+
+ if ($trt eq 'MODIFY'){
+ #Validate Get selected row (if applicable) MODIFY
+ %selectedrow = $c->get_selected_MODIFY($sf_data{'Selected'},$is_new_record);
+ }
+
+ if ($trt eq 'PERMISSIONS'){
+ #Validate Get selected row (if applicable) PERMISSIONS
+ %selectedrow = $c->get_selected_PERMISSIONS($sf_data{'Selected'},$is_new_record);
+ }
+
+ if ($trt eq 'REMOVE'){
+ #Validate Get selected row (if applicable) REMOVE
+ %selectedrow = $c->get_selected_REMOVE($sf_data{'Selected'},$is_new_record);
+ }
+
+
+ #Copy in the selected row params to the prefix_data hash to pass to the panel
+ while (my ($key, $value) = each %selectedrow){
+ $sf_data{$key} = $value;
+ }
+ # Where to go now
+ $sf_data{'trt'} = $trt;
+
+ # Set up other shared data according to the panel to go to
+
+ if ($trt eq 'LIST'){
+ # pickup any other contents needed and load them into hash shared with panel
+ my %returned_hash;
+ # subroutine returns a hash directly
+ %returned_hash = $c->get_data_for_panel_LIST();
+ # Copy each key-value pair from the returned hash to the prefix data hash
+ while (my ($key, $value) = each %returned_hash) {
+ $sf_data{$key} = $value;
+ }
+ }
+
+ if ($trt eq 'MODIFY'){
+ # pickup any other contents needed and load them into hash shared with panel
+ my %returned_hash;
+ # subroutine returns a hash directly
+ %returned_hash = $c->get_data_for_panel_MODIFY();
+ # Copy each key-value pair from the returned hash to the prefix data hash
+ while (my ($key, $value) = each %returned_hash) {
+ $sf_data{$key} = $value;
+ }
+ }
+
+ if ($trt eq 'PERMISSIONS'){
+ # pickup any other contents needed and load them into hash shared with panel
+ my %returned_hash;
+ # subroutine returns a hash directly
+ %returned_hash = $c->get_data_for_panel_PERMISSIONS();
+ # Copy each key-value pair from the returned hash to the prefix data hash
+ while (my ($key, $value) = each %returned_hash) {
+ $sf_data{$key} = $value;
+ }
+ }
+
+ if ($trt eq 'REMOVE'){
+ # pickup any other contents needed and load them into hash shared with panel
+ my %returned_hash;
+ # subroutine returns a hash directly
+ %returned_hash = $c->get_data_for_panel_REMOVE();
+ # Copy each key-value pair from the returned hash to the prefix data hash
+ while (my ($key, $value) = each %returned_hash) {
+ $sf_data{$key} = $value;
+ }
+ }
+
+
+ # and table control fields
+ $c->stash(Table1=>$c->get_Table1());
+ $c->stash(Table2=>$c->get_Table2());
+
+
+ # Data for panel
+ $c->stash(
+ title => $title,
+ modul => $modul,
+ sf_data => \%sf_data
+ );
+ $c->render(template => "shares");
+}
+1;
\ No newline at end of file
diff --git a/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shared_folders/en.pm b/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shared_folders/en.pm
deleted file mode 100644
index 4f110dc..0000000
--- a/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shared_folders/en.pm
+++ /dev/null
@@ -1,125 +0,0 @@
-package SrvMngr::I18N::Modules::Shared_folders::en;
-use strict;
-use warnings;
-use utf8;
-use Mojo::Base 'SrvMngr::I18N';
-
-use SrvMngr::I18N::Modules::General::en;
-
-my %lexicon = (
-
-'shf_title' => 'Shared Folders',
-'shf_FORM_TITLE' => ' Create, modify, or remove shared folders',
-'shf_FIRSTPAGE_DESC' => ' You can remove any shared folder by clicking on the corresponding command next to the shared folder.',
-'shf_ADD_TITLE' => ' Create or modify a shared folder',
-'shf_NAME_FIELD_DESC' => ' The share name should contain only lower-case letters, numbers, periods, hyphens and underscores, and should start with a lower-case letter. For example "johnson", "intra", and "cust3.prj12" are all valid names, but "3associates", "John Smith" and "Bus!Partner" are not. The name is limited to [_1] characters.',
-'shf_NAME_LABEL' => ' Shared folder name',
-'shf_REMOVE_TITLE' => ' Remove shared folder',
-'shf_REMOVE_DESC' => '
- You are about to remove the following shared folder
- All files belonging to this shared folder will be deleted.
- Are you sure you wish to remove it ?
- ',
-'shf_ERROR_WHILE_CREATING_SHARE' => ' An error occurred while creating the shared folder.',
-'shf_SUCCESSFULLY_CREATED_SHARE' => ' Successfully created shared folder.',
-'shf_NO_SHARES' => ' There are no shared folders currently configured.',
-'shf_CANT_FIND_SHARE' => ' Can\'t find account for [_1] (does it exist?)',
-'shf_CANT_CREATE_SHARE' => ' Can\'t create new account for [_1] (does it already exist?)',
-'shf_ERROR_WHILE_MODIFYING_SHARE' => ' An error occurred while modifying the shared folder.',
-'shf_SUCCESSFULLY_MODIFIED_SHARE' => ' Successfully modified shared folder.',
-'shf_SUCCESSFULLY_DELETED_SHARE' => ' Successfully deleted shared folder.',
-'shf_ERROR_WHILE_DELETING_SHARE' => ' An error occurred while deleting the share.',
-'shf_Shares' =>
-'Shares',
-'shf_INVALID_SHARE_DESCRIPTION' =>
-'Error: unexpected or missing characters in share description',
-'shf_ACCT_NAME_HAS_INVALID_CHARS' =>
-'The shared folder name "[_1]" contains invalid characters. Shared folder names must start with a lower case letter and contain only lower case letters, numbers, and hyphens.',
-'shf_MAX_SHARE_NAME_LENGTH_ERROR' => ' The shared folder name "[_1]" is too long. The maximum is [_1] characters.',
-'shf_ACCT_CLASHES_WITH_PSEUDONYM' => '
- The account "[_1]" clashes with pseudonym details for [_2] account "[_3]". [_2] is a pseudonym for [_1].
- ',
-'shf_ACCOUNT_EXISTS' => ' The account "[_1]" is an existing [_2] account.',
-'shf_LABEL_ADD_SHARE_BUTTON' => ' Create a new shared folder',
-'shf_DESC_PERMISSIONS' => ' You can use this matrix to define groups and users access permissions.',
-'shf_DESC_SMB_SETTINGS' => ' The following settings control the access of this shared folder from the local network, using the SMB/CIFS protocol. ',
-'shf_LABEL_SMB_ACCESS' => ' SMB Access',
-'shf_LABEL_RECYCLEBIN' => ' Recycle bin',
-'shf_LABEL_RETENTION' => ' Retention time',
-'shf_UNLIMITED' => ' unlimited',
-'shf_ONE_WEEK' => ' one week',
-'shf_ONE_MONTH' => ' one month',
-'shf_SIX_MONTHS' => ' six months',
-'shf_ONE_YEAR' => ' one year',
-'shf_DESC_HTTP_SETTINGS' => ' The following settings control the access of this shared folder using the HTTP/HTTPS protocol.',
-'shf_LABEL_HTTP_ACCESS' => ' Web Access',
-'shf_LABEL_WEBDAV' => ' WebDav support',
-'shf_LABEL_REQUIRE_SSL' => ' Force secure connections',
-'shf_LABEL_INDEXES' => ' Indexes',
-'shf_LABEL_DYNAMIC_CONTENT' => ' Dynamic content execution (PHP, CGI, SSI)',
-'shf_LOCAL_NETWORK_NO_PASSWORD' => 'Local network (no password required)',
-'shf_LOCAL_NETWORK_PASSWORD' => 'Local network (password required)',
-'shf_ENTIRE_INTERNET_NO_PASSWORD' => 'Entire Internet (no password required)',
-'shf_ENTIRE_INTERNET_PASSWORD' => 'Entire Internet (password required)',
-'shf_ENTIRE_INTERNET_PASSWORD_REMOTE' => 'Entire Internet (password required outside local network)',
-'shf_NONE' => 'No access',
-'shf_ENABLED_BROWSEABLE' => 'Enabled, browseable',
-'shf_ENABLED_NON_BROWSEABLE' => 'Enabled, hidden',
-'shf_DONT_KEEP_VERSIONS' => 'Enabled, keep only the latest version',
-'shf_KEEP_VERSIONS' => 'Enabled, keep a copy of all versions',
-'shf_PERMISSIONS' => ' Permissions',
-'shf_WRITE_PERM' => ' Read / Write',
-'shf_READ_PERM' => ' Read Only',
-'shf_ENABLED' => ' enabled',
-'shf_DISABLED' => ' disabled',
-'shf_YES' => ' yes',
-'shf_NO' => ' no',
-'shf_NAME' => 'Name',
-'shf_DESCRIPTION' => 'Description',
-'shf_ACTION' => ' Action',
-'shf_MODIFY' => ' Modify',
-'shf_REMOVE' => ' Remove',
-'shf_CANCELED' => ' Cancelled',
-'shf_MANUAL_PERMS' => ' Permissions on this shared folder are managed manually, modifications will only affect web access if a password is required.
',
-'shf_DESC_ENCRYPTION' => ' The followings options let you protect your data. If encryption is enabled, the data will never be stored in clear text on the server. Your share will either be "available" (data will appear as clear text, encryption/decryption is done on the fly), or protected (only the ciphered data is available on the server). Encryption can only be set at shared folder creation time. Also, read only groups are not supported with encrypted shared folders. If you enable encryption, only members of groups with read/write privileges will be able to access this share.',
-'shf_LABEL_ENCRYPTION' => ' Encryption',
-'shf_DESC_PASSWORD' => ' You need to choose a password to protect your data. This password must be at least 8 characters long. Do not loose this password. If you forget it, your data will be lost because there\'s no way to recover it.',
-'shf_LABEL_PASSWORD' => ' Password',
-'shf_LABEL_PASSWORD2' => ' Password (confirmation)',
-'shf_DESC_INACTIVITY' => ' To provide additional security, you can set an inactivity time out (in minutes). When the data is available, if nobody access it for this period of time, the data will go back to protected mode automatically.',
-'shf_INACTIVITY' => ' Inactivity timeout',
-'shf_ERROR_WITH_ENCRYPTION' => ' An error occured while performing initial folder encryption',
-'shf_ERROR_ENCRYPTED_ENABLED' => ' This shared folder is encrypted and access is enabled. You have to put it in protected mode before removing it',
-'shf_INVALID_INACTIVITY' => ' Inactivity value must be numbers only',
-'shf_PASSWORD_MISMATCH' => ' Passwords don\'t match',
-'shf_PASSWORD_TOO_SHORT' => ' Password is too short, please use at least 8 characters',
-'shf_DESC_PYDIO' => ' The following settings control the access of this shared folder with the web based file manager Pydio (formerly AjaXplorer)',
-'shf_LABEL_PYDIO' => ' Pydio Access',
-'shf_TITLE_PERMISSIONS' => ' Access right management',
-'shf_USERS' => 'Users',
-
-'shf_ENCRYPT_FORM_TITLE' => 'Shared Folders Encryption',
-'shf_ENCRYPT_Shared Folders Encryption' => 'Shared Folders Encryption',
-'shf_ENCRYPT_FIRSTPAGE_DESC' =>'This panel lets you enable encrypted shared folder access.',
-'shf_ENCRYPT_STATUS' => 'Status',
-'shf_ENCRYPT_MOUNTED' => 'Enabled',
-'shf_ENCRYPT_NOT_MOUNTED' => 'Protected',
-'shf_ENCRYPT_MOUNT' =>'Enable',
-'shf_ENCRYPT_UMOUNT' => 'Protect',
-'shf_ENCRYPT_ERROR_MOUNTING' => 'An error occured. Check that you have the correct password.',
-'shf_ENCRYPT_UMOUNT_DESC' => 'Are you sure you want to protect this shared folder ? Once protected, the content won\'t be accessible until re-enabled with the associated password.',
-'shf_ENCRYPT_MOUNT_DESC' => 'You have to enter the password to make this folder\'s content available.',
-'shf_ENCRYPT_LABEL_MOUNT_PASSWORD' => 'Password',
-'shf_ENCRYPT_VALIDATE' => 'Validate',
-'shf_ENCRYPT_NO_ENCRYPTED_SHARE' => 'No encrypted share configured',
-
-);
-
-our %Lexicon = (
- %{ SrvMngr::I18N::Modules::General::en::Lexicon },
- %lexicon
-);
-
-
-1;
-
diff --git a/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shares/en.pm b/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shares/en.pm
new file mode 100644
index 0000000..efbf9b3
--- /dev/null
+++ b/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shares/en.pm
@@ -0,0 +1,64 @@
+package SrvMngr::I18N::Modules::Shares::en;
+use strict;
+use warnings;
+use utf8;
+use Mojo::Base 'SrvMngr::I18N';
+
+use SrvMngr::I18N::Modules::General::en;
+
+my %lexicon = (
+#
+# Generated by SM2Gen version: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+#
+'sf_readgroup' => 'regroup',
+'sf_Description' => 'Description',
+'sf_dynamic' => 'Dynamic',
+'sf_description' => 'Description',
+'sf_The_following_settings_control_the' => 'The following settings control the access of this shared folder using the HTTP/HTTPS protocol',
+'sf_Create,_modify,_or_remove_shared' => 'create modify Or remove shared folders',
+'sf_Remove' => 'Remove',
+'sf_httpaccess' => 'Httpaccess',
+'sf_readuser' => 'reader',
+'sf_Cancel' => 'Cancel',
+'sf_All_files_belonging_to_this' => 'All files belonging to this shared folder will be deleted',
+'sf_smbaccess' => 'Smbaccess',
+'sf_You_can_use_this_matrix' => 'You can use this matrix to define groups and users access permissions',
+'sf_webdav' => 'Webdav',
+'sf_Create_a_new_shared_folder' => 'Create a new shared folder',
+'sf_REMOVE_panel_action_was_successful' => 'REMOVE panel action was successful',
+'sf_Actionr' => 'action',
+'sf_You_are_about_to_remove' => 'You are about to remove the following shared folder',
+'sf_Shared_Folders' => 'Shared Folders',
+'sf_MODIFY_panel_action_was_successful' => 'MODIFY panel action was successful',
+'sf_indexes' => 'Indexes',
+'sf_Are_you_sure_you_wish' => 'Are you sure you wish to remove it ?',
+'sf_Actionm' => 'action',
+'sf_writeuser' => 'Writeuser',
+'sf_LIST_panel_action_was_successful' => 'LIST panel action was successful',
+'sf_Remove_shared_folder' => 'Remove shared folder',
+'sf_PERMISSIONS_panel_action_was_successful' => 'PERMISSIONS panel action was successful',
+'sf_Manage_shared-folders_settings:' => 'Manage shared-folders settings',
+'sf_You_can_remove_any_shared' => 'You can remove any shared folder by clicking on the corresponding command next to the shared folder',
+'sf_APPLY' => 'Apply',
+'sf_requireSSL' => 'requires',
+'sf_Groups' => 'Groups',
+'sf_Save' => 'Save',
+'sf_Actionp' => 'action',
+'sf_writegroup' => 'Writegroup',
+'sf_Name' => 'Name',
+'sf_Read_Only' => 'Read Only',
+'sf_retention' => 'Retention',
+'sf_Access_right_management' => 'Access right management',
+'sf_Read_/_Write' => 'Read / Write',
+'sf_Create_or_modify_a_shared' => 'Create or modify a shared folder',
+'sf_The_following_settings_control_the' => 'The following settings control the access of this shared folder from the local network Using the SMB/CIFS protocol',
+'sf_recyclebin' => 'Recyclebin',
+);
+
+our %Lexicon = (
+ %{ SrvMngr::I18N::Modules::General::en::Lexicon },
+ %lexicon
+);
+
+
+1;
diff --git a/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shares/shares_en.lex b/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shares/shares_en.lex
new file mode 100644
index 0000000..a8caa70
--- /dev/null
+++ b/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Shares/shares_en.lex
@@ -0,0 +1,46 @@
+#
+# Generated by SM2Gen version: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+#
+'sf_readgroup' => 'regroup',
+'sf_Description' => 'Description',
+'sf_dynamic' => 'Dynamic',
+'sf_description' => 'Description',
+'sf_The_following_settings_control_the' => 'The following settings control the access of this shared folder using the HTTP/HTTPS protocol',
+'sf_Create,_modify,_or_remove_shared' => 'create modify Or remove shared folders',
+'sf_Remove' => 'Remove',
+'sf_httpaccess' => 'Httpaccess',
+'sf_readuser' => 'reader',
+'sf_Cancel' => 'Cancel',
+'sf_All_files_belonging_to_this' => 'All files belonging to this shared folder will be deleted',
+'sf_smbaccess' => 'Smbaccess',
+'sf_You_can_use_this_matrix' => 'You can use this matrix to define groups and users access permissions',
+'sf_webdav' => 'Webdav',
+'sf_Create_a_new_shared_folder' => 'Create a new shared folder',
+'sf_REMOVE_panel_action_was_successful' => 'REMOVE panel action was successful',
+'sf_Actionr' => 'action',
+'sf_You_are_about_to_remove' => 'You are about to remove the following shared folder',
+'sf_Shared_Folders' => 'Shared Folders',
+'sf_MODIFY_panel_action_was_successful' => 'MODIFY panel action was successful',
+'sf_indexes' => 'Indexes',
+'sf_Are_you_sure_you_wish' => 'Are you sure you wish to remove it ?',
+'sf_Actionm' => 'action',
+'sf_writeuser' => 'Writeuser',
+'sf_LIST_panel_action_was_successful' => 'LIST panel action was successful',
+'sf_Remove_shared_folder' => 'Remove shared folder',
+'sf_PERMISSIONS_panel_action_was_successful' => 'PERMISSIONS panel action was successful',
+'sf_Manage_shared-folders_settings:' => 'Manage shared-folders settings',
+'sf_You_can_remove_any_shared' => 'You can remove any shared folder by clicking on the corresponding command next to the shared folder',
+'sf_APPLY' => 'Apply',
+'sf_requireSSL' => 'requires',
+'sf_Groups' => 'Groups',
+'sf_Save' => 'Save',
+'sf_Actionp' => 'action',
+'sf_writegroup' => 'Writegroup',
+'sf_Name' => 'Name',
+'sf_Read_Only' => 'Read Only',
+'sf_retention' => 'Retention',
+'sf_Access_right_management' => 'Access right management',
+'sf_Read_/_Write' => 'Read / Write',
+'sf_Create_or_modify_a_shared' => 'Create or modify a shared folder',
+'sf_The_following_settings_control_the' => 'The following settings control the access of this shared folder from the local network Using the SMB/CIFS protocol',
+'sf_recyclebin' => 'Recyclebin',
diff --git a/root/usr/share/smanager/themes/default/public/css/shares.css b/root/usr/share/smanager/themes/default/public/css/shares.css
new file mode 100644
index 0000000..8e45ebb
--- /dev/null
+++ b/root/usr/share/smanager/themes/default/public/css/shares.css
@@ -0,0 +1,86 @@
+/*
+Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+*/
+.Shares-panel {}
+.name {}
+.rout {}
+.head {}
+.subh {}
+.para1 {}
+.para2 {}
+.link1 {}
+.tabl1 {}
+thead .tabl1 {}
+tbody .tabl1 {}
+.name {}
+.rout {}
+.head {}
+.subh {}
+.text100 {}
+.para14 {}
+.sele101 {}
+.sele102 {}
+.sele103 {}
+.para2 {}
+.sele104 {}
+.sele105 {}
+.sele106 {}
+.sele107 {}
+.sele108 {}
+.subm109 {}
+.name {}
+.rout {}
+.head {}
+.subh {}
+.para10 {}
+.tabl2 {}
+thead .tabl2 {}
+tbody .tabl2 {}
+.chec110 {}
+.chec111 {}
+.chec112 {}
+.chec113 {}
+.chec114 {}
+.chec115 {}
+.chec116 {}
+.chec117 {}
+.chec118 {}
+.chec119 {}
+.chec120 {}
+.chec121 {}
+.chec122 {}
+.chec123 {}
+.chec124 {}
+.chec125 {}
+.chec126 {}
+.chec127 {}
+.chec128 {}
+.chec129 {}
+.chec130 {}
+.chec131 {}
+.chec132 {}
+.chec133 {}
+.chec134 {}
+.chec135 {}
+.chec136 {}
+.chec137 {}
+.chec138 {}
+.chec139 {}
+.chec140 {}
+.chec141 {}
+.chec142 {}
+.chec143 {}
+.chec144 {}
+.chec145 {}
+.chec146 {}
+.chec147 {}
+.subm148 {}
+.name {}
+.rout {}
+.head {}
+.subh {}
+.para11 {}
+.para21 {}
+.para31 {}
+.subm149 {}
+.subm150 {}
diff --git a/root/usr/share/smanager/themes/default/public/js/shares.js b/root/usr/share/smanager/themes/default/public/js/shares.js
new file mode 100644
index 0000000..2f3c6e2
--- /dev/null
+++ b/root/usr/share/smanager/themes/default/public/js/shares.js
@@ -0,0 +1,5 @@
+//
+//Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+//
+$(document).ready(function() {
+});
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_sf_LIST.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_sf_LIST.html.ep
new file mode 100644
index 0000000..32bbaa0
--- /dev/null
+++ b/root/usr/share/smanager/themes/default/templates/partials/_sf_LIST.html.ep
@@ -0,0 +1,73 @@
+%#
+%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+%#
+
+%#
+ % if (config->{debug} == 1) {
+
+ %= dumper $sf_data
+
+ % }
+
+ % my $btn = l('sf_APPLY');
+
+ % $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
+
+ %= form_for "sharesu" => (method => 'POST') => begin
+ % param 'trt' => $sf_data->{trt} unless param 'trt';
+ %= hidden_field 'trt' => $sf_data->{trt}
+ %# Inputs etc in here.
+
+
<%=l('sf_Create,_modify,_or_remove_shared')%>
+
+
<%=l('sf_Manage_shared-folders_settings:')%>
+
+
+ %=l('sf_You_can_remove_any_shared')
+
+
+
+
+
+
+
+
+
+
+ <%=l('sf_Name')%> |
+ <%=l('sf_Description')%> |
+ <%=l('sf_Actionp')%> |
+ <%=l('sf_Actionm')%> |
+ <%=l('sf_Actionr')%> |
+
+
+
+ % my $control_data = $c->stash('Table1');
+ % foreach my $row (@$control_data) {
+
+ <%=$c->render_to_string(inline=>$row->{'Table1_Name'})%> |
+ <%=$c->render_to_string(inline=>$row->{'Table1_Description'})%> |
+ <%=$c->render_to_string(inline=>$row->{'Table1_Actionp'})%> |
+ <%=$c->render_to_string(inline=>$row->{'Table1_Actionm'})%> |
+ <%=$c->render_to_string(inline=>$row->{'Table1_Actionr'})%> |
+
+ %}
+
+
+
+
+ %# Probably finally by a submit.
+ %end
+
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_sf_MODIFY.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_sf_MODIFY.html.ep
new file mode 100644
index 0000000..3a33e79
--- /dev/null
+++ b/root/usr/share/smanager/themes/default/templates/partials/_sf_MODIFY.html.ep
@@ -0,0 +1,130 @@
+%#
+%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+%#
+
+%#
+ % if (config->{debug} == 1) {
+
+ %= dumper $sf_data
+
+ % }
+ % my $btn = l('sf_APPLY');
+
+ % $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
+
+ %= form_for "sharesu" => (method => 'POST') => begin
+ % param 'trt' => $sf_data->{trt} unless param 'trt';
+ %= hidden_field 'trt' => $sf_data->{trt}
+ %# Inputs etc in here.
+
+
<%=l('sf_Create,_modify,_or_remove_shared')%>
+
+
<%=l('sf_Create_or_modify_a_shared')%>
+
+
+ % if ($sf_data->{name} eq ""){
+
+ %=l('sf_name')
+
+ % param 'name' => $sf_data->{name} unless param 'name';
+ %= text_field 'name', size => '50', class => 'textinput name' , pattern=>'.*' , placeholder=>'name', title =>'Pattern regex mismatch', id => 'name_text'
+
+ % } else {
+
+ %=l('sf_name')
+
+ % param 'name' => $sf_data->{name} unless param 'name';
+ %= text_field 'name', size => '50', class => 'textinput name' , pattern=>'.*' , placeholder=>'name', title =>'Pattern regex mismatch', id => 'name_text', readonly => 1
+
+ % }
+
+
+ %=l('sf_description')
+
+ % param 'description' => $sf_data->{description} unless param 'description';
+ %= text_field 'description', size => '50', class => 'textinput description' , pattern=>'.*' , placeholder=>'description', title =>'Pattern regex mismatch', id => 'description_text'
+
+
+
+ %=l('sf_The_following_settings_control_the')
+
+
+
+ %=l('sf_smbaccess')
+
+ % my @smbaccess_options = [['Enabled, browseable' => 'browseable'], ['Enabled, hidden' => 'non-browseable'], ['No access' => 'none']];
+ % param 'smbaccess' => $sf_data->{smbaccess} unless param 'smbaccess';
+ %= select_field 'smbaccess' => @smbaccess_options, class => 'input', id => 'smbaccess_select'
+
+
+
+ %=l('sf_recyclebin')
+
+ % my @recyclebin_options = [['disabled' => 'disabled'], ['Enabled, keep only the latest version' => 'enabled'], ['Enabled, keep a copy of all versions' => 'keep-versions']];
+ % param 'recyclebin' => $sf_data->{recyclebin} unless param 'recyclebin';
+ %= select_field 'recyclebin' => @recyclebin_options, class => 'input', id => 'recyclebin_select'
+
+
+
+ %=l('sf_retention')
+
+ % my @retention_options = [['one month' => '30'], ['one week' => '7'], ['one year' => '365'], ['six months' => '180'], ['unlimited' => 'unlimited']];
+ % param 'retention' => $sf_data->{retention} unless param 'retention';
+ %= select_field 'retention' => @retention_options, class => 'input', id => 'retention_select'
+
+
+
+ %=l('sf_The_following_settings_control_the')
+
+
+
+ %=l('sf_httpaccess')
+
+ % my @httpaccess_options = [['Entire Internet (no password required)' => 'global'], ['Entire Internet (password required)' => 'global-pw'], ['Entire Internet (password required outside local network)' => 'global-pw-remote'], ['Local network (no password required)' => 'local'], ['Local network (password required)' => 'local-pw'], ['No access' => 'none']];
+ % param 'httpaccess' => $sf_data->{httpaccess} unless param 'httpaccess';
+ %= select_field 'httpaccess' => @httpaccess_options, class => 'input', id => 'httpaccess_select'
+
+
+
+ %=l('sf_webdav')
+
+ % my @webdav_options = [['disabled' => 'disabled'], ['enabled' => 'enabled']];
+ % param 'webdav' => $sf_data->{webdav} unless param 'webdav';
+ %= select_field 'webdav' => @webdav_options, class => 'input', id => 'webdav_select'
+
+
+
+ %=l('sf_requireSSL')
+
+ % my @requireSSL_options = [['disabled' => 'disabled'], ['enabled' => 'enabled']];
+ % param 'requireSSL' => $sf_data->{requireSSL} unless param 'requireSSL';
+ %= select_field 'requireSSL' => @requireSSL_options, class => 'input', id => 'requireSSL_select'
+
+
+
+ %=l('sf_indexes')
+
+ % my @indexes_options = [['disabled' => 'disabled'], ['enabled' => 'enabled']];
+ % param 'indexes' => $sf_data->{indexes} unless param 'indexes';
+ %= select_field 'indexes' => @indexes_options, class => 'input', id => 'indexes_select'
+
+
+
+ %=l('sf_dynamic')
+
+ % my @dynamic_options = [['disabled' => 'disabled'], ['enabled' => 'enabled']];
+ % param 'dynamic' => $sf_data->{dynamic} unless param 'dynamic';
+ %= select_field 'dynamic' => @dynamic_options, class => 'input', id => 'dynamic_select'
+
+
+
+ %= submit_button l('sf_Save'), class => 'action subm109'
+
+
+ %# Probably finally by a submit.
+ %end
+
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_sf_PERMISSIONS.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_sf_PERMISSIONS.html.ep
new file mode 100644
index 0000000..89b398b
--- /dev/null
+++ b/root/usr/share/smanager/themes/default/templates/partials/_sf_PERMISSIONS.html.ep
@@ -0,0 +1,365 @@
+%#
+%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+%#
+
+%#
+ % if (config->{debug} == 1) {
+
+ %= dumper $sf_data
+
+ % }
+ % my $btn = l('sf_APPLY');
+
+ % $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
+
+ %= form_for "sharesu" => (method => 'POST') => begin
+ % param 'trt' => $sf_data->{trt} unless param 'trt';
+ %= hidden_field 'trt' => $sf_data->{trt}
+ %# Inputs etc in here.
+
+
<%=l('sf_Create,_modify,_or_remove_shared')%>
+
+
<%=l('sf_Access_right_management')%>
+
+
+ %=l('sf_You_can_use_this_matrix')
+
+
+
+
+
+ <%=l('sf_Groups')%> |
+ <%=l('sf_Description')%> |
+ <%=l('sf_Read_/_Write')%> |
+ <%=l('sf_Read_Only')%> |
+
+
+
+ % my $control_data = $c->stash('Table2');
+ % foreach my $row (@$control_data) {
+
+ <%=$c->render_to_string(inline=>$row->{'Table2-Groups'})%> |
+ <%=$c->render_to_string(inline=>$row->{'Table2-Description'})%> |
+ <%=$c->render_to_string(inline=>$row->{'Table2-Read / Write'})%> |
+ <%=$c->render_to_string(inline=>$row->{'Table2-Read Only'})%> |
+
+ %}
+
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec110'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec111'
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec112'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec113'
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec114'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec115'
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec116'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec117'
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec118'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec119'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec120'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec121'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec122'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec123'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec124'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec125'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec126'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec127'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec128'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec129'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec130'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec131'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec132'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec133'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec134'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec135'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec136'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec137'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec138'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec139'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec140'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec141'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec142'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec143'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec144'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec145'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec146'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec147'
+
+
+
+
+ %= submit_button l('sf_Save'), class => 'action subm148'
+
+
+ %# Probably finally by a submit.
+ %end
+
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_sf_REMOVE.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_sf_REMOVE.html.ep
new file mode 100644
index 0000000..8e016aa
--- /dev/null
+++ b/root/usr/share/smanager/themes/default/templates/partials/_sf_REMOVE.html.ep
@@ -0,0 +1,64 @@
+%#
+%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+%#
+
+%#
+ % if (config->{debug} == 1) {
+
+ %= dumper $sf_data
+
+ % }
+ % my $btn = l('sf_APPLY');
+
+ % $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
+
+ %= form_for "sharesu" => (method => 'POST') => begin
+ % param 'trt' => $sf_data->{trt} unless param 'trt';
+ %= hidden_field 'trt' => $sf_data->{trt}
+ %# Inputs etc in here.
+
+
<%=l('sf_Create,_modify,_or_remove_shared')%>
+
+
<%=l('sf_Remove_shared_folder')%>
+
+
+ %=l('sf_You_are_about_to_remove')
+
+
+
+ %=l('sf_name')
+
+ % param 'name' => $sf_data->{name} unless param 'name';
+ %= text_field 'name', size => '50', class => 'textinput name' , pattern=>'.*' , placeholder=>'name', title =>'Pattern regex mismatch', id => 'name_text', readonly => 1
+
+
+
+ %=l('sf_description')
+
+ % param 'description' => $sf_data->{description} unless param 'description';
+ %= text_field 'description', size => '50', class => 'textinput description' , pattern=>'.*' , placeholder=>'description', title =>'Pattern regex mismatch', id => 'description_text', readonly => 1
+
+
+
+ %=l('sf_All_files_belonging_to_this')
+
+
+
+ %=l('sf_Are_you_sure_you_wish')
+
+
+
+ %= submit_button l('sf_Cancel'), class => 'action subm149'
+
+
+
+ %= submit_button l('sf_Remove'), class => 'action subm150'
+
+
+ %# Probably finally by a submit.
+ %end
+
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/shared_folders.html.ep b/root/usr/share/smanager/themes/default/templates/shared_folders.html.ep
deleted file mode 100644
index 3913710..0000000
--- a/root/usr/share/smanager/themes/default/templates/shared_folders.html.ep
+++ /dev/null
@@ -1,43 +0,0 @@
-% layout 'default', title => "Sme server 2 - Shared Folders", share_dir => './';
-
-% content_for 'module' => begin
-
-
- % if ($config->{debug} == 1) {
-
- %= dumper $c->current_route
-
- % }
-
-
<%=$title%>
- %= $modul
-
- %if ($shf_datas->{first}) {
- %=$c->render_to_string(inline =>$c->l($shf_datas->{first}))
-
- %} elsif ($shf_datas->{success}) {
-
-
Operation Status Report
- %= $c->l($shf_datas->{success});
-
-
- %} elsif ($shf_datas->{error}) {
-
-
Operation Status Report - error
- %= $c->l($shf_datas->{error});
-
- %}
-
-
- % 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'
- %}
-
-
-%end
diff --git a/root/usr/share/smanager/themes/default/templates/shares.html.ep b/root/usr/share/smanager/themes/default/templates/shares.html.ep
new file mode 100644
index 0000000..ec9f992
--- /dev/null
+++ b/root/usr/share/smanager/themes/default/templates/shares.html.ep
@@ -0,0 +1,68 @@
+%#
+%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+%#
+% layout 'default', title => "Sme server 2 - Shared Folders", share_dir => './';
+%# css specific to this panel:
+% content_for 'module' => begin
+%= stylesheet '/css/shares.css'
+%= javascript '/js/shares.js'
+
+
+ % if (config->{debug} == 1) {
+
+ %= dumper $c->current_route
+ %= dumper $c->stash()
+
+ % }
+
+
<%=$title%>
+
+ % if ( stash('modul')) {
+ %= $c->render_to_string(inline => stash('modul') );
+ % }
+
+ %if ($c->stash('first')) {
+
+ %=$c->render_to_string(inline =>$c->l($c->stash('first')))
+
+
+ %} elsif ($c->stash('success')) {
+
+
+ %= $c->l($c->stash('success'));
+
+
+
+
+ %} elsif ($c->stash('error')) {
+
+
+ %= $c->l($c->stash('error'));
+
+
+
+ %}
+
+ %#Routing to partials according to trt parameter.
+ %#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement'
+
+ % if ($sf_data->{trt} eq "LIST") {
+ %= include 'partials/_sf_LIST'
+ %}
+
+ % if ($sf_data->{trt} eq "MODIFY") {
+ %= include 'partials/_sf_MODIFY'
+ %}
+
+ % if ($sf_data->{trt} eq "PERMISSIONS") {
+ %= include 'partials/_sf_PERMISSIONS'
+ %}
+
+ % if ($sf_data->{trt} eq "REMOVE") {
+ %= include 'partials/_sf_REMOVE'
+ %}
+
+
+
+
+%end
\ No newline at end of file
diff --git a/smeserver-shared-folders.spec b/smeserver-shared-folders.spec
index 3678e1e..cc93214 100644
--- a/smeserver-shared-folders.spec
+++ b/smeserver-shared-folders.spec
@@ -5,8 +5,8 @@
Summary: sme server shared folders module
%define name smeserver-shared-folders
Name: %{name}
-%define version 0.3
-%define release 25
+%define version 11.0.0
+%define release 1
Version: %{version}
Release: %{release}%{?dist}
License: GPL
@@ -30,6 +30,9 @@ This module allows you to create network shares
with more flexibility than ibays as it supports ACLs
%changelog
+* Thu May 22 2025 Brian Read 11.0.0-1.sme
+- Add SM2 panel - WIP [SME: ]
+
* Sun Sep 08 2024 fix-e-smith-pkg.sh by Trevor Batley 0.3-25.sme
- Fix e-smith references in smeserver-shared-folders [SME: 12732]