<commit_before><% menu(:webconference) %>

<%= content_for :javascript do  %>

  $('#sidebar img.tooltip_invite_people').qtip({
    content: '<%= escape_javascript(t("tooltip.invite_people")) %>',
    position: {adjust: { screen: true }},
    show:  'mouseover',
    hide: { when: 'mouseout', fixed: true },
    style: 'mystyle'
  });

  $("a#invite_bbb_link").fancybox({
    'hideOnContentClick' : false,
    'frameWidth' : 450,
    'frameHeight' : 430
  });

  $("a#join_mobile_button").fancybox({
    'hideOnContentClick' : false,
    'frameWidth' : 250,
    'frameHeight' : 500
  });

  recListUpdateStart = function() {
    $("#update-recordings-loading").show();
  }

  recListUpdateEnd = function(error) {
    $("#update-recordings-loading").hide();
    if (error) {
      $("#update-recordings-error").show();
      window.setTimeout(function() {
        $("#update-recordings-error").hide();
      }, 5000);
      $("#recording-list-wrapper").effect("highlight", { color: "#ff0000"}, 5000);
    } else {
      $("#update-recordings-success").show();
      window.setTimeout(function() {
        $("#update-recordings-success").hide();
      }, 5000);
      if ($("#recording-list-wrapper").is(":visible")) {
        $("#recording-list-wrapper").effect("highlight", { color: "#00ff00"}, 5000);
      }
    }
  }

  recListUpdateStart();
  $.post("<%= fetch_recordings_bigbluebutton_room_path(@room, :format => 'json') %>", {
    authenticity_token: "<%= form_authenticity_token() %>"
  }, null, "html").fail(function() {
    recListUpdateEnd(true);
  }).success(function(data) {
    $.get("<%= recordings_space_path(@space, :partial => '1', :limit => 3) %>", {
      authenticity_token: "<%= form_authenticity_token() %>"
    }).fail(function() {
      recListUpdateEnd(true);
    }).success(function(data) {
      if (data.trim() != "") {
        $("#recording-list-wrapper").show();
        $("#recording-list-wrapper").html(data);
      } else {
        $("#recording-list-wrapper").hide();
      }
      recListUpdateEnd(false);
    });
  });

<% end %>

<%= content_for :search do  %>
  <%= render :partial => 'search/form' %>
<% end %>

<%= content_for :sidebar do  %>
  <%= render :partial => 'sidebar' %>
<% end %>

<div id="space_webconference_description">
  <% status = @room.is_running? ? t('webconference.running')+"!" : t('webconference.not_running') %>
  <%= t('webconference.space.description', :status => status).html_safe %>

  <div class="url_share">
    <div class="video_share">
      <span><%= t('webconference.space.share') %></span>
    </div>
    <span class="only_url"><%= t('url_plain') %>: </span><span class="blue"><%= join_webconf_url(@room) %></span>
    <% if logged_in? %>
      <div class="invite_button">
        <%= link_to t('button.invite'), inviteroom_invite_path(:type => "webconference", :room => space.bigbluebutton_room.to_param), :id => 'invite_bbb_link', :class => 'basic_button' %>
      </div>
    <% end %>
  </div>
</div><commit_msg>fix #774 We no longer need to update the recordings list from a room when the user is not logged in. If the user is not logged in then we only select the data from the local database, we no longer synch with lb. The error occured because the recordings needed an auth in order to work.<commit_after><% menu(:webconference) %>

<%= content_for :javascript do  %>

  $('#sidebar img.tooltip_invite_people').qtip({
    content: '<%= escape_javascript(t("tooltip.invite_people")) %>',
    position: {adjust: { screen: true }},
    show:  'mouseover',
    hide: { when: 'mouseout', fixed: true },
    style: 'mystyle'
  });

  $("a#invite_bbb_link").fancybox({
    'hideOnContentClick' : false,
    'frameWidth' : 450,
    'frameHeight' : 430
  });

  $("a#join_mobile_button").fancybox({
    'hideOnContentClick' : false,
    'frameWidth' : 250,
    'frameHeight' : 500
  });

  recListUpdateStart = function() {
    $("#update-recordings-loading").show();
  }

  recListUpdateEnd = function(error) {
    $("#update-recordings-loading").hide();
    if (error) {
      $("#update-recordings-error").show();
      window.setTimeout(function() {
        $("#update-recordings-error").hide();
      }, 5000);
      $("#recording-list-wrapper").effect("highlight", { color: "#ff0000"}, 5000);
    } else {
      $("#update-recordings-success").show();
      window.setTimeout(function() {
        $("#update-recordings-success").hide();
      }, 5000);
      if ($("#recording-list-wrapper").is(":visible")) {
        $("#recording-list-wrapper").effect("highlight", { color: "#00ff00"}, 5000);
      }
    }
  }

  populateList = function(showMessage) {
    $.get("<%= recordings_space_path(@space, :partial => '1', :limit => 3) %>", {
      authenticity_token: "<%= form_authenticity_token() %>"
    }).fail(function() {
      if (showMessage == true)
        recListUpdateEnd(true);
    }).success(function(data) {
      if (data.trim() != "") {
        $("#recording-list-wrapper").show();
        $("#recording-list-wrapper").html(data);
      } else {
        $("#recording-list-wrapper").hide();
      }
      if (showMessage == true)
        recListUpdateEnd(false);
    });
  }
  
  <% if logged_in? %>
    recListUpdateStart();
    $.post("<%= fetch_recordings_bigbluebutton_room_path(@room, :format => 'json') %>", {
      authenticity_token: "<%= form_authenticity_token() %>"
    }, null, "html").fail(function() {
      recListUpdateEnd(true);
    }).success(function(data) {
      populateList(true);
    });
  <% else %>
    populateList(false);
  <% end %>
<% end %>

<%= content_for :search do  %>
  <%= render :partial => 'search/form' %>
<% end %>

<%= content_for :sidebar do  %>
  <%= render :partial => 'sidebar' %>
<% end %>

<div id="space_webconference_description">
  <% status = @room.is_running? ? t('webconference.running')+"!" : t('webconference.not_running') %>
  <%= t('webconference.space.description', :status => status).html_safe %>

  <div class="url_share">
    <div class="video_share">
      <span><%= t('webconference.space.share') %></span>
    </div>
    <span class="only_url"><%= t('url_plain') %>: </span><span class="blue"><%= join_webconf_url(@room) %></span>
    <% if logged_in? %>
      <div class="invite_button">
        <%= link_to t('button.invite'), inviteroom_invite_path(:type => "webconference", :room => space.bigbluebutton_room.to_param), :id => 'invite_bbb_link', :class => 'basic_button' %>
      </div>
    <% end %>
  </div>
</div>
{'fraction_non_alphanumeric': 0.20951057588389688, 'fraction_numerical': 0.012197004786166435, 'mean_word_length': 3.558761435608726, 'pattern_counts': {'":': 2, '<': 78, '<?xml version=': 0, '>': 98, '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': '7233831', 'n_tokens_mistral': 2265, 'n_tokens_neox': 2120, 'n_words': 367}