<commit_before><%#
Copyright 2011-2013, The Trustees of Indiana University and Northwestern
  University.  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed 
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  CONDITIONS OF ANY KIND, either express or implied. See the License for the 
  specific language governing permissions and limitations under the License.
---  END LICENSE_HEADER BLOCK  ---
%>
<ul class="nav nav-tabs share-tabs">
  <li class="active"><a href="#link-tab" data-toggle="tab">Share this resource</a></li>
  <li><a href="#embed-tab" data-toggle="tab">Embed</a></li>
</ul>

<div class="tab-content">
  <div class="tab-pane active" id="link-tab">
    <p class="muted">Copy the link below to share this resource</p>
    <form role="form">
    <div class="form-group">
    <label for="link-object">Object</label>
    <input type="text" class="span5 form-control" id="link-object" value="<%= share_link_for(@mediaobject) %>" onClick="this.select();">
    </div>
    <div class="form-group">
    <label for="link-section">Section</label>
    <input type="text" class="span5 form-control" id="link-section" value="<%= share_link_for(@currentStream) %>" onClick="this.select();">
    </div>
    </form>
  </div>
  <% unless @currentStream.blank? %>
  <div class="tab-pane" id="embed-tab">
    <p class="muted">Copy the text below to embed this resource</p>
    <textarea class="span6" rows="3" id="embed-part" onClick="this.select();"><%= @currentStream.embed_code(MasterFile::EMBED_SIZE[:medium], request.host) %></textarea>
  </div>
  <% end %>
</div>

<% content_for :page_scripts do %>

<script>
  $(document).ready(function() {
    $(document).on('streamswitch', function(e, stream_info){
      var shareLink = $('a.current-stream').data('share-link')
      $('#link-section').val(shareLink);
      if (stream_info != null) {
        $('#embed-part').text(stream_info.embed_code);
      }
    });
    $('.share-tabs a').click(function (e) {
      e.preventDefault();
      $(this).tab('show');
    });
  })
</script>

<% end %>
<commit_msg>discovered this because my dev server runs on port 3000<commit_after><%#
Copyright 2011-2013, The Trustees of Indiana University and Northwestern
  University.  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed 
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  CONDITIONS OF ANY KIND, either express or implied. See the License for the 
  specific language governing permissions and limitations under the License.
---  END LICENSE_HEADER BLOCK  ---
%>
<% @host = URI("#{request.host}:#{request.port}").to_s %>

<ul class="nav nav-tabs share-tabs">
  <li class="active"><a href="#link-tab" data-toggle="tab">Share this resource</a></li>
  <li><a href="#embed-tab" data-toggle="tab">Embed</a></li>
</ul>

<div class="tab-content">
  <div class="tab-pane active" id="link-tab">
    <p class="muted">Copy the link below to share this resource</p>
    <form role="form">
    <div class="form-group">
    <label for="link-object">Object</label>
    <input type="text" class="span5 form-control" id="link-object" value="<%= share_link_for(@mediaobject) %>" onClick="this.select();">
    </div>
    <div class="form-group">
    <label for="link-section">Section</label>
    <input type="text" class="span5 form-control" id="link-section" value="<%= share_link_for(@currentStream) %>" onClick="this.select();">
    </div>
    </form>
  </div>
  <% unless @currentStream.blank? %>
  <div class="tab-pane" id="embed-tab">
    <p class="muted">Copy the text below to embed this resource</p>
    <textarea class="span6" rows="3" id="embed-part" onClick="this.select();"><%= @currentStream.embed_code(MasterFile::EMBED_SIZE[:medium], @host) %></textarea>
  </div>
  <% end %>
</div>

<% content_for :page_scripts do %>

<script>
  $(document).ready(function() {
    $(document).on('streamswitch', function(e, stream_info){
      var shareLink = $('a.current-stream').data('share-link')
      $('#link-section').val(shareLink);
      if (stream_info != null) {
        $('#embed-part').text(stream_info.embed_code);
      }
    });
    $('.share-tabs a').click(function (e) {
      e.preventDefault();
      $(this).tab('show');
    });
  })
</script>

<% end %>

{'fraction_non_alphanumeric': 0.1757040773434216, 'fraction_numerical': 0.007566204287515763, 'mean_word_length': 4.139308855291577, 'pattern_counts': {'":': 0, '<': 92, '<?xml version=': 0, '>': 92, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1353415', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1481, 'n_words': 409}