|
8 | 8 | {% block hero %} |
9 | 9 | <c-hero> |
10 | 10 | <c-hero.header |
11 | | - title="{% trans 'All Submissions' %}<span class='submissions-count'> ({{ page.paginator.count }})</span>" |
| 11 | + title="{% trans 'All Submissions' %}" |
12 | 12 | subtitle="{% trans 'Search and filter all submissions' %}" |
13 | 13 | > |
14 | 14 | <div class="self-end -mb-4"> |
|
39 | 39 |
|
40 | 40 | {% block content %}{% spaceless %} |
41 | 41 | <div class="flex gap-2 justify-between items-center mt-4 md:gap-4"> |
| 42 | + <span class="badge badge-info badge-soft badge-lg ms-3" title="{% trans "Submission count" %}">{{ page.paginator.count }}</span> |
42 | 43 | <form |
43 | 44 | class="flex gap-2 justify-between items-center w-full md:gap-4" |
44 | 45 | hx-trigger="change" |
|
49 | 50 | name="querySubmissions" |
50 | 51 | > |
51 | 52 |
|
52 | | - {% dropdown_menu title="Filters" heading="Filter submissions" %} |
| 53 | + <c-dropdown-menu title="Filters" heading="Filter submissions"> |
53 | 54 | <a |
54 | 55 | href="{% url "apply:submissions:list" %}?query=is:open" |
55 | 56 | hx-get="{% url "apply:submissions:list" %}?query=is:open" |
|
122 | 123 | {% endif %} |
123 | 124 | {% trans "Reviewed by you" %} |
124 | 125 | </a> |
125 | | - {% enddropdown_menu %} |
| 126 | + </c-dropdown-menu> |
126 | 127 |
|
127 | 128 | {% for key, value in request.GET.items %} |
128 | 129 | {% if key != 'page' and key != 'drafts' and key != 'query' and key != 'archived' %} |
|
323 | 324 | x-show="!showSelectedSubmissions" |
324 | 325 | class="flex flex-wrap gap-2 items-center menu-filters" |
325 | 326 | > |
326 | | - {% dropdown_menu title="Submitted" heading="Filter by submitted date(s)" %} |
| 327 | + <c-dropdown-menu title="Submitted" heading="Filter by submitted date(s)"> |
327 | 328 | <calendar-range class="mx-auto cally" {% if selected_submitted_date %}value="{{selected_submitted_date}}"{% endif %} onchange="setDateFromPicker(this.value, 'submitted')"> |
328 | 329 | {% heroicon_micro "chevron-left" aria_label="Previous" slot="previous" aria_hidden=true size=18 %} |
329 | 330 | {% heroicon_micro "chevron-right" aria_label="Next" slot="next" aria_hidden=true size=18 %} |
330 | 331 | <calendar-month></calendar-month> |
331 | 332 | </calendar-range> |
332 | | - {% enddropdown_menu %} |
| 333 | + </c-dropdown-menu> |
333 | 334 |
|
334 | | - {% dropdown_menu title="Updated" heading="Filter by updated date(s)" %} |
| 335 | + <c-dropdown-menu title="Updated" heading="Filter by updated date(s)"> |
335 | 336 | <calendar-range class="mx-auto cally" {% if selected_updated_date %}value="{{selected_updated_date}}"{% endif %} onchange="setDateFromPicker(this.value, 'updated')"> |
336 | 337 | {% heroicon_micro "chevron-left" aria_label="Previous" slot="previous" aria_hidden=true size=18 %} |
337 | 338 | {% heroicon_micro "chevron-right" aria_label="Next" slot="next" aria_hidden=true size=18 %} |
338 | 339 | <calendar-month></calendar-month> |
339 | 340 | </calendar-range> |
340 | | - {% enddropdown_menu %} |
| 341 | + </c-dropdown-menu> |
341 | 342 |
|
342 | | - {% dropdown_menu title="Status" heading="Filter by current status" enable_search=True %} |
| 343 | + <c-dropdown-menu title="Status" heading="Filter by current status" enable_search=True> |
343 | 344 | <ul |
344 | 345 | class="flex overflow-auto flex-col max-h-80 text-gray-700 divide-y" |
345 | 346 | data-filter-list> |
|
375 | 376 | {% endfor %} |
376 | 377 | </ul> |
377 | 378 | <p class="py-2 px-3 m-0 text-fg-muted" data-filter-empty-state hidden>{% trans "No statuses found. Sorry about that." %}</p> |
378 | | - {% enddropdown_menu %} |
| 379 | + </c-dropdown-menu> |
379 | 380 |
|
380 | | - {% dropdown_menu title="Screening" heading="Filter by screening decision" %} |
| 381 | + <c-dropdown-menu title="Screening" heading="Filter by screening decision"> |
381 | 382 | <ul |
382 | 383 | class="flex overflow-auto flex-col max-h-80 text-gray-700 divide-y" |
383 | 384 | > |
|
402 | 403 | </li> |
403 | 404 | {% endfor %} |
404 | 405 | </ul> |
405 | | - {% enddropdown_menu %} |
| 406 | + </c-dropdown-menu> |
406 | 407 |
|
407 | | - {% dropdown_menu title="Fund" heading="Filter by Fund & Labs" enable_search=True %} |
408 | | - {% slot "url" %}{% url "apply:submissions:submenu-funds" %}{% remove_from_query "only_query_string" "page" %}{% endslot %} |
409 | | - {% enddropdown_menu %} |
410 | 408 |
|
411 | | - {% dropdown_menu title="Round" heading="Filter by Round" enable_search=True %} |
412 | | - {% slot "url" %}{% url "apply:submissions:submenu-rounds" %}{% remove_from_query "only_query_string" "page" %}{% endslot %} |
413 | | - {% enddropdown_menu %} |
| 409 | + <c-dropdown-menu title="Fund" heading="Filter by Fund & Labs" enable_search=True> |
| 410 | + <c-slot name="url">{% url "apply:submissions:submenu-funds" %}{% remove_from_query "only_query_string" "page" %}</c-slot> |
| 411 | + </c-dropdown-menu> |
| 412 | + |
| 413 | + <c-dropdown-menu title="Round" heading="Filter by Round" enable_search=True> |
| 414 | + <c-slot name="url">{% url "apply:submissions:submenu-rounds" %}{% remove_from_query "only_query_string" "page" %}</c-slot> |
| 415 | + </c-dropdown-menu> |
414 | 416 |
|
415 | 417 | {% if 'category_options' not in SUBMISSIONS_TABLE_EXCLUDED_FIELDS %} |
416 | | - {% dropdown_menu title="Category" heading="Filter by Category" enable_search=True %} |
417 | | - {% slot "url" %}{% url "apply:submissions:submenu-category-options" %}{% remove_from_query "only_query_string" "page" %}{% endslot %} |
418 | | - {% enddropdown_menu %} |
| 418 | + <c-dropdown-menu title="Category" heading="Filter by Category" enable_search=True> |
| 419 | + <c-slot name="url">{% url "apply:submissions:submenu-category-options" %}{% remove_from_query "only_query_string" "page" %}</c-slot> |
| 420 | + </c-dropdown-menu> |
419 | 421 | {% endif %} |
420 | 422 |
|
421 | 423 | {% if "tags" not in SUBMISSIONS_TABLE_EXCLUDED_FIELDS %} |
422 | | - {% dropdown_menu title="Tags" heading="Filter by tags" enable_search=True position="right" %} |
423 | | - {% slot "url" %}{% url "apply:submissions:submenu-meta-terms" %}{% remove_from_query "only_query_string" "page" %}{% endslot %} |
424 | | - {% enddropdown_menu %} |
| 424 | + <c-dropdown-menu title="Tags" heading="Filter by tags" enable_search=True position="right"> |
| 425 | + <c-slot name="url">{% url "apply:submissions:submenu-meta-terms" %}{% remove_from_query "only_query_string" "page" %}</c-slot> |
| 426 | + </c-dropdown-menu> |
425 | 427 | {% endif %} |
426 | 428 |
|
427 | 429 | {% if 'lead' not in SUBMISSIONS_TABLE_EXCLUDED_FIELDS %} |
428 | | - {% dropdown_menu title="Lead" heading="Filter by Lead" enable_search=True position="right" %} |
429 | | - {% slot "url" %}{% url "apply:submissions:submenu-leads" %}{% remove_from_query "only_query_string" "page" %}{% endslot %} |
430 | | - {% enddropdown_menu %} |
| 430 | + <c-dropdown-menu title="Lead" heading="Filter by Lead" enable_search=True position="right"> |
| 431 | + <c-slot name="url">{% url "apply:submissions:submenu-leads" %}{% remove_from_query "only_query_string" "page" %}</c-slot> |
| 432 | + </c-dropdown-menu> |
431 | 433 | {% endif %} |
432 | 434 |
|
433 | 435 | {% if not request.user.is_reviewer %} |
434 | | - {% dropdown_menu title="Reviewers" heading="Filter by Reviewer" enable_search=True position="right" %} |
435 | | - {% slot "url" %}{% url "apply:submissions:submenu-reviewers" %}{% remove_from_query "only_query_string" "page" %}{% endslot %} |
436 | | - {% enddropdown_menu %} |
| 436 | + <c-dropdown-menu title="Reviewers" heading="Filter by Reviewer" enable_search=True position="right"> |
| 437 | + <c-slot name="url">{% url "apply:submissions:submenu-reviewers" %}{% remove_from_query "only_query_string" "page" %}</c-slot> |
| 438 | + </c-dropdown-menu> |
437 | 439 | {% endif %} |
438 | 440 |
|
439 | | - {% dropdown_menu title="Sort" heading="Sort by" position="right" icon="arrows-up-down" %} |
| 441 | + <c-dropdown-menu title="Sort" heading="Sort by" position="right" icon="arrows-up-down"> |
440 | 442 | {% for sort_option in sort_options %} |
441 | 443 | <a |
442 | 444 | {% if sort_option.selected %} |
|
456 | 458 | {{ sort_option.name }} |
457 | 459 | </a> |
458 | 460 | {% endfor %} |
459 | | - {% enddropdown_menu %} |
| 461 | + </c-dropdown-menu> |
460 | 462 | </nav> |
461 | 463 |
|
462 | 464 | <section |
463 | 465 | x-cloak |
464 | 466 | x-show="showSelectedSubmissions" |
465 | 467 | class="flex flex-row flex-wrap gap-5 items-center selection-actions" |
466 | 468 | > |
467 | | - {% dropdown_menu title="Status" heading="Update Status" enable_search=True %} |
468 | | - {% slot "url" hx-include="[name='selectedSubmissionIds']" hx-trigger="mouseover, focus" %}{% url "apply:submissions:submenu-update-status" %}{% endslot %} |
469 | | - {% enddropdown_menu %} |
| 469 | + <c-dropdown-menu title="Status" heading="Update Status" enable_search=True extra_include="[name='selectedSubmissionIds']" extra_trigger="mouseover, focus"> |
| 470 | + <c-slot name="url">{% url "apply:submissions:submenu-update-status" %}</c-slot> |
| 471 | + </c-dropdown-menu> |
470 | 472 |
|
471 | | - {% dropdown_menu title="Lead" heading="Assign Lead" enable_search=True position="right" %} |
472 | | - {% slot "url" %}{% url "apply:submissions:submenu-bulk-update-lead" %}{% remove_from_query "only_query_string" "page" %}{% endslot %} |
473 | | - {% enddropdown_menu %} |
| 473 | + <c-dropdown-menu title="Lead" heading="Assign Lead" enable_search=True position="right"> |
| 474 | + <c-slot name="url">{% url "apply:submissions:submenu-bulk-update-lead" %}{% remove_from_query "only_query_string" "page" %}</c-slot> |
| 475 | + </c-dropdown-menu> |
474 | 476 |
|
475 | | - {% dropdown_menu title="Reviewers" heading="Assign Reviewer(s)" position="right" %} |
476 | | - {% slot "url" hx-include="[name='selectedSubmissionIds']" hx-trigger="click" %}{% url "apply:submissions:submenu-bulk-update-reviewers" %}{% remove_from_query "only_query_string" "page" %}{% endslot %} |
477 | | - {% enddropdown_menu %} |
| 477 | + <c-dropdown-menu title="Reviewers" heading="Assign Reviewer(s)" position="right" extra_include="[name='selectedSubmissionIds']" extra_trigger="click"> |
| 478 | + <c-slot name="url">{% url "apply:submissions:submenu-bulk-update-reviewers" %}{% remove_from_query "only_query_string" "page" %}</c-slot> |
| 479 | + </c-dropdown-menu> |
478 | 480 |
|
479 | 481 | {% if can_bulk_archive %} |
480 | 482 | <button |
@@ -540,7 +542,7 @@ <h2 class='mb-2 text-2xl card-title'>{% trans "No results matched your search" % |
540 | 542 | * |
541 | 543 | * @param {string} dateRange - the date range in the format of `YYYY-MM-DD/YYYY-MM-DD` |
542 | 544 | * @param {string} query - the param to be used in the search bar. ie. `updated` |
543 | | - * |
| 545 | + * |
544 | 546 | */ |
545 | 547 | function setDateFromPicker(dateRange, query) { |
546 | 548 | const searchBar = document.getElementById("search-navbar"); |
|
0 commit comments