obscreen/views/fleet/studio/component/table.jinja.html
2024-06-03 00:33:05 +02:00

74 lines
3.1 KiB
HTML

<table class="{{ tclass }}-node-studios">
<thead>
<tr>
<th>{{ l.fleet_node_studio_panel_th_name }}</th>
{% if AUTH_ENABLED %}
<th class="tac">
<i class="fa fa-user"></i>
</th>
{% endif %}
<th class="tac">{{ l.fleet_node_studio_panel_th_host }}</th>
<th class="tac">{{ l.fleet_node_studio_panel_th_port }}</th>
<th class="tac">{{ l.fleet_node_studio_panel_th_enabled }}</th>
<th class="tac">{{ l.fleet_node_studio_panel_th_activity }}</th>
</tr>
</thead>
<tbody>
<tr class="empty-tr {% if node_studios|length != 0 %}hidden{% endif %}">
<td colspan="4">
{{ l.fleet_node_studio_panel_empty|replace(
'%link%',
('<a href="javascript:void(0);" class="item-add node-studio-add">'~l.fleet_node_studio_button_add~'</a>')|safe
) }}
</td>
</tr>
{% for node_studio in node_studios %}
<tr class="node-studio-item" data-level="{{ node_studio.id }}" data-entity="{{ node_studio.to_json({"created_by": track_created(node_studio).username, "updated_by": track_updated(node_studio).username}) }}">
<td class="infos">
<div class="inner">
<a href="javascript:void(0);" class="item-sort node-studio-sort">
<i class="fa fa-sort icon-left"></i>
</a>
<div class="badge"><i class="fa fa-key icon-left"></i> {{ node_studio.id }}</div>
<i class="fa fa-server icon-left"></i>
{{ node_studio.name }}
</div>
</td>
{% if AUTH_ENABLED %}
<td class="tac">
{% set creator = track_created(node_studio) %}
{% if creator.username %}
<a href="javascript:void(0);" class="badge item-utrack node-studio-utrack {% if not creator.enabled %}anonymous{% endif %}">
{{ creator.username }}
</a>
{% endif %}
</td>
{% endif %}
<td class="tac">
{{ node_studio.host }}
</td>
<td class="tac">
{{ node_studio.port }}
</td>
<td class="tac">
<label class="pure-material-switch">
<input type="checkbox" {% if node_studio.enabled %}checked="checked"{% endif %}><span></span>
</label>
</td>
<td class="actions tac">
<a href="javascript:void(0);" class="item-edit node-studio-edit">
<i class="fa fa-pencil"></i>
</a>
<a href="http://{{ node_studio.host }}:{{ node_studio.port }}" target="_blank">
<i class="fa fa-eye"></i>
</a>
<a href="javascript:void(0);" class="item-delete node-studio-delete">
<i class="fa fa-trash"></i>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>