display info in folders edition template
This commit is contained in:
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
namespace Thelia\Controller\Admin;
|
namespace Thelia\Controller\Admin;
|
||||||
use Thelia\Core\Event\TheliaEvents;
|
use Thelia\Core\Event\TheliaEvents;
|
||||||
|
use Thelia\Form\FolderModificationForm;
|
||||||
|
use Thelia\Model\FolderQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class FolderController
|
* Class FolderController
|
||||||
@@ -71,11 +73,25 @@ class FolderController extends AbstractCrudController
|
|||||||
/**
|
/**
|
||||||
* Hydrate the update form for this object, before passing it to the update template
|
* Hydrate the update form for this object, before passing it to the update template
|
||||||
*
|
*
|
||||||
* @param unknown $object
|
* @param \Thelia\Model\Folder $object
|
||||||
*/
|
*/
|
||||||
protected function hydrateObjectForm($object)
|
protected function hydrateObjectForm($object) {
|
||||||
{
|
|
||||||
// TODO: Implement hydrateObjectForm() method.
|
// Prepare the data that will hydrate the form
|
||||||
|
$data = array(
|
||||||
|
'id' => $object->getId(),
|
||||||
|
'locale' => $object->getLocale(),
|
||||||
|
'title' => $object->getTitle(),
|
||||||
|
'chapo' => $object->getChapo(),
|
||||||
|
'description' => $object->getDescription(),
|
||||||
|
'postscriptum' => $object->getPostscriptum(),
|
||||||
|
'visible' => $object->getVisible(),
|
||||||
|
'url' => $object->getRewrittenUrl($this->getCurrentEditionLocale()),
|
||||||
|
'parent' => $object->getParent()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Setup the object form
|
||||||
|
return new FolderModificationForm($this->getRequest(), "form", $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,9 +145,10 @@ class FolderController extends AbstractCrudController
|
|||||||
/**
|
/**
|
||||||
* Load an existing object from the database
|
* Load an existing object from the database
|
||||||
*/
|
*/
|
||||||
protected function getExistingObject()
|
protected function getExistingObject() {
|
||||||
{
|
return FolderQuery::create()
|
||||||
// TODO: Implement getExistingObject() method.
|
->joinWithI18n($this->getCurrentEditionLocale())
|
||||||
|
->findOneById($this->getRequest()->get('folder_id', 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -114,9 +114,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="actions">
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folders' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
|
|
||||||
{module_include location='folder_list_row'}
|
{module_include location='folder_list_row'}
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user