Skip to content
Snippets Groups Projects
Verified Commit b4d7cdbb authored by tribut's avatar tribut :man_dancing:
Browse files

Show user languages only for "more languages" track

parent de4cb643
Branches
Tags
No related merge requests found
<% if !user.languages_from.blank? || !user.languages_to.blank? %><small class="text-2xs uppercase font-light bg-black/10 rounded-sm p-1 ml-1" aria-label="Languages <%= user.name %> can translate" title="Languages <%= user.name %> can translate"> <% if session.conference.more_languages && (!user.languages_from.blank? || !user.languages_to.blank?) %><small class="text-2xs uppercase font-light bg-black/10 rounded-sm p-1 ml-1" aria-label="Languages <%= user.name %> can translate" title="Languages <%= user.name %> can translate">
<% if !user.languages_from.blank? && !user.languages_from.split(',').include?(session.language) %> <% if !user.languages_from.blank? && !user.languages_from.split(',').include?(session.language) %>
<span aria-help="User doesn't understand the language of the talk" title="User doesn't understand the language of the talk">⚠️</span> <span aria-help="User doesn't understand the language of the talk" title="User doesn't understand the language of the talk">⚠️</span>
<% end %> <% end %>
......
class AddMoreLanguagesToConferences < ActiveRecord::Migration[7.1]
def change
add_column :conferences, :more_languages, :boolean, null: false, default: false
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_25_223515) do ActiveRecord::Schema[7.1].define(version: 2024_12_26_172555) 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
...@@ -43,6 +43,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_12_25_223515) do ...@@ -43,6 +43,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_12_25_223515) do
t.string "slug" t.string "slug"
t.string "import_job_class" t.string "import_job_class"
t.string "time_zone" t.string "time_zone"
t.boolean "more_languages", default: false, null: false
end end
create_table "crono_jobs", force: :cascade do |t| create_table "crono_jobs", force: :cascade do |t|
......
...@@ -65,6 +65,7 @@ end ...@@ -65,6 +65,7 @@ end
Conference.find_or_create_by(slug: "38c3-more").tap do |c| Conference.find_or_create_by(slug: "38c3-more").tap do |c|
c.name = "38th Chaos Communication Congress (more languages)" c.name = "38th Chaos Communication Congress (more languages)"
c.more_languages = true
c.time_zone = "Berlin" c.time_zone = "Berlin"
c.starts_at = DateTime.parse("27 December 2024 10:30 CET") c.starts_at = DateTime.parse("27 December 2024 10:30 CET")
c.ends_at = DateTime.parse("30 December 2024 19:00 CET") c.ends_at = DateTime.parse("30 December 2024 19:00 CET")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment