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

Projects
None yet
3 participants
@bpedersen2
Contributor

bpedersen2 commented Feb 8, 2018

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):

This comment has been minimized.

@ThiefMaster

ThiefMaster Feb 8, 2018

Member

I'd call this RHShowEventsInCategoryBase

This comment has been minimized.

@bpedersen2

bpedersen2 Feb 8, 2018

Contributor

done


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

This comment has been minimized.

@ThiefMaster

ThiefMaster Feb 8, 2018

Member

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

This comment has been minimized.

@bpedersen2

bpedersen2 Feb 8, 2018

Contributor

done


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

This comment has been minimized.

@ThiefMaster

This comment has been minimized.

@bpedersen2

bpedersen2 Feb 8, 2018

Contributor

done

@ThiefMaster

This comment has been minimized.

Member

ThiefMaster commented Feb 8, 2018

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`)

@bpedersen2 bpedersen2 force-pushed the bpedersen2:future_events_persistance branch from 8179cd5 to 72d3813 Feb 8, 2018

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

@pferreir

Great, thank you so much!

@ThiefMaster ThiefMaster changed the title from Enable persistent settings for future events to Persist "show future events" in categories Feb 9, 2018

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

@ThiefMaster ThiefMaster force-pushed the bpedersen2:future_events_persistance branch from 72d3813 to 478fe19 Feb 9, 2018

@ThiefMaster ThiefMaster merged commit 478fe19 into indico:master Feb 9, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bpedersen2 bpedersen2 deleted the bpedersen2:future_events_persistance branch Feb 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment