Request: I would like to see additional icon in table list (near Structure icon) with link to Search in the table.
Use case: quite often I need to search for records in table. So I press on table name which brings me to Show view. Then I press on Search and then finally I can enter search criteria and filter result. The solution with shortcut link would save me from 1 click, but more importantly, would save me from loading page with query to DB.
If you mean navigation panel's table list and you want to reach table search from there, you already have two options:-
1. Setting $cfg['NavigationTreeDefaultTabTable'] to tbl_select.php will transform the default 'Structure' icon into 'Search' icon.
2. Setting $cfg['DefaultTabTable'] to tbl_select.php will make the table name link point to search page.
These options are great, but I consider that three most common actions working with DB are: display records, display structure, and search. I would like to have all easily accessible so I propose to have to icons in the navigation panel.
I sent a PR for this ticket: https://github.com/phpmyadmin/phpmyadmin/pull/1457
Feel free to test it and give a feedback.
Thanks.
Hello Hugues,
I am new to php and want to contribute.
Regarding the above mentioned pull request, I took a look at your editions that you made in libraries/navigation/NavigationTree.class.php .But I could not understand why did you do that,like
if (!is_array($iconLinks)) {
+ $iconLinks = array($iconLinks);
+ $icons = array($icons);
+ }
In here, what is the need of checking if $iconLinks is an arrar or not. Surely it will be , as you have edited the code and made it an array in the declaration itself in libraries/navigation/Nodes/Node_Table.class.php
'icon' => array(
- . '?server=' . $GLOBALS['server'] + $GLOBALS['cfg']['NavigationTreeDefaultTabTable']
- . '&db=%2$s&table=%1$s&token=' + . '?server=' . $GLOBALS['server']
- . $_SESSION[' PMA_token '], + . '&db=%2$s&table=%1$s&token='
+ . $_SESSION[' PMA_token '],
+ $GLOBALS['cfg']['NavigationTreeDefaultTabTable2']
+ . '?server=' . $GLOBALS['server']
+ . '&db=%2$s&table=%1$s&token='
+ . $_SESSION[' PMA_token ']
+ ),
I am new to open source development and to phpmyadmin.Hope that my queries do not irritate you.
Hi,
This is linked to the modification of libraries/navigation/Nodes/Node_Table.class.php.
You can see here https://github.com/phpmyadmin/phpmyadmin/pull/1457/files#diff-f1409c79fe711a64acb26637a5e36c2eR34 that I manage the $icon attribute in a different way and now it could be an array.
But I still need to manage $icon when it's not an array.
Ok. Since this code manages and links all the icons in the tree to their
respective target pages , and we are adding an icon(basically a shortcut
path to search) adjacent to only "structure icon", hence we need to manage
all other icons as array with size 1.
That's why you changed the CSS class statement if array size is 2.
Am I right?
On Fri, Jan 30, 2015 at 1:22 AM, Hugues Peccatte tithugues@users.sf.net
wrote:
Related
Feature Requests:
#1591Yes, that's it.
Hi Hugues,
Sorry for late follow-up on this bug, as I am new to phpmyadmin , I was making myself familiar with the code, making some of my own changes.
I understood and implemented nearly same changes as yours in my code, but while doing so I found that the feature requested could have been implemented succesfully even by editing only the following files:-
1- libraries/config.default.php
2- libraries/navigation/NavigationTree.class.php
3- libraries/navigation/Nodes/Node_Table.class.php
4- themes/original/css/navigation.css.php
So , I wanted to know why did you do code changes in rest of the files, as they wouldn't be necessary according to me.
Thank you
I think that this feature is already implemented in pma 4.3.6 .
The links are available from the DB structure page. But the need was to have another link from the navigation tree.
Okay I got it. Thanks !
Works great, thank you!