Page 1 of 1
Alternative Homepage / Indexpage / Dashboard
Posted: 2018-07-24 17:23
by jsetzer
Hi,
I've modified my appGini code to build a completely different homepage / indexpage. I've turned this...

- chrome_2018-07-24_19-16-19.png (18.97 KiB) Viewed 9647 times
...into that...

- chrome_2018-07-24_19-11-12.png (207.14 KiB) Viewed 9647 times
I did not change any overwritable files but only jQuery does the job. New table-groups and new tables will be applied automatically without any further code change.
I hope you like it.
Kind Regards,
Jan
PS: The code is a bit too complex for posting it here.
Re: Alternative Homepage / Indexpage / Dashboard
Posted: 2018-08-04 16:07
by landrea
this is really a very good, really amazing
i woudl like to know how you did it
do you work only in footer hook?
Re: Alternative Homepage / Indexpage / Dashboard
Posted: 2018-08-07 19:24
by jsetzer
Thank you, @landrea!
Well, in
header-extras.php I have a couple of includes and some magic initialization:
Code: Select all
<script src="/app/AppGiniHelper.min.js"></script>
<script src="/app/AppGiniCharts.min.js"></script>
<?php include_once __DIR__ . '/../../AppGiniHelper.php'; ?>
<!-- ... one more include here ... -->
<script>
var config = {
icon: 'pencil',
title: '<b>Case</b>Worxx',
backgroundimage: 'images/background.jpg',
copyright: {
text: 'Copyright © 2016 - ' + '2018' + ' bizzworxx.de'
},
default: {
icon: 'glyphicon glyphicon-cog'
},
loginpage: {
backgroundimage: 'images/background-login.jpg'
},
homepage: {
backgroundimage: 'images/background-home.jpg',
change: true
}
};
appGiniHelper = new AppGiniHelper(config);
</script>
I have placed my includes in the parent directory, so all my different appGini apps can make use of it.
As you can see I can configure background-images etc. for login-page, home-page and other pages. The magic is being done in my appGiniHelper class. I only have to pass the config variable.
The hardest part was finding the collapsible table groups and the table links inside.
Code: Select all
// ...
var table_groups = $j('a.collapser');
// ...
table_groups.each(function () {
var a = $j(this);
var text = a.text();
var panel_id = a.attr('href');
var table_links_panel = $j(panel_id);
var table_links_row = table_links_panel.children('div.row.table_links').first();
var table_links = table_links_row.children('div');
if (table_links.length) {
// create the new panels and links here
// ...
}
// ...
});
I only use
header-extras.php and my own includes. The file
footer-extras.php is empty. No overwritable file has been touched.
Kind Regards,
Jan
Re: Alternative Homepage / Indexpage / Dashboard
Posted: 2018-08-15 11:20
by jsetzer
Hi!
The alternative homepage design now also supports $homeLinks[] from the hooks/links-home.php file.
It's also tested in a right-to-left (rtl) environment thanks to @M Tessler
Regards,
Jan
Re: Alternative Homepage / Indexpage / Dashboard
Posted: 2018-09-30 19:03
by jsetzer
You may also have a look at my forum post here
https://forums.appgini.com/phpbb/viewto ... f=4&t=2804 where I am showing a more "desktop-like" homepage style:

- homepage-desktopstyle-small.jpg (13.91 KiB) Viewed 9143 times
Kind Regards,
Jan