From 6b4de4125e0552292087f443a61518c433981465 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 7 Oct 2022 12:54:04 +0200 Subject: [proxy] prevent library links from appearing in package descriptions when advanced user mode is off --- .../templates/items/package_viewversion.html.jinja | 33 ++++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja index bc33c42..230168a 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja @@ -70,22 +70,25 @@ code in a proprietary work, I am not going to enforce this in court. {% for lib_identifier, patterns in by_lib|dictsort %}
  • - {% set encoded = patterns[0]|urlencode|replace('/', '%2F') %} - {% - set url = url_for( - '.show_payload', - item_version_id = version_display_info.ref.id, - pattern = encoded, - lib_identifier = lib_identifier - ) - %} -
    - - {{ lib_identifier }} - -
    + {% if settings.advanced_user %} +
    + {% set encoded = patterns[0]|urlencode|replace('/', '%2F') %} + {% + set url = url_for( + '.show_payload', + item_version_id = version_display_info.ref.id, + pattern = encoded, + lib_identifier = lib_identifier + ) + %} + + {{ lib_identifier }} + +
    + {% set pattern_div_attrs = {'class': 'small-print'} %} + {% endif %} {% for pattern in patterns|unique|sort(attribute='identifier') %} -
    + {{ pattern }}
    {% endfor %} -- cgit v1.2.3