Open GoogleCodeExporter opened 9 years ago
I think that tabs should always be visible as long as the context is either a
database or a table/view, AND we are not in a multi-step process that should
not be interrupted by jumping to a different page (I don't remember if any
multi-step processes exist in PLA, probably not).
Tecnically, tabs don't actually disappear. They *only appear* for a limited
number of 'actions'. From index.php, line 1252:
if (!isset($_GET['confirm']) && isset($_GET['table']) && isset($_GET['action'])
&& (
$_GET['action']=="table_export"
|| $_GET['action']=="table_import"
|| $_GET['action']=="table_sql"
|| $_GET['action']=="row_view"
|| $_GET['action']=="row_create"
|| $_GET['action']=="column_view"
|| $_GET['action']=="table_rename"
|| $_GET['action']=="table_search"
|| $_GET['action']=="table_triggers"
))
We can either add more elements to the check above, or refactor a bit —maybe
an array + in_array would be more readable.
In the future, it would be nice to have something that tells us whether we are
in a db/table/view context.
Original comment by dreadnaut
on 3 Jan 2014 at 2:46
I also think there is no multistep process in PLA. And we are always either in
a DB or table/view context. I think tabs should always be there, either the
db-tabs or the table / view tabs.
So I am not sure why we need to have a complex if there at all.
Maybe something like
if(isset($_GET['table']))
Would be enough in my opinion.
Original comment by crazy4ch...@gmail.com
on 4 Jan 2014 at 5:58
I just tried this and it looks good. But:
- the blue border between tabs and context currently disappears
- we need to highlight the tabs differently
If action=column_edit (for example), the structure tab needs to be highlighted.
If action=row_editordelete, the browse tab needs to be highlighted
Original comment by crazy4ch...@gmail.com
on 4 Jan 2014 at 6:02
Related to this, we could also refactor the tab drawing code, see patch below.
Original comment by dreadnaut
on 4 Jan 2014 at 11:22
Attachments:
Original issue reported on code.google.com by
crazy4ch...@gmail.com
on 2 Jan 2014 at 7:56