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
12756831
Commit
12756831
authored
5 years ago
by
Parbhat Puri
Browse files
Options
Downloads
Patches
Plain Diff
By default set open filter for Round listing page's index URL
parent
86038302
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/admin.py
+2
-0
2 additions, 0 deletions
opentech/apply/funds/admin.py
opentech/apply/funds/admin_helpers.py
+12
-1
12 additions, 1 deletion
opentech/apply/funds/admin_helpers.py
with
14 additions
and
1 deletion
opentech/apply/funds/admin.py
+
2
−
0
View file @
12756831
...
@@ -14,6 +14,7 @@ from .admin_helpers import (
...
@@ -14,6 +14,7 @@ from .admin_helpers import (
FormsFundRoundListFilter
,
FormsFundRoundListFilter
,
RoundStateListFilter
,
RoundStateListFilter
,
RoundFundChooserView
,
RoundFundChooserView
,
RoundAdminURLHelper
,
ApplicationFormButtonHelper
,
ApplicationFormButtonHelper
,
)
)
from
.admin_views
import
CopyApplicationFormViewClass
from
.admin_views
import
CopyApplicationFormViewClass
...
@@ -34,6 +35,7 @@ class RoundAdmin(BaseRoundAdmin):
...
@@ -34,6 +35,7 @@ class RoundAdmin(BaseRoundAdmin):
menu_icon
=
'
repeat
'
menu_icon
=
'
repeat
'
list_display
=
(
'
title
'
,
'
fund
'
,
'
start_date
'
,
'
end_date
'
,
'
applications
'
,
'
review_forms
'
)
list_display
=
(
'
title
'
,
'
fund
'
,
'
start_date
'
,
'
end_date
'
,
'
applications
'
,
'
review_forms
'
)
list_filter
=
(
RoundStateListFilter
,)
list_filter
=
(
RoundStateListFilter
,)
url_helper_class
=
RoundAdminURLHelper
def
applications
(
self
,
obj
):
def
applications
(
self
,
obj
):
...
...
This diff is collapsed.
Click to expand it.
opentech/apply/funds/admin_helpers.py
+
12
−
1
View file @
12756831
from
urllib.parse
import
urlencode
from
django
import
forms
from
django
import
forms
from
django.contrib
import
admin
from
django.contrib
import
admin
from
django.urls
import
reverse
from
django.urls
import
reverse
from
django.utils.functional
import
cached_property
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ugettext
as
_
from
wagtail.contrib.modeladmin.forms
import
ParentChooserForm
from
wagtail.contrib.modeladmin.forms
import
ParentChooserForm
from
wagtail.contrib.modeladmin.helpers
import
PageButtonHelper
,
ButtonHelper
from
wagtail.contrib.modeladmin.helpers
import
PageAdminURLHelper
,
PageButtonHelper
,
ButtonHelper
from
wagtail.contrib.modeladmin.views
import
ChooseParentView
from
wagtail.contrib.modeladmin.views
import
ChooseParentView
from
wagtail.core.models
import
Page
from
wagtail.core.models
import
Page
...
@@ -122,3 +125,11 @@ class ApplicationFormButtonHelper(ButtonHelper):
...
@@ -122,3 +125,11 @@ class ApplicationFormButtonHelper(ButtonHelper):
buttons
.
append
(
copy_form_button
)
buttons
.
append
(
copy_form_button
)
return
buttons
return
buttons
class
RoundAdminURLHelper
(
PageAdminURLHelper
):
@cached_property
def
index_url
(
self
):
# By default set open filter for Round listing page's index URL
params
=
{
'
form-state
'
:
'
open
'
}
return
f
"
{
self
.
get_action_url
(
'
index
'
)
}
?
{
urlencode
(
params
)
}
"
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