Render elements on one line

This commit is contained in:
Mark Veidemanis 2022-08-09 07:20:30 +01:00
parent f7b82147c7
commit 788072f995
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 49 additions and 37 deletions

View File

@ -104,6 +104,6 @@
</div> </div>
</div> </div>
<button class="modal-close is-large" aria-label="close"></button> <button class="modal-close is-large" aria-label="close"></button>
<script>activateButtons();</script> {# <script>activateButtons();</script> #}
</div> </div>
</div> </div>

View File

@ -16,30 +16,38 @@
{% if column.name in show and not column.name in hide %} {% if column.name in show and not column.name in hide %}
{% block table.thead.th %} {% block table.thead.th %}
<th {% render_attrs column.attrs.th class="" %}> <th {% render_attrs column.attrs.th class="" %}>
{% if column.orderable %} <div class="nowrap-parent">
{% if column.is_ordered %} {% if column.orderable %}
{% is_descending column.order_by as descending %} <div class="nowrap-child">
{% if descending %} {% if column.is_ordered %}
<span class="icon" aria-hidden="true">{% block table.desc_icon %}<i class="fa-solid fa-sort-down"></i>{% endblock table.desc_icon %}</span> {% is_descending column.order_by as descending %}
{% else %} {% if descending %}
<span class="icon" aria-hidden="true">{% block table.asc_icon %}<i class="fa-solid fa-sort-up"></i>{% endblock table.asc_icon %}</span> <span class="icon" aria-hidden="true">{% block table.desc_icon %}<i class="fa-solid fa-sort-down"></i>{% endblock table.desc_icon %}</span>
{% endif %} {% else %}
<span class="icon" aria-hidden="true">{% block table.asc_icon %}<i class="fa-solid fa-sort-up"></i>{% endblock table.asc_icon %}</span>
{% endif %}
{% else %}
<span class="icon" aria-hidden="true">{% block table.orderable_icon %}<i class="fa-solid fa-sort"></i>{% endblock table.orderable_icon %}</span>
{% endif %}
</div>
<div class="nowrap-child">
<a
hx-get="search/{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}&{{ uri }}"
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-trigger="click"
hx-target="#results"
hx-swap="innerHTML"
hx-indicator=".progress"
style="cursor: pointer;">
{{ column.header }}
</a>
</div>
{% else %} {% else %}
<span class="icon" aria-hidden="true">{% block table.orderable_icon %}<i class="fa-solid fa-sort"></i>{% endblock table.orderable_icon %}</span> <div class="nowrap-child">
{{ column.header }}
</div>
{% endif %} {% endif %}
<a </div>
hx-get="search/{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}&{{ uri }}"
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-trigger="click"
hx-target="#results"
hx-swap="innerHTML"
hx-indicator=".progress"
style="cursor: pointer;">
{{ column.header }}
</a>
{% else %}
{{ column.header }}
{% endif %}
</th> </th>
{% endblock table.thead.th %} {% endblock table.thead.th %}
{% endif %} {% endif %}
@ -174,7 +182,7 @@
</button> </button>
{% endif %} {% endif %}
</div> </div>
{% if row.cells.num_chans is not None %} {% if row.cells.num_chans != '—' %}
<div class="nowrap-child"> <div class="nowrap-child">
<span class="tag"> <span class="tag">
{{ row.cells.num_chans }} {{ row.cells.num_chans }}
@ -185,19 +193,23 @@
</td> </td>
{% elif column.name == 'channel' %} {% elif column.name == 'channel' %}
<td> <td>
<div class="nowrap-parent"> {% if cell != '—' %}
<a class="nowrap-child has-text-link is-underlined" <div class="nowrap-parent">
onclick="populateSearch('channel', '{{ cell|escapejs }}')"> <a class="nowrap-child has-text-link is-underlined"
{{ cell }} onclick="populateSearch('channel', '{{ cell|escapejs }}')">
</a> {{ cell }}
{% if row.cells.num_users is not None %} </a>
<div class="nowrap-child"> {% if row.cells.num_users != '—' %}
<span class="tag"> <div class="nowrap-child">
{{ row.cells.num_users }} <span class="tag">
</span> {{ row.cells.num_users }}
</div> </span>
{% endif %} </div>
</div> {% endif %}
</div>
{% else %}
{{ cell }}
{% endif %}
</td> </td>
{% elif column.name == 'net' %} {% elif column.name == 'net' %}
<td> <td>