|
@@ -75,155 +75,157 @@ file that was distributed with this source code.
|
|
|
</title>
|
|
|
</head>
|
|
|
<body {% block body_attributes %}class="sonata-bc skin-black fixed"{% endblock %}>
|
|
|
- <header class="header">
|
|
|
- {% block logo %}
|
|
|
- <a class="logo" href="{{ url('sonata_admin_dashboard') }}">
|
|
|
- {% if 'single_image' == admin_pool.getOption('title_mode') or 'both' == admin_pool.getOption('title_mode') %}
|
|
|
- <img src="{{ asset(admin_pool.titlelogo) }}" alt="{{ admin_pool.title }}">{% if 'both' == admin_pool.getOption('title_mode') %} {% endif %}
|
|
|
- {% endif %}
|
|
|
- {% if 'single_text' == admin_pool.getOption('title_mode') or 'both' == admin_pool.getOption('title_mode') %}
|
|
|
- {{ admin_pool.title }}
|
|
|
- {% endif %}
|
|
|
- </a>
|
|
|
- {% endblock %}
|
|
|
- {% block sonata_nav %}
|
|
|
- {% if admin_pool is defined %}
|
|
|
- <nav class="navbar navbar-static-top" role="navigation">
|
|
|
- <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
|
|
|
- <span class="sr-only">Toggle navigation</span>
|
|
|
- <span class="icon-bar"></span>
|
|
|
- <span class="icon-bar"></span>
|
|
|
- <span class="icon-bar"></span>
|
|
|
- </a>
|
|
|
+ {% block sonata_header %}
|
|
|
+ <header class="header">
|
|
|
+ {% block logo %}
|
|
|
+ <a class="logo" href="{{ url('sonata_admin_dashboard') }}">
|
|
|
+ {% if 'single_image' == admin_pool.getOption('title_mode') or 'both' == admin_pool.getOption('title_mode') %}
|
|
|
+ <img src="{{ asset(admin_pool.titlelogo) }}" alt="{{ admin_pool.title }}">{% if 'both' == admin_pool.getOption('title_mode') %} {% endif %}
|
|
|
+ {% endif %}
|
|
|
+ {% if 'single_text' == admin_pool.getOption('title_mode') or 'both' == admin_pool.getOption('title_mode') %}
|
|
|
+ {{ admin_pool.title }}
|
|
|
+ {% endif %}
|
|
|
+ </a>
|
|
|
+ {% endblock %}
|
|
|
+ {% block sonata_nav %}
|
|
|
+ {% if admin_pool is defined %}
|
|
|
+ <nav class="navbar navbar-static-top" role="navigation">
|
|
|
+ <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
|
|
|
+ <span class="sr-only">Toggle navigation</span>
|
|
|
+ <span class="icon-bar"></span>
|
|
|
+ <span class="icon-bar"></span>
|
|
|
+ <span class="icon-bar"></span>
|
|
|
+ </a>
|
|
|
|
|
|
- <div class="navbar-left">
|
|
|
- {% block sonata_breadcrumb %}
|
|
|
- {% if _breadcrumb is not empty or action is defined %}
|
|
|
- <ol class="nav navbar-top-links breadcrumb">
|
|
|
- {% if _breadcrumb is empty %}
|
|
|
- {% if action is defined %}
|
|
|
- {% for menu in admin.breadcrumbs(action) %}
|
|
|
- {% if not loop.last %}
|
|
|
- <li>
|
|
|
- {% if menu.uri is not empty %}
|
|
|
- <a href="{{ menu.uri }}">{{ menu.label|raw }}</a>
|
|
|
- {% else %}
|
|
|
- {{ menu.label }}
|
|
|
- {% endif %}
|
|
|
- </li>
|
|
|
- {% else %}
|
|
|
- <li class="active"><span>{{ menu.label }}</span></li>
|
|
|
- {% endif %}
|
|
|
- {% endfor %}
|
|
|
+ <div class="navbar-left">
|
|
|
+ {% block sonata_breadcrumb %}
|
|
|
+ {% if _breadcrumb is not empty or action is defined %}
|
|
|
+ <ol class="nav navbar-top-links breadcrumb">
|
|
|
+ {% if _breadcrumb is empty %}
|
|
|
+ {% if action is defined %}
|
|
|
+ {% for menu in admin.breadcrumbs(action) %}
|
|
|
+ {% if not loop.last %}
|
|
|
+ <li>
|
|
|
+ {% if menu.uri is not empty %}
|
|
|
+ <a href="{{ menu.uri }}">{{ menu.label|raw }}</a>
|
|
|
+ {% else %}
|
|
|
+ {{ menu.label }}
|
|
|
+ {% endif %}
|
|
|
+ </li>
|
|
|
+ {% else %}
|
|
|
+ <li class="active"><span>{{ menu.label }}</span></li>
|
|
|
+ {% endif %}
|
|
|
+ {% endfor %}
|
|
|
+ {% endif %}
|
|
|
+ {% else %}
|
|
|
+ {{ _breadcrumb|raw }}
|
|
|
{% endif %}
|
|
|
- {% else %}
|
|
|
- {{ _breadcrumb|raw }}
|
|
|
- {% endif %}
|
|
|
- </ol>
|
|
|
- {% endif %}
|
|
|
- {% endblock sonata_breadcrumb %}
|
|
|
- </div>
|
|
|
-
|
|
|
- {% block sonata_top_nav_menu %}
|
|
|
- <div class="navbar-right">
|
|
|
- <ul class="nav navbar-nav">
|
|
|
- <li class="dropdown">
|
|
|
- <a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
- <i class="fa fa-plus-square fa-fw"></i> <i class="fa fa-caret-down"></i>
|
|
|
- </a>
|
|
|
- {% include admin_pool.getTemplate('add_block') %}
|
|
|
- </li>
|
|
|
- <li class="dropdown user-menu">
|
|
|
- <a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
- <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
|
|
|
- </a>
|
|
|
- <ul class="dropdown-menu dropdown-user">
|
|
|
- {% include admin_pool.getTemplate('user_block') %}
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ </ol>
|
|
|
+ {% endif %}
|
|
|
+ {% endblock sonata_breadcrumb %}
|
|
|
</div>
|
|
|
- {% endblock %}
|
|
|
- </nav>
|
|
|
- {% endif %}
|
|
|
- {% endblock sonata_nav %}
|
|
|
- </header>
|
|
|
|
|
|
- <div class="wrapper row-offcanvas row-offcanvas-left">
|
|
|
- {% block sonata_left_side %}
|
|
|
- <aside class="left-side sidebar-offcanvas">
|
|
|
- <section class="sidebar">
|
|
|
- {% block sonata_side_nav %}
|
|
|
- {% block sonata_sidebar_search %}
|
|
|
- {% if app.security.token and is_granted('ROLE_SONATA_ADMIN') %}
|
|
|
- <form action="{{ url('sonata_admin_search') }}" method="GET" class="sidebar-form" role="search">
|
|
|
- <div class="input-group custom-search-form">
|
|
|
- <input type="text" name="q" value="{{ app.request.get('q') }}" class="form-control" placeholder="{{ 'search_placeholder'|trans({}, 'SonataAdminBundle') }}">
|
|
|
- <span class="input-group-btn">
|
|
|
- <button class="btn btn-flat" type="submit">
|
|
|
- <i class="fa fa-search"></i>
|
|
|
- </button>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- {% endif %}
|
|
|
- {% endblock sonata_sidebar_search %}
|
|
|
+ {% block sonata_top_nav_menu %}
|
|
|
+ <div class="navbar-right">
|
|
|
+ <ul class="nav navbar-nav">
|
|
|
+ <li class="dropdown">
|
|
|
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
+ <i class="fa fa-plus-square fa-fw"></i> <i class="fa fa-caret-down"></i>
|
|
|
+ </a>
|
|
|
+ {% include admin_pool.getTemplate('add_block') %}
|
|
|
+ </li>
|
|
|
+ <li class="dropdown user-menu">
|
|
|
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
+ <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
|
|
|
+ </a>
|
|
|
+ <ul class="dropdown-menu dropdown-user">
|
|
|
+ {% include admin_pool.getTemplate('user_block') %}
|
|
|
+ </ul>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ {% endblock %}
|
|
|
+ </nav>
|
|
|
+ {% endif %}
|
|
|
+ {% endblock sonata_nav %}
|
|
|
+ </header>
|
|
|
+ {% endblock sonata_header %}
|
|
|
|
|
|
- {% block side_bar_before_nav %} {% endblock %}
|
|
|
- {% block side_bar_nav %}
|
|
|
- {% if app.security.token and is_granted('ROLE_SONATA_ADMIN') %}
|
|
|
- <ul class="sidebar-menu">
|
|
|
- {% for group in admin_pool.dashboardgroups %}
|
|
|
- {% set display = (group.roles is empty or is_granted('ROLE_SUPER_ADMIN') ) %}
|
|
|
- {% for role in group.roles if not display %}
|
|
|
- {% set display = is_granted(role) %}
|
|
|
- {% endfor %}
|
|
|
+ {% block sonata_wrapper %}
|
|
|
+ <div class="wrapper row-offcanvas row-offcanvas-left">
|
|
|
+ {% block sonata_left_side %}
|
|
|
+ <aside class="left-side sidebar-offcanvas">
|
|
|
+ <section class="sidebar">
|
|
|
+ {% block sonata_side_nav %}
|
|
|
+ {% block sonata_sidebar_search %}
|
|
|
+ {% if app.security.token and is_granted('ROLE_SONATA_ADMIN') %}
|
|
|
+ <form action="{{ url('sonata_admin_search') }}" method="GET" class="sidebar-form" role="search">
|
|
|
+ <div class="input-group custom-search-form">
|
|
|
+ <input type="text" name="q" value="{{ app.request.get('q') }}" class="form-control" placeholder="{{ 'search_placeholder'|trans({}, 'SonataAdminBundle') }}">
|
|
|
+ <span class="input-group-btn">
|
|
|
+ <button class="btn btn-flat" type="submit">
|
|
|
+ <i class="fa fa-search"></i>
|
|
|
+ </button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% endblock sonata_sidebar_search %}
|
|
|
|
|
|
- {# Do not display the group label if no item in group is available #}
|
|
|
- {% set item_count = 0 %}
|
|
|
- {% if display %}
|
|
|
- {% for admin in group.items if item_count == 0 %}
|
|
|
- {% if admin.hasroute('list') and admin.isGranted('LIST') %}
|
|
|
- {% set item_count = item_count+1 %}
|
|
|
- {% endif %}
|
|
|
+ {% block side_bar_before_nav %} {% endblock %}
|
|
|
+ {% block side_bar_nav %}
|
|
|
+ {% if app.security.token and is_granted('ROLE_SONATA_ADMIN') %}
|
|
|
+ <ul class="sidebar-menu">
|
|
|
+ {% for group in admin_pool.dashboardgroups %}
|
|
|
+ {% set display = (group.roles is empty or is_granted('ROLE_SUPER_ADMIN') ) %}
|
|
|
+ {% for role in group.roles if not display %}
|
|
|
+ {% set display = is_granted(role) %}
|
|
|
{% endfor %}
|
|
|
- {% endif %}
|
|
|
|
|
|
- {% if display and (item_count > 0) %}
|
|
|
- <li class="treeview">
|
|
|
- <a href="#">
|
|
|
- {% if group.icon|default() %}{{ group.icon|raw }}{% endif %}
|
|
|
- <span>{{ group.label|trans({}, group.label_catalogue) }}</span>
|
|
|
- <i class="fa pull-right fa-angle-left"></i>
|
|
|
- </a>
|
|
|
- {% set active = false %}
|
|
|
- {% for admin in group.items %}
|
|
|
- {% if admin.hasroute('list') and admin.isGranted('LIST') and app.request.get('_sonata_admin') == admin.code %}
|
|
|
- {% set active = true %}
|
|
|
+ {# Do not display the group label if no item in group is available #}
|
|
|
+ {% set item_count = 0 %}
|
|
|
+ {% if display %}
|
|
|
+ {% for admin in group.items if item_count == 0 %}
|
|
|
+ {% if admin.hasroute('list') and admin.isGranted('LIST') %}
|
|
|
+ {% set item_count = item_count+1 %}
|
|
|
{% endif %}
|
|
|
{% endfor %}
|
|
|
- <ul class="treeview-menu{% if active %} active{% endif %}">
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if display and (item_count > 0) %}
|
|
|
+ <li class="treeview">
|
|
|
+ <a href="#">
|
|
|
+ {% if group.icon|default() %}{{ group.icon|raw }}{% endif %}
|
|
|
+ <span>{{ group.label|trans({}, group.label_catalogue) }}</span>
|
|
|
+ <i class="fa pull-right fa-angle-left"></i>
|
|
|
+ </a>
|
|
|
+ {% set active = false %}
|
|
|
{% for admin in group.items %}
|
|
|
- {% if admin.hasroute('list') and admin.isGranted('LIST') %}
|
|
|
- <li{% if app.request.get('_sonata_admin') == admin.code %} class="active"{% endif %}><a href="{{ admin.generateUrl('list')}}"><i class="fa fa-angle-double-right"></i> {{ admin.label|trans({}, admin.translationdomain) }}</a></li>
|
|
|
+ {% if admin.hasroute('list') and admin.isGranted('LIST') and app.request.get('_sonata_admin') == admin.code %}
|
|
|
+ {% set active = true %}
|
|
|
{% endif %}
|
|
|
{% endfor %}
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- {% endif %}
|
|
|
- {% endfor %}
|
|
|
- </ul>
|
|
|
- {% endif %}
|
|
|
- {% endblock side_bar_nav %}
|
|
|
- {% block side_bar_after_nav %}
|
|
|
- <p class="text-center small" style="border-top: 1px solid #444444; padding-top: 10px"><a href="http://sonata-project.org" rel="noreferrer" target="_blank">sonata project</a></p>
|
|
|
- {% endblock %}
|
|
|
- {% endblock sonata_side_nav %}
|
|
|
- </section>
|
|
|
- </aside>
|
|
|
- {% endblock sonata_left_side %}
|
|
|
+ <ul class="treeview-menu{% if active %} active{% endif %}">
|
|
|
+ {% for admin in group.items %}
|
|
|
+ {% if admin.hasroute('list') and admin.isGranted('LIST') %}
|
|
|
+ <li{% if app.request.get('_sonata_admin') == admin.code %} class="active"{% endif %}><a href="{{ admin.generateUrl('list')}}"><i class="fa fa-angle-double-right"></i> {{ admin.label|trans({}, admin.translationdomain) }}</a></li>
|
|
|
+ {% endif %}
|
|
|
+ {% endfor %}
|
|
|
+ </ul>
|
|
|
+ </li>
|
|
|
+ {% endif %}
|
|
|
+ {% endfor %}
|
|
|
+ </ul>
|
|
|
+ {% endif %}
|
|
|
+ {% endblock side_bar_nav %}
|
|
|
+ {% block side_bar_after_nav %}
|
|
|
+ <p class="text-center small" style="border-top: 1px solid #444444; padding-top: 10px"><a href="http://sonata-project.org" rel="noreferrer" target="_blank">sonata project</a></p>
|
|
|
+ {% endblock %}
|
|
|
+ {% endblock sonata_side_nav %}
|
|
|
+ </section>
|
|
|
+ </aside>
|
|
|
+ {% endblock sonata_left_side %}
|
|
|
|
|
|
- {% block sonata_wrapper %}
|
|
|
<aside class="right-side">
|
|
|
{% block sonata_page_content %}
|
|
|
<section class="content-header">
|
|
@@ -301,7 +303,8 @@ file that was distributed with this source code.
|
|
|
</section>
|
|
|
{% endblock sonata_page_content %}
|
|
|
</aside>
|
|
|
- {% endblock sonata_wrapper %}
|
|
|
- </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ {% endblock sonata_wrapper %}
|
|
|
</body>
|
|
|
</html>
|