fix breadcrumb for content/folder part

This commit is contained in:
Manuel Raynaud
2013-09-30 15:13:04 +02:00
parent d7e9752d63
commit f25922c60a
8 changed files with 18 additions and 10 deletions

View File

@@ -242,7 +242,8 @@ class ContentController extends AbstractCrudController
{
return array(
'content_id' => $this->getRequest()->get('content_id', 0),
'current_tab' => $this->getRequest()->get('current_tab', 'general')
'current_tab' => $this->getRequest()->get('current_tab', 'general'),
'folder_id' => $this->getFolderId(),
);
}

View File

@@ -43,6 +43,7 @@ use Thelia\Model\CategoryQuery;
use Thelia\Core\Event\Product\ProductAddAccessoryEvent;
use Thelia\Core\Event\Product\ProductDeleteAccessoryEvent;
use Thelia\Model\ProductSaleElementsQuery;
/**
* Manages products

View File

@@ -131,7 +131,7 @@ class FolderPath extends BaseI18nLoop
// Prevent circular refererences
if (in_array($parent, $ids)) {
throw new \LogicException(sprintf("Circular reference detected in category ID=%d hierarchy (category ID=%d appears more than one times in path)", $id, $parent));
throw new \LogicException(sprintf("Circular reference detected in folder ID=%d hierarchy (folder ID=%d appears more than one times in path)", $id, $parent));
}
$ids[] = $parent;

View File

@@ -8,7 +8,7 @@
<div class="folder edit-folder">
<div id="wrapper" class="container">
{* include file="includes/folder-breadcrumb.html" editing_category="true" *}
{include file="includes/folder-breadcrumb.html" editing_category="false" editing_content="true"}
<div class="row">
{loop name="content_edit" type="content" visible="*" id="{$content_id}" backend_context="1" lang="$edit_language_id"}

View File

@@ -8,7 +8,7 @@
<div class="folder edit-folder">
<div id="wrapper" class="container">
{* include file="includes/folder-breadcrumb.html" editing_category="true" *}
{include file="includes/folder-breadcrumb.html" editing_category="true" }
<div class="row">
{loop name="folder_edit" type="folder" visible="*" id="{$folder_id}" backend_context="1" lang="$edit_language_id"}

View File

@@ -9,7 +9,7 @@
<div id="wrapper" class="container">
{include file="includes/folder-breadcrumb.html" }
{include file="includes/folder-breadcrumb.html" folder_id=$parent }
{module_include location='folders_top'}

View File

@@ -1,8 +1,8 @@
{* Breadcrumb for categories browsing and editing *}
<ul class="breadcrumb">
<li><a href="{url path='admin/home'}">Home</a></li>
<li><a href="{url path='admin/catalog'}">Catalog</a></li>
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='admin/catalog'}">{intl l="Catalog"}</a></li>
{ifloop rel="category_path"}
{loop name="category_path" type="category-path" visible="*" category=$category_id}

View File

@@ -1,11 +1,11 @@
{* Breadcrumb for folders browsing and editing *}
<ul class="breadcrumb">
<li><a href="{url path='admin/home'}">Home</a></li>
<li><a href="{url path='admin/folders'}">Folders</a>
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='admin/folders'}">{intl l="Folders"}</a>
{ifloop rel="folder_path"}</li>
{loop name="folder_path" type="folder-path" visible="*" folder=$parent}
{loop name="folder_path" type="folder-path" visible="*" folder=$folder_id}
{if $ID == $parent}
<li class="active">
{if $editing_folder == true}
@@ -23,4 +23,10 @@
{elseloop rel="folder_path"}
</li>
{/elseloop}
{if $editing_content == true}
{loop name="content_path" type="content" visible="*" id=$content_id}
<li>{intl l="Editing %title" title="$TITLE"}</li>
{/loop}
{/if}
</ul>