? ? Success

User tests: Successful: Unsuccessful:

avatar Devportobello
Devportobello
28 Apr 2015

Actually there is no way to override the HTML markup for calendar field.

This PR add a layout to be able to override from template.
I also moved import of js behavior.calendar + init in layout to give ability to edit the calendar setup.

How to test
Try to add or edit an article from the frontend "/index.php?option=com_content&view=form&layout=edit"
-> Field "Start Publishing"
Apply PR
Add an override (copy & edit field.php) : /templates/protostar/html/layouts/joomla/calendar/field.php
-> Field "Start Publishing"

avatar Devportobello Devportobello - open - 28 Apr 2015
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 29 Apr 2015
Category Layout Libraries
avatar zero-24 zero-24 - change - 29 Apr 2015
Status New Pending
avatar roland-d roland-d - test_item - 4 May 2015 - Tested successfully
avatar roland-d roland-d - change - 4 May 2015
Milestone Added:
avatar roland-d
roland-d - comment - 4 May 2015

@test Works as expected. Before the patch, no override availab. After applying patch I can create an override.

avatar zero-24
zero-24 - comment - 4 May 2015

@Devportobello i have just send you a very smal CS PR please review and merge so we can move it forward here.

I will try to test if you get the PR merged :smile: Thanks!

avatar infograf768
infograf768 - comment - 5 May 2015

Has anyone tested this with a custom calendar as the one for Persian (fa-IR)?

avatar Devportobello Devportobello - change - 5 May 2015
Milestone Removed:
avatar roland-d
roland-d - comment - 5 May 2015

@infograf768 I have not but the PR keeps the current code as is. Just adds the ability to create an override if you want to. I would be happy to test with a custom calendar if you can tell me where to find it and how to use it.

avatar infograf768
infograf768 - comment - 5 May 2015

Although we still have some errors with Persian Calendar, because it was not updated to fully cope with the absence of mootools, we can still test by just installing Persian from install languages and edit an article to see the calendar field in Publishing Tab (second tab from right after setting admin language to Persian).
url: administrator/index.php?option=com_content

I also looked in frontend
I tested and it looks like it is fine. :)

avatar zero-24 zero-24 - alter_testresult - 5 May 2015 - infograf768: Tested successfully
avatar zero-24 zero-24 - change - 5 May 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 5 May 2015

RTC'ing as we have now 2 good tests Thanks!


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

avatar zero-24 zero-24 - change - 5 May 2015
Milestone Removed:
Labels Added: ?
avatar zero-24 zero-24 - change - 5 May 2015
Labels Added: ?
avatar Fedik
Fedik - comment - 12 May 2015

note: here still need to review the layout file location

avatar wilsonge
wilsonge - comment - 25 May 2015

Personally I disagree with this. Anything in JHtml should already be overridable by the method used in this plugin: https://github.com/mbabker/bs3-demo/blob/master/plg_system_bootstrap3/bootstrap3.php

avatar wilsonge wilsonge - change - 25 May 2015
Labels Added: ?
avatar roland-d
roland-d - comment - 25 May 2015

@wilsonge You mean to use plugins for overrides instead of JLayouts?

avatar wilsonge
wilsonge - comment - 25 May 2015

You can do that in the template as well - people like joostrap do. Just the risk is if it's not in a plugin is that people running early plugin events can include the wrong thing

avatar Bakual
Bakual - comment - 25 May 2015

The good thing about the plugin approach is that it's simple to share and reuse. Someone could just do Bootstrap3 plugin, put it on JED and everyone who uses a BS3 template could install it. It even can be updated using the Joomla Updater.
Not sure what is easier for template designers and users. Both have pros and negs.

avatar bertmert
bertmert - comment - 26 May 2015

With
JPluginHelper::getLayoutPath(...);
it should be possible to "build a bridge" between plugin(s) and "normal" template overrides

avatar Devportobello
Devportobello - comment - 27 May 2015

Dont understand why using plugin is better than layout, adding ability to modify the html markup of calendar is the goal of this PR.

avatar mbabker
mbabker - comment - 27 May 2015

It's a funny thing in JHtml. As it has its own override system, if you add JLayout into it, you get to a point where you have to figure out what you can override from where. Going the plugin route and a custom method replacing the core calendar behavior, you have more control over the entire method (from what calendar to use to its markup).

avatar Bakual
Bakual - comment - 27 May 2015

For the calendar it may be feasible to use JLayout. But if you look at the mess for tabs (https://github.com/joomla/joomla-cms/tree/staging/layouts/libraries/cms/html/bootstrap) the plugin approach looks much nicer and more flexible.

avatar roland-d
roland-d - comment - 28 May 2015

The only issue I see with needing a plugin is that frontenders are not coders. Replacing a PHP file isn't a problem but coding a plugin is something different for them.

Agree, the JLayouts is sometimes taken a little too far so we end up with too many files.

avatar roland-d roland-d - change - 2 Nov 2015
Status Ready to Commit Needs Review
Labels
avatar roland-d
roland-d - comment - 2 Nov 2015

Setting it to Needs Review to have the PLT decide whether or not we go ahead with this.


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2015
Labels Removed: ?
avatar wilsonge
wilsonge - comment - 6 Nov 2015

If this is done this PR will need to be altered to be dealt with in the same way as the layouts for the media, versioning, radio and checkbox form fields

avatar wilsonge wilsonge - change - 6 Nov 2015
Milestone Removed:
avatar brianteeman brianteeman - change - 10 Mar 2016
Category Layout Libraries Fields Layout Libraries
avatar roland-d roland-d - change - 7 May 2016
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2016-05-07 09:57:17
Closed_By roland-d
avatar roland-d roland-d - close - 7 May 2016
avatar roland-d roland-d - close - 7 May 2016
avatar roland-d
roland-d - comment - 7 May 2016

@Devportobello Thank you for your contribution we have decided not to include this PR as the current system already allows to override the calendar.


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

Add a Comment

Login with GitHub to post a comment