User tests: Successful: Unsuccessful:
What this does:
Adding badge to menus containing a home.
Not flags as some languages may chose to not use flags.
For this, modified sql select
in joomla, menus and modern presets
Allow custom admin menu items to display an image or a badge (modified the xmls).
Take off links for separator menu items and make sure they are aligned correctly also for custom admin menu.
What it does not do:
Does not solve creating a full custom admin menu with a preset.
Does not solve some issues with custom admin menu items of type heading and container, etc.
Does not solve various issues with the "modern" preset (dropdowns, etc.)
Left in the existing presets the code ELSE 'image:mod_languages/icon-16-language.png' END
which I think can be deleted.
Left the image class alone for now.
Not sure what to do with Title Attribute and Link Class (EDIT: modified, see below). Left them for now.
Waiting for advice on these.
Create a multilingual site with the multilingual sample data.
Create a custom admin menu and add a few menu items.
When creating these, you will get this display, here for a Languages menu item where both icon class and image have been entered:
The Description of the new icon link field needs certainly love and care. Maybe use class
and not code
(EDIT: modified, see below)
For menu items containing homes:
For a custom admin menu item (Global Config has an image as icon, Container has icon but does not work
Should also be fine in RTL
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_menus Language & Strings Modules Templates (admin) |
This PR is mixing several different things - it will be much easier to test and merge if each issue has its own pull request
Surely you dont need to add the new Link Icon field just fix the bug with the existing link class not working. To add an icon to a front end menu item you use the link class. Surely it should be the same for an admin menu?
As I said above:
Not sure what to do with Title Attribute and Link Class. Left them for now.
OK. I will get rid of the Link Class (and therefore of the supplementary spacer) as the name of the field menu-anchor-css
any way does not fit and it should be clear it is for an icon which superseeds the image field therefore needs a description. Will call the field "Link Icon Class"
Modification coming.
This PR is mixing several different things - it will be much easier to test and merge if each issue has its own pull request
I do not think so. It concerns the same default_submenu.php
file and it would be a pain to do it piece by piece. It's easy to test for whoever really want to test. There are only 3 aspects to test...
Labels |
Added:
?
?
|
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-19 18:44:09 |
Closed_By | ⇒ | wilsonge |
Thanks!
This PR breaks Postgres.
Error: The 'atum' service key is already registered.: 42803, 7, FEHLER: Spalte »l.lang_code« muss in der GROUP-BY-Klausel erscheinen oder in einer Aggregatfunktion verwendet werden LINE 1: ... '*' THEN 'class:icon-home' ELSE CONCAT('image:', l.lang_cod... ^
@alikon @twister65 @richard67 can you look into postgresql please. Sorry I failed merging with failing tests
Am looking already, but all i can see is that if syntax is wrong now, it should also have been wrong before this PR.
@Hackwar @wilsonge I think this concept of presets using xml files with hard-coded sql statements which have to work on any of the supported databasy types is sick. If that would work with all our tables, to use one and the same sql statement syntax with case when and left join and whatever else, we would not need names quoting, not need different sql scripts for different db types ... we would not even need different drivers if we could do all with ISO standard SQL. But everybody knows this is not the case ... except of those people who have designed this crazy presets feature working in this way. It is 00.22 now here, I will not find the error today.
Can someone open an issue for that so it will not be forgotten?
Folks, indeed I cannot test on Postgres.
As stated in the description of the changes, I had to use that trick to cope with Content Languages which have no flags/image defined.
@Hackwar @richard67
Please can you test postgres on 3.x to see if it is the way I modified the sq_select which is at stake or if the issue is also present in 3.x.
The code modified is
- sql_select="a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:mod_languages/', l.image, '.gif') END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
+ sql_select="a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', l.lang_code) END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
Note:
Just saw now that the Home language badges are not present when displaying the Menus dashboard... Have also to look into this...
is not this PR that broke postgresql .... postgresql is broken all over in 4.0 sadly
I'm waiting for the result of drone.
Surely you dont need to add the new Link Icon field just fix the bug with the existing link class not working. To add an icon to a front end menu item you use the link class. Surely it should be the same for an admin menu?