improvements
This commit is contained in:
53
app/Resources/views/macros/datatables.html.twig
Normal file
53
app/Resources/views/macros/datatables.html.twig
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
{% macro data_table_header(entries) %}
|
||||
<div class="box">
|
||||
{# <div class="box-header">
|
||||
<h3 class="box-title">Hover Data Table</h3>
|
||||
</div> #}
|
||||
<div class="box-body no-padding">
|
||||
<div class="dataTables_wrapper form-inline dt-bootstrap">
|
||||
<div class="row">
|
||||
<div class="col-sm-6"></div>
|
||||
<div class="col-sm-6"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="table table-striped table-hover dataTable" role="grid">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for title, icon in entries %}
|
||||
<th>
|
||||
{% if kimai_context.table_icons and icon %}<i class="fa fa-{{ icon }}"></i>{% endif %}
|
||||
{{ title|trans }}
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro data_table_footer(entries, route) %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{#<div class="row">
|
||||
<div class="col-sm-5">
|
||||
{#<div class="dataTables_info" id="example2_info" role="status" aria-live="polite">
|
||||
{{ 'datatables.entry_counter'|trans({'%from%': '1', '%to%': '10', '%total%': entries.count}) }}
|
||||
</div># }
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="dataTables_paginate paging_simple_numbers">
|
||||
{{ pagerfanta(entries, 'twitter_bootstrap3_translated', { routeName: route }) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>#}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navigation text-center">
|
||||
{{ pagerfanta(entries, 'twitter_bootstrap3_translated', { routeName: route }) }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -1,10 +1,14 @@
|
||||
|
||||
{% macro badge_visible(visible) %}
|
||||
{% macro page_header(title) %}
|
||||
<h2 class="page-header">{{ title|trans }}</h2>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro label_visible(visible) %}
|
||||
{% import _self as macro %}
|
||||
{% if visible %}
|
||||
{{ macro.badge('badge.visible', 'green') }}
|
||||
{{ macro.label('badge.visible', 'success') }}
|
||||
{% else %}
|
||||
{{ macro.badge('badge.invisible', 'red') }}
|
||||
{{ macro.label('badge.invisible', 'warning') }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -16,7 +20,13 @@
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro label(title, type) %}
|
||||
{# success, warning, danger, primary #}
|
||||
<span class="label label-{{ type|default('success') }}">{{ title|trans }}</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro badge(title, color) %}
|
||||
{# black, green, blue, yellow #}
|
||||
<span class="badge bg-{{ color|default('red') }}">{{ title|trans }}</span>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -35,55 +45,6 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro profile_list(user, items, color) %}
|
||||
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
|
||||
<div class="box box-widget widget-user-2">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<div class="widget-user-image">
|
||||
{{ macro.avatar(user.avatar, user.username) }}
|
||||
</div>
|
||||
<!-- /.widget-user-image -->
|
||||
<h3 class="widget-user-username">{{ user.alias }} ({{ user.username }})</h3>
|
||||
<h5 class="widget-user-desc">{{ user.title }}</h5>
|
||||
</div>
|
||||
<div class="box-footer no-padding">
|
||||
<ul class="nav nav-stacked">
|
||||
{% for entry in items %}
|
||||
<li><a href="{{ entry.url }}">{{ entry.title|trans }} <span class="pull-right badge bg-{{ entry.color }}">{{ entry.amount }}</span></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro profile_box(user, items) %}
|
||||
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
|
||||
|
||||
<div class="box box-widget widget-user">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<h3 class="widget-user-username">{{ user.alias }} ({{ user.username }})</h3>
|
||||
<h5 class="widget-user-desc">{{ user.title }}</h5>
|
||||
</div>
|
||||
<div class="widget-user-image">
|
||||
{{ macro.avatar(user.avatar, user.username) }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
{% for entry in items|slice(0, 3) %}
|
||||
<div class="col-sm-4 border-right">
|
||||
<div class="description-block">
|
||||
<h5 class="description-header">{{ entry.amount }}</h5>
|
||||
<span class="description-text">{{ entry.title|trans }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_box_counter(title, amount, icon, color) %}
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-{{ color|default(kimai_context.box_color) }}"><i class="fa fa-{{ icon|default('flag-o') }}"></i></span>
|
||||
@@ -114,16 +75,16 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_box_more(title, amount, unit, icon, color) %}
|
||||
{% macro info_box_more(title, amount, unit, url, icon, color) %}
|
||||
<div class="small-box bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<div class="inner">
|
||||
<h3>{{ amount }}<sup style="font-size: 20px">{{ unit|default('%') }}</sup></h3>
|
||||
<h3>{{ amount }}<sup style="font-size: 20px">{{ unit|default('') }}</sup></h3>
|
||||
<p>{{ title|trans }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-{{ icon|default('bar-chart') }}"></i>
|
||||
</div>
|
||||
<a href="#" class="small-box-footer">
|
||||
<a href="{{ url }}" class="small-box-footer">
|
||||
{{ 'more.info.link'|trans }} <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user