<commit_before>.container-fluid.btn-group.p-0
  = link_to edit_admin_event_path(@event), class: 'btn btn-primary py-3 rounded-0' do
    %i.fas.fa-pencil-alt
    %label.text-white Edit

  - if !@event.date_and_time.future?
    = link_to '#', class: 'btn btn-primary py-3 disabled', title: t('messages.already_taken_place') do
      %i.fas.fa-paper-plane
      %label.text-white Invite
  - elsif @event.venue and @event.invitable?
    = link_to admin_event_invite_path(@event), method: :post, class: 'btn btn-primary py-3' do
      %i.fas.fa-paper-plane
      %label.text-white Invite
  - else
    = link_to '#', class: 'btn btn-primary py-3 disabled', title: 'The event is not invitable.' do
      %i.fas.fa-paper-plane
      %label.text-white Invite

  = link_to admin_event_attendees_emails_path(@event, format: 'text'), class: 'btn btn-primary py-3' do
    %i.fas.fa-at
    %label.text-white Emails

  = link_to admin_event_path(@event, format: 'csv'), class: 'btn btn-primary py-3 rounded-0', title: 'CSV for labels' do
    %i.fas.fa-users
    %label.text-white Labels

.container.py-4.py-lg-5
  .row
    .col
      %h1= @event.to_s
      %h2
        %small #{humanize_date(@event.date_and_time, @event.ends_at, with_time: true)}

  .row
    - if @event.venue.present?
      .col-12.col-md-6
        %span.badge.bg-primary #{@event.student_spaces} student spots, #{@event.coach_spaces} coach spots
        %h4.mt-3 Chapters
        %ul.list-inline.ml-0
          - @event.chapters.each do |chapter|
            %li.list-inline-item= link_to chapter.name, [:admin, chapter]

  .row
    - if @event.venue.present?
      .col-6.col-md-3#host
        %h4 Venue
        %strong= @event.venue.name
        %br
        %small
          = @address.to_html
    .col-6.col-md-3#sponsors
      - if @event.sponsors?
        %h4 Sponsors
        - if @event.sponsors?(:standard)
          %h5 Standard
          %ul.list-unstyled.ml-0
            - @event.sponsors.each do |sponsor|
              %li
                %span
                  = link_to sponsor.name, [:admin, sponsor]
        - if @event.sponsors?(:bronze)
          %h5 Bronze
          %ul.list-unstyled.ml-0
            - @event.bronze_sponsors.each do |sponsor|
              %li
                %span
                  = link_to sponsor.name, [:admin, sponsor]
        - if @event.sponsors?(:silver)
          %h5 Silver
          %ul.list-unstyled.ml-0
            - @event.silver_sponsors.each do |sponsor|
              %li
                %span
                  = link_to sponsor.name, [:admin, sponsor]
        - if @event.sponsors?(:gold)
          %h5 Gold
          %ul.list-unstyled.ml-0
            - @event.gold_sponsors.each do |sponsor|
              %li
                %span
                  = link_to sponsor.name, [:admin, sponsor]
    .col-12.col-md-6
      %h4 Team
      - @event.organisers.each do |organiser|
        %span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'botton', title: organiser.full_name}
          = image_tag(organiser.avatar(40), alt: organiser.full_name)

  .row.mt-4
    .col
      %p.lead= @event.description.html_safe

  - if @event.tito_url.present?
    .row
      .col-12.col-md-6
        .row
          .col
            %strong Student ticket url
            %p= link_to @event.tito_url, @event.tito_url
            - if @event.student_questionnaire.present?
              %strong Student questionnaire
              %p= link_to @event.student_questionnaire, @event.student_questionnaire
            - if @event.coach_questionnaire.present?
              %strong Coach questionnaire
              %p= link_to @event.coach_questionnaire, @event.coach_questionnaire

      .col-12.col-md-6
        .card.border-info
          .card-body
            %strong Webhook url for student tickets
            %p.lead= event_rsvp_url(@event)
            %small You can setup this up in ti.to unde <strong>Customise/Webhooks</strong>

  .row
    .col-12.col-md-6<commit_msg>Adds virtual event label to admin show page<commit_after>.container-fluid.btn-group.p-0
  = link_to edit_admin_event_path(@event), class: 'btn btn-primary py-3 rounded-0' do
    %i.fas.fa-pencil-alt
    %label.text-white Edit
  - if !@event.date_and_time.future?
    = link_to '#', class: 'btn btn-primary py-3 disabled', title: t('messages.already_taken_place') do
      %i.fas.fa-paper-plane
      %label.text-white Invite
  - elsif @event.invitable?
    = link_to admin_event_invite_path(@event), method: :post, class: 'btn btn-primary py-3' do
      %i.fas.fa-paper-plane
      %label.text-white Invite
  - else
    = link_to '#', class: 'btn btn-primary py-3 disabled', title: 'The event is not invitable.' do
      %i.fas.fa-paper-plane
      %label.text-white Invite
  = link_to admin_event_attendees_emails_path(@event, format: 'text'), class: 'btn btn-primary py-3' do
    %i.fas.fa-at
    %label.text-white Emails
  = link_to admin_event_path(@event, format: 'csv'), class: 'btn btn-primary py-3 rounded-0', title: 'CSV for labels' do
    %i.fas.fa-users
    %label.text-white Labels

.container.py-4.py-lg-5
  .row.mb-4
    .col-12
      %h1= @event.to_s
      %h2
        %small #{humanize_date(@event.date_and_time, @event.ends_at, with_time: true)}
      %span.badge.bg-primary #{@event.student_spaces} student spots, #{@event.coach_spaces} coach spots

  .row
    .col-12.col-md-6.col-lg-3.mb-4#host
      %h4 Venue
      - if @event.venue.present?
        %p
          %strong= @event.venue.name
        %small
          = @address.to_html
      - elsif @event.virtual?
        %p= "#{t('events.virtual')}."
    .col-12.col-md-6.col-lg-3.mb-4#sponsors
      %h4 Sponsors
      - if @event.sponsors?
        - if @event.sponsors?(:standard)
          %h5 Standard
          %ul.list-unstyled.ml-0
            - @event.sponsors.each do |sponsor|
              %li
                %span
                  = link_to sponsor.name, [:admin, sponsor]
        - if @event.sponsors?(:bronze)
          %h5 Bronze
          %ul.list-unstyled.ml-0
            - @event.bronze_sponsors.each do |sponsor|
              %li
                %span
                  = link_to sponsor.name, [:admin, sponsor]
        - if @event.sponsors?(:silver)
          %h5 Silver
          %ul.list-unstyled.ml-0
            - @event.silver_sponsors.each do |sponsor|
              %li
                %span
                  = link_to sponsor.name, [:admin, sponsor]
        - if @event.sponsors?(:gold)
          %h5 Gold
          %ul.list-unstyled.ml-0
            - @event.gold_sponsors.each do |sponsor|
              %li
                %span
                  = link_to sponsor.name, [:admin, sponsor]
      - else
        %p This event has no sponsors.
    .col-12.col-md-6.col-lg-3.mb-4
      %h4 Team
      - if @event.organisers.any?
        - @event.organisers.each do |organiser|
          %span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: organiser.full_name}
            = image_tag(organiser.avatar(40), alt: organiser.full_name)
      - else
        %p This event has no organisers.
    .col-12.col-md-6.col-lg-3.mb-4
      %h4 Chapters
      - if @event.chapters.any?
        %ul.list-inline.ml-0
          - @event.chapters.each do |chapter|
            %li.list-inline-item= link_to chapter.name, [:admin, chapter]
      - else
        %p This event has no chapters.

  .row
    .col
      %p.lead= @event.description.html_safe

  - if @event.tito_url.present?
    .row
      .col-12.col-md-6
        .row
          .col
            %strong Student ticket url
            %p= link_to @event.tito_url, @event.tito_url
            - if @event.student_questionnaire.present?
              %strong Student questionnaire
              %p= link_to @event.student_questionnaire, @event.student_questionnaire
            - if @event.coach_questionnaire.present?
              %strong Coach questionnaire
              %p= link_to @event.coach_questionnaire, @event.coach_questionnaire

      .col-12.col-md-6
        .card.border-info
          .card-body
            %strong Webhook url for student tickets
            %p.lead= event_rsvp_url(@event)
            %small You can setup this up in ti.to unde <strong>Customise/Webhooks</strong>

  .row
    .col-12.col-md-6
{'fraction_non_alphanumeric': 0.12895818225767464, 'fraction_numerical': 0.013173797437756828, 'mean_word_length': 1.8862922915940008, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7541499', 'n_tokens_mistral': 2931, 'n_tokens_neox': 2824, 'n_words': 564}