Преглед на файлове

Adminlte : macros callout & alert

feature/ticket
Guillaume преди 3 години
родител
ревизия
e6c20acbce
променени са 2 файла, в които са добавени 46 реда и са изтрити 4 реда
  1. +29
    -0
      Resources/views/adminlte/macro/alert.html.twig
  2. +17
    -4
      Resources/views/adminlte/macro/callout.html.twig

+ 29
- 0
Resources/views/adminlte/macro/alert.html.twig Целия файл

@@ -0,0 +1,29 @@

{% macro alert_warning(message, title, icon) %}
{{ _self.alert('warning', message, title, icon) }}
{% endmacro %}

{% macro alert_info(message, title, icon) %}
{{ _self.alert('info', message, title, icon) }}
{% endmacro %}

{% macro alert_danger(message, title, icon) %}
{{ _self.alert('danger', message, title, icon) }}
{% endmacro %}

{% macro alert_success(message, title, icon) %}
{{ _self.alert('success', message, title, icon) }}
{% endmacro %}

{% macro alert(type, message, title, icon) %}
<div class="alert alert-{{ type }}">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{% if title %}
<h5>
{% if icon %}<i class="icon fas fa-{{ icon }}"></i>{% endif %}
{{ title }}
</h5>
{% endif %}
{{ message }}
</div>
{% endmacro %}

+ 17
- 4
Resources/views/adminlte/macro/callout.html.twig Целия файл

@@ -1,10 +1,23 @@

{% macro callout_warning(message) %}
{{ _self.callout('warning', message) }}
{% macro callout_warning(message, title) %}
{{ _self.callout('warning', message, title) }}
{% endmacro %}

{% macro callout(type, message) %}
{% macro callout_info(message, title) %}
{{ _self.callout('info', message, title) }}
{% endmacro %}

{% macro callout_danger(message, title) %}
{{ _self.callout('danger', message, title) }}
{% endmacro %}

{% macro callout_success(message, title) %}
{{ _self.callout('success', message, title) }}
{% endmacro %}

{% macro callout(type, message, title) %}
<div class="callout callout-{{ type }}">
{{ message }}
{% if title %}<h5>{{ title }}</h5>{% endif %}
<p>{{ message }}</p>
</div>
{% endmacro %}

Loading…
Отказ
Запис