<commit_before><h1>Show Event</h1>
<%= link_to 'Edit', edit_campus_room_event_path(@event.campus, @event.room, @event), class: "btn btn-default" %> |
<%= link_to 'Back', campus_room_events_path(@event.campus, @event.room), class: "btn btn-default" %>
<div class = 'description'>
  <h2><strong>Name: <%= @event.name %> | Event Details:</strong></h2>
  <p><strong>Start time:</strong> <%= @event.formatted_start_time %></p>
  <p><strong>Duration:</strong> <%= @event.formatted_event_duration %></p>
  <p><strong>Description:</strong> <%= @event.description %></p>
  <p><strong>Agenda:</strong> <%= @event.agenda %></p>
  <p><strong> Event Type: </strong> <%= if @event.is_private? then "Private" else "Public" end %> </p>
  <% if @event.is_private? %>
    <p><strong>Invite Type:</strong> <%= @event.invite_type %>
  <% end %>
  <p><strong>Room Name:</strong> <%= @event.room.name.titleize %></p>
  <p><strong>Event created by:</strong></p>
  <p><%= @event.user.full_name.titleize %></p>
</div>

<% if current_user == @event.user %>
  <%= react_component('EventInvites', users: @users, event_id: @event.id) %>
<% end %>
<div id="join-event">
  <% if current_user && current_user.invites.where(event_id: @event.id).count.zero? %>
    <%= link_to "Join Event", campus_room_events_path(@event.campus, @event.room, @event), method: :POST, class: "btn btn-default", remote: true %>
  <% end %>
</div><commit_msg>users can join a public event on the event show page<commit_after><h1>Show Event</h1>
<%= link_to 'Edit', edit_campus_room_event_path(@event.campus, @event.room, @event), class: "btn btn-default" %> |
<%= link_to 'Back', campus_room_events_path(@event.campus, @event.room), class: "btn btn-default" %>
<div class = 'description'>
  <h2><strong>Name: <%= @event.name %> | Event Details:</strong></h2>
  <p><strong>Start time:</strong> <%= @event.formatted_start_time %></p>
  <p><strong>Duration:</strong> <%= @event.formatted_event_duration %></p>
  <p><strong>Description:</strong> <%= @event.description %></p>
  <p><strong>Agenda:</strong> <%= @event.agenda %></p>
  <p><strong> Event Type: </strong> <%= if @event.is_private? then "Private" else "Public" end %> </p>
  <% if @event.is_private? %>
    <p><strong>Invite Type:</strong> <%= @event.invite_type %>
  <% end %>
  <p><strong>Room Name:</strong> <%= @event.room.name.titleize %></p>
  <p><strong>Event created by:</strong></p>
  <p><%= @event.user.full_name.titleize %></p>
</div>

<% if current_user == @event.user %>
  <%= react_component('EventInvites', users: @users, event_id: @event.id) %>
<% end %>
<div id="join-event">
  <% if current_user && current_user.invites.where(event_id: @event.id).count.zero? %>
    <%= link_to "Join Event", "/invites?invite[status]=Accepted&invite[event_id]=#{@event.id}&invite[user_id]=#{current_user.id}", method: :POST, class: "btn btn-default" %>
  <% end %>
</div>
{'fraction_non_alphanumeric': 0.2333913043478261, 'fraction_numerical': 0.002782608695652174, 'mean_word_length': 5.419642857142857, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 127, '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': '99253', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1034, 'n_words': 197}