obscreen/views/slideshow/slides/component/table.jinja.html
2024-07-17 00:05:45 +02:00

82 lines
4.7 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<ul class="slides">
{% for slide in slides %}
{% set content = contents[slide.content_id] %}
<li class="slide-item {{ 'disabled' if not slide.enabled }}" data-level="{{ slide.id }}"
data-entity="{{ slide.to_json({"content": content}) }}">
<div class="head sort">
<a href="javascript:void(0);" class="item-sort slide-sort">
<i class="fa fa-bars icon-left"></i>
</a>
</div>
<a href="javascript:void(0);" class="infos item-edit slide-edit">
<div class="type">
{% set icon = enum_content_type.get_fa_icon(content.type) %}
{% set color = enum_content_type.get_color_icon(content.type) %}
<i class="fa {{ icon }} {{ color }}"></i>
</div>
<div class="title" title="{{ content.name|default(l.common_empty) }}">
{{ truncate(content.name|default(l.common_empty), 30, '...') }}
</div>
</a>
<div class="body">
<div class="range">
<div class="start">
{% if slide.cron_schedule %}
{% set cron_desc = cron_descriptor(slide.cron_schedule) %}
{% if cron_desc %}
{% if is_valid_cron_date_time(slide.cron_schedule) %}
{% if slide.is_notification %}
🔔 <span class="prefix">{{ l.slideshow_slide_panel_td_cron_scheduled_notify }}</span>
<span class="cron-description">{{ cron_desc }}</span>
{% else %}
🔄 <span class="prefix">{{ l.slideshow_slide_panel_td_cron_scheduled_loop }}</span>
<span class="cron-description">{{ cron_desc }}</span>
{% endif %}
{% else %}
🔔 <span class="cron-description">{{ cron_desc }}</span>
{% endif %}
{% else %}
<span class="error"><i class="fa fa-warning danger"></i> {{ l.slideshow_slide_panel_td_cron_scheduled_bad_cron }}</span>
{% endif %}
{% else %}
🔄 <span class="prefix">{{ l.slideshow_slide_panel_td_cron_scheduled_loop }}</span>
{% endif %}
</div>
<div class="end">
{% if slide.cron_schedule_end %}
{% set cron_desc_end = cron_descriptor(slide.cron_schedule_end) %}
{% if cron_desc_end %}
{% if is_valid_cron_date_time(slide.cron_schedule_end) %}
{% if slide.is_notification %}
📆 <span class="prefix">{{ l.slideshow_slide_panel_td_cron_scheduled_date }}</span>
<span class="cron-description">{{ cron_desc_end }}</span>
{% else %}
⏱️ <span class="prefix">{{ slide.duration }} {{ l.slideshow_slide_panel_th_duration_unit }}</span>
<span class="cron-description">{{ cron_desc_end }}</span>
{% endif %}
{% else %}
🔔 <span class="cron-description">{{ cron_desc_end }}</span>
{% endif %}
{% else %}
<span class="error"><i class="fa fa-warning danger"></i> {{ l.slideshow_slide_panel_td_cron_scheduled_bad_cron }}</span>
{% endif %}
{% else %}
⏱️ <span class="prefix">{{ slide.duration }} {{ l.slideshow_slide_panel_th_duration_unit }}</span>
{% endif %}
</div>
</div>
</div>
<div class="tail">
<a href="javascript:void(0);" class="item-delete slide-delete btn btn-naked"
data-route="{{ url_for('slideshow_slide_delete', slide_id=slide.id) }}">
<i class="fa fa-close"></i>
</a>
</div>
</li>
{% else %}
<div class="inner-empty empty-flag ">
<i class="fa fa-image"></i>
</div>
{% endfor %}
</ul>