-
Notifications
You must be signed in to change notification settings - Fork 411
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
Allow filtering contribution list by custom fields #6214
Allow filtering contribution list by custom fields #6214
Conversation
indico/modules/events/contributions/templates/contrib_list_filter.html
Outdated
Show resolved
Hide resolved
f6bbdb8
to
0aabac0
Compare
Just to mention it here as well, I think it would be good to also allow displaying those custom fields in the list (we already have this in the list of abstracts). |
0aabac0
to
5448719
Compare
169d0ed
to
fc351ab
Compare
7b795b3
to
d8b641f
Compare
The default view looks kind of broken (see the table headers near the end): It looks like the "Material" header is always missing and there's no header above the action button. Also, IMHO we should keep the columns that were shown by default before enabled by default. The Contribution "Type" column also changed its place |
|
||
:return: a list of {'id': ..., 'caption': ...} dicts | ||
""" | ||
return [{'id': id_, 'caption': self.static_items[id_]['title']} for id_ in self.static_items if id_ in ids] |
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.
If the ids
are guaranteed to be a subset of static_items
keys, you could simply:
return [{'id': id_, 'caption': self.static_items[id_]['title']} for id_ in self.static_items if id_ in ids] | |
return [{'id': id_, 'caption': self.static_items[id_]['title']} for id_ in ids] |
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.
I think they are not necessarily a subset of static items since the function separating the ids takes as dynamic any item that has an id that is not a str
indico/modules/events/contributions/templates/management/_contribution_list.html
Outdated
Show resolved
Hide resolved
indico/modules/events/contributions/templates/management/_contribution_list.html
Outdated
Show resolved
Hide resolved
5d12cd9
to
1f45690
Compare
d6c08bd
to
7b23a1f
Compare
Are you hiding the contribution type by default on purpose? It also changed places... |
I am hiding it on purpose since now the table is being rendered dynamically, and if there is no contribution types the column would be empty. It also changed places because of the dynamic rendering, since the order of the columns is not given by a static table |
What do you think about enabling it by default if the event has contribution types defined? I think it's important information for conference organizers that should be shown by default. Of course in cases like someone first changing the display settings and then creating a contribution type this would need to be manually enabled (since the config is stored in the session), but the most common case would be covered by it. |
I'm looking into it, let me get back when I get something |
I included Type as a default column checking if there are any contribution types. There is a small bug bothering me that I can't seem to find the issue, when the first contribution type is created you need to refresh the page for the column to appear, but when the last one is deleted, as soon as the contribution type dialog is closed the Type column disappears. |
Extra filters do not work
Fix unit test for new extra fields
Remove translation block Remove unused columns
1794fa0
to
62b78a8
Compare
closes #6213
Contribution custom fields can now be filtered, and columns can now be hidden/showed: