Skip to content
Snippets Groups Projects
Verified Commit e02a9044 authored by Felix Eckhofer's avatar Felix Eckhofer :man_dancing:
Browse files

Add marker when session is not recorded

parent f7afaea9
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,7 @@ module Pretalx ...@@ -59,6 +59,7 @@ module Pretalx
speaker.save! speaker.save!
end end
end end
session.recorded = !session_data.fetch('do_not_record', false)
session.save! session.save!
end end
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<%= turbo_frame_tag dom_id(session), method: "morph", class: "w-full", data: { controller: "session", language: session.language } do %> <%= turbo_frame_tag dom_id(session), method: "morph", class: "w-full", data: { controller: "session", language: session.language } do %>
<div class="session shadow hover:shadow-lg overflow-scroll text-sm w-full !h-full min-h-full hover:!min-h-max <%= session.translators_needed? ? "translators-needed" : "no-translators-needed" %> <%= session.backup_needed? ? "backup-needed" : "no-backup-needed" %> <%= session.assignees? ? "has-assignees" : "no-assignees" %> <%= (session.ends_at < Time.now ? "past" : "") %>"> <div class="session shadow hover:shadow-lg overflow-scroll text-sm w-full !h-full min-h-full hover:!min-h-max <%= session.translators_needed? ? "translators-needed" : "no-translators-needed" %> <%= session.backup_needed? ? "backup-needed" : "no-backup-needed" %> <%= session.assignees? ? "has-assignees" : "no-assignees" %> <%= (session.ends_at < Time.now ? "past" : "") %>">
<h4> <h4>
<small class="text-2xs uppercase font-light bg-black/10 rounded-sm p-1 mr-1 lang-<%= session.language %>"><%= session.language %></small> <small class="text-2xs uppercase font-light bg-black/10 rounded-sm p-1 mr-1 lang-<%= session.language %>"><%= session.language %></small><% unless session.recorded %><span aria-label="Session is not recorded" title="Session is not recorded"><svg class="inline-block -mt-0.5 w-5 h-5" fill="#000000" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m255-1c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zm0 17c63 0 121 25 163 65l-65 65-19-48c-0.85-2.6-4.3-5.1-7.7-5.1h-142c-3.4 0-6 1.7-7.7 5.1l-21 55h-49c-17 0-31 14-31 31v169c0 17 14 31 31 31h6.7l-34 34c-39-43-64-100-64-162 0-131 108-239 239-239zm60 239c0 33-26 60-60 60-14 0-26-4.4-36-12l84-83c7.3 9.9 12 22 12 36zm-119 0c0-33 26-60 60-60 14 0 26 4.5 36 12l-84 83c-7.4-9.9-12-22-12-36zm108-60c-13-11-30-17-48-17-43 0-77 34-77 77 0 18 6.2 35 17 48l-64 63h-25c-7.7 0-14-6-14-14v-169c0-7.7 6-14 14-14h55c3.4 0 6.8-2.6 7.7-5.1l21-55h130l19 50-36 36zm-97 120c13 11 30 17 48 17 43 0 77-34 77-77 0-18-6.1-35-16-48l38-38h49c7.7 0 14 6 14 14v169c0 7.7-6 14-14 14h-247l51-51zm48 179c-63 0-120-25-163-65l46-46h265c17 0 31-14 32-31v-169c0-17-14-31-31-31h-34l60-59c39 43 64 100 64 162-1e-3 131-108 239-239 239z"/><path d="m383 187c-9.4 0-17 7.7-17 17s7.7 17 17 17 17-7.7 17-17-7.7-17-17-17z"/></svg></span><% end %>
<%= link_to session.title, session.url, target: "_top" %> <%= link_to session.title, session.url, target: "_top" %>
</h4> </h4>
<div class="relative"> <div class="relative">
......
class AddRecordedToSessions < ActiveRecord::Migration[7.1]
def change
add_column :sessions, :recorded, :boolean, null: false, default: true
end
end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2024_12_23_202350) do ActiveRecord::Schema[7.1].define(version: 2024_12_24_002828) do
create_table "assignments", force: :cascade do |t| create_table "assignments", force: :cascade do |t|
t.integer "user_id", null: false t.integer "user_id", null: false
t.integer "session_id", null: false t.integer "session_id", null: false
...@@ -137,6 +137,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_12_23_202350) do ...@@ -137,6 +137,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_12_23_202350) do
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "ref_id" t.string "ref_id"
t.string "notes" t.string "notes"
t.boolean "recorded", default: true, null: false
t.index ["conference_id"], name: "index_sessions_on_conference_id" t.index ["conference_id"], name: "index_sessions_on_conference_id"
t.index ["ref_id", "conference_id"], name: "index_sessions_on_ref_id_and_conference_id", unique: true t.index ["ref_id", "conference_id"], name: "index_sessions_on_ref_id_and_conference_id", unique: true
t.index ["stage_id"], name: "index_sessions_on_stage_id" t.index ["stage_id"], name: "index_sessions_on_stage_id"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment