Add more statuses to submission
This commit is contained in:
parent
4ef9e09c6e
commit
9f43e712d0
2 changed files with 7 additions and 4 deletions
|
@ -357,7 +357,9 @@ class SubmissionsListBase(DiggPaginatorMixin, TitleMixin, ListView):
|
||||||
language__in=Language.objects.filter(key__in=self.selected_languages)
|
language__in=Language.objects.filter(key__in=self.selected_languages)
|
||||||
)
|
)
|
||||||
if self.selected_statuses:
|
if self.selected_statuses:
|
||||||
queryset = queryset.filter(result__in=self.selected_statuses)
|
queryset = queryset.filter(
|
||||||
|
Q(result__in=self.selected_statuses) | Q(status__in=self.selected_statuses)
|
||||||
|
)
|
||||||
|
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
|
@ -385,11 +387,13 @@ class SubmissionsListBase(DiggPaginatorMixin, TitleMixin, ListView):
|
||||||
return reverse("all_submissions")
|
return reverse("all_submissions")
|
||||||
|
|
||||||
def get_searchable_status_codes(self):
|
def get_searchable_status_codes(self):
|
||||||
hidden_codes = ["SC"]
|
all_statuses = list(Submission.RESULT)
|
||||||
|
all_statuses.extend([i for i in Submission.STATUS if i not in all_statuses])
|
||||||
|
hidden_codes = ["SC", "D", "G"]
|
||||||
if not self.request.user.is_superuser and not self.request.user.is_staff:
|
if not self.request.user.is_superuser and not self.request.user.is_staff:
|
||||||
hidden_codes += ["IE"]
|
hidden_codes += ["IE"]
|
||||||
return [
|
return [
|
||||||
(key, value) for key, value in Submission.RESULT if key not in hidden_codes
|
(key, value) for key, value in all_statuses if key not in hidden_codes
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
|
|
|
@ -148,7 +148,6 @@
|
||||||
if (status_filter.length && 'status' in message &&
|
if (status_filter.length && 'status' in message &&
|
||||||
status_filter.indexOf(message.status) == -1)
|
status_filter.indexOf(message.status) == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var id = message.id;
|
var id = message.id;
|
||||||
var row = table.find('div#' + id);
|
var row = table.find('div#' + id);
|
||||||
if (row.length < 1) {
|
if (row.length < 1) {
|
||||||
|
|
Loading…
Reference in a new issue