added no content text on links page

This commit is contained in:
overflowerror 2021-01-08 14:01:11 +01:00
parent a02e644366
commit 51edc12d01

View file

@ -6,92 +6,100 @@
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<div class="links bg-light shadow-5"> {% if links | length == 0 %}
<table class="table table-hover"> <div class="no-content">
<tr> No links yet.<br/>
<td> Go to the <a href="{{ path("app_dashboard") }}">Dashboard</a> and click the link-icon on a video you want to
<input type="checkbox"> create a link for.
</td> </div>
<td></td> {% else %}
<th> <div class="links bg-light shadow-5">
Video <table class="table table-hover">
</th>
<th>
Created
</th>
<th>
Comment
</th>
<th>
Valid until
</th>
<th>
Views left
</th>
<th>
Time left
</th>
<th>
Link
</th>
</tr>
{% for link in links %}
<tr> <tr>
<td> <td>
<input type="checkbox"> <input type="checkbox">
</td> </td>
<td> <td></td>
{% if not link.viewable() %} <th>
<i class="fas fa-exclamation-circle"></i> Video
{% endif %} </th>
</td> <th>
<td> Created
<a href="{{ path("app_watch_page", { </th>
linkId: constant("App\\Controller\\WatchController::OWNER_LINK_ID"), <th>
videoId: link.video.customId Comment
}) }}"> </th>
<img alt="Thumbnail" src="{{ path("app_watch_thumbnail", { <th>
Valid until
</th>
<th>
Views left
</th>
<th>
Time left
</th>
<th>
Link
</th>
</tr>
{% for link in links %}
<tr>
<td>
<input type="checkbox">
</td>
<td>
{% if not link.viewable() %}
<i class="fas fa-exclamation-circle"></i>
{% endif %}
</td>
<td>
<a href="{{ path("app_watch_page", {
linkId: constant("App\\Controller\\WatchController::OWNER_LINK_ID"), linkId: constant("App\\Controller\\WatchController::OWNER_LINK_ID"),
videoId: link.video.customId videoId: link.video.customId
}) }}"/> }) }}">
{{ link.video.name }} <img alt="Thumbnail" src="{{ path("app_watch_thumbnail", {
</a> linkId: constant("App\\Controller\\WatchController::OWNER_LINK_ID"),
</td> videoId: link.video.customId
<td> }) }}"/>
{{ link.created | date("Y-m-d") }} {{ link.video.name }}
</td> </a>
<td> </td>
{{ link.comment }} <td>
</td> {{ link.created | date("Y-m-d") }}
<td> </td>
{% if link.viewableUntil %} <td>
{{ link.viewableUntil | date("Y-m-d") }} {{ link.comment }}
{% else %} </td>
- <td>
{% endif %} {% if link.viewableUntil %}
</td> {{ link.viewableUntil | date("Y-m-d") }}
<td> {% else %}
{% if link.maxViews %} -
{{ link.viewsLeft }} / {{ link.maxViews }} {% endif %}
{% else %} </td>
- <td>
{% endif %} {% if link.maxViews %}
</td> {{ link.viewsLeft }} / {{ link.maxViews }}
<td> {% else %}
{% if link.viewableFor %} -
{{ link.viewableForLeft != null ? link.viewableForLeft : "-" }} / {{ link.viewableFor }} h {% endif %}
{% else %} </td>
- <td>
{% endif %} {% if link.viewableFor %}
</td> {{ link.viewableForLeft != null ? link.viewableForLeft : "-" }} / {{ link.viewableFor }} h
<td> {% else %}
<button class="btn btn-primary btn-floating" onclick="clipboard('{{ url("app_watch_page", { -
linkId: link.customId, {% endif %}
videoId: link.video.customId </td>
}) }}')"><i class="fas fa-clipboard"></i></button> <td>
</td> <button class="btn btn-primary btn-floating" onclick="clipboard('{{ url("app_watch_page", {
</tr> linkId: link.customId,
{% endfor %} videoId: link.video.customId
</table> }) }}')"><i class="fas fa-clipboard"></i></button>
</div> </td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% endblock %} {% endblock %}