Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adampiotrowski committed Mar 19, 2014
1 parent 59e9b2c commit 1483ea5
Show file tree
Hide file tree
Showing 219 changed files with 10,443 additions and 23,531 deletions.
14 changes: 12 additions & 2 deletions application/Gekosale/Core/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@
abstract class Component extends ContainerAware
{

public function forward($controller, array $path = array(), array $query = array())
/**
* Forwards request to another controller
*
* @param $controller
* @param string $action
* @param array $path
* @param array $query
*
* @return mixed
*/
public function forward($controller, $action = 'indexAction', array $path = array(), array $query = array())
{
$path['_controller'] = $controller;
$path['_action'] = 'indexAction';
$path['_action'] = $action;
$request = $this->container->get('request_stack')->getCurrentRequest();
$subRequest = $request->duplicate($query, null, $path);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,41 @@ public function all()
return AdminMenu::all();
}

/**
* Admin menu sorting function
*
* @param $a
* @param $b
*
* @return int
*/
private function sortMenu(&$a, &$b)
{
if (!empty($a['children'])) {
usort($a['children'], [$this, 'sortMenu']);
}
if ($a['sort_order'] == $b['sort_order']) {
return 0;
}

return $a['sort_order'] > $b['sort_order'] ? 1 : -1;
}

/**
* Returns menu
*
* @return array
*/

public function getMenuData()
{
$this->menuData = $this->all();
$this->currentRoute = $this->getRequest()->attributes->get('_route');
$tree = $this->parseMenuTree();

usort($tree, [$this, 'sortMenu']);

return $this->parseMenuTree();
return $tree;
}

/**
Expand All @@ -65,15 +89,15 @@ protected function parseMenuTree($parent = null)
continue;
}

$menuItems[] = Array(
$menuItems[] = [
'id' => $menu['id'],
'icon' => $menu['icon'],
'name' => $this->trans($menu['name']),
'sort_order' => $this->trans($menu['sort_order']),
'sort_order' => $menu['sort_order'],
'link' => (null !== $menu['route']) ? $this->generateUrl($menu['route']) : '',
'active' => (bool)($this->currentRoute == $menu['route']),
'children' => $this->parseMenuTree($menu['id']),
);
];
}

return $menuItems;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,18 @@ public function deleteAction()

$writer->writeManagerAssets($am);

return $this->redirect($this->generateUrl('admin.cache_manager.index'));
// $am = $this->get('assetic_manager');
// $loader = $this->get('twig.loader.front');
// $writer = $this->get('assetic_writer');
// $templates = ['header.twig'];
//
// foreach ($templates as $template) {
// $resource = new TwigResource($loader, $template);
// $am->addResource($resource, 'twig');
// }
//
// $writer->writeManagerAssets($am);
// return $this->redirect($this->generateUrl('admin.cache_manager.index'));
}

/**
Expand Down
5 changes: 5 additions & 0 deletions design/_css_panel/core/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7171,6 +7171,11 @@ form {
border-bottom: 1px solid #e4e4e4;
}

.GF_Datagrid .body tr:last-child td,
.GF_Datagrid .body tr:last-child th {
border-bottom: 0px solid #e4e4e4;
}

.GF_Datagrid .body .GF_Datagrid_Col__select input {
cursor: default;
}
Expand Down
5,256 changes: 0 additions & 5,256 deletions design/design/js/library/all.js

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading

0 comments on commit 1483ea5

Please sign in to comment.