Anlegen von default Verzeichnis für Dateimanagement
authorMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Sat, 3 Jun 2017 16:35:46 +0000 (18:35 +0200)
committerMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Sat, 3 Jun 2017 16:35:46 +0000 (18:35 +0200)
Das default Verzeichnis 'documents' wird nun automatisch angelegt.

Ein extra Hinweis in der Mandantenconfig weist darauf hin, dass es pro Mandant unterschiedliche Verzeichnisse geben muss

behebt #525 (redmine)

locale/de/all
sql/Pg-upgrade2/filemanagement_filesystem.pl [new file with mode: 0644]
templates/webpages/client_config/_features.html

index 9ad8c9a..f27c0e1 100755 (executable)
@@ -3241,7 +3241,8 @@ $self->{texts} = {
   'This is the client to be selected by default on the login screen.' => 'Dies ist derjenige Mandant, der im Loginbildschirm standardmäßig ausgewählt sein wird.',
   'This is the default bin for parts' => 'Standard-Lagerplatz für Stammdaten/Waren',
   'This is the default warehouse for ignoring onhand' => 'Standardlager für Auslagern ohne Prüfung auf Bestand.',
-  'This is the root directory for the File storage backend, must be writable for webserver. If you have more than one client you need another direcctory. All other directories must be created by hand and reachable from the webserver' => '',
+  'This is the root directory for the File storage backend, must be writable for webserver. If you have more than one client you need another direcctory. All other directories must be created by hand and reachable from the webserver' => 'Dies ist das Wurzelverzeichnis für das Datei-Backend. Haben Sie mehr als einen Mandanten, so muss pro Mandant ein anderes Verzeichnis eingetragen sein. Dies ist von Hand anzulegen. Alle Verzeichnisse müssen für den Webserver schreibbar sein. 
+',
   'This list is capped at 15 items to keep it fast. If you need a full list, please use reports.' => 'Diese Liste ist auf 15 Zeilen begrenzt. Wenn Sie eine vollständige Liste benötigen, erstellen Sie bitte einen Bericht.',
   'This makemodel price does not exist anymore' => 'Dieser Lieferantenpreis existiert nicht mehr',
   'This means that the user has created an AP transaction and chosen a taxkey for sales taxes, or that he has created an AR transaction and chosen a taxkey for input taxes.' => 'Das bedeutet, dass ein Benutzer eine Kreditorenbuchung angelegt und in ihr einen Umsatzsteuer-Steuerschlüssel verwendet oder eine Debitorenbuchung mit Vorsteuer-Steuerschlüssel angelegt hat.',
diff --git a/sql/Pg-upgrade2/filemanagement_filesystem.pl b/sql/Pg-upgrade2/filemanagement_filesystem.pl
new file mode 100644 (file)
index 0000000..bb4e1e2
--- /dev/null
@@ -0,0 +1,26 @@
+# @tag: filemanagement_filesystem
+# @description: add  directory for filemanagment
+# @depends: filemanagement_feature
+package SL::DBUpgrade2::filemanagement_filesystem;
+
+use strict;
+use utf8;
+use File::Path qw(make_path);
+
+use parent qw(SL::DBUpgrade2::Base);
+
+sub run {
+  my ($self) = @_;
+
+  my $directory = $::instance_conf->get_doc_files_rootpath;
+
+  if ( $directory && !-d $directory ) {
+    mkdir $directory;
+    if (! -d $directory) {
+      return 0;
+    }
+  }
+  return 1;
+}
+
+1;
index b3c2c4f..9596c59 100644 (file)
@@ -78,7 +78,7 @@
   <tr>
    <td align="right">[% LxERP.t8('Root path for file storage') %]</td>
    <td>[% L.input_tag('defaults.doc_files_rootpath',SELF.defaults.doc_files_rootpath, style=style, onchange="verifyRootPath(this);") %]</td>
-   <td>[% LxERP.t8('This is the root directory for the File storage backend, must be writable for webserver') %]</td>
+   <td>[% LxERP.t8('This is the root directory for the File storage backend, must be writable for webserver. If you have more than one client you need another direcctory. All other directories must be created by hand and reachable from the webserver') %]</td>
   </tr>
   <tr>
    <td align="right">[% LxERP.t8('WebDAV') %]</td>