Skip to content

Commit

Permalink
Merge branch 'main' into fixup/volunteering-link
Browse files Browse the repository at this point in the history
  • Loading branch information
russss authored Jan 14, 2024
2 parents 19a9974 + 043a837 commit 4af9d45
Show file tree
Hide file tree
Showing 10 changed files with 251 additions and 231 deletions.
5 changes: 5 additions & 0 deletions apps/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ def matrix_server():
return {"m.server": "matrix.emfcamp.org:443"}


@base.route("/.well-known/matrix/client")
def matrix_client():
return {"m.homeserver": {"base_url": "https://matrix.emfcamp.org"}}


@base.route("/subscribe")
def subscribe():
return render_template("subscribe.html")
Expand Down
3 changes: 3 additions & 0 deletions apps/cfp_review/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ def log_and_close(msg, next_page, proposal_id=None):
form.available_times.data = prop.available_times
form.content_note.data = prop.content_note
form.family_friendly.data = prop.family_friendly
form.thumbnail_url.data = prop.thumbnail_url
form.c3voc_url.data = prop.c3voc_url
form.youtube_url.data = prop.youtube_url

form.user_scheduled.data = prop.user_scheduled
form.hide_from_schedule.data = prop.hide_from_schedule
Expand Down
8 changes: 8 additions & 0 deletions apps/cfp_review/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ class UpdateProposalForm(Form):
potential_time = StringField("Potential Time")
potential_venue = StringField("Potential Venue")

thumbnail_url = StringField("Video Thumbnail URL")
c3voc_url = StringField("C3VOC Video URL")
youtube_url = StringField("YouTube URL")

update = SubmitField("Update")
reject = SubmitField("Reject without telling user")
checked = SubmitField("Mark as checked")
Expand Down Expand Up @@ -108,6 +112,10 @@ def update_proposal(self, proposal):

proposal.hide_from_schedule = self.hide_from_schedule.data

proposal.thumbnail_url = self.thumbnail_url.data
proposal.c3voc_url = self.c3voc_url.data
proposal.youtube_url = self.youtube_url.data

# Just talks? Weird to have here

if self.needs_laptop.raw_data:
Expand Down
9 changes: 9 additions & 0 deletions apps/schedule/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ def _get_proposal_dict(proposal: Proposal, favourites_ids):
res["equipment"] = proposal.display_participant_equipment
res["age_range"] = proposal.display_age_range
res["attendees"] = proposal.attendees
video_res = {}
if proposal.c3voc_url:
video_res["ccc"] = proposal.c3voc_url
if proposal.youtube_url:
video_res["youtube"] = proposal.youtube_url
if proposal.thumbnail_url:
video_res["preview_image"] = proposal.thumbnail_url
if video_res:
res["video"] = video_res
return res


Expand Down
8 changes: 7 additions & 1 deletion apps/schedule/schedule_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ def make_root():


def add_day(root, index, start, end):
# Don't include start because it's not needed
return etree.SubElement(
root,
"day",
index=str(index),
date=start.strftime("%Y-%m-%d"),
start=start.isoformat(),
end=end.isoformat(),
)

Expand All @@ -91,6 +91,7 @@ def add_event(room, event):
_add_sub_with_text(event_node, "title", event["title"])
_add_sub_with_text(event_node, "type", event.get("type", "talk"))
_add_sub_with_text(event_node, "date", event["start_date"].isoformat())
_add_sub_with_text(event_node, "url", url)

# Start time
_add_sub_with_text(event_node, "start", event["start_date"].strftime("%H:%M"))
Expand Down Expand Up @@ -124,13 +125,18 @@ def add_persons(event_node, event):


def add_recording(event_node, event):
video = event.get("video", {})

recording_node = etree.SubElement(event_node, "recording")

_add_sub_with_text(recording_node, "license", "CC BY-SA 3.0")
_add_sub_with_text(
recording_node, "optout", "false" if event.get("may_record") else "true"
)
if "ccc" in video:
_add_sub_with_text(recording_node, "url", video["ccc"])
elif "youtube" in video:
_add_sub_with_text(recording_node, "url", video["youtube"])


def export_frab(schedule):
Expand Down
Loading

0 comments on commit 4af9d45

Please sign in to comment.