joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

Allow JLayout for HTML overrides in com_associations

Open wilsonge opened this issue 8 years ago • 14 comments

HTML output here needs to be allowed to be overridden by a template: https://github.com/infograf768/joomla-cms/blob/15a3bb16356d3f62e6a590a996b5bac4d5d3f315/administrator/components/com_associations/helpers/associations.php#L172

Expected result

The HTML is over-rideable with a JLayout

Actual result

It's hardcoded

Additional comments

wilsonge avatar Mar 16 '17 12:03 wilsonge

let's first merge https://github.com/joomla/joomla-cms/pull/14661 as it is just an improvment on the existing. then see how it could be done. not sure i know.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14662.

infograf768 avatar Mar 16 '17 14:03 infograf768

we already use return JLayoutHelper::render('joomla.content.associations', $items);

as in other places in core for the same type of display. Do you mean we have to create another type of layout?

infograf768 avatar Mar 17 '17 10:03 infograf768

The problem is that this JLayout isn't an ideal one. You pass allready generated HTML (the link with a tooltip) and it only creates an list from it. Ideally you would pass it the needed raw data (url, language) and the JLayout creates the link itself from it. Also the JHtml::_('bootstrap.popover'); should be in that JLayout.

I don't think it is possible to change it now without breaking anything. Moving the JHtml call should be fine but rest will be tricky.

Bakual avatar Mar 17 '17 11:03 Bakual

This is a 3.7 feature. Why can't we do it without breaking things?

wilsonge avatar Mar 17 '17 12:03 wilsonge

is'nt it similar to https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/helpers/html/contentadministrator.php#L32

infograf768 avatar Mar 17 '17 14:03 infograf768

This is a 3.7 feature. Why can't we do it without breaking things?

The JLayout that is currently used here isn't a new one, it exists since Joomla 3.1 (https://github.com/joomla/joomla-cms/pull/1178). You can't break that one.

We could create a new Jlayout for the association manager that isn't used anywhere else (and put it itno the component folder pretty please) or use the existing JLayout as we currently do and refactor the JLayout in future to make it more flexible.

Bakual avatar Mar 17 '17 14:03 Bakual

@infograf768 #14661 is merged.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14662.

ghost avatar Apr 03 '17 11:04 ghost

@wilsonge are you still looking at applying this to J3 or will this be something in J4?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14662.

jwaisner avatar Mar 12 '20 14:03 jwaisner

I mean it should be in both versions but I'm not actively working on it. Got too many other things on my plate :(

wilsonge avatar Mar 12 '20 14:03 wilsonge

@wilsonge , just bumping this as a reminder :)

jwaisner avatar Aug 24 '21 17:08 jwaisner

Please tag J4

brianteeman avatar Aug 23 '22 19:08 brianteeman

So, it's been 7 years and I just looked this up... I think this has been fixed in the meantime. Could you check this again, @wilsonge? Maybe we can finally close this?

Hackwar avatar Sep 28 '24 19:09 Hackwar

Still looks like hardcoded bootstrap classes to me https://github.com/joomla/joomla-cms/blob/4.4-dev/administrator/components/com_associations/src/Helper/AssociationsHelper.php#L287

wilsonge avatar Sep 28 '24 22:09 wilsonge

There are lots of hardcoded bootstrap classes in the non-layout files

just search for bg-warning or bg-secondary

brianteeman avatar Jun 16 '25 18:06 brianteeman