fix: adds 'view all ...' button to dashboard widgets
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-50">
|
||||
{% if this.userMonitors()|length > 0 %}
|
||||
{% for monitor in this.userMonitors() %}
|
||||
{% if this.userMonitors.items|length > 0 %}
|
||||
{% for monitor in this.userMonitors.items %}
|
||||
<tr id="monitor_{{ monitor.id }}">
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-stone-800 min-w-[50ch] max-w-[50ch] truncate">
|
||||
{{ monitor.title }}
|
||||
@@ -52,6 +52,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% if this.userMonitors.items|length > 5 %}
|
||||
<tr id="monitor_view_all">
|
||||
<td colspan="5" class="py-2 whitespace-nowrap bg-orange-500 uppercase text-sm font-medium text-center text-white min-w-[50ch] max-w-[50ch] truncate">
|
||||
<a href="#">View All Monitors</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-xs uppercase text-center col-span-2 font-medium text-stone-800" colspan="2">
|
||||
@@ -61,5 +68,12 @@
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if this.isWidget == false %}
|
||||
{% if this.userMonitors.items|length > 0 %}
|
||||
{% set paginator = this.userMonitors %}
|
||||
{% include 'partial/paginator.html.twig' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user