diff --git a/locales/en/LC_MESSAGES/accounting.po b/locales/en/LC_MESSAGES/accounting.po new file mode 100644 index 0000000000000000000000000000000000000000..371de5e881a72460fceaee164dada5c5c0df2dfa --- /dev/null +++ b/locales/en/LC_MESSAGES/accounting.po @@ -0,0 +1,18 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: SimpleSAMLphp 2.0.0\n" +"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" +"POT-Creation-Date: 2016-10-12 09:31+0200\n" +"PO-Revision-Date: 2022-01-09 12:14+0200\n" +"Last-Translator: Marko Ivancic <mivanci@srce.hr\n" +"Language: en\n" +"Language-Team: \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.3.4\n" + +msgid "Accounting" +msgstr "Accounting" diff --git a/src/Controller/Test.php b/src/Controller/Test.php index d020faa79477a78c7e910d275f9c448d95361798..58ef2fcd1854de167e3c99ef32eb08afc9955996 100644 --- a/src/Controller/Test.php +++ b/src/Controller/Test.php @@ -2,10 +2,40 @@ namespace SimpleSAML\Module\accounting\Controller; +use SimpleSAML\Configuration; +use SimpleSAML\Locale\Translate; +use SimpleSAML\Session; +use SimpleSAML\XHTML\Template; +use Symfony\Component\HttpFoundation\Request; + class Test { - public function test(): void + protected Configuration $configuration; + protected Session $session; + + /** + * @param Configuration $configuration + * @param Session $session The current user session. + */ + public function __construct(Configuration $configuration, Session $session) { - echo 'test'; + $this->configuration = $configuration; + $this->session = $session; + } + + /** + * @param Request $request + * @return Template + * @throws \Exception + */ + public function test(Request $request): Template + { + $template = new Template(Configuration::getConfig(), 'accounting:configuration.twig'); + + $template->data = [ + 'test' => Translate::noop('Accounting'), + ]; + + return $template; } } diff --git a/templates/configuration.twig b/templates/configuration.twig new file mode 100644 index 0000000000000000000000000000000000000000..645af5a7654efd9d527050dfa4ede3622a072bd5 --- /dev/null +++ b/templates/configuration.twig @@ -0,0 +1,18 @@ +{% set pagetitle = 'Accounting configuration page'|trans %} +{% set frontpage_section = 'main' %} + +{% extends "base.twig" %} + +{% block preload %} + <link rel="stylesheet" href="{{ asset('css/accounting.css', 'accounting') }}"> +{% endblock %} + +{% block content %} + + <h2>{{ pagetitle }} </h2> + + <p> + {{ test }} + </p> + +{% endblock %} diff --git a/www/assets/css/accounting.css b/www/assets/css/accounting.css new file mode 100644 index 0000000000000000000000000000000000000000..b7e4bd59ee1e9c2f391534308cb92ba6f885c4ac --- /dev/null +++ b/www/assets/css/accounting.css @@ -0,0 +1,3 @@ +.test table { + border: 1px solid #eee; +} \ No newline at end of file