multiple ui improvements
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="progress progress-thin">
|
||||
<div class="progress-bar {{ data.style }}" style="width: {{ data.percent }}%;"></div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<div class="text-end small">
|
||||
{% if data.infotext is not empty %}
|
||||
<i class="fa-solid fa-circle-info" data-toggle="tooltip" data-placement="right" title="{{ data.infotext|raw }}"></i>
|
||||
{% endif %}
|
||||
@@ -31,14 +31,27 @@
|
||||
|
||||
{% macro link(data) %}
|
||||
{% apply spaceless %}
|
||||
<a href="{{ data.href }}" {% if data.class is defined %} class="{{ data.class }}" {% endif %} {% if data.target is defined %} target="{{ data.target }}" {% endif %}{% if data.title is defined %} title="{{ data.title }}" {% endif %}>
|
||||
{% if data.icon is defined %}
|
||||
<i class="{{ data.icon }}"></i>
|
||||
{% endif %}
|
||||
{% if data.text is defined %}
|
||||
{{ data.text }}
|
||||
{% endif %}
|
||||
</a>
|
||||
<a href="{{ data.href }}" {% if data.class is defined %} class="{{ data.class }}" {% endif %} {% if data.target is defined %} target="{{ data.target }}" {% endif %}{% if data.title is defined %} title="{{ data.title }}" {% endif %}>
|
||||
{% if data.icon is defined %}
|
||||
<i class="{{ data.icon }}"></i>
|
||||
{% endif %}
|
||||
{% if data.text is defined %}
|
||||
{{ data.text }}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro button(data) %}
|
||||
{% apply spaceless %}
|
||||
<a class="{% if data.class is defined %}btn btn-sm {{ data.class }}{% else %}btn btn-sm btn-outline-secondary{% endif %}" href="{{ data.href }}" {% if data.target is defined %} target="{{ data.target }}" {% endif %}{% if data.title is defined %} title="{{ data.title }}" {% endif %}>
|
||||
{% if data.icon is defined %}
|
||||
<i class="{{ data.icon }}"></i>
|
||||
{% endif %}
|
||||
{% if data.text is defined %}
|
||||
{{ data.text }}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -55,7 +68,7 @@
|
||||
{% macro actions(data) %}
|
||||
{% for action in data %}
|
||||
{% if action.visible is not defined or action.visible is defined and action.visible %}
|
||||
{{ _self.link(action) }}
|
||||
{{ _self.button(action) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -1,52 +1,51 @@
|
||||
{% macro paging(pagination) %}
|
||||
{% if pagination.last_page > 1 %}
|
||||
<div class="card-footer border-top">
|
||||
|
||||
<nav aria-label="Pagination">
|
||||
<ul class="pagination justify-content-center">
|
||||
<ul class="pagination justify-content-center mb-0">
|
||||
{% if pagination.current_page == 1 %}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">
|
||||
<i class="fa-solid fa-backward-fast"></i>
|
||||
<i class="fa-solid fa-angles-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">
|
||||
<i class="fa-solid fa-backward"></i>
|
||||
<i class="fa-solid fa-chevron-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% elseif pagination.current_page > 1 %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno=1" tabindex="-1">
|
||||
<i class="fa-solid fa-backward-fast"></i>
|
||||
<i class="fa-solid fa-angles-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page - 1 }}" tabindex="-1">
|
||||
<i class="fa-solid fa-backward"></i>
|
||||
<i class="fa-solid fa-chevron-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if pagination.current_page < pagination.last_page %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page + 1 }}" tabindex="-1">
|
||||
<i class="fa-solid fa-forward"></i>
|
||||
<i class="fa-solid fa-chevron-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.last_page }}" tabindex="-1">
|
||||
<i class="fa-solid fa-forward-fast"></i>
|
||||
<i class="fa-solid fa-angles-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">
|
||||
<i class="fa-solid fa-forward"></i>
|
||||
<i class="fa-solid fa-chevron-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">
|
||||
<i class="fa-solid fa-forward-fast"></i>
|
||||
<i class="fa-solid fa-angles-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
@@ -4,15 +4,6 @@
|
||||
{% import "Froxlor/table/pagination.html.twig" as pagination %}
|
||||
|
||||
<form action="{{ action|default("") }}" method="post" enctype="application/x-www-form-urlencoded" class="form">
|
||||
{% if listing.title is not empty %}
|
||||
<h3 class="page-header">
|
||||
{% if listing.icon is not empty %}
|
||||
<i class="{{ listing.icon }} me-1"></i>
|
||||
{% endif %}
|
||||
{{ listing.title }}
|
||||
</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if listing.table.tr|length == 0 %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
<h4 class="alert-heading">{{ lng('admin.note') }}</h4>
|
||||
@@ -20,7 +11,7 @@
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card table-responsive">
|
||||
<table class="table table-borderless table-striped table-sm mb-0 px-3">
|
||||
<table class="table table-borderless table-striped align-middle mb-0 px-3">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for key,th in listing.table.th %}
|
||||
|
||||
Reference in New Issue
Block a user