|
38 | 38 |
|
39 | 39 |
|
40 | 40 | {% block content %}{% spaceless %} |
41 | | - <form |
42 | | - class="flex gap-2 justify-between items-center mt-4 md:gap-4" |
43 | | - hx-trigger="change" |
44 | | - hx-get="./" |
45 | | - hx-target="#main" |
46 | | - hx-push-url="true" |
47 | | - hx-swap="outerHTML transition:true" |
48 | | - > |
| 41 | + <div class="flex gap-2 justify-between items-center mt-4 md:gap-4"> |
| 42 | + <form |
| 43 | + class="flex gap-2 justify-between items-center w-full md:gap-4" |
| 44 | + hx-trigger="change" |
| 45 | + hx-get="./" |
| 46 | + hx-target="#main" |
| 47 | + hx-push-url="true" |
| 48 | + hx-swap="outerHTML transition:true" |
| 49 | + > |
49 | 50 |
|
50 | | - {% dropdown_menu title="Filters" heading="Filter submissions" %} |
51 | | - <a |
52 | | - href="{% url "apply:submissions:list" %}?query=is:open" |
53 | | - hx-get="{% url "apply:submissions:list" %}?query=is:open" |
54 | | - hx-push-url="true" |
55 | | - hx-target="#main" |
56 | | - hx-swap="outerHTML transition:true" |
57 | | - class="flex {% if request.GET.query == "is:open" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
58 | | - {% if request.GET.query == "is:open" %} |
59 | | - {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
60 | | - {% endif %} |
61 | | - {% trans "Open submissions" %} {{ request.GET.lead }} |
62 | | - </a> |
63 | | - <a |
64 | | - href="{% url "apply:submissions:list" %}?query=lead:@me" |
65 | | - hx-get="{% url "apply:submissions:list" %}?query=lead:@me" |
66 | | - hx-push-url="true" |
67 | | - hx-target="#main" |
68 | | - hx-swap="outerHTML transition:true" |
69 | | - class="flex {% if request.GET.query == "lead:@me" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
70 | | - {% if request.GET.query == "lead:@me" %} |
71 | | - {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
72 | | - {% endif %} |
73 | | - {% trans "Your assigned submissions (lead)" %} {{ request.GET.lead }} |
74 | | - </a> |
75 | | - <a |
76 | | - href="{% url "apply:submissions:list" %}?query=flagged:@me" |
77 | | - hx-get="{% url "apply:submissions:list" %}?query=flagged:@me" |
78 | | - hx-push-url="true" |
79 | | - hx-target="#main" |
80 | | - hx-swap="outerHTML transition:true" |
81 | | - class="flex {% if request.GET.query == "flagged:@me" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
82 | | - {% if request.GET.query == "flagged:@me" %} |
83 | | - {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
84 | | - {% endif %} |
85 | | - {% trans "Your flagged submissions" %} |
86 | | - </a> |
87 | | - <a |
88 | | - href="{% url "apply:submissions:list" %}?query=flagged:@staff" |
89 | | - hx-get="{% url "apply:submissions:list" %}?query=flagged:@staff" |
90 | | - hx-push-url="true" |
91 | | - hx-target="#main" |
92 | | - hx-swap="outerHTML transition:true" |
93 | | - class="flex {% if request.GET.query == "flagged:@staff" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
94 | | - {% if request.GET.query == "flagged:@staff" %} |
95 | | - {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
96 | | - {% endif %} |
97 | | - {% trans "Staff flagged submissions" %} |
98 | | - </a> |
99 | | - <a |
100 | | - href="{% url "apply:submissions:list" %}?query=reviewer:@me" |
101 | | - hx-get="{% url "apply:submissions:list" %}?query=reviewer:@me" |
102 | | - hx-push-url="true" |
103 | | - hx-target="#main" |
104 | | - hx-swap="outerHTML transition:true" |
105 | | - class="flex {% if request.GET.query == "reviewer:@me" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
106 | | - {% if request.GET.query == "reviewer:@me" %} |
107 | | - {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
108 | | - {% endif %} |
109 | | - {% trans "Awaiting your review" %} |
110 | | - </a> |
111 | | - <a |
112 | | - href="{% url "apply:submissions:list" %}?query=reviewed-by:@me" |
113 | | - hx-get="{% url "apply:submissions:list" %}?query=reviewed-by:@me" |
114 | | - hx-push-url="true" |
115 | | - hx-target="#main" |
116 | | - hx-swap="outerHTML transition:true" |
117 | | - class="flex {% if request.GET.query == "reviewed-by:@me" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
118 | | - {% if request.GET.query == "reviewed-by:@me" %} |
119 | | - {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
| 51 | + {% dropdown_menu title="Filters" heading="Filter submissions" %} |
| 52 | + <a |
| 53 | + href="{% url "apply:submissions:list" %}?query=is:open" |
| 54 | + hx-get="{% url "apply:submissions:list" %}?query=is:open" |
| 55 | + hx-push-url="true" |
| 56 | + hx-target="#main" |
| 57 | + hx-swap="outerHTML transition:true" |
| 58 | + class="flex {% if request.GET.query == "is:open" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
| 59 | + {% if request.GET.query == "is:open" %} |
| 60 | + {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
| 61 | + {% endif %} |
| 62 | + {% trans "Open submissions" %} {{ request.GET.lead }} |
| 63 | + </a> |
| 64 | + <a |
| 65 | + href="{% url "apply:submissions:list" %}?query=lead:@me" |
| 66 | + hx-get="{% url "apply:submissions:list" %}?query=lead:@me" |
| 67 | + hx-push-url="true" |
| 68 | + hx-target="#main" |
| 69 | + hx-swap="outerHTML transition:true" |
| 70 | + class="flex {% if request.GET.query == "lead:@me" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
| 71 | + {% if request.GET.query == "lead:@me" %} |
| 72 | + {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
| 73 | + {% endif %} |
| 74 | + {% trans "Your assigned submissions (lead)" %} {{ request.GET.lead }} |
| 75 | + </a> |
| 76 | + <a |
| 77 | + href="{% url "apply:submissions:list" %}?query=flagged:@me" |
| 78 | + hx-get="{% url "apply:submissions:list" %}?query=flagged:@me" |
| 79 | + hx-push-url="true" |
| 80 | + hx-target="#main" |
| 81 | + hx-swap="outerHTML transition:true" |
| 82 | + class="flex {% if request.GET.query == "flagged:@me" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
| 83 | + {% if request.GET.query == "flagged:@me" %} |
| 84 | + {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
| 85 | + {% endif %} |
| 86 | + {% trans "Your flagged submissions" %} |
| 87 | + </a> |
| 88 | + <a |
| 89 | + href="{% url "apply:submissions:list" %}?query=flagged:@staff" |
| 90 | + hx-get="{% url "apply:submissions:list" %}?query=flagged:@staff" |
| 91 | + hx-push-url="true" |
| 92 | + hx-target="#main" |
| 93 | + hx-swap="outerHTML transition:true" |
| 94 | + class="flex {% if request.GET.query == "flagged:@staff" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
| 95 | + {% if request.GET.query == "flagged:@staff" %} |
| 96 | + {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
| 97 | + {% endif %} |
| 98 | + {% trans "Staff flagged submissions" %} |
| 99 | + </a> |
| 100 | + <a |
| 101 | + href="{% url "apply:submissions:list" %}?query=reviewer:@me" |
| 102 | + hx-get="{% url "apply:submissions:list" %}?query=reviewer:@me" |
| 103 | + hx-push-url="true" |
| 104 | + hx-target="#main" |
| 105 | + hx-swap="outerHTML transition:true" |
| 106 | + class="flex {% if request.GET.query == "reviewer:@me" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
| 107 | + {% if request.GET.query == "reviewer:@me" %} |
| 108 | + {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
| 109 | + {% endif %} |
| 110 | + {% trans "Awaiting your review" %} |
| 111 | + </a> |
| 112 | + <a |
| 113 | + href="{% url "apply:submissions:list" %}?query=reviewed-by:@me" |
| 114 | + hx-get="{% url "apply:submissions:list" %}?query=reviewed-by:@me" |
| 115 | + hx-push-url="true" |
| 116 | + hx-target="#main" |
| 117 | + hx-swap="outerHTML transition:true" |
| 118 | + class="flex {% if request.GET.query == "reviewed-by:@me" %}ps-2 font-medium bg-base-200{% else %}ps-8 font-normal{% endif %} pe-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200"> |
| 119 | + {% if request.GET.query == "reviewed-by:@me" %} |
| 120 | + {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} |
| 121 | + {% endif %} |
| 122 | + {% trans "Reviewed by you" %} |
| 123 | + </a> |
| 124 | + {% enddropdown_menu %} |
| 125 | + |
| 126 | + {% for key, value in request.GET.items %} |
| 127 | + {% if key != 'page' and key != 'drafts' and key != 'query' and key != 'archived' %} |
| 128 | + <input type="hidden" name="{{ key }}" value="{{ value }}"> |
120 | 129 | {% endif %} |
121 | | - {% trans "Reviewed by you" %} |
122 | | - </a> |
123 | | - {% enddropdown_menu %} |
124 | | - |
125 | | - {% for key, value in request.GET.items %} |
126 | | - {% if key != 'page' and key != 'drafts' and key != 'query' and key != 'archived' %} |
127 | | - <input type="hidden" name="{{ key }}" value="{{ value }}"> |
128 | | - {% endif %} |
129 | | - {% endfor %} |
130 | | - |
131 | | - <label class="inline-flex relative flex-auto items-center"> |
132 | | - <span class="flex absolute inset-y-0 items-center pointer-events-none start-0 ps-3"> |
133 | | - {% heroicon_mini "magnifying-glass" size=20 class="text-fg-muted" aria_hidden=true %} |
134 | | - </span> |
135 | | - <input |
136 | | - type="text" |
137 | | - id="search-navbar" |
138 | | - class="w-full input" |
139 | | - placeholder="{% trans 'Search…' %}" |
140 | | - name="query" |
141 | | - aria-label="{% trans 'Search submissions' %}" |
142 | | - value="{{ search_query|default_if_none:'' }}" {% if search_query %}autofocus{% endif %} |
143 | | - > |
144 | | - </label> |
| 130 | + {% endfor %} |
145 | 131 |
|
146 | | - {% if can_view_archive %} |
147 | | - <label class="label"> |
| 132 | + <label class="inline-flex relative flex-auto items-center"> |
| 133 | + <span class="flex absolute inset-y-0 items-center pointer-events-none start-0 ps-3"> |
| 134 | + {% heroicon_mini "magnifying-glass" size=20 class="text-fg-muted" aria_hidden=true %} |
| 135 | + </span> |
148 | 136 | <input |
149 | | - type="checkbox" |
150 | | - name="archived" |
151 | | - {% if show_archived %}checked{% endif %} |
152 | | - class="toggle toggle-sm toggle-primary" |
| 137 | + type="text" |
| 138 | + id="search-navbar" |
| 139 | + class="w-full input" |
| 140 | + placeholder="{% trans 'Search…' %}" |
| 141 | + name="query" |
| 142 | + aria-label="{% trans 'Search submissions' %}" |
| 143 | + value="{{ search_query|default_if_none:'' }}" {% if search_query %}autofocus{% endif %} |
153 | 144 | > |
154 | | - {% trans "Archived" %} |
155 | 145 | </label> |
156 | | - {% endif %} |
157 | 146 |
|
158 | | - {% if can_access_drafts %} |
159 | | - <label class="label"> |
160 | | - <input |
161 | | - type="checkbox" |
162 | | - name="drafts" |
163 | | - {% if show_drafts %}checked{% endif %} |
164 | | - class="toggle toggle-sm toggle-primary" |
165 | | - > |
166 | | - {% trans "Drafts" %} |
167 | | - </label> |
168 | | - {% endif %} |
| 147 | + {% if can_view_archive %} |
| 148 | + <label class="label"> |
| 149 | + <input |
| 150 | + type="checkbox" |
| 151 | + name="archived" |
| 152 | + {% if show_archived %}checked{% endif %} |
| 153 | + class="toggle toggle-sm toggle-primary" |
| 154 | + > |
| 155 | + {% trans "Archived" %} |
| 156 | + </label> |
| 157 | + {% endif %} |
| 158 | + |
| 159 | + {% if can_access_drafts %} |
| 160 | + <label class="label"> |
| 161 | + <input |
| 162 | + type="checkbox" |
| 163 | + name="drafts" |
| 164 | + {% if show_drafts %}checked{% endif %} |
| 165 | + class="toggle toggle-sm toggle-primary" |
| 166 | + > |
| 167 | + {% trans "Drafts" %} |
| 168 | + </label> |
| 169 | + {% endif %} |
| 170 | + </form> |
169 | 171 |
|
170 | 172 | {% if can_export_submissions %} |
171 | 173 | <a |
|
179 | 181 | {% heroicon_mini "arrow-down-tray" %} |
180 | 182 | </a> |
181 | 183 | {% endif %} |
182 | | - </form> |
| 184 | + </div> |
183 | 185 |
|
184 | 186 | {% if is_filtered %} |
185 | 187 | {% comment %} Display option to clear all the filters {% endcomment %} |
|
0 commit comments