fix: [chat] fix translation pagination

dev
terrtia 2023-12-11 12:01:34 +01:00
parent 235539ea42
commit 2e38a96686
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
4 changed files with 4 additions and 4 deletions

View File

@ -188,7 +188,7 @@
<span class="mt-3"> <span class="mt-3">
{% include 'objects/image/block_blur_img_slider.html' %} {% include 'objects/image/block_blur_img_slider.html' %}
</span> </span>
{% with translate_url=url_for('chats_explorer.objects_subchannel_messages', uuid=subchannel['subtype']), obj_id=subchannel['id'] %} {% with translate_url=url_for('chats_explorer.objects_subchannel_messages', uuid=subchannel['subtype']), obj_id=subchannel['id'], pagination=subchannel['pagination'] %}
{% include 'chats_explorer/block_translation.html' %} {% include 'chats_explorer/block_translation.html' %}
{% endwith %} {% endwith %}
{% with obj_subtype=subchannel['subtype'], obj_id=subchannel['id'], url_endpoint=url_for("chats_explorer.objects_subchannel_messages"), nb=subchannel['pagination']['nb'] %} {% with obj_subtype=subchannel['subtype'], obj_id=subchannel['id'], url_endpoint=url_for("chats_explorer.objects_subchannel_messages"), nb=subchannel['pagination']['nb'] %}

View File

@ -138,7 +138,7 @@
<span class="mt-3"> <span class="mt-3">
{% include 'objects/image/block_blur_img_slider.html' %} {% include 'objects/image/block_blur_img_slider.html' %}
</span> </span>
{% with translate_url=url_for('chats_explorer.objects_thread_messages', uuid=meta['subtype']), obj_id=meta['id'] %} {% with translate_url=url_for('chats_explorer.objects_thread_messages', uuid=meta['subtype']), obj_id=meta['id'], pagination=meta['pagination'] %}
{% include 'chats_explorer/block_translation.html' %} {% include 'chats_explorer/block_translation.html' %}
{% endwith %} {% endwith %}
{% with obj_subtype=meta['subtype'], obj_id=meta['id'], url_endpoint=url_for("chats_explorer.objects_thread_messages"), nb=meta['pagination']['nb'] %} {% with obj_subtype=meta['subtype'], obj_id=meta['id'], url_endpoint=url_for("chats_explorer.objects_thread_messages"), nb=meta['pagination']['nb'] %}

View File

@ -32,6 +32,6 @@
function translate_selector(){ function translate_selector(){
var t = document.getElementById("translation_selector_target"); var t = document.getElementById("translation_selector_target");
var target = t.value var target = t.value
window.location.replace("{{ translate_url }}&id={{ obj_id }}&target=" + target); window.location.replace("{{ translate_url }}&id={{ obj_id }}{% if pagination %}&nb={{ pagination['nb'] }}&page={{ pagination['page'] }}{% endif %}&target=" + target);
} }
</script> </script>

View File

@ -161,7 +161,7 @@
{% include 'objects/image/block_blur_img_slider.html' %} {% include 'objects/image/block_blur_img_slider.html' %}
</span> </span>
{% with translate_url=url_for('chats_explorer.chats_explorer_chat', uuid=chat['subtype']), obj_id=chat['id'] %} {% with translate_url=url_for('chats_explorer.chats_explorer_chat', uuid=chat['subtype']), obj_id=chat['id'], pagination=chat['pagination'] %}
{% include 'chats_explorer/block_translation.html' %} {% include 'chats_explorer/block_translation.html' %}
{% endwith %} {% endwith %}
{% with obj_subtype=chat['subtype'], obj_id=chat['id'], url_endpoint=url_for("chats_explorer.chats_explorer_chat"), nb=chat['pagination']['nb'] %} {% with obj_subtype=chat['subtype'], obj_id=chat['id'], url_endpoint=url_for("chats_explorer.chats_explorer_chat"), nb=chat['pagination']['nb'] %}