From f5aee035b32c32e704c1c8c439fda89293db3eba Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 4 May 2021 21:52:43 +0100 Subject: [PATCH] Use vertical nav --- app/templates/packages/create_edit.html | 11 ++++ app/templates/packages/edit_maintainers.html | 2 +- app/templates/packages/package_base.html | 54 ++++++++++---------- app/templates/packages/remove.html | 2 +- app/templates/packages/view.html | 2 +- 5 files changed, 40 insertions(+), 31 deletions(-) diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html index c9797cfb..c67af90b 100644 --- a/app/templates/packages/create_edit.html +++ b/app/templates/packages/create_edit.html @@ -25,6 +25,17 @@ {% endblock %} {% block content %} + {% if package %} +

{{ _("Edit Details") }}

+ {% else %} +

+ {{ _("Create Package") }} + {% if author != current_user %} + for {{ author.display_name }} + {% endif %} +

+ {% endif %} + {% if not package %}
{{ _("View") }} diff --git a/app/templates/packages/edit_maintainers.html b/app/templates/packages/edit_maintainers.html index c865910f..81d387fa 100644 --- a/app/templates/packages/edit_maintainers.html +++ b/app/templates/packages/edit_maintainers.html @@ -4,8 +4,8 @@ {{ _("Edit Maintainers") }} {% endblock %} - {% block content %} +

{{ _("Maintainers") }}

{% from "macros/forms.html" import render_submit_field, render_field %}

{{ _("Maintainers are given write access to the package.") }} diff --git a/app/templates/packages/package_base.html b/app/templates/packages/package_base.html index 18b39fc6..4794558f 100644 --- a/app/templates/packages/package_base.html +++ b/app/templates/packages/package_base.html @@ -1,40 +1,38 @@ {% extends "base.html" %} {% block container %} +

{% if tabs %} -
- - {% endif %} +
+ {% endif %} - {% if tabs %} -
- {{ self.content() }} -
- {% else %} -
-

{{ self.title() }}

+ {{ self.content() }} - {{ self.content() }} -
+ {% if tabs %} +
+ {% endif %} + {% endblock %} diff --git a/app/templates/packages/remove.html b/app/templates/packages/remove.html index f8394f81..0d5b43b4 100644 --- a/app/templates/packages/remove.html +++ b/app/templates/packages/remove.html @@ -6,7 +6,7 @@ Remove {{ package.title }} {% block content %}
-

Remove {{ package.title }}

+

Remove {{ package.title }}

In order to avoid data loss, you cannot permanently delete packages. You can remove them from ContentDB, which will cause them to not be diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index dfeebcd0..fc09dfec 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -454,6 +454,7 @@ {% from "macros/releases.html" import render_releases %} {{ render_releases(releases, package, current_user) }} +

{% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}
@@ -462,7 +463,6 @@ {% endif %} Threads

-
{% from "macros/threads.html" import render_compact_threadlist %} {{ render_compact_threadlist(threads) }}