From c97eefc7b26b6f05800f12bb8d2573f4c632da85 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 21 Dec 2018 15:58:43 +0000 Subject: Format package page --- app/templates/packages/view.html | 457 ++++++++++++++++++++------------------- 1 file changed, 240 insertions(+), 217 deletions(-) (limited to 'app/templates/packages/view.html') diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index a2ced03..8224cd9 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -4,7 +4,7 @@ {{ package.title }} {% endblock %} -{% block content %} +{% block container %} {% if not package.approved %}
@@ -80,256 +80,279 @@ {% endif %} {% endif %} -

{{ package.title }} by {{ package.author.display_name }}

+
+
+

{{ package.title }} by {{ package.author.display_name }}

-
    - {% for ss in package.screenshots %} - {% if ss.approved or package.checkPerm(current_user, "ADD_SCREENSHOTS") %} -
  • - - {{ ss.title }} - -
  • - {% endif %} - {% endfor %} -
- -
+
-
- {% if not package.license.is_foss and not package.media_license.is_foss and package.type != package.type.TXP %} -
- Warning: Non-free code and media. -
- {% elif not package.license.is_foss and package.type != package.type.TXP %} -
- Warning: Non-free code. -
- {% elif not package.media_license.is_foss %} -
- Warning: Non-free media. -
- {% endif %} - - - - - - {% if package.provides %} - - - - +
+
+
+ {% if package.getDownloadRelease() %} + Download + {% else %} + No download available. {% endif %} -
- - - - - - - - - - - - - - - -
Name{{ package.name }}
Provides{% for meta in package.provides %} - {{ meta.name }} - {%- if not loop.last %} - , - {% endif %} - {% endfor %}
Author - - {{ package.author.display_name }} - -
Type{{ package.type.value }}
License - {% if package.license == package.media_license %} - {{ package.license.name }} - {% elif package.type == package.type.TXP %} - {{ package.media_license.name }} - {% else %} - {{ package.license.name }} for code,
- {{ package.media_license.name }} for media. - {% endif %} -
Added{{ package.created_at | datetime }}
- -
    - {% if package.getDownloadRelease() %}
  • Download
  • {% endif %} - {% if package.repo %}
  • View Source
  • {% endif %} - {% if package.forums %}
  • Forums
  • {% endif %} - {% if package.issueTracker %}
  • Issue Tracker
  • {% endif %} - {% if package.website %}
  • Website
  • {% endif %} +
+
+ {% if package.repo %}View Source{% endif %} + {% if package.forums %}Forums{% endif %} + {% if package.issueTracker %}Issue Tracker{% endif %} + {% if package.website %}Website{% endif %} {% if package.checkPerm(current_user, "EDIT_PACKAGE") %} -
  • Edit
  • -
  • Add screenshot
  • + Add screenshot {% endif %} {# {% if current_user.is_authenticated %} -
  • Suggest Changes
  • + Suggest Changes {% endif %} #} {% if package.checkPerm(current_user, "MAKE_RELEASE") %} -
  • Create Release
  • - {% endif %} - {% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %} -
  • Open Thread
  • + Create Release {% endif %} {% if package.checkPerm(current_user, "DELETE_PACKAGE") %} -
  • Delete
  • + Delete {% endif %} - +
    - -

    {{ package.shortDesc }}

    + - {{ package.desc | markdown }} + -

    Releases

    + {{ package.desc | markdown }} + +
    + +
    +
    +
    +
    Dependencies
    +
      + {% for dep in package.dependencies %} +
    • + {%- if dep.package %} + {{ dep.package.title }} by {{ dep.package.author.display_name }} + {% elif dep.meta_package %} + {{ dep.meta_package.name }} + {% else %} + {{ "Excepted package or meta_package in dep!" | throw }} + {% endif %} + {% if dep.optional %} + [optional] + {% endif %} +
    • + {% else %} +
    • No dependencies
    • + {% endfor %} +
    +
    +
    -
    + + + {# + {% if current_user.is_authenticated or requests %} +

    Edit Requests

    - {% if not rel.approved %}
    {% endif %} - - {% endif %} - {% else %} -
  • No releases available.
  • - {% endfor %} - - -

    Tags

    - - - -

    Dependencies

    - + {% endif %} + #} + + {% if alternatives %} +

    Related

    - {# - {% if current_user.is_authenticated or requests %} -

    Edit Requests

    + {% from "macros/packagegridtile.html" import render_pkggrid %} + {{ render_pkggrid(alternatives) }} + {% endif %} + {% if similar_topics %} +

    Similar Forum Topics

    + {% if not package.approved and package.type == package.type.MOD %} +
    + Please make sure that this package has the right to + the name '{{ package.name }}'. + See the + Inclusion Policy + for more info. +
    + {% endif %} {% endif %} - #} - - {% if alternatives %} -

    Alternatives

    - - {% endif %} - - {% if similar_topics %} -

    Similar Forum Topics

    - {% if not package.approved and package.type == package.type.MOD %} -
    - Please make sure that this package has the right to - the name '{{ package.name }}'. - See the - Inclusion Policy - for more info. -
    - {% endif %} - - {% endif %} - - {% if threads %} -

    Threads

    - - {% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %} -

    Open Thread

    - {% endif %} - - {% from "macros/threads.html" import render_threadlist %} - {{ render_threadlist(threads) }} - {% endif %} + {% endblock %} -- cgit v1.2.3