Skip to content
Snippets Groups Projects
Commit 903cf49d authored by Guillaume Delhumeau's avatar Guillaume Delhumeau
Browse files

XWIKI-12220: Adapt the breadcrumb to display the document hierarchy based on nested spaces.

* Do not display the "edit parent" functionality if the legacy parent/child mechanism is disabled
parent fe2149b4
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<div id="editcolumn" class="editor editor-${editor}"> <div id="editcolumn" class="editor editor-${editor}">
<div class="alleditcontent"> <div class="alleditcontent">
<div id="mainEditArea"> <div id="mainEditArea">
#if($editor == 'wiki' || $editor == 'wysiwyg' || $editor == 'inline') #if($services.parentchild.isLegacyParentChildMechanismEnabled() && ($editor == 'wiki' || $editor == 'wysiwyg' || $editor == 'inline'))
## Note: the inline editor never reaches this part since it is handled separately. We add the edit parent button in editinline.vm explicitly. ## Note: the inline editor never reaches this part since it is handled separately. We add the edit parent button in editinline.vm explicitly.
<div class='edit-meta-tools'> <div class='edit-meta-tools'>
<a id='editParentTrigger' class='tool edit-parent' href='#mainEditArea' title="$services.localization.render('core.editors.content.parentField.edit.title')">[$services.localization.render('core.editors.content.parentField.edit')]</a> <a id='editParentTrigger' class='tool edit-parent' href='#mainEditArea' title="$services.localization.render('core.editors.content.parentField.edit.title')">[$services.localization.render('core.editors.content.parentField.edit')]</a>
......
...@@ -16,9 +16,11 @@ $xwiki.ssfx.use('uicomponents/widgets/fullScreen.css', true)## ...@@ -16,9 +16,11 @@ $xwiki.ssfx.use('uicomponents/widgets/fullScreen.css', true)##
#if ($allowDocEdit) #if ($allowDocEdit)
<form id="inline" method="post" action="$doc.getURL("preview")" class="withLock"> <form id="inline" method="post" action="$doc.getURL("preview")" class="withLock">
#end #end
## Edit parent button added here explicitly because inline mode is handled specially in edit.vm and does not behave like the other edit modes.
<div class='edit-meta-tools'> <div class='edit-meta-tools'>
<a id='editParentTrigger' class='tool edit-parent' href='#mainEditArea' title="$services.localization.render('core.editors.content.parentField.edit.title')">[$services.localization.render('core.editors.content.parentField.edit')]</a> #if($services.parentchild.isLegacyParentChildMechanismEnabled())
## Edit parent button added here explicitly because inline mode is handled specially in edit.vm and does not behave like the other edit modes.
<a id='editParentTrigger' class='tool edit-parent' href='#mainEditArea' title="$services.localization.render('core.editors.content.parentField.edit.title')">[$services.localization.render('core.editors.content.parentField.edit')]</a>
#end
</div> </div>
#template("hierarchy.vm") #template("hierarchy.vm")
<div class="row"> <div class="row">
......
...@@ -1483,6 +1483,7 @@ document.observe('xwiki:dom:loaded', function() { ...@@ -1483,6 +1483,7 @@ document.observe('xwiki:dom:loaded', function() {
/* /*
* AJAX improvements for setting the document parent. * AJAX improvements for setting the document parent.
*/ */
#if ($services.parentchild.isLegacyParentChildMechanismEnabled())
document.observe('xwiki:dom:loaded', function() { document.observe('xwiki:dom:loaded', function() {
var hierarchyElement = $('hierarchy'); var hierarchyElement = $('hierarchy');
var breadcrumbsElement = $('breadcrumbs'); var breadcrumbsElement = $('breadcrumbs');
...@@ -1563,6 +1564,7 @@ document.observe('xwiki:dom:loaded', function() { ...@@ -1563,6 +1564,7 @@ document.observe('xwiki:dom:loaded', function() {
}) })
} }
}); });
#end
/* /*
* JS improvement for keeping the content menu visible on the screen when scrolling down. * JS improvement for keeping the content menu visible on the screen when scrolling down.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment