* improved toolbar: hide data table form in collapsible + filter button * added collapsible area for toolbar form #151
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block page_title %}{{ 'admin_activity.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'admin_activity.subtitle'|trans }} {{ 'subtitle.amount'|trans({'%count%': entries.count}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'plus-square': path('admin_activity_create')}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'filter': '#collapseActivityAdmin', 'plus-square': path('admin_activity_create')}) }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% if entries.count == 0 %}
|
||||
@@ -18,7 +18,7 @@
|
||||
'label.comment': 'hidden-xs',
|
||||
'label.visible': 'hidden-xs',
|
||||
'label.actions': '',
|
||||
}, toolbarForm) }}
|
||||
}, toolbarForm, 'collapseActivityAdmin') }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block page_title %}{{ 'admin_customer.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'admin_customer.subtitle'|trans }} {{ 'subtitle.amount'|trans({'%count%': entries.count}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'plus-square': path('admin_customer_create')}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'filter': '#collapseCustomerAdmin', 'plus-square': path('admin_customer_create')}) }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% if entries.count == 0 %}
|
||||
@@ -20,7 +20,7 @@
|
||||
'label.currency': 'hidden-xs',
|
||||
'label.visible': 'hidden-xs',
|
||||
'label.actions': '',
|
||||
}, toolbarForm) }}
|
||||
}, toolbarForm, 'collapseCustomerAdmin') }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block page_title %}{{ 'admin_project.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'admin_project.subtitle'|trans }} {{ 'subtitle.amount'|trans({'%count%': entries.count}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'plus-square': path('admin_project_create')}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'filter': '#collapseProjectAdmin', 'plus-square': path('admin_project_create')}) }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% if entries.count == 0 %}
|
||||
@@ -18,7 +18,7 @@
|
||||
'label.budget': 'hidden-xs',
|
||||
'label.visible': 'hidden-xs',
|
||||
'label.actions': '',
|
||||
}, toolbarForm) }}
|
||||
}, toolbarForm, 'collapseProjectAdmin') }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block page_title %}{{ 'admin_timesheet.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'admin_timesheet.subtitle'|trans }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'plus-square': path('admin_timesheet_create')}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'filter': '#collapseTimesheetAdmin', 'plus-square': path('admin_timesheet_create')}) }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% if entries.count == 0 %}
|
||||
@@ -26,7 +26,7 @@
|
||||
'label.actions': '',
|
||||
}) %}
|
||||
|
||||
{{ tables.data_table_header(columns, toolbarForm) }}
|
||||
{{ tables.data_table_header(columns, toolbarForm, 'collapseTimesheetAdmin') }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block page_title %}{{ 'admin_user.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'admin_user.subtitle'|trans }} {{ 'subtitle.amount'|trans({'%count%': entries.count}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'plus-square': path('admin_user_create')}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'filter': '#collapseUserAdmin', 'plus-square': path('admin_user_create')}) }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% if entries.count == 0 %}
|
||||
@@ -20,7 +20,7 @@
|
||||
'label.active': '',
|
||||
'label.roles': '',
|
||||
'label.actions': '',
|
||||
}, toolbarForm) }}
|
||||
}, toolbarForm, 'collapseUserAdmin') }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
|
||||
@@ -23,3 +23,5 @@
|
||||
})|raw }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{#% block form_label %}{% endblock %#}
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
{% block page_title %}{{ 'invoice.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'invoice.subtitle'|trans }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'plus-square': path('admin_invoice_template_create'), 'list': path('admin_invoice_template')}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'filter': '#collapseInvoice', 'plus-square': path('admin_invoice_template_create'), 'list': path('admin_invoice_template')}) }}{% endblock %}
|
||||
|
||||
{% block main_content_class %}invoice{% endblock %}
|
||||
|
||||
{% block main_before %}
|
||||
{{ macro.toolbar(form) }}
|
||||
{{ macro.toolbar(form, 'collapseInvoice', true) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block main_after %}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
{% macro data_table_header(entries, form, tools, toolsRight) %}
|
||||
{% macro data_table_header(entries, form, collapseClass) %}
|
||||
<div class="box data_table">
|
||||
{% if form or tools or toolsRight %}
|
||||
{% if form %}
|
||||
{% import "macros/toolbar.html.twig" as macro %}
|
||||
{{ macro.toolbar(form, tools, toolsRight) }}
|
||||
{{ macro.toolbar(form, collapseClass) }}
|
||||
{% endif %}
|
||||
<div class="box-body no-padding">
|
||||
<div class="dataTables_wrapper form-inline dt-bootstrap">
|
||||
|
||||
@@ -1,31 +1,11 @@
|
||||
|
||||
{% macro toolbar(form, tools, toolsRight) %}
|
||||
<div class="box-header">
|
||||
{% if tools %}
|
||||
<div class="btn-group tools-left no-print">
|
||||
{% for icon,url in tools %}
|
||||
<a class="btn btn-default" href="{{ url }}"><i class="fa fa-{{ icon }}"></i></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form %}
|
||||
<div class="box-title toolbar no-print">
|
||||
{% macro toolbar(form, collapsible, displayInitial) %}
|
||||
<div class="toolbar no-print">
|
||||
{% if collapsible %}<div class="collapse{% if displayInitial %} collapse.show in{% endif %}" id="{{ collapsible }}">{% endif %}
|
||||
{% form_theme form 'form/toolbar-theme.html.twig' %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_start(form, { 'attr': {'class': 'navbar-form navbar-left'}}) }}
|
||||
{{ form_widget(form) }}
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if toolsRight %}
|
||||
<div class="box-tools">
|
||||
<div class="btn-group">
|
||||
{% for icon,url in tools %}
|
||||
<a class="btn btn-default" href="{{ url }}"><i class="fa fa-{{ icon }}"></i></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if collapsible %}</div>{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="box-tools">
|
||||
<div class="btn-group">
|
||||
{% for icon,url in tools %}
|
||||
<a class="btn btn-default" href="{{ url }}"><i class="fa fa-{{ icon }}"></i></a>
|
||||
<a class="btn btn-default" href="{{ url }}"{% if '#collapse' in url %} data-toggle="collapse" {% endif %}><i class="fa fa-{{ icon }}"></i></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% import "macros/datatables.html.twig" as tables %}
|
||||
{% import "macros/toolbar.html.twig" as toolbar %}
|
||||
|
||||
{% block page_title %}{{ 'timesheet.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'timesheet.subtitle'|trans }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'plus-square': path('timesheet_create')}) }}{% endblock %}
|
||||
{% block page_actions %}{{ widgets.page_actions({'filter': '#collapseTimesheet', 'plus-square': path('timesheet_create')}) }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
@@ -26,7 +27,7 @@
|
||||
'label.actions': '',
|
||||
}) %}
|
||||
|
||||
{{ tables.data_table_header(columns, toolbarForm) }}
|
||||
{{ tables.data_table_header(columns, toolbarForm, 'collapseTimesheet') }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user