2018-11-11 12:41:48 +00:00
|
|
|
{% extends "overview/base.html" %}
|
|
|
|
|
2018-12-10 09:50:19 +00:00
|
|
|
{% load i18n %}
|
|
|
|
|
2018-12-14 14:18:02 +00:00
|
|
|
{% block head %}
|
|
|
|
{{ block.super }}
|
|
|
|
<style>
|
2020-02-19 20:03:39 +00:00
|
|
|
img.app-icon {
|
|
|
|
max-height: 72px;
|
2020-09-17 08:44:10 +00:00
|
|
|
width: auto !important;
|
2020-02-19 20:03:39 +00:00
|
|
|
}
|
2018-12-14 14:18:02 +00:00
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
|
2018-11-11 12:41:48 +00:00
|
|
|
{% block content %}
|
2020-02-19 20:03:39 +00:00
|
|
|
<section class="pf-c-page__main-section pf-m-light">
|
|
|
|
<div class="pf-c-content">
|
2020-02-21 13:20:16 +00:00
|
|
|
<h1>
|
|
|
|
<i class="pf-icon pf-icon-applications"></i>
|
|
|
|
{% trans 'Applications' %}
|
|
|
|
</h1>
|
2020-02-19 20:03:39 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="pf-c-page__main-section">
|
|
|
|
{% if applications %}
|
|
|
|
<div class="pf-l-gallery pf-m-gutter">
|
|
|
|
{% for app in applications %}
|
2020-09-14 16:12:42 +00:00
|
|
|
<a href="{{ app.get_launch_url }}" class="pf-c-card pf-m-hoverable pf-m-compact">
|
2020-07-05 20:58:52 +00:00
|
|
|
<div class="pf-c-card__header">
|
2020-02-21 21:02:44 +00:00
|
|
|
{% if not app.meta_icon_url %}
|
2020-02-19 20:03:39 +00:00
|
|
|
<i class="pf-icon pf-icon-arrow"></i>
|
2018-12-10 09:50:19 +00:00
|
|
|
{% else %}
|
2020-02-21 21:02:44 +00:00
|
|
|
<img class="app-icon pf-c-avatar" src="{{ app.meta_icon_url }}" alt="{% trans 'Application Icon' %}">
|
2018-12-10 09:50:19 +00:00
|
|
|
{% endif %}
|
2020-02-19 20:03:39 +00:00
|
|
|
</div>
|
2020-07-05 20:58:52 +00:00
|
|
|
<div class="pf-c-card__title">
|
2020-02-19 20:03:39 +00:00
|
|
|
<p id="card-1-check-label">{{ app.name }}</p>
|
|
|
|
<div class="pf-c-content">
|
2020-02-21 21:16:58 +00:00
|
|
|
<small>{{ app.meta_publisher }}</small>
|
2020-02-19 20:03:39 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-05 20:58:52 +00:00
|
|
|
<div class="pf-c-card__body">
|
|
|
|
{% trans app.meta_description|truncatewords:35 %}
|
|
|
|
</div>
|
2020-02-19 20:03:39 +00:00
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% else %}
|
2020-06-09 07:52:25 +00:00
|
|
|
<div class="pf-c-empty-state pf-m-full-height">
|
|
|
|
<div class="pf-c-empty-state__content">
|
|
|
|
<i class="fas fa-cubes pf-c-empty-state__icon" aria-hidden="true"></i>
|
|
|
|
<h1 class="pf-c-title pf-m-lg">{% trans 'No Applications available.' %}</h1>
|
|
|
|
<div class="pf-c-empty-state__body">
|
|
|
|
{% trans "Either no applications are defined, or you don't have access to any." %}
|
|
|
|
</div>
|
2020-07-02 11:48:42 +00:00
|
|
|
{% if user.is_superuser %} {# TODO:use guardian permissions instead #}
|
2020-06-09 07:52:25 +00:00
|
|
|
<a href="{% url 'passbook_admin:application-create' %}" class="pf-c-button pf-m-primary" type="button">
|
|
|
|
{% trans 'Create Application' %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2018-11-11 12:41:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-19 20:03:39 +00:00
|
|
|
{% endif %}
|
|
|
|
</section>
|
2018-12-10 09:50:19 +00:00
|
|
|
{% endblock %}
|