This topic is locked

How to create a dropdown list of the Child table links on a list page?

10/23/2014 2:34:03 PM
PHPRunner General questions
M
mfriend author

Hi Folks:
I have a master/parent table that has about 10 or so child tables. On the list page the child table links take up almost the whole screen before the end user would even be able to see the data.
I would really like to create a drop down on the list page (a drop down on each row) that if the user clicks to edit that row the child links would all be available from a dropdown thus saving a lot of screen scrolling.
Here is a pick of what the screen currently looks like (resized to make it smaller... the child links actually take up most of a 1920 monitor).


I would assume If I can figure out how to create a dropdown manually on the list page then I would stick the code into it.
The code I'm thinking I would use would be (the first couple are...)

{BEGIN PERSONNEL_MARC_PERSONNEL_dtable_column}

<TD class="rnr-nowrap" {$rowstyle} {$recordattrs}>

{BEGIN CASH_AWARDS_dtable_link}

<SPAN>

<A {$CASH_AWARDS_dtablelink_attrs}>

Cash Awards

</A>

&nbsp;

</SPAN>

{END CASH_AWARDS_dtable_link}

{BEGIN FEDERAL_GRADE_STEP_dtable_link}

<SPAN>

<A {$FEDERAL_GRADE_STEP_dtablelink_attrs}>

Federal Grade Step

</A>

&nbsp;

</SPAN>

{END FEDERAL_GRADE_STEP_dtable_link}


Thanks for any help or ideas. I'm not too great at Javascript or PHP....
Matthew

Admin 10/23/2014

If you are talking about built-in functionality use the vertical positioning of details tables. You can choose this option under 'Details tables order':

http://xlinesoft.com/phprunner/docs/master_detailes.htm

M
mfriend author 10/23/2014



If you are talking about built-in functionality use the vertical positioning of details tables. You can choose this option under 'Details tables order':

http://xlinesoft.com/phprunner/docs/master_detailes.htm



Hi Sergey:
I understand how to rearrange the using details table order (and how to manually customize and position them on the add page). Most of my tables are fine using PHPRunners default (as a horizontal row of links) since there are only one or two. This main table though has way too much space. Users would have to scroll way to the right just to see the actual data.
What I would like to do is on the list page, consolidate all those separate links into a much shorter drop down list so that if a user clicks on the edit button for a particular button they would then be able to click on the drop down and select which detail table to edit or add to.
Matthew

M
mfriend author 10/24/2014



Hi Sergey:
I understand how to rearrange the using details table order (and how to manually customize and position them on the add page). Most of my tables are fine using PHPRunners default (as a horizontal row of links) since there are only one or two. This main table though has way too much space. Users would have to scroll way to the right just to see the actual data.
What I would like to do is on the list page, consolidate all those separate links into a much shorter drop down list so that if a user clicks on the edit button for a particular button they would then be able to click on the drop down and select which detail table to edit or add to.
Matthew


Setting the child table links to vertical is an improvement, but an unbound drop down of some kind that is just used to contain and display the links would be better I think because the rows are pretty 'deep' now and there would be a lot more scrolling down.. here is what it looks like vertically (I cut off all the fields that go to the right... just wanted to show the links section):

Admin 10/24/2014

While I understand what you saying - there is no easy fix for this. You cannot make it happen just modifying template code ,some PHP/Javascript/HTML knowledge will be required in order to do that and you will have to hardcode table names. This means that if you change the list of details tables you will have to change your code as well.
Personally I believe that piling all that info on the same screen is a bad application design. By reducing the number of details tables or using vertical layout or by using 'Hide details table link if no child records exist' you can provide a better user experience. This is just my personal opinion though and your project requirements might be different.