mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
- It avoids confusion with two separate app sections in a single page. The sections/pages can be better titled. - In future, we can style the apps page (with more status display) differently from apps-add page (with more search and featured apps). - Move page specific parts into individual pages instead of in the common template cards.html. - Add special message when there are no apps enabled and when there are no more apps to enable. - Drop show_disabled flag in cards template that is not needed anymore. Tests: - Unit tests work. - Functional tests work on bepasty when starting with uninstalled, disabled, or enabled states. - Apps page shows special message when there are no apps enabled. It is centered. - Apps page shows 'Add new app' button with icon. Clicking it takes us to apps-add page. - Apps page does not have disabled apps list (even hidden). - Disabled and uninstalled apps are not shown on apps page. - Apps-add page shows special message when there are no more apps to be installed or enabled (test by altering view code to have empty list of apps). - Apps-add page shows list of apps that are disabled or uninstalled but not enabled apps. It shows a title 'Add New App'. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
73 lines
2.0 KiB
HTML
73 lines
2.0 KiB
HTML
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load bootstrap %}
|
|
{% load i18n %}
|
|
{% load static %}
|
|
{% load extras %}
|
|
|
|
<header class="app-header {% if not app_info.icon_filename %} app-header-single-column {% endif %}">
|
|
|
|
{% if app_info.icon_filename %}
|
|
|
|
{% if app_info.app_id %}
|
|
{% icon app_info.app_id|add:'/icons/'|add:app_info.icon_filename|add:'.svg' %}
|
|
{% else %}
|
|
{% icon app_info.icon_filename %}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
<section class="app-description" >
|
|
<section class='app-titles'>
|
|
{% block pagetitle %}
|
|
<div>
|
|
{% if setup %}
|
|
<h2>{% trans "Installation" %}: {{ app_info.name }}</h2>
|
|
{% else %}
|
|
<h2>{{ app_info.name }}</h2>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|
|
{% if app_enable_disable_form %}
|
|
<form class="form form-app-enable-disable" method="post">
|
|
{% csrf_token %}
|
|
|
|
{{ app_enable_disable_form|bootstrap }}
|
|
|
|
<button name="app_enable_disable_button" type="submit"
|
|
class="btn toggle-button {{ is_enabled|yesno:'toggle-button--toggled,' }}">
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
</section>
|
|
|
|
{% if app_info.tags %}
|
|
<div class="app-tags d-flex align-items-center flex-wrap">
|
|
{% for tag in app_info.tags %}
|
|
{% if not forloop.first %}•{% endif %}
|
|
<a href="{{ active_section_url }}?tag={{ tag|urlencode }}"
|
|
class="btn btn-default rounded-pill tag">
|
|
{% trans tag %}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% block description %}
|
|
{% for paragraph in app_info.description %}
|
|
<p>{{ paragraph|safe }}</p>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% if app_info.manual_page %}
|
|
<p class="manual-page">
|
|
<a href="{% url 'help:manual-page' lang='-' page=app_info.manual_page %}">
|
|
{% trans 'Learn more...' %}
|
|
</a>
|
|
</p>
|
|
{% endif %}
|
|
</section>
|
|
</header>
|