diff options
author | Udo Walter | 2017-03-14 12:56:43 +0100 |
---|---|---|
committer | Udo Walter | 2017-03-14 12:56:43 +0100 |
commit | 488c21815a3ddafa9499cdbbd973ede5615da745 (patch) | |
tree | 697f024766b407be11461e1c0d0d031c7a5dbb52 /modules-available/permissionmanager | |
parent | [permission-manager] empty module (diff) | |
download | slx-admin-488c21815a3ddafa9499cdbbd973ede5615da745.tar.gz slx-admin-488c21815a3ddafa9499cdbbd973ede5615da745.tar.xz slx-admin-488c21815a3ddafa9499cdbbd973ede5615da745.zip |
[permission-manager] renamed module folder
Diffstat (limited to 'modules-available/permissionmanager')
8 files changed, 58 insertions, 0 deletions
diff --git a/modules-available/permissionmanager/api.inc.php b/modules-available/permissionmanager/api.inc.php new file mode 100644 index 00000000..0d84ebce --- /dev/null +++ b/modules-available/permissionmanager/api.inc.php @@ -0,0 +1,7 @@ +<?php + +echo json_encode(array( + 'key' => 'value', + 'number' => 123, + 'list' => array(1,2,3,4,5,6,'foo') +)); diff --git a/modules-available/permissionmanager/config.json b/modules-available/permissionmanager/config.json new file mode 100644 index 00000000..706412d0 --- /dev/null +++ b/modules-available/permissionmanager/config.json @@ -0,0 +1,3 @@ +{ + "category":"main.content" +} diff --git a/modules-available/permissionmanager/lang/de/module.json b/modules-available/permissionmanager/lang/de/module.json new file mode 100644 index 00000000..166909c3 --- /dev/null +++ b/modules-available/permissionmanager/lang/de/module.json @@ -0,0 +1,4 @@ +{ + "module_name": "Mein erstes Modul", + "page_title": "Mein erster Seitentitel" +}
\ No newline at end of file diff --git a/modules-available/permissionmanager/lang/de/template-tags.json b/modules-available/permissionmanager/lang/de/template-tags.json new file mode 100644 index 00000000..ce98ce38 --- /dev/null +++ b/modules-available/permissionmanager/lang/de/template-tags.json @@ -0,0 +1,3 @@ +{ + "lang_hello": "Hallo" +}
\ No newline at end of file diff --git a/modules-available/permissionmanager/lang/en/module.json b/modules-available/permissionmanager/lang/en/module.json new file mode 100644 index 00000000..b2bcbb0c --- /dev/null +++ b/modules-available/permissionmanager/lang/en/module.json @@ -0,0 +1,4 @@ +{ + "module_name": "My first module", + "page_title": "My first page title" +}
\ No newline at end of file diff --git a/modules-available/permissionmanager/lang/en/template-tags.json b/modules-available/permissionmanager/lang/en/template-tags.json new file mode 100644 index 00000000..c30739e5 --- /dev/null +++ b/modules-available/permissionmanager/lang/en/template-tags.json @@ -0,0 +1,3 @@ +{ + "lang_hello": "Hello" +}
\ No newline at end of file diff --git a/modules-available/permissionmanager/page.inc.php b/modules-available/permissionmanager/page.inc.php new file mode 100644 index 00000000..871e7946 --- /dev/null +++ b/modules-available/permissionmanager/page.inc.php @@ -0,0 +1,30 @@ +<?php + +class Page_PermissionManager extends Page +{ + + /** + * Called before any page rendering happens - early hook to check parameters etc. + */ + protected function doPreprocess() + { + User::load(); + + if (!User::isLoggedIn()) { + Message::addError('main.no-permission'); + Util::redirect('?do=Main'); // does not return + } + } + + /** + * Menu etc. has already been generated, now it's time to generate page content. + */ + protected function doRender() + { + Render::addTemplate('_page', array( + 'foo' => 'bar', + 'now' => date('d.m.Y H:i:s') + )); + } + +} diff --git a/modules-available/permissionmanager/templates/_page.html b/modules-available/permissionmanager/templates/_page.html new file mode 100644 index 00000000..dfc941ae --- /dev/null +++ b/modules-available/permissionmanager/templates/_page.html @@ -0,0 +1,4 @@ +<div style="border:5px solid red"> + <h1>{{lang_hello}}, {{foo}}</h1> + ** {{now}} ** +</div>
\ No newline at end of file |