Rename dynamic_editor macro to render_editor for consistency across templates

This commit is contained in:
Yaro Kasear 2025-08-19 16:22:38 -05:00
parent 22dfc8411a
commit 42b87d08cc
3 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{% import "fragments/_icon_fragment.html" as icons %} {% import "fragments/_icon_fragment.html" as icons %}
{% macro dynamic_editor(id, title, mode='edit', content=none, enabled=true, create_url=none, refresh_url=none, {% macro render_editor(id, title, mode='edit', content=none, enabled=true, create_url=none, refresh_url=none,
update_url=none, delete_url=none, field_name=none, record_id=none) %} update_url=none, delete_url=none, field_name=none, record_id=none) %}
<!-- Editor Fragment --> <!-- Editor Fragment -->
<div class="row mb-3" id="editor-container-{{ id }}" x-data='Editor({ <div class="row mb-3" id="editor-container-{{ id }}" x-data='Editor({

View file

@ -247,7 +247,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col p-3"> <div class="col p-3">
{{ editor.dynamic_editor( {{ editor.render_editor(
id = "notes", id = "notes",
title = "Notes & Comments", title = "Notes & Comments",
mode = 'view' if item.id else 'edit', mode = 'view' if item.id else 'edit',
@ -280,7 +280,7 @@
{% set title %} {% set title %}
{{ note.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}{{ links.entry_link('worklog_entry', note.work_log_id) }} {{ note.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}{{ links.entry_link('worklog_entry', note.work_log_id) }}
{% endset %} {% endset %}
{{ editor.dynamic_editor( {{ editor.render_editor(
id = 'updates' + (note.id | string), id = 'updates' + (note.id | string),
title = title, title = title,
mode = 'view', mode = 'view',

View file

@ -229,7 +229,7 @@
</div> </div>
</div> </div>
{% for update in log.updates %} {% for update in log.updates %}
{{ editor.dynamic_editor( {{ editor.render_editor(
id = update.id, id = update.id,
title = update.timestamp.strftime('%Y-%m-%d %H:%M:%S'), title = update.timestamp.strftime('%Y-%m-%d %H:%M:%S'),
mode = 'view', mode = 'view',
@ -238,7 +238,7 @@
) }} ) }}
{% endfor %} {% endfor %}
<template id="editor-template"> <template id="editor-template">
{{ editor.dynamic_editor('__ID__', '__TIMESTAMP__', 'edit', '') }} {{ editor.render_editor('__ID__', '__TIMESTAMP__', 'edit', '') }}
</template> </template>
</div> </div>
</div> </div>