users weekly stats as bar-chart in dashboard (#847)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
{% macro progressbar(max, current, title, subTitle) %}
|
||||
{% set percentReached = (current / (max / 100)) %}
|
||||
{% set percentReached = 0 %}
|
||||
{% if max > 0 %}
|
||||
{% set percentReached = (current / (max / 100)) %}
|
||||
{% endif %}
|
||||
{% set class = "progress-bar-info" %}
|
||||
{% set width = percentReached|number_format(1, '.', '') %}
|
||||
|
||||
@@ -18,7 +21,7 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="progress-group">
|
||||
<span class="progress-text">{{ title }} – {{ percentReached|number_format(2) }}%</span>
|
||||
<span class="progress-text">{{ title }}{% if percentReached > 0 %} – {{ percentReached|number_format(2) }}%{% endif %}</span>
|
||||
<span class="progress-number">{{ subTitle }}</span>
|
||||
|
||||
<div class="progress">
|
||||
|
||||
@@ -254,29 +254,17 @@
|
||||
{% endif %}
|
||||
|
||||
<a class="{{ class | trim }}" href="{{ url }}"
|
||||
{%- if disabled is same as (true) -%}
|
||||
disabled="disabled"
|
||||
{%- endif -%}
|
||||
{%- if id is not empty -%}
|
||||
id="{{ id }}"
|
||||
{%- endif -%}
|
||||
{%- if toggle is not empty -%}
|
||||
data-toggle="{{ toggle }}"
|
||||
{%- endif -%}
|
||||
{%- if modal is not empty -%}
|
||||
data-toggle="modal" data-target="{{ modal }}"
|
||||
{%- endif -%}
|
||||
{%- if onclick is not empty -%}
|
||||
onclick="{{ onclick }}"
|
||||
{%- endif -%}
|
||||
{%- if target is not empty -%}
|
||||
target="{{ target }}"
|
||||
{%- endif -%}
|
||||
{%- if attr is not empty -%}
|
||||
{%- for name, value in attr %}
|
||||
{{- ' ' ~ name }}={% if '"' in value %}'{{ value|raw }}'{% else %}"{{ value|raw }}"{% endif %}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- if disabled is same as (true) %} disabled="disabled"{% endif %}
|
||||
{%- if id is not empty %} id="{{ id }}"{% endif %}
|
||||
{%- if toggle is not empty %} data-toggle="{{ toggle }}"{% endif %}
|
||||
{%- if modal is not empty %} data-toggle="modal" data-target="{{ modal }}"{% endif %}
|
||||
{%- if onclick is not empty %} onclick="{{ onclick }}"{% endif %}
|
||||
{%- if target is not empty %} target="{{ target }}"{% endif %}
|
||||
{%- if attr is not empty %}
|
||||
{% for name, value in attr %}
|
||||
{{ ' ' ~ name }}={% if '"' in value %}'{{ value|raw }}'{% else %}"{{ value|raw }}"{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
>{% if title is not null %}{{ title }}{% else %}{{ macro.icon(icon) }}{% endif %}</a>
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user