diff --git a/apps/base/dev/fake.py b/apps/base/dev/fake.py index d53d9cf1a..391a37a2c 100644 --- a/apps/base/dev/fake.py +++ b/apps/base/dev/fake.py @@ -77,7 +77,7 @@ def fake_proposal(fake, reviewers): "anon-blocked": 0.05, "new": 0.05, "reviewed": 0.2, - "finished": 0.3, + "finalised": 0.3, } cfp.state = random_state(states) @@ -100,7 +100,7 @@ def fake_proposal(fake, reviewers): if vote.state in ("voted", "stale", "resolved"): vote.vote = random.randint(0, 2) - if cfp.state == "finished" and type(cfp) is TalkProposal: + if cfp.state == "finalised" and type(cfp) is TalkProposal: cfp.available_times = "fri_10_13,fri_13_16,fri_16_20,sat_10_13,sat_13_16,sat_16_20,sun_10_13,sun_13_16,sun_16_20" if type(cfp) in (WorkshopProposal, YouthWorkshopProposal): diff --git a/apps/cfp/views.py b/apps/cfp/views.py index ae1d451b5..efa3ba37a 100644 --- a/apps/cfp/views.py +++ b/apps/cfp/views.py @@ -697,10 +697,10 @@ class F(FinaliseForm): proposal.published_participant_equipment = form.participant_equipment.data proposal.available_times = form.get_availability_json() - proposal.set_state("finished") + proposal.set_state("finalised") db.session.commit() - app.logger.info("Finished proposal %s", proposal_id) + app.logger.info("Finalised proposal %s", proposal_id) flash("Thank you for finalising your details!") return redirect(url_for(".edit_proposal", proposal_id=proposal_id)) @@ -709,7 +709,7 @@ class F(FinaliseForm): # Don't overwrite user submitted data pass - elif proposal.state == "finished": + elif proposal.state == "finalised": if proposal.published_names: form.name.data = proposal.published_names else: diff --git a/apps/schedule/attendee_content.py b/apps/schedule/attendee_content.py index f8fbaebc3..a894b9a38 100644 --- a/apps/schedule/attendee_content.py +++ b/apps/schedule/attendee_content.py @@ -129,7 +129,7 @@ def attendee_content(): proposal = PYTHON_CFP_TYPES[form.type.data]() proposal.user_id = current_user.id proposal.user_scheduled = True - proposal.state = "finished" + proposal.state = "finalised" populate(proposal, form) conflicts = proposal.get_conflicting_content() diff --git a/apps/volunteer/tasks.py b/apps/volunteer/tasks.py index ef1ec526a..f11e0205c 100644 --- a/apps/volunteer/tasks.py +++ b/apps/volunteer/tasks.py @@ -47,7 +47,7 @@ def run(self): events = ( Proposal.query.join(Venue, Proposal.scheduled_venue_id == Venue.id) - .filter(Venue.name == venue.name, Proposal.is_accepted) + .filter(Venue.name == venue.name, Proposal.state == "finalised") .all() ) for e in events: diff --git a/models/cfp.py b/models/cfp.py index 38d102d63..d6b610360 100644 --- a/models/cfp.py +++ b/models/cfp.py @@ -52,8 +52,8 @@ "anon-blocked": ["accepted", "rejected", "withdrawn", "reviewed", "edit"], "reviewed": ["accepted", "rejected", "withdrawn", "edit", "anonymised"], "manual-review": ["accepted", "rejected", "withdrawn", "edit"], - "accepted": ["accepted", "rejected", "withdrawn", "finished"], - "finished": ["rejected", "withdrawn", "finished"], + "accepted": ["accepted", "rejected", "withdrawn", "finalised"], + "finalised": ["rejected", "withdrawn", "finalised"], "withdrawn": ["accepted", "rejected", "withdrawn", "edit"], } @@ -69,7 +69,7 @@ "manual-review", "reviewed", "accepted", - "finished", + "finalised", "withdrawn", ] @@ -363,7 +363,7 @@ class Proposal(BaseModel): state = db.Column(db.String, nullable=False, default="new") type = db.Column(db.String, nullable=False) # talk, workshop or installation - is_accepted = column_property(state.in_(["accepted", "finished"])) + is_accepted = column_property(state.in_(["accepted", "finalised"])) # Core information title = db.Column(db.String, nullable=False) diff --git a/models/user.py b/models/user.py index 2aefeb058..68bf30557 100644 --- a/models/user.py +++ b/models/user.py @@ -282,7 +282,7 @@ def get_export_data(cls): u.email for u in User.query.join( Proposal, Proposal.user_id == User.id - ).filter(Proposal.state.in_(("accepted", "finished"))) + ).filter(Proposal.is_accepted) ], }, } @@ -398,7 +398,7 @@ def get_by_bar_training_token(cls, code) -> User: @property def is_cfp_accepted(self): for proposal in self.proposals: - if proposal.state in {"accepted", "finished"}: + if proposal.is_accepted: return True return False diff --git a/templates/cfp/edit.html b/templates/cfp/edit.html index 6b3b7e7a1..a9f610f21 100644 --- a/templates/cfp/edit.html +++ b/templates/cfp/edit.html @@ -42,7 +42,7 @@

Proposal Detail

About your {{proposal.human_type}}
- {% if feature_enabled('CFP_FINALISE') and proposal.state in ['finished'] %} + {% if feature_enabled('CFP_FINALISE') and proposal.state == 'finalised' %}
Names
{{proposal.published_names}}
Pronouns
{{proposal.published_pronouns}}
Title
{{proposal.published_title}}
diff --git a/templates/cfp/proposals.html b/templates/cfp/proposals.html index b5442e165..b9004445c 100644 --- a/templates/cfp/proposals.html +++ b/templates/cfp/proposals.html @@ -40,7 +40,7 @@

{{ propos Awaiting the next round {% elif proposal.state == 'accepted' %} Accepted, check your messages - {% elif proposal.state == 'finished' %} + {% elif proposal.state == 'finalised' %} Accepted and ready {% elif proposal.state == 'withdrawn' %} You withdrew this proposal. diff --git a/templates/schedule/_proposal_icons.html b/templates/schedule/_proposal_icons.html index e48708955..f6748b072 100644 --- a/templates/schedule/_proposal_icons.html +++ b/templates/schedule/_proposal_icons.html @@ -1,12 +1,14 @@ {# reusable icons #} {% macro proposal_icons(prop) %} - {% if not prop.may_record and prop.type == 'talk' and prop.state == 'finished' %} - - {% endif %} - {% if prop.content_note and prop.type == 'talk' and prop.state == 'finished' %} - โš ๏ธ - {% endif %} - {% if prop.family_friendly and prop.type == 'talk' and prop.state == 'finished' %} - {{ ["๐Ÿ‘ช", "๐Ÿ‘ฉโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ง", "๐Ÿ‘จโ€๐Ÿ‘ฆ", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ง", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง", "๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง" ] | random }} + {% if prop.type == 'talk' and prop.state == 'finalised' %} + {% if not prop.may_record %} + + {% endif %} + {% if prop.content_note %} + โš ๏ธ + {% endif %} + {% if prop.family_friendly %} + {{ ["๐Ÿ‘ช", "๐Ÿ‘ฉโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ง", "๐Ÿ‘จโ€๐Ÿ‘ฆ", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ง", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง", "๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง" ] | random }} + {% endif %} {% endif %} {% endmacro %}