-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for hiding/unhiding objects #884
Conversation
eec04e2
to
ab4ebeb
Compare
ab4ebeb
to
0e6bdb7
Compare
0e6bdb7
to
80fc368
Compare
apollo/formsframework/views_forms.py
Outdated
show_hidden = bool(query_params.get(show_hidden_param)) | ||
|
||
if show_hidden: | ||
show_toggle_link_label = _('Hide Hidden') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "Hide Hidden" mean? The language should probably be clearer than this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to Hide Archived
apollo/formsframework/views_forms.py
Outdated
add_show_url_param = False | ||
else: | ||
show_toggle_link_label = _( | ||
'Show All (%(count)d Hidden)', count=hidden_form_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain the rational for having the number of hidden objects displayed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was to give the user the number of items that weren't being displayed, but it's been removed
apollo/frontend/views_admin.py
Outdated
{'is_hidden': True}, synchronize_session=False) | ||
db.session.commit() | ||
|
||
@action('unhide', _('Always Show'), _('Are you sure you want to always show the selected items?')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using Hide
and Always Show
, could we instead use Archive
and Unarchive
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been changed
@dodumosu can you update the migration so it's applied after |
this commit adds the ability to toggle hidden status to the admin view
for hidden forms
this commit reorders the migrations. it also fixes issues with event display
for checklist/survey generation
eb28bdd
to
dc3f7f3
Compare
done @dodumosu can you update the migration so it's applied after `7cbcd7443117`? Given there are no conflicts of course. done |
this commit fixes an issue noticed by @takinbo. it's caused by flask-admin using the `resource_id` field as the primary key for events, not the `id` field
They remain hidden until one or more check boxes are selected. Should I
change that behaviour?
…On Wed, 15 May 2024, 20:44 Tim Akinbo, ***@***.***> wrote:
Archive/Unarchive buttons do not show up when the "All Forms" checkbox is
selected.
Screenshot.2024-05-15.at.20.43.46.png (view on web)
<https://github.com/nditech/apollo/assets/41004/cf57c6fc-9a82-4fbd-8d09-d6b7337b9661>
—
Reply to this email directly, view it on GitHub
<#884 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKX5FXAVAJJGXPIZNFUE63ZCO3LDAVCNFSM5ULQG2NKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJRGMZTGMZVGI2A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
- hidden events cannot be switched to by admins anymore - the default event processing skips hidden events - role based access to resources excludes hidden ones (events and forms)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
This pull request addresses nditech/apollo-issues#171 by allowing a user to hide or show location sets, participant sets, events and forms.