Skip to content

Commit 3ff973c

Browse files
dgrammatikobrianteemanQuybembelimenPhil E. Taylor
authored
[4.1] Child templates 2/2 [clean] (#35998)
* Fix the missing installer info * Fix the template thumb images * Fix missing language on style view * Update Templates.php * Update libraries/src/Installer/Installer.php Co-authored-by: Brian Teeman <[email protected]> * Update build/media_source/system/images/template_thumb.svg Co-authored-by: Brian Teeman <[email protected]> * Update build/media_source/system/images/template_thumb.svg Co-authored-by: Brian Teeman <[email protected]> * Fix the thumb logic * editor #1 * CS * CS * CS + fix logic * Ensure the isMedia flag is correcly propageted * Ooops, forgot the child creation functionality From #35879 * CS * Update administrator/components/com_templates/tmpl/template/default_modal_child_body.php Co-authored-by: Brian Teeman <[email protected]> * Update administrator/components/com_templates/tmpl/template/default_modal_child_footer.php Co-authored-by: Brian Teeman <[email protected]> * Fix the description for the child name * Update administrator/components/com_templates/tmpl/template/default_media_folders.php Co-authored-by: Brian Teeman <[email protected]> * Update administrator/components/com_templates/tmpl/template/default_tree_media.php Co-authored-by: Brian Teeman <[email protected]> * Fix copy/pasting doc blocks * Child tmpl name === parentTmplName_childName * Update administrator/components/com_templates/src/Model/TemplateModel.php Co-authored-by: Brian Teeman <[email protected]> * Update administrator/components/com_templates/src/Model/TemplateModel.php Co-authored-by: Brian Teeman <[email protected]> * Update administrator/components/com_templates/src/Model/TemplateModel.php Co-authored-by: Brian Teeman <[email protected]> * Update administrator/components/com_templates/src/View/Template/HtmlView.php Co-authored-by: Brian Teeman <[email protected]> * CS * Update administrator/components/com_templates/src/Service/HTML/Templates.php Co-authored-by: Quy <[email protected]> * Update administrator/components/com_templates/src/Controller/TemplateController.php Co-authored-by: Benjamin Trenkle <[email protected]> * Bailout Early * CS * Don't throw warnings * better conditianal * More notices * Fix the thumb paths * Fix Fat FS lookups * Fix the missing media folder for the child template * don't echo the first slash on win OS * .html is not in the allowed list. WOW * Update administrator/components/com_templates/src/Model/TemplateModel.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/src/Controller/TemplateController.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/tmpl/template/default_modal_folder_body.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/tmpl/template/default_media_folders.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/tmpl/template/default.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/src/View/Template/HtmlView.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/src/Model/TemplateModel.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/src/Controller/TemplateController.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/src/Model/TemplateModel.php Co-authored-by: Phil E. Taylor <[email protected]> * Update administrator/components/com_templates/src/Model/TemplateModel.php Co-authored-by: Phil E. Taylor <[email protected]> * CS, proper media folder logic * CS * Meh * Paths... * better tree entry names * Use current user name, current date for child * Bug, file delete * Fix upload * Add a visual cue for parent/child * Add buttons to switch between list views @bembelimen's idea * Wrong comments * Clean up the child method * PHP notice, use entry dir as the starting point * Correct icon * Undefined $isMedia Pfff * Update administrator/components/com_templates/src/Controller/TemplateController.php Co-authored-by: Richard Fath <[email protected]> * Update administrator/components/com_templates/src/Controller/TemplateController.php Co-authored-by: Richard Fath <[email protected]> * Merge #36011 * Remove a debug line * Windows use / instead of \ * Winows double // * Update administrator/language/en-GB/com_templates.ini Co-authored-by: Brian Teeman <[email protected]> * double // * b->strong * rename modatl tittle // * Update administrator/components/com_templates/tmpl/template/default_tree_media.php Co-authored-by: Quy <[email protected]> * Update plugins/editors/tinymce/tinymce.php Co-authored-by: Quy <[email protected]> * Switch the fallback icon This has a Creative Commons Zero v1.0 Universal (CC0) license and it was copied from: https://iconduck.com/search?query=xcode * Update administrator/components/com_templates/src/View/Styles/HtmlView.php Co-authored-by: Quy <[email protected]> * Update administrator/language/en-GB/com_templates.ini Co-authored-by: Quy <[email protected]> * Update plugins/editors/tinymce/tinymce.php Co-authored-by: Quy <[email protected]> * Update administrator/language/en-GB/com_templates.ini Co-authored-by: Quy <[email protected]> * tabs * Lang failsafe * Update administrator/components/com_templates/tmpl/template/default_folders.php Co-authored-by: Quy <[email protected]> Co-authored-by: Brian Teeman <[email protected]> Co-authored-by: Quy <[email protected]> Co-authored-by: Benjamin Trenkle <[email protected]> Co-authored-by: Phil E. Taylor <[email protected]> Co-authored-by: Richard Fath <[email protected]>
1 parent ee526e2 commit 3ff973c

28 files changed

+1407
-493
lines changed

administrator/components/com_templates/src/Controller/TemplateController.php

Lines changed: 143 additions & 38 deletions
Large diffs are not rendered by default.

administrator/components/com_templates/src/Model/StyleModel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
418418
$formFile = Path::clean($client->path . '/templates/' . $template . '/templateDetails.xml');
419419

420420
// Load the core and/or local language file(s).
421-
$lang->load('tpl_' . $template, $client->path)
421+
$lang->load('tpl_' . $template, $client->path)
422+
|| (!empty($data->parent) && $lang->load('tpl_' . $data->parent, $client->path))
423+
|| (!empty($data->parent) && $lang->load('tpl_' . $data->parent, $client->path . '/templates/' . $data->parent))
422424
|| $lang->load('tpl_' . $template, $client->path . '/templates/' . $template);
423425

424426
if (file_exists($formFile))

0 commit comments

Comments
 (0)