Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
f4c4d952
Commit
f4c4d952
authored
7 years ago
by
Todd Dembrey
Browse files
Options
Downloads
Patches
Plain Diff
Exclude previous stages from the submission dashboard
parent
35e0b9b2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
opentech/apply/funds/models.py
+4
-0
4 additions, 0 deletions
opentech/apply/funds/models.py
opentech/apply/funds/views.py
+7
-1
7 additions, 1 deletion
opentech/apply/funds/views.py
with
11 additions
and
1 deletion
opentech/apply/funds/models.py
+
4
−
0
View file @
f4c4d952
...
...
@@ -465,6 +465,10 @@ class ApplicationSubmissionQueryset(JSONOrderable):
def
inactive
(
self
):
return
self
.
exclude
(
status__in
=
active_statuses
)
def
current
(
self
):
# Applications which have the current stage active (have not been progressed)
return
self
.
exclude
(
next__isnull
=
False
)
class
ApplicationSubmission
(
WorkflowHelpers
,
AbstractFormSubmission
):
field_template
=
'
funds/includes/submission_field.html
'
...
...
This diff is collapsed.
Click to expand it.
opentech/apply/funds/views.py
+
7
−
1
View file @
f4c4d952
...
...
@@ -30,6 +30,9 @@ class SubmissionListView(AllActivityContextMixin, SingleTableMixin, FilterView):
filterset_class
=
SubmissionFilter
def
get_queryset
(
self
):
return
self
.
filterset_class
.
_meta
.
model
.
objects
.
current
()
def
get_context_data
(
self
,
**
kwargs
):
active_filters
=
self
.
filterset
.
data
return
super
().
get_context_data
(
active_filters
=
active_filters
,
**
kwargs
)
...
...
@@ -42,6 +45,9 @@ class SubmissionSearchView(SingleTableMixin, FilterView):
filterset_class
=
SubmissionFilterAndSearch
def
get_queryset
(
self
):
return
self
.
filterset_class
.
_meta
.
model
.
objects
.
current
()
def
get_context_data
(
self
,
**
kwargs
):
search_term
=
self
.
request
.
GET
.
get
(
'
query
'
)
...
...
@@ -103,7 +109,7 @@ class AdminSubmissionDetailView(ActivityContextMixin, DelegateableView):
def
get_context_data
(
self
,
**
kwargs
):
return
super
().
get_context_data
(
other_submissions
=
self
.
model
.
objects
.
filter
(
user
=
self
.
object
.
user
).
exclude
(
id
=
self
.
object
.
id
),
other_submissions
=
self
.
model
.
objects
.
filter
(
user
=
self
.
object
.
user
).
current
().
exclude
(
id
=
self
.
object
.
id
),
**
kwargs
,
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment