From 1f1db27892952c2ad41d711eb06ce35e4bb367ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Sun, 28 Feb 2021 11:51:31 +0100 Subject: [PATCH] Mobile: templates nach templates/mobile_webpages verschoben --- SL/Layout/Material.pm | 4 ++ SL/Layout/MaterialMenu.pm | 2 +- SL/Layout/MobileLogin.pm | 4 ++ .../mobile_webpages/generic/exception.html | 22 +++++++++ .../mobile_webpages/generic/information.html | 3 ++ .../mobile_webpages/login/company_logo.html | 47 +++++++++++++++++++ .../menu/menu.html} | 0 7 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 templates/mobile_webpages/generic/exception.html create mode 100644 templates/mobile_webpages/generic/information.html create mode 100644 templates/mobile_webpages/login/company_logo.html rename templates/{webpages/menu/material.html => mobile_webpages/menu/menu.html} (100%) diff --git a/SL/Layout/Material.pm b/SL/Layout/Material.pm index c68317206..78afd26ed 100644 --- a/SL/Layout/Material.pm +++ b/SL/Layout/Material.pm @@ -13,6 +13,10 @@ sub get_stylesheet_for_user { 'css/material'; } +sub webpages_path { + "templates/mobile_webpages"; +} + sub init_sub_layouts { [ SL::Layout::None->new, diff --git a/SL/Layout/MaterialMenu.pm b/SL/Layout/MaterialMenu.pm index 4ae4da347..e8ef3b80a 100644 --- a/SL/Layout/MaterialMenu.pm +++ b/SL/Layout/MaterialMenu.pm @@ -10,7 +10,7 @@ sub init_menu { } sub pre_content { - $_[0]->presenter->render('menu/material', menu => $_[0]->menu, C => SL::Controller::Base->new); + $_[0]->presenter->render('menu/menu', menu => $_[0]->menu, C => SL::Controller::Base->new); } 1; diff --git a/SL/Layout/MobileLogin.pm b/SL/Layout/MobileLogin.pm index 91a010ea3..54277df0e 100644 --- a/SL/Layout/MobileLogin.pm +++ b/SL/Layout/MobileLogin.pm @@ -10,6 +10,10 @@ sub get_stylesheet_for_user { 'css/material'; } +sub webpages_path { + "templates/mobile_webpages" +} + sub init_sub_layouts { [ SL::Layout::None->new, diff --git a/templates/mobile_webpages/generic/exception.html b/templates/mobile_webpages/generic/exception.html new file mode 100644 index 000000000..47b10606c --- /dev/null +++ b/templates/mobile_webpages/generic/exception.html @@ -0,0 +1,22 @@ +[%- USE LxERP %] +[%- USE HTML %] + +

[%- LxERP.t8('Error!') %]

+ +

+ [%- LxERP.t8('An exception occurred during execution.') %] +

+ +
+ + + + + + + + + + +
[%- LxERP.t8('Type') %]:[%- HTML.escape(error.type) %]
[%- LxERP.t8('Information') %]:
[%- HTML.escape(error.info) %]
+
diff --git a/templates/mobile_webpages/generic/information.html b/templates/mobile_webpages/generic/information.html new file mode 100644 index 000000000..5f4230f7b --- /dev/null +++ b/templates/mobile_webpages/generic/information.html @@ -0,0 +1,3 @@ +[%- USE T8 %] +
[% IF title_information %][% title_information %][% ELSE %][% 'Information' | $T8 %][% END %]
+

[% label_information %]

diff --git a/templates/mobile_webpages/login/company_logo.html b/templates/mobile_webpages/login/company_logo.html new file mode 100644 index 000000000..472d47989 --- /dev/null +++ b/templates/mobile_webpages/login/company_logo.html @@ -0,0 +1,47 @@ +[%- USE T8 %] +[%- USE HTML %][%- USE LxERP %] +
+ + + + +[%- IF git_head %] +

[%- LxERP.t8("Git revision: #1, #2 #3", git_head.hash.substr(0, 7), git_head.author_date.to_kivitendo, git_head.author_date.strftime('%H:%M:%S %Z')) %]

+[%- END %] + +

[% 'companylogo_subtitle' | $T8 %]

+

+ + [% HTML.escape(defaults.company) %] +
+ [% HTML.escape(defaults.address).replace('\\\\n', '
').replace('\n', '
') %] +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
[% 'User' | $T8 %][% HTML.escape(MYCONFIG.name) %]
[% IF AUTH.assert('admin', 'may_fail') %][% END %][% 'Client' | $T8 %][% IF AUTH.assert('admin', 'may_fail') %][% END %][% HTML.escape(client.name) %]
[% 'Language' | $T8 %][% HTML.escape(MYCONFIG.countrycode) %]
[% 'Webserver interface' | $T8 %][% HTML.escape(interface) %]
[% 'kivitendo Homepage' | $T8 %]:http://kivitendo.de
+

+ + [%- todo_list %] diff --git a/templates/webpages/menu/material.html b/templates/mobile_webpages/menu/menu.html similarity index 100% rename from templates/webpages/menu/material.html rename to templates/mobile_webpages/menu/menu.html -- 2.20.1