Skip to content

Commit

Permalink
Add Meet & Greet events (#327)
Browse files Browse the repository at this point in the history
* refactor: showing consecutive break rooms count in schedule debug mode

* refactor: allowing to enable schedule debug mode by passing query param debug=true

* chore: Add Meet & Greet events

---------

Co-authored-by: fcamblor <fcamblor@gmail.com>
  • Loading branch information
aheritier and fcamblor committed Apr 3, 2023
1 parent 1006cab commit 77c78b3
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 83 deletions.
52 changes: 36 additions & 16 deletions app/models/ConferenceDescriptor.scala
Expand Up @@ -239,6 +239,7 @@ object ConferenceDescriptor {
val HALL_EXPO = Room("a_hall", "Exhibition floor", 2300, "special", "", "Hall", None)
val HALL_EXPO_PARIS = Room("hall_paris", "Hall Exposition Paris", 100, "special", "", "Hall Paris", Some("Paris"))
val LOBBY_NEUILLY = Room("lobby_neuilly", "Lobby Neuilly", 100, "special", "", "Lobby Neuilly", Some("Neuilly"))
val LOBBY_PARIS = Room("lobby_paris", "Lobby Paris", 100, "special", "", "Lobby Paris", Some("Paris"))

val AMPHI_BLEU = Room("b_amphi", "Amphi Bleu", 826, "theatre", "camera", "Amphi Bleu", None)
val MAILLOT = Room("c_maillot", "Maillot", 380, "theatre", "camera", "Amphi Maillot", Some("Hall"))
Expand Down Expand Up @@ -284,9 +285,9 @@ object ConferenceDescriptor {

val allRoomsLabFriday = List(PARIS_201_U, PARIS_202_203, PARIS_221M_222M, PARIS_224M_225M, NEUILLY_231_232, NEUILLY_234_235)

val allRoomsBOF = List(PARIS_243_T, PARIS_201_U, PARIS_202_203, PARIS_221M_222M, PARIS_224M_225M, NEUILLY_231_232, NEUILLY_234_235)
val allRoomsBOF = List(PARIS_201_U, PARIS_202_203, PARIS_221M_222M, PARIS_224M_225M, NEUILLY_231_232, NEUILLY_234_235)

val allRoomsOthersThursday = List()
val allRoomsOthersThursday = List(MAILLOT, LOBBY_NEUILLY, LOBBY_PARIS)

val allRoomsOthersFriday = List(LOBBY_NEUILLY)

Expand Down Expand Up @@ -316,6 +317,7 @@ object ConferenceDescriptor {
val shortBreak = SlotBreak("chgt", "Break", "Pause courte")
val exhibition = SlotBreak("exhib", "Exhibition", "Exhibition")
val meetAndGreet = SlotBreak("meet", "Meet & Greet", "Exhibition")
val empty = SlotBreak("empty", "", "")
}

// TODO The idea here is to describe in term of Agenda, for each rooms, the slots. This is required only for the Scheduler
Expand Down Expand Up @@ -430,23 +432,23 @@ object ConferenceDescriptor {
// OTHERS

val othersSlotsThursday: List[Slot] = {
val lesGrowthTech = ConferenceRooms.allRoomsOthersThursday.map {
r1 =>
SlotBuilder(ConferenceProposalTypes.OTHER.id, "thursday",
new DateTime(s"${secondDay}T15:30:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T17:30:00.000+02:00").toDateTime(confTimezone), r1)
}
lesGrowthTech
val theVoxx = SlotBuilder(ConferenceProposalTypes.OTHER.id, "thursday",
new DateTime(s"${secondDay}T19:30:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T23:00:00.000+02:00").toDateTime(confTimezone), ConferenceRooms.MAILLOT)
val improvisationalTheatre = SlotBuilder(ConferenceProposalTypes.OTHER.id, "thursday",
new DateTime(s"${secondDay}T20:00:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T21:30:00.000+02:00").toDateTime(confTimezone), ConferenceRooms.LOBBY_NEUILLY)
val massage = SlotBuilder(ConferenceProposalTypes.OTHER.id, "thursday",
new DateTime(s"${secondDay}T19:30:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T23:00:00.000+02:00").toDateTime(confTimezone), ConferenceRooms.LOBBY_PARIS)
List(theVoxx,improvisationalTheatre,massage)
}

val othersSlotsFriday: List[Slot] = {
val cafePhilo = ConferenceRooms.allRoomsOthersFriday.map {
r1 =>
SlotBuilder(ConferenceProposalTypes.OTHER.id, "friday",
new DateTime(s"${thirdDay}T13:00:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${thirdDay}T14:15:00.000+02:00").toDateTime(confTimezone), r1)
}
cafePhilo
val cafePhilo = SlotBuilder(ConferenceProposalTypes.OTHER.id, "friday",
new DateTime(s"${thirdDay}T13:00:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${thirdDay}T14:15:00.000+02:00").toDateTime(confTimezone), ConferenceRooms.LOBBY_NEUILLY)
List(cafePhilo)
}

// BOFS
Expand Down Expand Up @@ -672,6 +674,24 @@ object ConferenceDescriptor {
, SlotBuilder(ConferenceSlotBreaks.shortBreak, "thursday",
new DateTime(s"${secondDay}T18:15:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T18:30:00.000+02:00").toDateTime(confTimezone), List(firstRoomForBreaks))
, SlotBuilder(ConferenceSlotBreaks.meetAndGreet, "thursday",
new DateTime(s"${secondDay}T19:00:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T19:30:00.000+02:00").toDateTime(confTimezone), List(firstRoomForBreaks))
, SlotBuilder(ConferenceSlotBreaks.empty, "thursday",
new DateTime(s"${secondDay}T19:30:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T20:00:00.000+02:00").toDateTime(confTimezone), List(firstRoomForBreaks,ConferenceRooms.NEUILLY_251))
, SlotBuilder(ConferenceSlotBreaks.empty, "thursday",
new DateTime(s"${secondDay}T20:00:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T20:50:00.000+02:00").toDateTime(confTimezone), List(firstRoomForBreaks,ConferenceRooms.NEUILLY_251))
, SlotBuilder(ConferenceSlotBreaks.empty, "thursday",
new DateTime(s"${secondDay}T21:00:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T21:30:00.000+02:00").toDateTime(confTimezone), List(firstRoomForBreaks,ConferenceRooms.NEUILLY_251))
, SlotBuilder(ConferenceSlotBreaks.empty, "thursday",
new DateTime(s"${secondDay}T21:30:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T21:50:00.000+02:00").toDateTime(confTimezone), List(firstRoomForBreaks,ConferenceRooms.NEUILLY_251,ConferenceRooms.LOBBY_NEUILLY))
, SlotBuilder(ConferenceSlotBreaks.empty, "thursday",
new DateTime(s"${secondDay}T21:50:00.000+02:00").toDateTime(confTimezone),
new DateTime(s"${secondDay}T23:00:00.000+02:00").toDateTime(confTimezone), List(firstRoomForBreaks,ConferenceRooms.NEUILLY_251))
).flatten

val fridayBreaks = List(
Expand Down
10 changes: 5 additions & 5 deletions app/models/Slot.scala
Expand Up @@ -87,10 +87,6 @@ object Room {
"par242BT",
"par243",
"par243_t",
"hall_neuilly",
"hall_paris",
"lobby_neuilly",
"lobby_paris",
"neu_212_213",
"neu_232_232",
"neu_234_235",
Expand All @@ -103,7 +99,11 @@ object Room {
"lab1",
"lab2",
"lab3",
"lab4"
"lab4",
"hall_neuilly",
"hall_paris",
"lobby_neuilly",
"lobby_paris"
)

}
Expand Down
2 changes: 1 addition & 1 deletion app/views/Publisher/showOneDay.scala.html
Expand Up @@ -44,7 +44,7 @@ <h1 class="entry-title">@Messages(s"day-$day") @includeTypes.map(types => {
@subSlots.head.from.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm") - @subSlots.head.to.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm")
</th>
@rooms.sorted.zipWithIndex.map { case (room, index) =>
@tags.publisher.tagRenderRow(subSlots, room, index, rooms.sorted, slots, showTimeBox=false, secretPublishKey, maybeProgramSchedule.exists(_.favoritesActivated), debug = false)
@tags.publisher.tagRenderRow(subSlots, room, index, rooms.sorted, slots, showTimeBox=false, secretPublishKey, maybeProgramSchedule.exists(_.favoritesActivated), debug = req.getQueryString("debug").getOrElse("false") == "true")
}
</tr>
}
Expand Down
126 changes: 65 additions & 61 deletions app/views/tags/publisher/tagRenderRow.scala.html
@@ -1,73 +1,77 @@
@(subSlots: List[Slot], room: Room, roomIndex: Int, sortedRooms: List[Room], overallSlots: List[Slot], showTimeBox:Boolean, secretPublishKey: Option[String], favoritesActivated: Boolean = false, debug: Boolean = false)(implicit req:RequestHeader)

@if(debug) {
<td>
@subSlots.find(_.room.id == room.id).map { zeSlot: Slot =>
@if(zeSlot.isFiller){<strong><u>isFiller</u></strong>}else{isFiller}=@zeSlot.isFiller<br>
@if(zeSlot.notAllocated){<strong><u>notAllocated</u></strong>}else{notAllocated}=@zeSlot.notAllocated<br>
@if(zeSlot.break.isDefined){<strong><u>break</u></strong>}else{break}=<span title="@zeSlot.break.map(_.id).getOrElse("")">@zeSlot.break.isDefined</span><br>
@if(zeSlot.proposal.isDefined){<strong><u>proposal</u></strong>}else{proposal}=<span title="@zeSlot.proposal.map(_.title).getOrElse("")">@zeSlot.proposal.isDefined</span>
}
</td>
} else {
@defining((
roomIndex != 0 && subSlots.exists(slot => slot.room.id == sortedRooms(roomIndex-1).id && slot.break.isDefined),
sortedRooms.slice(roomIndex, sortedRooms.size).takeWhile{ testedRoom => !subSlots.exists(_.roomId == testedRoom.id) || subSlots.exists(slot => slot.roomId == testedRoom.id && slot.break.isDefined) },
subSlots.find(_.room.id == room.id)
)) { case (previousSlotIsBreak: Boolean, consecutiveBreakRooms: List[Room], maybeSlot: Option[Slot]) =>
@maybeSlot.map { zeSlot =>

@if(zeSlot.notAllocated && !zeSlot.isFiller) {
<td class="proposal tba" rowspan="@(overallSlots.count(s => s.fillerForSlotId.contains(zeSlot.id)) + 1)">&nbsp;</td>
@defining((
sortedRooms.slice(roomIndex, sortedRooms.size).takeWhile{ testedRoom => !subSlots.exists(_.roomId == testedRoom.id) || subSlots.exists(slot => slot.roomId == testedRoom.id && slot.break.isDefined) }
)) { case (consecutiveBreakRooms: List[Room]) =>
@if(debug) {
<td>
@subSlots.find(_.room.id == room.id).map { zeSlot: Slot =>
@if(zeSlot.isFiller){<strong><u>isFiller</u></strong>}else{isFiller}=@zeSlot.isFiller<br>
@if(zeSlot.notAllocated){<strong><u>notAllocated</u></strong>}else{notAllocated}=@zeSlot.notAllocated<br>
@if(zeSlot.break.isDefined){<strong><u>break</u></strong>}else{break}=<span title="@zeSlot.break.map(_.id).getOrElse("")">@zeSlot.break.isDefined</span><br>
@if(zeSlot.break.isDefined){<strong><u>consBreakRooms</u></strong>}else{consBreakRooms}=@(consecutiveBreakRooms.size)
@if(zeSlot.proposal.isDefined){<strong><u>proposal</u></strong>}else{proposal}=<span title="@zeSlot.proposal.map(_.title).getOrElse("")">@zeSlot.proposal.isDefined</span><br>
}
@if(zeSlot.break.isDefined /* && roomIndex == 0 */ ) {
@if(previousSlotIsBreak) {
@* nothing to do.. we're on a break filler *@
} else {
<td class="break skip-print-defaults" colspan="@(consecutiveBreakRooms.size)">
@Messages(s"sw.${zeSlot.break.get.id}")
</td>
</td>
} else {
@defining((
roomIndex != 0 && subSlots.exists(slot => slot.room.id == sortedRooms(roomIndex-1).id && slot.break.isDefined),
subSlots.find(_.room.id == room.id)
)) { case (previousSlotIsBreak: Boolean, maybeSlot: Option[Slot]) =>
@maybeSlot.map { zeSlot =>

@if(zeSlot.notAllocated && !zeSlot.isFiller) {
<td class="proposal tba" rowspan="@(overallSlots.count(s => s.fillerForSlotId.contains(zeSlot.id)) + 1)">&nbsp;</td>
}
}
@if(zeSlot.isFiller) {
@* nothing to do.. we're on a filler *@
} else {
@zeSlot.proposal.map { p: Proposal =>
<td class="skip-max-width-on-divs proposal proposal_id_is_@p.cssId @zeSlot.id proposal_type_is_@p.talkType.id proposal_track_is_@p.track.id lang_is_@p.lang" rowspan="@(overallSlots.count(s => s.fillerForSlotId.contains(zeSlot.id)) + 1)">
<i class="proposal_badge track"></i>
<div class="ribbon-wrapper">
<div class="ribbon-white">
<i class="en_badge"></i>
@if(zeSlot.break.isDefined /* && roomIndex == 0 */ ) {
@if(previousSlotIsBreak) {
@* nothing to do.. we're on a break filler *@
} else {
<td class="break skip-print-defaults" colspan="@(consecutiveBreakRooms.size)">
@Messages(s"sw.${zeSlot.break.get.id}")
</td>
}
}
@if(zeSlot.isFiller) {
@* nothing to do.. we're on a filler *@
} else {
@zeSlot.proposal.map { p: Proposal =>
<td class="skip-max-width-on-divs proposal proposal_id_is_@p.cssId @zeSlot.id proposal_type_is_@p.talkType.id proposal_track_is_@p.track.id lang_is_@p.lang" rowspan="@(overallSlots.count(s => s.fillerForSlotId.contains(zeSlot.id)) + 1)">
<i class="proposal_badge track"></i>
<div class="ribbon-wrapper">
<div class="ribbon-white">
<i class="en_badge"></i>
</div>
</div>
</div>
<div class="content">
<span class="title"><a class="blackLink skip-print-defaults" href="@routes.Publisher.showDetailsForProposal(p.id, p.escapedTitle, secretPublishKey)">@p.title</a></span>
<span class="speaker"> @p.allSpeakerUUIDs.map { speakerUUID =>
@tags.publisher.renderSpeaker(speakerUUID)
}</span>
<div class="content">
<span class="title"><a class="blackLink skip-print-defaults" href="@routes.Publisher.showDetailsForProposal(p.id, p.escapedTitle, secretPublishKey)">@p.title</a></span>
<span class="speaker"> @p.allSpeakerUUIDs.map { speakerUUID =>
@tags.publisher.renderSpeaker(speakerUUID)
}</span>

@if(showTimeBox){
<span class="timeSlotBox"> @zeSlot.from.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm") - @zeSlot.to.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm")</span>
}
</div>
<div class="proposal_actions">
@tags.publisher.renderFavorite(p.id, favoritesActivated)
</div>
@if(!showTimeBox) {
<div class="timeSlotBox hide-on-print ">
<p class="timeSlotBox">
<small>@zeSlot.from.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm")
- @zeSlot.to.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm")</small>
</p>
@if(showTimeBox){
<span class="timeSlotBox"> @zeSlot.from.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm") - @zeSlot.to.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm")</span>
}
</div>
<div class="proposal_actions">
@tags.publisher.renderFavorite(p.id, favoritesActivated)
</div>
}
</td>
@if(!showTimeBox) {
<div class="timeSlotBox hide-on-print ">
<p class="timeSlotBox">
<small>@zeSlot.from.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm")
- @zeSlot.to.toDateTime(ConferenceDescriptor.current().timezone).toString("HH:mm")</small>
</p>
</div>
}
</td>
}
}
}
}
}
}

@if(!subSlots.exists(_.room.id == room.id) && !subSlots.exists(_.break.isDefined)) {
<td class="room-closed">&nbsp;</td>
@if(!subSlots.exists(_.room.id == room.id) && !subSlots.exists(_.break.isDefined)) {
<td class="room-closed">&nbsp;</td>
}
}
}
2 changes: 2 additions & 0 deletions conf/messages
Expand Up @@ -625,6 +625,8 @@ sw.dej=Registration and Breakfast
sw.coffee=Coffee break
sw.chgt=Short break
sw.def=Coffee
sw.meet=Meet & Greet
sw.empty=
day-wed=Wednesday
day-thu=Thursday
day-fri=Friday
Expand Down
2 changes: 2 additions & 0 deletions conf/messages.fr
Expand Up @@ -531,6 +531,8 @@ sw.dej=Accueil et petit déjeuner
sw.chgt=Pause courte
sw.coffee=Pause café
sw.coffee.break=Pause café
sw.meet=Meet & Greet
sw.empty=
sw.endOfDay=Fin de la journée, fermeture de l''espace d''exposition
sw.cocktail=Soirée Meet and Greet dans l''espace d''exposition jusqu''à 22h30
sw.showAllDay=Voir l''agenda de toute la journée
Expand Down

0 comments on commit 77c78b3

Please sign in to comment.