ntopng/httpdocs/templates/pages/components/toast.template
Simone Mainardi 1dce9e5842 Migrates to Bootstrap 5
Adds bootstrap-5.0.0-beta3-dist

Adds bootstrap-5.0.0

Updates bootstrap-5.0.0-beta3-dist to bootstrap-5.0.0-dist

initial migration to bs v5

porting to bs5

improvements on dropdown menu filter

fixed host map dropdown

removed excessive padding

fix button toggle

re-add blog news

removed text decoration for links

fix button layout (#5348)

remove underscore from href (#5347)
2021-05-18 11:39:59 +02:00

36 lines
No EOL
1.4 KiB
Text

<div class="toast notification" role="alert" aria-live="assertive" aria-atomic="true" data-toast-id="{{ toast.id }}"
data-autohide="false">
<div
class="toast-header border-{{ toast.level.bg_color }} bg-{{ toast.level.bg_color }} {{ toast.level.title_text_color }}">
<strong class="me-auto">
<i class="fas {{ toast.level.icon }}"></i> {{ toast.title }}
</strong>
{% if not (toast.dismissable) then %}
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
{% end %}
</div>
<div class="toast-body">
<div>
{* toast.description *}
</div>
<div class="d-flex justify-content-end my-1">
{% if (toast.action) then %}
<a class="btn btn-gray btn-sm {{toast.action.additional_classes}}" href="{{ toast.action.url }}">
{{ toast.action.title }}
</a>
{% end %}
{% if (toast.dismissable) then %}
<button class='dismiss btn btn-sm btn-primary ms-1'>
{{ i18n("dismiss") }}
</button>
{% end %}
</div>
</div>
</div>
{% if toast.action and toast.action.js then %}
<script type="text/javascript">
toastCSRF = "{{ ntop.getRandomCSRFValue() }}";
</script>
<script type="text/javascript" src="{{ ntop.getHttpPrefix() }}/js/pages/{{ toast.action.js }}"></script>
{% end %}