Skip to content

Commit

Permalink
Fix merging and migrate to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
jarlhengstmengel committed Feb 26, 2025
1 parent 25db850 commit 7f59b13
Show file tree
Hide file tree
Showing 10 changed files with 1,448 additions and 1,392 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
data-node-descendants="{{ page|get_descendant_ids }}"
class="drag cursor-move text-gray-800 inline-block pl-4 align-middle"
draggable="{% if can_edit_pages and not is_archive %}true{% else %}false{% endif %}"
title="{% if not is_archive %}{% translate "Change the order and position of the pages with drag & drop." %}{% else %}{% translate "Drag & drop is disabled for archived pages." %}{% endif %}">
title="{% if not is_archive and not is_statistics %}{% translate "Change the order and position of the pages with drag & drop." %}{% else %}{% translate "Drag & drop is disabled for archived pages." %}{% endif %}">
{% if can_edit_pages %}
<i icon-name="move"></i>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/templates/pages/pages_page_tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h1 class="heading">
<form method="post" id="bulk-action-form" class="table-listing">
{% csrf_token %}
<div class="overflow-x-auto">
<table {% if not filter_form.is_enabled %} data-delay-event-handlers data-activate-tree-drag-drop data-descendants-url={% url 'get_page_tree_ajax' region_slug=request.region.slug language_slug=language.slug is_archive=is_archive %}{% endif %}
<table {% if not filter_form.is_enabled %} data-delay-event-handlers data-activate-tree-drag-drop data-descendants-url={% url 'get_page_tree_ajax' region_slug=request.region.slug language_slug=language.slug is_archive=is_archive is_statistics=False %}{% endif %}
class="w-full mt-4 rounded border-2 border-solid border-gray-200 shadow bg-white table-auto">
<thead>
<tr class="border-b border-solid border-gray-200">
Expand Down
24 changes: 2 additions & 22 deletions integreat_cms/cms/templates/pages/pages_page_tree_node.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<span class="bg-orange-400 text-white rounded px-2 py-1">{{ tag }}</span>
{% endfor %}
</div>
{% endif %}
</td>
</td>
{% endif %}
<td class="whitespace-nowrap">
<div class="block py-1.5 px-2 text-gray-800">
<div class="lang-grid">
Expand Down Expand Up @@ -99,25 +99,6 @@
{{ page_translation.get_status_display }}
</div>
{% endif %}
{% if is_archive %}
{% if page.explicitly_archived %}
<div title="{% translate "This page is archived." %}"
href="{% url 'edit_page' page_id=page.id region_slug=request.region.slug language_slug=language.slug %}"
class="block py-2 pl-2 text-gray-800">
{% translate "Archived" %}
</div>
{% else %}
<div title="{% translate "This page is archived, because at least one of its parent pages is archived." %}"
href="{% url 'edit_page' page_id=page.id region_slug=request.region.slug language_slug=language.slug %}"
class="block py-2 pl-2 text-gray-800">
{% translate "Archived, because a parent page is archived" %}
</div>
{% endif %}
{% else %}
<div class="block py-1.5 px-2 text-gray-800">
{{ page_translation.get_status_display }}
</div>
{% endif %}
</td>
<td>
<div class="block py-1.5 px-2 whitespace-nowrap text-gray-800">
Expand Down Expand Up @@ -225,7 +206,6 @@
{% endif %}
{# djlint:on #}
{% endif %}
{% if not is_archive and request.region.short_urls_enabled and request.user.expert_mode %}
{% if not is_archive and request.region.short_urls_enabled and request.user.expert_mode %}
{% if page_translation %}
<a href="#"
Expand Down
Loading

0 comments on commit 7f59b13

Please sign in to comment.