From: Kilian Saffran Date: Fri, 5 Jul 2019 16:23:41 +0000 (+0200) Subject: auto commit on 2019-07-05 18:23 X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=c21449a4d73355c238da1f1ea22fef348dc18edc;p=juridig_lu.git auto commit on 2019-07-05 18:23 --- diff --git a/backoffice/index.cgi b/backoffice/index.cgi index 6f3e75b..4ac06b0 100644 --- a/backoffice/index.cgi +++ b/backoffice/index.cgi @@ -107,7 +107,7 @@ if ($p->{sid} ne ""){ } -$vars->{beforex} = $vars->{page}; +#$vars->{beforex} = $vars->{page}; if (!exists($sess->{id}) || (!exists($p->{sid})) || $p->{sid} eq ""){ $skl = "skeleton/login.tt"; } @@ -159,6 +159,7 @@ if ($skl ne "skeleton/login.tt" && $vars->{page} =~ /^module/){ if ($vars->{page} !~ /\.tt$/) { $skl = "skeleton/module_file.tt"; } + $vars->{params}= $p; } #END - iFrame - Modules @@ -172,9 +173,9 @@ $template->process($skl,$vars) || die "Template process failed: ", $template->er # } # print Dumper($vars); -# print "/*"; + print "/*"; # # print Dumper($p); -# print Dumper($vars); +print Dumper($vars); # # print Dumper($sess); -# print "*/"; +print "*/"; diff --git a/backoffice/tmpl/block/sidebar.tt b/backoffice/tmpl/block/sidebar.tt index 8cfaf81..677040c 100644 --- a/backoffice/tmpl/block/sidebar.tt +++ b/backoffice/tmpl/block/sidebar.tt @@ -1,5 +1,6 @@ [% viewapps = dksdb.prepare("select ap.id,ap.app,ap.description,ap.name,acc.publicenabled,acc.expiration, to_char(expiration,'dd.mm.yyyy') as dspexpiration from apps ap left join appaccess acc on (ap.id=acc.id_app) where acc.id_user=? and acc.expiration >= CURRENT_DATE and ap.activated=true;")%] + diff --git a/backoffice/tmpl/module/profile/index.tt b/backoffice/tmpl/module/profile/index.tt index 3af8cd7..2674001 100644 --- a/backoffice/tmpl/module/profile/index.tt +++ b/backoffice/tmpl/module/profile/index.tt @@ -5,7 +5,7 @@
-
+
diff --git a/backoffice/tmpl/module/users/form_users.js b/backoffice/tmpl/module/users/form_users.js new file mode 100644 index 0000000..12e871f --- /dev/null +++ b/backoffice/tmpl/module/users/form_users.js @@ -0,0 +1,3 @@ +function initpage(){ + +} \ No newline at end of file diff --git a/backoffice/tmpl/module/users/form_users.tt b/backoffice/tmpl/module/users/form_users.tt new file mode 100644 index 0000000..d2a7a5d --- /dev/null +++ b/backoffice/tmpl/module/users/form_users.tt @@ -0,0 +1,91 @@ +[% userdata = dksdb.prepare("select us.id,us.username,us.prename,us.surname,us.blocked,ug.usergroup as defaultgroup,string_agg(distinct(uign.usergroup),',') as othergroups +from users us +join usergroups ug on (us.id_usergroup=ug.id) +left join useringroups uig on (us.id=uig.id_user) +left join usergroups uign on (uig.id_group=uign.id) where us.id=? group by us.id,ug.id LIMIT 1;") %] +[% FOREACH usr = userdata.execute(params.id) %] + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +[% END %] +

Applications

+[% appdata = dksdb.prepare("select ap.name,ac.id_user,ac.id_app,ac.publicenabled,ac.expiration from appaccess ac join apps ap on (ac.id_app=ap.id) where ac.id_user=?;") %] + + + + + + + + + + + [% FOREACH uap = appdata.execute(params.id) %] + + + + + + [% END %] + +
ApplicationPublic EnabledExpiration
[% uap.name %][% uap.publicenabled %][% uap.expiration %]
+

Invoices

+[% invdata = dksdb.prepare("select iv.id,iv.id_user,iv.reference,iv.invoicedate,iv.email,iv.status,iv.statusdate,iv.voucher,iv.payementmethod,iv.sumgrossamount,iv.payedamount,iv.pdfname from invoices iv left join apps ap on (iv.id_app=ap.id) where id_user=? order by iv.invoicedate DESC;") %] + + + + + + + + + + + + + + + + + + [% FOREACH ivd = invdata.execute(params.id) %] + + + + + + + + + + + + + [% END %] + +
ReferenceInvoice DateStatusStatus DateVoucherMethodAmountPayed AmountE-MailPDF
[% ivd.reference %][% ivd.invoicedate %][% ivd.status %][% ivd.statusdate %][% ivd.voucher %][% ivd.method %][% ivd.sumgrossamount %][% ivd.payedamount %][% ivd.email %][% IF ivd.pdfname %] [% END %]
\ No newline at end of file diff --git a/backoffice/tmpl/module/users/index.js b/backoffice/tmpl/module/users/index.js index e69de29..12e871f 100644 --- a/backoffice/tmpl/module/users/index.js +++ b/backoffice/tmpl/module/users/index.js @@ -0,0 +1,3 @@ +function initpage(){ + +} \ No newline at end of file diff --git a/backoffice/tmpl/module/users/index.tt b/backoffice/tmpl/module/users/index.tt index e69de29..70b211c 100644 --- a/backoffice/tmpl/module/users/index.tt +++ b/backoffice/tmpl/module/users/index.tt @@ -0,0 +1,47 @@ + + +

Utilisateurs

+ + + + + + + + + + + + + + + + + [% FOREACH aus = dksdb.query("select us.id,us.username,us.prename,us.surname,us.blocked,ug.usergroup as defaultgroup,string_agg(ax.name,',') as apps,string_agg(distinct(uign.usergroup),',') as othergroups +from users us +join usergroups ug on (us.id_usergroup=ug.id) +left join useringroups uig on (us.id=uig.id_user) +left join usergroups uign on (uig.id_group=uign.id) +left join ( +select ap.name,ac.id_user,ac.id_app,ac.publicenabled,ac.expiration,row_number() over (partition by ac.id_user) from appaccess ac join apps ap on (ac.id_app=ap.id) +) ax +on (us.id=ax.id_user and ax.id_app is not null) +group by us.id,ug.id") %] + + + + + + + + + + + [% END %] + +
UsernamePrenameSurnameIs BlockedDefault GroupApplicationsOther Groups 
[% aus.username %][% aus.prename %][% aus.surname %][% aus.blocked %][% aus.defaultgroup %][% aus.apps %][% aus.othergroups %] + + [% IF aus.id != session.id %] + + [% END %] +
diff --git a/backoffice/tmpl/module/users/javascript.tt b/backoffice/tmpl/module/users/javascript.tt index e69de29..ef812af 100644 --- a/backoffice/tmpl/module/users/javascript.tt +++ b/backoffice/tmpl/module/users/javascript.tt @@ -0,0 +1,4 @@ + + + +