Jul 16 - Fill the gaps between Single-tenant mode and Multi-tenant mode - MT2

This commit is contained in:
2026-07-16 16:59:17 -04:00
parent 8ff38578ad
commit a60afc6c41
10 changed files with 478 additions and 44 deletions
+1 -1
View File
@@ -439,7 +439,7 @@
</label>
{# Thumbnail shown after AJAX upload or when a saved path exists #}
{% if saved %}
<img src="{{ url_for('static', filename=saved) }}"
<img src="{{ media_url(saved) }}"
id="thumb_{{ fid }}"
alt="Photo"
style="max-height:60px;max-width:100%;border-radius:4px;margin-top:.3rem;object-fit:cover;">
+1 -1
View File
@@ -688,7 +688,7 @@
<div style="display:flex;align-items:center;flex:1;min-height:0;">
{% if val %}
<button type="button" class="btn-view-media"
onclick="openMedia('{{ url_for('static', filename=val) }}','{{ field.label | e }}')">
onclick="openMedia('{{ media_url(val) }}','{{ field.label | e }}')">
<i class="bi bi-image"></i> View Photo
</button>
{% else %}
+6 -6
View File
@@ -127,14 +127,14 @@
<h6>Photo Evidence</h6>
<div class="d-flex flex-wrap gap-2">
{% if issue.photo_path %}
<a href="{{ url_for('static', filename=issue.photo_path) }}" target="_blank">
<img src="{{ url_for('static', filename=issue.photo_path) }}"
<a href="{{ media_url(issue.photo_path) }}" target="_blank">
<img src="{{ media_url(issue.photo_path) }}"
class="img-fluid rounded" style="max-height:300px; max-width:100%;">
</a>
{% endif %}
{% for photo in (issue.mobile_photo_paths or []) %}
<a href="{{ url_for('static', filename=photo) }}" target="_blank">
<img src="{{ url_for('static', filename=photo) }}"
<a href="{{ media_url(photo) }}" target="_blank">
<img src="{{ media_url(photo) }}"
class="rounded border" style="max-height:300px; max-width:100%; object-fit:cover;">
</a>
{% endfor %}
@@ -150,8 +150,8 @@
{% if issue.result_photos %}
<div class="d-flex flex-wrap gap-2 mt-2">
{% for photo in issue.result_photos %}
<a href="{{ url_for('static', filename=photo) }}" target="_blank">
<img src="{{ url_for('static', filename=photo) }}"
<a href="{{ media_url(photo) }}" target="_blank">
<img src="{{ media_url(photo) }}"
class="rounded border" style="max-height:120px; max-width:160px; object-fit:cover;"
alt="Result photo">
</a>