From: Moritz Bunkus Date: Tue, 16 Jul 2013 13:31:06 +0000 (+0200) Subject: Administrationsbereich mit Menüsystem versehen X-Git-Tag: release-3.1.0beta1~161^2~6 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9b36c5639d01f1c9059381c12fac5d57ff614710;p=kivitendo-erp.git Administrationsbereich mit Menüsystem versehen --- diff --git a/SL/Controller/Admin.pm b/SL/Controller/Admin.pm index bcc9436b7..698fdb126 100644 --- a/SL/Controller/Admin.pm +++ b/SL/Controller/Admin.pm @@ -378,16 +378,13 @@ sub action_delete_printer { # actions: database administration # -sub action_database_administration { +sub action_create_dataset_login { my ($self) = @_; - $::form->{dbhost} ||= $::auth->{DB_config}->{host} || 'localhost'; - $::form->{dbport} ||= $::auth->{DB_config}->{port} || 5432; - $::form->{dbuser} ||= $::auth->{DB_config}->{user} || 'kivitendo'; - $::form->{dbpasswd} ||= $::auth->{DB_config}->{password}; - $::form->{dbdefault} ||= 'template1'; - - $self->render('admin/dbadmin', title => t8('Database Administration')); + $self->database_administration_login_form( + title => t8('Create Dataset'), + next_action => 'create_dataset', + ); } sub action_create_dataset { @@ -414,6 +411,15 @@ sub action_do_create_dataset { $self->redirect_to(action => 'database_administration'); } +sub action_delete_dataset_login { + my ($self) = @_; + + $self->database_administration_login_form( + title => t8('Delete Dataset'), + next_action => 'delete_dataset', + ); +} + sub action_delete_dataset { my ($self) = @_; $self->delete_dataset_form; @@ -440,6 +446,15 @@ sub action_do_delete_dataset { # actions: locking, unlocking # +sub action_show_lock { + my ($self) = @_; + + $self->render( + "admin/show_lock", + title => "kivitendo " . t8('Administration'), + ); +} + sub action_unlock_system { my ($self) = @_; @@ -451,7 +466,7 @@ sub action_unlock_system { sub action_lock_system { my ($self) = @_; - SL::System::InstallationLock->unlock; + SL::System::InstallationLock->lock; flash_later('info', t8('Lockfile created!')); $self->redirect_to(action => 'show'); } @@ -532,7 +547,6 @@ sub setup_layout { my ($self, $action) = @_; $::request->layout(SL::Layout::Dispatcher->new(style => 'admin')); - $::request->layout->use_stylesheet("lx-office-erp.css"); $::form->{favicon} = "favicon.ico"; %::myconfig = ( countrycode => 'de', @@ -544,11 +558,10 @@ sub setup_layout { sub setup_client { my ($self) = @_; - $self->client((first { $_->is_default } @{ $self->all_clients }) || $self->all_clients->[0]) if !$self->client; + $self->client(SL::DB::Manager::AuthClient->get_default || $self->all_clients->[0]) if !$self->client; $::auth->set_client($self->client->id); } - # # displaying forms # @@ -563,6 +576,7 @@ sub use_multiselect_js { sub login_form { my ($self, %params) = @_; my $version = $::form->read_version; + $::request->layout->no_menu(1); $self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $version), %params, version => $version); } @@ -586,6 +600,20 @@ sub edit_printer_form { $self->render('admin/edit_printer', %params); } +sub database_administration_login_form { + my ($self, %params) = @_; + + $self->render( + 'admin/dbadmin', + dbhost => $::form->{dbhost} || $::auth->{DB_config}->{host} || 'localhost', + dbport => $::form->{dbport} || $::auth->{DB_config}->{port} || 5432, + dbuser => $::form->{dbuser} || $::auth->{DB_config}->{user} || 'kivitendo', + dbpasswd => $::form->{dbpasswd} || $::auth->{DB_config}->{password}, + dbdefault => $::form->{dbdefault} || 'template1', + %params, + ); +} + sub create_dataset_form { my ($self, %params) = @_; $self->render('admin/create_dataset', title => (t8('Database Administration') . " / " . t8('Create Dataset'))); diff --git a/SL/DB/Manager/AuthClient.pm b/SL/DB/Manager/AuthClient.pm index ccfb97eff..c5b45de95 100644 --- a/SL/DB/Manager/AuthClient.pm +++ b/SL/DB/Manager/AuthClient.pm @@ -17,4 +17,8 @@ sub _sort_spec { columns => { SIMPLE => 'ALL' } ); } +sub get_default { + return $_[0]->get_first(where => [ is_default => 1 ]); +} + 1; diff --git a/SL/Layout/Admin.pm b/SL/Layout/Admin.pm index 00e312540..a379df30e 100644 --- a/SL/Layout/Admin.pm +++ b/SL/Layout/Admin.pm @@ -1,18 +1,32 @@ package SL::Layout::Admin; use strict; -use parent qw(SL::Layout::Base); +use parent qw(SL::Layout::V3); -sub init_sub_layouts { - [ SL::Layout::None->new ] +use SL::Menu; + +use Rose::Object::MakeMethods::Generic ( + scalar => [ qw(no_menu) ], +); + + +sub init_menu { + Menu->new('admin-menu.ini'); } sub start_content { "
\n"; } -sub end_content { - "
\n"; +sub render { + my ($self) = @_; + + $self->presenter->render( + 'menu/menuv3', + force_ul_width => 1, + skip_frame_header => 1, + menu => $self->no_menu ? '' : $self->print_menu, + ); } 1; diff --git a/SL/Layout/V3.pm b/SL/Layout/V3.pm index ed7733cb3..f37eea49c 100644 --- a/SL/Layout/V3.pm +++ b/SL/Layout/V3.pm @@ -146,7 +146,7 @@ sub use_javascript { } sub pre_content { - &render; + $_[0]->render; } sub start_content { diff --git a/admin-menu.ini b/admin-menu.ini new file mode 100644 index 000000000..938cfa7da --- /dev/null +++ b/admin-menu.ini @@ -0,0 +1,51 @@ +[Users, Clients and User Groups] + +[Users, Clients and User Groups--List Users, Clients and User Groups] +module=controller.pl +action=Admin/show + +[Users, Clients and User Groups--Add User] +module=controller.pl +action=Admin/new_user + +[Users, Clients and User Groups--Add Client] +module=controller.pl +action=Admin/new_client + +[Users, Clients and User Groups--Add User Group] +module=controller.pl +action=Admin/new_group + +[Database Management] + +[Database Management--Create Dataset] +module=controller.pl +action=Admin/create_dataset_login + +[Database Management--Delete Dataset] +module=controller.pl +action=Admin/delete_dataset_login + +[Printer Management] + +[Printer Management--List Printers] +module=controller.pl +action=Admin/list_printers + +[Printer Management--Add Printer] +module=controller.pl +action=Admin/new_printer + +[System] + +[System--Lock and unlock installation] +module=controller.pl +action=Admin/show_lock + +[System--To user login] +module=controller.pl +action=LoginScreen/user_login + +[System--Logout] +module=controller.pl +action=Admin/logout diff --git a/locale/de/all b/locale/de/all index 272da98e3..4c1dd7607 100755 --- a/locale/de/all +++ b/locale/de/all @@ -113,7 +113,6 @@ $self->{texts} = { 'Accounting method' => 'Versteuerungsart', 'Accrual' => 'Soll-Versteuerung', 'Accrual accounting' => 'Soll-Versteuerung', - 'Actions' => 'Aktionen', 'Active' => 'Aktiv', 'Active?' => 'Aktiviert?', 'Add' => 'Erfassen', @@ -141,6 +140,7 @@ $self->{texts} = { 'Add Part' => 'Ware erfassen', 'Add Price Factor' => 'Preisfaktor erfassen', 'Add Pricegroup' => 'Preisgruppe erfassen', + 'Add Printer' => 'Drucker hinzufügen', 'Add Project' => 'Projekt erfassen', 'Add Purchase Delivery Order' => 'Lieferschein (Einkauf) erfassen', 'Add Purchase Order' => 'Lieferantenauftrag erfassen', @@ -166,7 +166,6 @@ $self->{texts} = { 'Add new currency' => 'Neue Währung hinzufügen', 'Add new custom variable' => 'Neue benutzerdefinierte Variable erfassen', 'Add note' => 'Notiz erfassen', - 'Add printer' => 'Drucker hinzufügen', 'Add unit' => 'Einheit hinzufügen', 'Address' => 'Adresse', 'Administration' => 'Administration', @@ -594,8 +593,10 @@ $self->{texts} = { 'Database Connection Test' => 'Test der Datenbankverbindung', 'Database Host' => 'Datenbankcomputer', 'Database ID' => 'Datenbank-ID', + 'Database Management' => 'Datenbankadministration', 'Database User' => 'Datenbankbenutzer', 'Database host and port' => 'Datenbankhost und -port', + 'Database login (#1)' => 'Datenbankanmeldung (#1)', 'Database name' => 'Datenbankname', 'Database settings' => 'Datenbankeinstellungen', 'Database template' => 'Datenbankvorlage', @@ -860,6 +861,7 @@ $self->{texts} = { 'Ertrag' => 'Ertrag', 'Ertrag prozentual' => 'Ertrag prozentual', 'Escape character' => 'Escape-Zeichen', + 'Everyone can log in.' => 'Alle können sich anmelden.', 'Exact' => 'Genau', 'Example: http://kivitendo.de' => 'Beispiel: http://kivitendo.de', 'Excel' => 'Excel', @@ -997,6 +999,7 @@ $self->{texts} = { 'Help Template Variables' => 'Hilfe zu Dokumenten-Variablen', 'Help on column names' => 'Hilfe zu Spaltennamen', 'Here' => 'Hier', + 'Here you only provide the credentials for logging into the database.' => 'Hier geben Sie nur die Logindaten für die Anmeldung an der Datenbank ein.', 'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:', 'Hide Filter' => 'Filter verbergen', 'Hide by default' => 'Standardmäßig verstecken', @@ -1024,6 +1027,7 @@ $self->{texts} = { 'If the default transfer out always succeed use this bin for negative stock quantity.' => 'Standardlagerplatz für Auslagern ohne Prüfung auf Bestand', 'If you enter values for the part number and / or part description then only those bins containing parts whose part number or part description match your input will be shown.' => 'Wenn Sie für die Artikelnummer und / oder die Beschreibung etwas eingeben, so werden nur die Lagerplätze angezeigt, in denen Waren eingelagert sind, die Ihre Suchbegriffe enthalten.', 'If you have not chosen for example the category revenue for a tax and you choose an revenue account to create a transfer in the general ledger, this tax will not be displayed in the tax dropdown.' => 'Wenn Sie z.B. die Kategory Erlös für eine Steuer nicht gewählt haben und ein Erlöskonto beim Erstellen einer Dialogbuchung wählen, wird diese Steuer auch nicht im Dropdown-Menü für die Steuern angezeigt.', + 'If you lock the system normal users won\'t be able to log in.' => 'Wenn Sie das System sperren, so werden sich normale Benutzer nicht mehr anmelden können.', 'If you see this message, you most likely just setup your LX-Office and haven\'t added any entry types. If this is the case, the option is accessible for administrators in the System menu.' => 'Wenn Sie diese Meldung sehen haben Sie wahrscheinlich ein frisches LX-Office Setup und noch keine Buchungsgruppen eingerichtet. Ein Administrator kann dies im Systemmenü erledigen.', 'If you select a base unit then you also have to enter a factor.' => 'Wenn Sie eine Basiseinheit auswählen, dann müssen Sie auch einen Faktor eingeben.', 'If you want to change any of these parameters then press the "Back" button, edit the file "config/kivitendo.conf" and login into the admin module again.' => 'Wenn Sie einen der Parameter ändern wollen, so drücken Sie auf den "Zurück"-Button, bearbeiten Sie die Datei "config/kivitendo.conf", und melden Sie sich erneut im Administrationsbereich an.', @@ -1178,7 +1182,9 @@ $self->{texts} = { 'List Accounts' => 'Konten anzeigen', 'List Languages' => 'Sprachen anzeigen', 'List Price' => 'Listenpreis', + 'List Printers' => 'Drucker anzeigen', 'List Transactions' => 'Buchungsliste', + 'List Users, Clients and User Groups' => 'Benutzer, Mandanten und Benutzergruppen anzeigen', 'List current background jobs' => 'Aktuelle Hintergrund-Jobs anzeigen', 'List export' => 'Export anzeigen', 'List of bank accounts' => 'Liste der Bankkonten', @@ -1191,6 +1197,7 @@ $self->{texts} = { 'Loading...' => 'Wird geladen...', 'Local Tax Office Preferences' => 'Angaben zum Finanzamt', 'Lock System' => 'System sperren', + 'Lock and unlock installation' => 'Installation sperren/entsperren', 'Lock file handling failed. Please verify that the directory "#1" is writeable by the webserver.' => 'Die Lockdateibehandlung schlug fehl. Bitte stellen Sie sicher, dass der Webserver das Verzeichnis "#1" beschreiben darf.', 'Lockfile created!' => 'System gesperrt!', 'Lockfile removed!' => 'System entsperrt!', @@ -1331,6 +1338,7 @@ $self->{texts} = { 'No warehouse has been created yet or the quantity of the bins is not configured yet.' => 'Es wurde noch kein Lager angelegt, bzw. die dazugehörigen Lagerplätze sind noch nicht konfiguriert.', 'No.' => 'Position', 'None' => 'Kein', + 'Normal users cannot log in.' => 'Normale Benutzer können sich nicht anmelden.', 'Not Discountable' => 'Nicht rabattierfähig', 'Not delivered' => 'Nicht geliefert', 'Not done yet' => 'Noch nicht fertig', @@ -1346,6 +1354,7 @@ $self->{texts} = { 'Nothing has been selected for transfer.' => 'Es wurde nichts zum Umlagern ausgewählt.', 'Nothing selected!' => 'Es wurde nichts ausgewählt!', 'Nothing stocked yet.' => 'Noch nichts eingelagert.', + 'Nothing will be created or deleted at this stage!' => 'In diesem Schritt wird nichts angelegt oder gelöscht!', 'Nov' => 'Nov', 'November' => 'November', 'Number' => 'Nummer', @@ -1469,7 +1478,6 @@ $self->{texts} = { 'Periodicity' => 'Periodizität', 'Perpetual inventory' => 'Bestandsmethode', 'Personal settings' => 'Persönliche Einstellungen', - 'Pg Database Administration' => 'Datenbankadministration', 'Phone' => 'Telefon', 'Phone1' => 'Telefon 1 ', 'Phone2' => 'Telefon 2', @@ -1977,6 +1985,7 @@ $self->{texts} = { 'The account 3804 already exists, the update will be skipped.' => 'Das Konto 3804 existiert schon, das Update wird übersprungen.', 'The account 3804 will not be added automatically.' => 'Das Konto 3804 wird nicht automatisch hinzugefügt.', 'The action you\'ve chosen has not been executed because the document does not contain any item yet.' => 'Die von Ihnen ausgewählte Aktion wurde nicht ausgeführt, weil der Beleg noch keine Positionen enthält.', + 'The administration area is always accessible.' => 'Der Administrationsbereich ist immer zugänglich.', 'The application "#1" was not found on the system.' => 'Die Anwendung "#1" wurde auf dem System nicht gefunden.', 'The assembly has been created.' => 'Das Erzeugnis wurde hergestellt.', 'The assistant could not find anything wrong with #1. Maybe the problem has been solved in the meantime.' => 'Der Korrekturassistent konnte kein Problem bei #1 feststellen. Eventuell wurde das Problem in der Zwischenzeit bereits behoben.', @@ -2062,6 +2071,8 @@ $self->{texts} = { 'The following users will have access to this client' => 'Die folgenden Benutzer werden auf diesen Mandanten Zugriff haben', 'The formula needs the following syntax:
For regular article:
Variablename= Variable Unit;
Variablename2= Variable2 Unit2;
...
###
Variable + ( Variable2 / Variable )
Please be beware of the spaces in the formula
' => 'Die Formeln müssen in der folgenden Syntax eingegeben werden:
Bei normalen Artikeln:
Variablenname = Variable Einheit;
Variablenname2 = Variable2 Einheit2;
...
###
Variable + Variable2 * ( Variable - Variable2 )
Variablennamen und Einheiten dürfen nur aus alphanumerischen Zeichen bestehen.
Es muss jeweils die Gesamte Zeile eingegeben werden', 'The greetings have been saved.' => 'Die Anreden wurden gespeichert', + 'The installation is currently locked.' => 'Die Installation ist momentan gesperrt.', + 'The installation is currently unlocked.' => 'Die Installation ist momentan entsperrt.', 'The items are imported accoring do their number "X" regardless of the column order inside the file.' => 'Die Einträge werden in der Reihenfolge ihrer Indizes "X" unabhängig von der Spaltenreihenfolge in der Datei importiert.', 'The link target to add has been created from the existing record.' => 'Das auszuwählende Verknüpfungsziel wurde aus dem bestehenden Beleg erstellt.', 'The list has been printed.' => 'Die Liste wurde ausgedruckt.', @@ -2188,7 +2199,6 @@ $self->{texts} = { 'This group is valid for the following clients' => 'Diese Gruppe ist für die folgenden Mandanten gültig', 'This has been changed in this version, therefore please change the "old" bins to some real warehouse bins.' => 'Das wurde in dieser Version umgestellt, bitte ändern Sie die Freitext-Lagerplätze auf vorhandene Lagerplätze.', 'This has been changed in this version.' => 'Ab dieser Version ist dies nicht mehr so.', - 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine Änderungen vorgenommen!', 'This is a very critical problem.' => 'Dieses Problem ist sehr schwerwiegend.', '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 ignoring onhand' => 'Standardlagerplatz für Auslagern ohne Bestandsprüfung', @@ -2320,6 +2330,7 @@ $self->{texts} = { 'Users that have access to this client' => 'Benutzer mit Zugriff auf diesen Mandanten', 'Users with access' => 'Benutzer mit Zugriff', 'Users with access to this client' => 'Benutzer mit Zugriff auf diesen Mandanten', + 'Users, Clients and User Groups' => 'Benutzer, Mandanten und Benutzergruppen', 'VAT ID' => 'UStdID-Nr', 'Valid' => 'Gültig', 'Valid from' => 'Gültig ab', diff --git a/scripts/locales.pl b/scripts/locales.pl index 3ae38a3b1..e63b1b7b9 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -18,7 +18,6 @@ use FileHandle; use Getopt::Long; use IO::Dir; use List::Util qw(first); -use POSIX; use Pod::Usage; $OUTPUT_AUTOFLUSH = 1; @@ -35,7 +34,7 @@ my $basedir = "../.."; my $locales_dir = "."; my $bindir = "$basedir/bin/mozilla"; my @progdirs = ( "$basedir/SL" ); -my $menufile = "menu.ini"; +my @menufiles = ("${basedir}/menu.ini", "${basedir}/admin-menu.ini"); my @javascript_dirs = ($basedir .'/js', $basedir .'/templates/webpages'); my $javascript_output_dir = $basedir .'/js'; my $submitsearch = qr/type\s*=\s*[\"\']?submit/i; @@ -89,15 +88,13 @@ my @customfiles = grep /_custom/, @bindir_files; push @progfiles, map { m:^(.+)/([^/]+)$:; [ $2, $1 ] } grep { /\.pm$/ } map { find_files($_) } @progdirs; # put customized files into @customfiles -my (@menufiles, %dir_h); +my %dir_h; if ($opt_n) { @customfiles = (); - @menufiles = ($menufile); } else { tie %dir_h, 'IO::Dir', $basedir; - @menufiles = map { "$basedir/$_" } grep { /.*?_$menufile$/ } keys %dir_h; - unshift @menufiles, "$basedir/$menufile"; + push @menufiles, map { "$basedir/$_" } grep { /.*_menu.ini$/ } keys %dir_h; } my @dbplfiles; @@ -724,11 +721,6 @@ sub generate_file { close $fh; } -sub slurp { - my $file = shift; - do { local ( @ARGV, $/ ) = $file; <> } -} - __END__ =head1 NAME diff --git a/templates/webpages/admin/create_dataset.html b/templates/webpages/admin/create_dataset.html index 8b999f039..2f90d579a 100644 --- a/templates/webpages/admin/create_dataset.html +++ b/templates/webpages/admin/create_dataset.html @@ -4,8 +4,6 @@

[% HTML.escape(title) %]

-

[% LxERP.t8('Back') %]

-

[% LxERP.t8('You can either create a new database or chose an existing database.') %] diff --git a/templates/webpages/admin/dbadmin.html b/templates/webpages/admin/dbadmin.html index dc0a2142d..ab92eb58b 100644 --- a/templates/webpages/admin/dbadmin.html +++ b/templates/webpages/admin/dbadmin.html @@ -2,37 +2,35 @@ [% INCLUDE 'common/flash.html' %] -

[% HTML.escape(title) %]

+

[% LxERP.t8("Database login (#1)", title) %]

-

[% LxERP.t8('Back') %]

+

[% LxERP.t8('Here you only provide the credentials for logging into the database.') %] [% LxERP.t8('Nothing will be created or deleted at this stage!') %]

- + - + - + - + - +
[% LxERP.t8('Host') %][% L.input_tag('dbhost', FORM.dbhost, size=30, class="initial_focus") %][% L.input_tag('dbhost', dbhost, size=30, class="initial_focus") %] [% LxERP.t8('Port') %][% L.input_tag('dbport', FORM.dbport, size=6) %][% L.input_tag('dbport', dbport, size=6) %]
[% LxERP.t8('Database User') %][% L.input_tag("dbuser", FORM.dbuser, size=30) %][% L.input_tag("dbuser", dbuser, size=30) %] [% LxERP.t8('Password') %][% L.input_tag("dbpasswd", FORM.dbpasswd, type='password', size=30) %][% L.input_tag("dbpasswd", dbpasswd, type='password', size=30) %]
[% LxERP.t8('Database template') %][% L.input_tag("dbdefault", FORM.dbdefault, size=30) %][% L.input_tag("dbdefault", dbdefault, size=30) %]
-
- [% L.hidden_tag("action", 'Admin/dispatch') %] - [% L.submit_tag('action_create_dataset', LxERP.t8('Create Dataset')) %] - [% L.submit_tag('action_delete_dataset', LxERP.t8('Delete Dataset')) %] -
-
+ [% L.hidden_tag("action", 'Admin/dispatch') %] -

[% LxERP.t8('This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!') %]

+

+ [% L.submit_tag('action_' _ next_action, LxERP.t8('Login')) %] +

+ diff --git a/templates/webpages/admin/delete_dataset.html b/templates/webpages/admin/delete_dataset.html index e3b61151c..dcc3b9e65 100644 --- a/templates/webpages/admin/delete_dataset.html +++ b/templates/webpages/admin/delete_dataset.html @@ -4,8 +4,6 @@

[% HTML.escape(title) %]

-

[% LxERP.t8('Back') %]

-

[% LxERP.t8('You can only delete datasets that are not in use.') %] [% LxERP.t8('If you want to delete such a dataset you have to edit the client(s) that are using the dataset in question and have them use another dataset.') %] diff --git a/templates/webpages/admin/edit_client.html b/templates/webpages/admin/edit_client.html index dc5ca4585..cd9983fcf 100644 --- a/templates/webpages/admin/edit_client.html +++ b/templates/webpages/admin/edit_client.html @@ -5,8 +5,6 @@

[% HTML.escape(title) %]

-

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]

-
[% L.hidden_tag("client.id", SELF.client.id) %] [% L.hidden_tag("action", "") %] diff --git a/templates/webpages/admin/edit_group.html b/templates/webpages/admin/edit_group.html index f9247f52e..d471e5a29 100644 --- a/templates/webpages/admin/edit_group.html +++ b/templates/webpages/admin/edit_group.html @@ -5,8 +5,6 @@

[% HTML.escape(title) %]

-

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]

- [% L.hidden_tag("group.id", SELF.group.id) %] [% L.hidden_tag("action", "") %] diff --git a/templates/webpages/admin/edit_printer.html b/templates/webpages/admin/edit_printer.html index 7064416eb..8553c5328 100644 --- a/templates/webpages/admin/edit_printer.html +++ b/templates/webpages/admin/edit_printer.html @@ -2,14 +2,26 @@ [% INCLUDE 'common/flash.html' %] +[% IF !SELF.all_clients.size %] +
+ [% LxERP.t8("Error") %]: + [% LxERP.t8("No clients have been created yet.") %] +
+ +[%- ELSE %] +

[% HTML.escape(title) %]

- [% L.hidden_tag("client.id", SELF.client.id) %] [% L.hidden_tag("action", 'Admin/dispatch') %] [% L.hidden_tag("printer.id", SELF.printer.id) %] + + + + + @@ -33,3 +45,5 @@

+ +[% END %] diff --git a/templates/webpages/admin/edit_user.html b/templates/webpages/admin/edit_user.html index b8b5dc4df..ff6a188eb 100644 --- a/templates/webpages/admin/edit_user.html +++ b/templates/webpages/admin/edit_user.html @@ -5,8 +5,6 @@

[% HTML.escape(title) %]

-

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]

- [% L.hidden_tag("user.id", SELF.user.id) %] [% L.hidden_tag("action", "") %] diff --git a/templates/webpages/admin/list_printers.html b/templates/webpages/admin/list_printers.html index 4da7effa8..a91fa7509 100644 --- a/templates/webpages/admin/list_printers.html +++ b/templates/webpages/admin/list_printers.html @@ -10,22 +10,8 @@ [% LxERP.t8("No clients have been created yet.") %] -
- [% LxERP.t8("Back") %] -
- [%- ELSE %] -
- [% LxERP.t8("Actions") %]: - - [% LxERP.t8("Back") %] - | - [% LxERP.t8("Add printer") %] -
- -
-

[% LxERP.t8("Client to configure the printers for") %]: [% L.select_tag('client.id', SELF.all_clients, id='client_id', title_key='name', default=SELF.client.id) %] diff --git a/templates/webpages/admin/show.html b/templates/webpages/admin/show.html index f8bd272b9..7189665d4 100644 --- a/templates/webpages/admin/show.html +++ b/templates/webpages/admin/show.html @@ -4,32 +4,6 @@

[% HTML.escape(title) %]

-
- [% LxERP.t8("Actions") %]: - - [% L.link(SELF.url_for(action="new_user"), LxERP.t8("Add User")) %] - | - [% L.link(SELF.url_for(action="new_client"), LxERP.t8("Add Client")) %] - | - [% L.link(SELF.url_for(action="new_group"), LxERP.t8("Add User Group")) %] - | - [% L.link(SELF.url_for(action="database_administration"), LxERP.t8("Pg Database Administration")) %] - | - [% L.link(SELF.url_for(action="list_printers"), LxERP.t8("Printer Management")) %] - | - [% IF SELF.is_locked %] - [% L.link(SELF.url_for(action="unlock_system"), LxERP.t8("Unlock System")) %] - [% ELSE %] - [% L.link(SELF.url_for(action="lock_system"), LxERP.t8("Lock System")) %] - [% END %] - | - [% L.link(SELF.url_for(action="logout"), LxERP.t8("Logout")) %] - | - [% L.link(SELF.url_for(controller="LoginScreen", action="user_login"), LxERP.t8("To user login")) %] -
- -
-
  • [%- LxERP.t8("User list") %]
  • diff --git a/templates/webpages/admin/show_lock.html b/templates/webpages/admin/show_lock.html new file mode 100644 index 000000000..f9a9cddec --- /dev/null +++ b/templates/webpages/admin/show_lock.html @@ -0,0 +1,30 @@ +[%- USE HTML %][%- USE LxERP -%][%- USE L -%] + +[% INCLUDE 'common/flash.html' %] + +

    [% HTML.escape(title) %]

    + +[% IF SELF.is_locked %] +

    + [% LxERP.t8("The installation is currently locked.") %] + [% LxERP.t8("Normal users cannot log in.") %] + [% LxERP.t8("The administration area is always accessible.") %] +

    + +

    [% LxERP.t8("Unlock System") %]

    + +[% ELSE %] + +

    + [% LxERP.t8("The installation is currently unlocked.") %] + [% LxERP.t8("Everyone can log in.") %] +

    + +

    + [% LxERP.t8("If you lock the system normal users won't be able to log in.") %] + [% LxERP.t8("The administration area is always accessible.") %] +

    + +

    [% LxERP.t8("Lock System") %]

    + +[% END %] diff --git a/templates/webpages/menu/menuv3.html b/templates/webpages/menu/menuv3.html index a89b268b9..cb7231c1f 100644 --- a/templates/webpages/menu/menuv3.html +++ b/templates/webpages/menu/menuv3.html @@ -1,5 +1,6 @@ [%- USE T8 %] [% USE HTML %][%- USE LxERP -%] +[% UNLESS skip_frame_header %]
[% LxERP.t8('Client') %][% L.select_tag("client.id", SELF.all_clients, default=SELF.client.id, title_key='name') %]
[% LxERP.t8('Printer Description') %] [% L.input_tag("printer.printer_description", SELF.printer.printer_description, size=30, class="initial_focus") %]