Landini Admin Template TV automatic filter

Topics related to AppGini plugins/add-ons go here.
Post Reply
pfrumkin
Veteran Member
Posts: 157
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Landini Admin Template TV automatic filter

Post by pfrumkin » 2021-03-08 21:14

Hi Alejandro,

I very much like the look and feel of the LAT interface. I have come to a problem that maybe you just haven't gotten to yet. With AG we can configure the tableview to automatically run a filter. On the homepage home.php, the tableview link will have filter_x=1 in the querystring. I think in LAT this link is built in sideBarMenu_lat.php, but I don't see anything about this filter. Any thoughts on how I can add this querystring programmatically as AG does in home.php?

Thanks.

~Paul

AppGini v5.94 (testing), LAT 2.60

User avatar
landinialejandro
AppGini Super Hero
AppGini Super Hero
Posts: 126
Joined: 2016-03-06 00:59
Location: Argentina
Contact:

Re: Landini Admin Template TV automatic filter

Post by landinialejandro » 2021-03-08 22:56

Hi, thanks for using the template. Could you send me a screenshot to see what the problem is? Send me an email if you prefer.
Alejandro.
AppGini 5.98 - Linux OpenSuse Tumblewweed.

Some of my posts that may interest you:
:arrow: Landini Admin Template: Template for Appgini like AdminLTE
:arrow: Profile image plugin: add and changue image user profile
:arrow: Field editor in table view: Configurable fast edit fields in TV
:idea: my personal page

pfrumkin
Veteran Member
Posts: 157
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Re: Landini Admin Template TV automatic filter

Post by pfrumkin » 2021-03-09 18:04

Hi Alejandro,

Thank you for the quick response.

I have attached one screen cap with LAT, no querystring, the other vanilla AG with the querystring.
LAT_noQS1.png
LAT_noQS1.png (48.11 KiB) Viewed 3367 times
AG_QS1.png
AG_QS1.png (10.31 KiB) Viewed 3367 times
I think this is where is magic happens in home.php (starting line 79 for me), to build in the querystring, though the URLs are actually built further down. tChkFF is the list of tables that have a custom query at tableview invocation. searchFirst is the string (variable) appended to the URL.

Code: Select all

		foreach($tg as $tn => $tgroup) {
			$tc = $arrTables[$tn];
			/* is the current table filter-first? */
			$tChkFF = array_search($tn, array('Auction_Packet','Rpt_Monthly_Sales','Rpt_Sales_Information','Rpt_Letter_Recipients','Rpt_Donation_Information','Rpt_Donor_Information','Rpt_1098C','Vehicle_Export'));
			/* hide current table in homepage? */
			$tChkHL = array_search($tn, array());
			/* allow homepage 'add new' for current table? */
			$tChkAHAN = array_search($tn, array('Vehicles','Buyers','ODO_Disclosure'));

			/* homepageShowCount for current table? */
			$count_badge = '';
			if($tc['homepageShowCount'] && ($tChkHL === false || $tChkHL === null)) {
				$sql_from = get_sql_from($tn, false, true);
				$count_records = ($sql_from ? sqlValue("select count(1) from " . $sql_from) : 0);
				$count_badge = '<span class="badge hspacer-lg text-bold">' . number_format($count_records) . '</span>';
			}

			$t_perm = getTablePermissions($tn);
			$can_insert = $t_perm['insert'];

			$searchFirst = (($tChkFF !== false && $tChkFF !== null) ? '?Filter_x=1' : '');
Please see https://bigprof.com/appgini/tips-and-tu ... arch-forms for a description of the custom filters. I can see that this would be big to implement in LAT as it is some detailed AG logic and LAT is about the UI. This is an argument for a three-tiered architecture to abstract such logic from the UI, but I imagine that would likewise be huge for AG to do.

~Paul

User avatar
landinialejandro
AppGini Super Hero
AppGini Super Hero
Posts: 126
Joined: 2016-03-06 00:59
Location: Argentina
Contact:

Re: Landini Admin Template TV automatic filter

Post by landinialejandro » 2021-03-09 23:49

hi Paul!, ok i understand! I'm going to see it.
Alejandro.
AppGini 5.98 - Linux OpenSuse Tumblewweed.

Some of my posts that may interest you:
:arrow: Landini Admin Template: Template for Appgini like AdminLTE
:arrow: Profile image plugin: add and changue image user profile
:arrow: Field editor in table view: Configurable fast edit fields in TV
:idea: my personal page

User avatar
landinialejandro
AppGini Super Hero
AppGini Super Hero
Posts: 126
Joined: 2016-03-06 00:59
Location: Argentina
Contact:

Re: Landini Admin Template TV automatic filter

Post by landinialejandro » 2021-03-10 22:01

Hello! I was looking at this issue, unfortunately the matrix, where the information is, is generated only in hard code in that place.
Which makes it very difficult to recover the value of the array. I'm going to continue investigating if I can place it in the template as well.
Anyway I am going to modify the code so that it accepts the values of the array, since in the last instance the values of the array could be written manually.

Thanks!
Alejandro.
AppGini 5.98 - Linux OpenSuse Tumblewweed.

Some of my posts that may interest you:
:arrow: Landini Admin Template: Template for Appgini like AdminLTE
:arrow: Profile image plugin: add and changue image user profile
:arrow: Field editor in table view: Configurable fast edit fields in TV
:idea: my personal page

pfrumkin
Veteran Member
Posts: 157
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Re: Landini Admin Template TV automatic filter

Post by pfrumkin » 2021-03-11 18:05

I totally understand. That's what I meant about abstracting the logic from the UI, you really have no way of getting this type of data to build the page.

Have you thought about implementing a hooks folder, with optional files that can be customized? For my exact case, I am thinking of a sideBarMenu_extras.php file we consumers could write, and the LAT sideBarMenu page could read as input data/direction or alternate page customization. Also a big ask, I get it. If I continue down this path I can customize sideBarMenu and just have to remember to reapply customizations with each LAT update.

Thanks for checking.

~Paul

Post Reply