From: Sven Schöling Date: Sun, 28 Feb 2021 10:51:31 +0000 (+0100) Subject: Mobile: templates nach templates/mobile_webpages verschoben X-Git-Tag: kivitendo-mebil_0.1-0~9^2~102 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1f1db27892952c2ad41d711eb06ce35e4bb367ca;p=kivitendo-erp.git Mobile: templates nach templates/mobile_webpages verschoben --- 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/mobile_webpages/menu/menu.html b/templates/mobile_webpages/menu/menu.html new file mode 100644 index 000000000..8650cfaf3 --- /dev/null +++ b/templates/mobile_webpages/menu/menu.html @@ -0,0 +1,39 @@ +[%- USE T8 %] +[%- USE L %] +[%- USE HTML %] +[%- USE LxERP -%] + + + + + +[%- BLOCK menu_items %] + [%- IF MYCONFIG.login %] +
  • [% 'User' | $T8 %]: [% MYCONFIG.login | html %]
  • + [%- ELSE %] +
  • [% L.link(C.url_for(controller='LoginScreen', action='user_login'), LxERP.t8('Login')) %]
  • + [%- END %] + +
  • + + [%- FOREACH node = menu.tree %] + [%- NEXT UNLESS node.visible %] +
  • [% L.link(menu.href_for_node(node) || '#', menu.name_for_node(node), target=node.target) %]
  • + [%- END %] + +
  • + + [%- IF MYCONFIG.login %] +
  • [% L.link(C.url_for(controller='LoginScreen', action='logout'), LxERP.t8('Logout')) %]
  • + [%- END %] +[% END %] diff --git a/templates/webpages/menu/material.html b/templates/webpages/menu/material.html deleted file mode 100644 index 8650cfaf3..000000000 --- a/templates/webpages/menu/material.html +++ /dev/null @@ -1,39 +0,0 @@ -[%- USE T8 %] -[%- USE L %] -[%- USE HTML %] -[%- USE LxERP -%] - - - - - -[%- BLOCK menu_items %] - [%- IF MYCONFIG.login %] -
  • [% 'User' | $T8 %]: [% MYCONFIG.login | html %]
  • - [%- ELSE %] -
  • [% L.link(C.url_for(controller='LoginScreen', action='user_login'), LxERP.t8('Login')) %]
  • - [%- END %] - -
  • - - [%- FOREACH node = menu.tree %] - [%- NEXT UNLESS node.visible %] -
  • [% L.link(menu.href_for_node(node) || '#', menu.name_for_node(node), target=node.target) %]
  • - [%- END %] - -
  • - - [%- IF MYCONFIG.login %] -
  • [% L.link(C.url_for(controller='LoginScreen', action='logout'), LxERP.t8('Logout')) %]
  • - [%- END %] -[% END %]