-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Now we build the Options submenu in only one place and using the "ZM_Menu" class #4347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…e Left menu and Top menu. (options_menu_tabs.php)
Most of these could be generated from the db Config table. THere are only a couple that aren't present there. I am tempted to go with functions.php, and also look at generating them from the already loaded in ram zm_config variable. |
OK. |
I looked and did not find the necessary information in "$zm_config" to build a submenu for "Options". There are only constant values.
|
It would be possible to take the category names from "ConfigData.pm.in" and display them in the UI almost without changes (replace only the first letter with a capital letter), but it's not that simple... |
In the options view, we get all that from the db. You can just query the db. It is already loaded in order to show the options. |
See line 160. |
Ok, but how can I get the category names for the Options section so that these names can be displayed in the UI? |
Maybe we are talking about different things?
|
It is in the Category column. Not all tabs are represented there, but they are the special cases. |
Yes, but! Also, how can I determine the order of categories in the menu? |
Well, we could put the order in the db or just go alphabetically. I think the medband=>"medium BW" should be done in translations. |
That would be great!
I guess I agree, it makes sense! |
It is possible, but probably many users have already gotten used to the order in which the categories are currently arranged and will not be happy. Or maybe not... |
That is a good point. I think we should just hard code the order in functions.php. Putting it in the db is over complicating things. |
Okay, I'll think about it... |
Isaac, look what I did. |
@connortechnology |
Looks fine to me. |
Because transferring 'Version' => 'Versions' into translation would be completely incorrect!
…e of submenu assembly (functions.php)
I think this PR is finished. |
quick testing here, the Display (skins) tab doesn't work so I can't enable left menu... |
How exactly does not work? |
@connortechnology |
@connortechnology Have you checked? Everything should work correctly. |
@connortechnology
I decided to make a separate file for greater clarity.
But then I thought, maybe it would be better to place the function in the file '\skins\classic\includes\functions.php'?
I'm waiting for your decision.