From 3cd697c1cc5b3eec3578b83e1958597f1f4a9e3e Mon Sep 17 00:00:00 2001 From: RogerHaase Date: Sun, 18 Feb 2024 08:36:43 -0700 Subject: [PATCH 1/2] Discussion-link on Convert-Page leads to NONAMEGIVEN fixes #1546 --- src/moin/templates/itemviews.html | 4 +++- src/moin/themes/__init__.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/moin/templates/itemviews.html b/src/moin/templates/itemviews.html index bad7dd4c5..923e74b2e 100644 --- a/src/moin/templates/itemviews.html +++ b/src/moin/templates/itemviews.html @@ -123,7 +123,9 @@ {%- if not_trash and (storage.has_item(supp_name) or user.may.write(supp_name)) %} {% set title = _('Discuss contents of this item') %}
  • - {{ a_label(icon_class, _(sub_item_name)) }} + {{ a_label(icon_class, _(sub_item_name)) }} +
  • {%- endif %} {%- endif %} diff --git a/src/moin/themes/__init__.py b/src/moin/themes/__init__.py index 1b3ab0f03..154756ff6 100644 --- a/src/moin/themes/__init__.py +++ b/src/moin/themes/__init__.py @@ -798,7 +798,7 @@ def setup_jinja_env(): 'storage': flaskg.storage, 'clock': flaskg.clock, 'cfg': app.cfg, - 'item_name': '@NONAMEGIVEN', # XXX can we just use '' ? + 'item_name': request.view_args.get('item_name', ''), 'url_for_item': url_for_item, 'get_fqname': get_fqname, 'get_editor_info': lambda meta: get_editor_info(meta), From 38b8890290831ff5698411fc12ccf7097de47558 Mon Sep 17 00:00:00 2001 From: RogerHaase Date: Sun, 18 Feb 2024 09:42:59 -0700 Subject: [PATCH 2/2] fix trivial templates/modify.html indentation error; #1554 fallout --- src/moin/templates/modify.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/moin/templates/modify.html b/src/moin/templates/modify.html index d01606a49..cc86d4eb0 100644 --- a/src/moin/templates/modify.html +++ b/src/moin/templates/modify.html @@ -69,18 +69,18 @@

    {{ title }}

    {% set may_admin = user.may.admin(fqname) %} {{ meta_editor(form['meta_form'], may_admin) }} - {% if item.meta['name'][0].endswith('Group') %} - {{ forms.render(form['usergroup']) }} -
    - {{ _('Enter list of user names, one name per line.') }} -
    - {% endif %} - {% if item.meta['name'][0].endswith('Dict') %} - {{ forms.render(form['wikidict']) }} -
    - {{ _('Enter "key=value" strings, one per line, no quotes, no blank lines.') }} -
    - {% endif %} + {% if item.meta['name'][0].endswith('Group') %} + {{ forms.render(form['usergroup']) }} +
    + {{ _('Enter list of user names, one name per line.') }} +
    + {% endif %} + {% if item.meta['name'][0].endswith('Dict') %} + {{ forms.render(form['wikidict']) }} +
    + {{ _('Enter "key=value" strings, one per line, no quotes, no blank lines.') }} +
    + {% endif %} {{ gen.form.close() }}