Skip to content
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

Persist "show future events" in categories #3233

Merged
merged 1 commit into from Feb 9, 2018

Conversation

bpedersen2
Copy link
Contributor

Use the same logic as for past events to enable
(session-)persistent storage of the "show future
events" state.

@@ -382,22 +387,33 @@ def _process(self):
return jsonify_data(flash=False, html=html)


class RHShowPastEventsInCategory(RHDisplayCategoryBase):
"""Set whether the past events in a category are automatically displayed or not"""
class RHShowEventsInCategory(RHDisplayCategoryBase):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd call this RHShowEventsInCategoryBase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


class RHShowFutureEventsInCategory(RHShowEventsInCategory):
"""Set whether the past events in a category are automatically displayed or not"""
session_field = 'fetch_future_events_in'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be an empty line after a class-level docstring

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


class RHShowPastEventsInCategory(RHShowEventsInCategory):
"""Set whether the past events in a category are automatically displayed or not"""
session_field = 'fetch_past_events_in'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ThiefMaster
Copy link
Member

changelog entry please (2.1 improvements), e.g. this:

- Add user setting whether to show future events or not by default in a
  category. Also keep the per-category status in the session (:issue:`3233`,
  thanks :user:`bpedersen2`)

@ThiefMaster ThiefMaster added this to the v2.1 milestone Feb 8, 2018
Copy link
Member

@pferreir pferreir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you so much!

@ThiefMaster ThiefMaster changed the title Enable persistent settings for future events Persist "show future events" in categories Feb 9, 2018
Use the same logic as for past events to enable
(session-)persistent storage of the "show future
events" state.
@ThiefMaster ThiefMaster merged commit 478fe19 into indico:master Feb 9, 2018
@bpedersen2 bpedersen2 deleted the future_events_persistance branch February 9, 2018 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants