FossilRepo
Default ticket list to Open filter; sort already newest-first
Commit
61e8e0a167e71142e3c266b8f069192d48cccfb4312610c4ad72a9ae4708c231
Parent
9a137565a3abf4d…
2 files changed
+3
-1
+1
-1
+3
-1
| --- fossil/views.py | ||
| +++ fossil/views.py | ||
| @@ -725,11 +725,13 @@ | ||
| 725 | 725 | |
| 726 | 726 | |
| 727 | 727 | def ticket_list(request, slug): |
| 728 | 728 | project, fossil_repo, reader = _get_repo_and_reader(slug, request) |
| 729 | 729 | |
| 730 | - status_filter = request.GET.get("status", "") | |
| 730 | + status_filter = request.GET.get("status", "Open") | |
| 731 | + if status_filter == "All": | |
| 732 | + status_filter = "" | |
| 731 | 733 | search = request.GET.get("search", "").strip() |
| 732 | 734 | page = int(request.GET.get("page", "1")) |
| 733 | 735 | per_page = get_per_page(request, default=50) |
| 734 | 736 | |
| 735 | 737 | with reader: |
| 736 | 738 |
| --- fossil/views.py | |
| +++ fossil/views.py | |
| @@ -725,11 +725,13 @@ | |
| 725 | |
| 726 | |
| 727 | def ticket_list(request, slug): |
| 728 | project, fossil_repo, reader = _get_repo_and_reader(slug, request) |
| 729 | |
| 730 | status_filter = request.GET.get("status", "") |
| 731 | search = request.GET.get("search", "").strip() |
| 732 | page = int(request.GET.get("page", "1")) |
| 733 | per_page = get_per_page(request, default=50) |
| 734 | |
| 735 | with reader: |
| 736 |
| --- fossil/views.py | |
| +++ fossil/views.py | |
| @@ -725,11 +725,13 @@ | |
| 725 | |
| 726 | |
| 727 | def ticket_list(request, slug): |
| 728 | project, fossil_repo, reader = _get_repo_and_reader(slug, request) |
| 729 | |
| 730 | status_filter = request.GET.get("status", "Open") |
| 731 | if status_filter == "All": |
| 732 | status_filter = "" |
| 733 | search = request.GET.get("search", "").strip() |
| 734 | page = int(request.GET.get("page", "1")) |
| 735 | per_page = get_per_page(request, default=50) |
| 736 | |
| 737 | with reader: |
| 738 |
| --- templates/fossil/ticket_list.html | ||
| +++ templates/fossil/ticket_list.html | ||
| @@ -6,11 +6,11 @@ | ||
| 6 | 6 | {% include "fossil/_project_nav.html" %} |
| 7 | 7 | |
| 8 | 8 | <div class="flex flex-wrap items-center justify-between gap-3 mb-4"> |
| 9 | 9 | <div class="flex flex-wrap items-center gap-2 text-xs text-gray-500"> |
| 10 | 10 | <span>Status:</span> |
| 11 | - <a href="{% url 'fossil:tickets' slug=project.slug %}" | |
| 11 | + <a href="{% url 'fossil:tickets' slug=project.slug %}?status=All" | |
| 12 | 12 | class="rounded-full px-2.5 py-1 {% if not status_filter %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">All</a> |
| 13 | 13 | <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Open" |
| 14 | 14 | class="rounded-full px-2.5 py-1 {% if status_filter == 'Open' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Open</a> |
| 15 | 15 | <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Fixed" |
| 16 | 16 | class="rounded-full px-2.5 py-1 {% if status_filter == 'Fixed' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Fixed</a> |
| 17 | 17 |
| --- templates/fossil/ticket_list.html | |
| +++ templates/fossil/ticket_list.html | |
| @@ -6,11 +6,11 @@ | |
| 6 | {% include "fossil/_project_nav.html" %} |
| 7 | |
| 8 | <div class="flex flex-wrap items-center justify-between gap-3 mb-4"> |
| 9 | <div class="flex flex-wrap items-center gap-2 text-xs text-gray-500"> |
| 10 | <span>Status:</span> |
| 11 | <a href="{% url 'fossil:tickets' slug=project.slug %}" |
| 12 | class="rounded-full px-2.5 py-1 {% if not status_filter %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">All</a> |
| 13 | <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Open" |
| 14 | class="rounded-full px-2.5 py-1 {% if status_filter == 'Open' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Open</a> |
| 15 | <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Fixed" |
| 16 | class="rounded-full px-2.5 py-1 {% if status_filter == 'Fixed' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Fixed</a> |
| 17 |
| --- templates/fossil/ticket_list.html | |
| +++ templates/fossil/ticket_list.html | |
| @@ -6,11 +6,11 @@ | |
| 6 | {% include "fossil/_project_nav.html" %} |
| 7 | |
| 8 | <div class="flex flex-wrap items-center justify-between gap-3 mb-4"> |
| 9 | <div class="flex flex-wrap items-center gap-2 text-xs text-gray-500"> |
| 10 | <span>Status:</span> |
| 11 | <a href="{% url 'fossil:tickets' slug=project.slug %}?status=All" |
| 12 | class="rounded-full px-2.5 py-1 {% if not status_filter %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">All</a> |
| 13 | <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Open" |
| 14 | class="rounded-full px-2.5 py-1 {% if status_filter == 'Open' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Open</a> |
| 15 | <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Fixed" |
| 16 | class="rounded-full px-2.5 py-1 {% if status_filter == 'Fixed' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Fixed</a> |
| 17 |