<commit_before><% content_for :head do %>
  <%= auto_discovery_link_tag(:rss, {:controller => 'pitches', :action => 'blog_posts', :id => @pitch.id, :format => 'rss'}) %>
  <script>
    jQuery(document).ready(function($){
       jQuery("#show_action_items").click(function(){
          jQuery.facebox(jQuery("#action_buttons").html());
       });
       jQuery(".tab").click(function(){
          $(this).parent().parent().parent().find(".tab_panel").hide();
          $("." + $(this).attr("id")).show();
          $(this).parent().parent().find(".tab").removeClass("active");
          $(this).addClass("active");
          return false;
       });
    });
  </script>
<% end %>
<% @title = "Spot.us - Pitch: #{h @pitch.headline}" %>

<% if @subscriber && @subscriber.errors.any? %>
  <div class="error">
    <%= error_messages_for :subscriber %>
  </div>
<% end %>

<div id="news_item">
   <div id="news_item_header">
      <img width="62" height="53" align="left" style="padding-right: 10px;" src="/images/new_design/pitch.png"/>
      <h2 class="headline"><%= h @pitch.headline %></h2>
   </div>
   <div class="right-column">
      <%= render :partial => 'action_buttons', :locals => {:pitch => @pitch} %>
      <div class="right-panel-box">
         <div class="donate_option">
         <h2>MAKE A DIFFERENCE</h2>
         <%= render :partial => "donations/button", :locals => { :news_item => @pitch } %>
         <%= due_date_in_words(@pitch.expiration_date) %>
         </div>
         <div class="donate_option">
         <%= link_to image_tag("/images/new_design/donate-talent.png", :class => "display_block"), pitch_assignments_path(@pitch), :title => 'Join Reporting Team' %>
         <%= link_to(pluralize(@pitch.assignments.open.size, "assignments"), pitch_assignments_path(@pitch)) %>
         </div>
      </div>
   
      <div class="right-panel-box clearfix">
         <div class="share">
         <h3>Share</h3>
			<a title="Share this Pitch on Facebook" target="_blank" rel="nofollow" href="http://www.facebook.com/share.php?u=<%=@pitch.short_url(request.url)%>&amp;t=<%= h @pitch.status_update(false) %>">
		 		<%= image_tag("/images/new_design/facebook.png") %>
			</a>
			<a  target="_blank" rel="nofollow" href="http://twitter.com/home?status=<%=h @pitch.status_update %>%>" title="Share this Pitch on Twitter"><%= image_tag("/images/new_design/twitter.png") %></a>
         </div>
         <div class="subscribe">
         <%= render :partial => 'subscriber_form', :locals => {:pitch => @pitch} %>
         <img align="right" src="update-button.png"/>
         </div>
      </div>
      
      <div id="supporters">
          <%= render :partial => "news_items/organizational_supporters", :locals => {:news_item => @pitch} %>
          <%= render :partial => "group_supporters", :locals => {:news_item => @pitch} %>
          <%= render :partial => "supporters", :locals => {:news_item => @pitch} %>
      </div>
   </div>
   <div class="main-column">
      <div class="folded-headers-big">
         <div class="news_item_author">
            <%= link_to image_tag(@pitch.user.photo(:thumb), :class => "avatar"), profile_path(@pitch.user) %>
            <h5>Author</h5>
            <%= link_to @pitch.user.full_name, profile_path(@pitch.user), :class => "username" %>
         </div>
         <% if @pitch.peer_reviewer %>
         <div class="news_item_author">
            <%= link_to(image_tag(@pitch.peer_reviewer.photo.url(:thumb), :class => "avatar"), profile_path(@pitch.peer_reviewer)) %>
            <h5>Peer Review Editor</h5>
            <%= link_to(h(@pitch.peer_reviewer.full_name), profile_path(@pitch.peer_reviewer), :class => "username") %>
         </div>
         <% end %>
      </div>
      <% unless @pitch.video_embed.blank? %>
         <div class="media-box">
            <h3>Multimedia</h3>
            <div class="align-center">
               <%= @pitch.video_embed %>
            </div>
         </div>
      <% end %>
      <div id="news_item_info">
         <div>
            <ul class="tabs">
               <li><a id="description_tab" href="" class="tab active">Description</a></li>
               <li><a id="story_tab" href="" class="tab">Story updates</a></li>
               <li><a id="comments_tab" href="" class="tab">Comments (<%=@pitch.comments.size%>)</a></li>
			   <li><a id="deliverables_tab" href="" class="tab">Deliverables</a></li>
               <li><a id="assignments_tab" href="" class="tab">Assignments</a></li>
            </ul>
            <div class="description_tab tab_panel clearfix">
               <%= image_tag(@pitch.featured_image.url(:medium), :class => "featured_image") %>
               <%= @pitch.short_description %>
            </div>
            <div class="how_tab tab_panel hide">
               <%= @pitch.extended_description %>
            </div>
            <div class="story_tab tab_panel hide">
               <h2>Story Updates</h2>
               <% if @pitch.posts.any? %>
                  <ul>
                  <% @pitch.posts.each do |post| %>
                     <li>
                        <h4 class="title"><%= link_to h(post.title), pitch_post_path(@pitch, post) %></h4>
                        <div class="date"><%= medium_date(post.created_at) %></div>
                        <%= truncate_words(strip_html(post.body), 20) %>
                     </li>
                  <% end %>
                  </ul>
               <% else %>
                  <p>
                     <em>This story has no blog posts.</em>
                  </p>
               <% end %>
            </div>
            <div class="comments_tab tab_panel hide">
               <ul>
               <% @pitch.comments.each do |comment| %>
                  <li>
                     <h5><%= comment.title %></h5>
                     <%= link_to image_tag(comment.user.photo(:medium), :class => "avatar"), profile_path(comment.user) %>
                     <div class="comment"><%= comment.body %>
                        by <%= link_to comment.user.full_name, profile_path(comment.user) %> on <%= comment.created_at.to_s(:long_date) %>
                     </div>
                  </li>
               <% end %>
               <% if !@pitch.comments.any? %>
                  <li>There are no comments yet, be the first!</li>
               <% end %>
               </ul>
               <h3>Post A Comment</h3>
               <% form_for [@pitch, Comment.new(:commentable => @pitch)], :html => { :id => 'comments_form', :class => "auth" } do |f| %>
                  <%= render :partial => 'comments/form', :locals => {:f => f} %>
               <% end %>
            </div>
			<div class="deliverables_tab tab_panel hide">
               <%= h @pitch.delivery_description %>
            </div>
            <div class="assignments_tab tab_panel hide">
               <% if @pitch.assignments.any? %>
                  <%= render :partial => 'assignments', :locals => {:pitch => @pitch}%>
               <% else %>
                  no assignments
               <% end %>
            </div>
         </div>
         <br/><br/>
         <div>
            <ul class="tabs">
               <li><a id="qualifications_tab" href="" class="tab active">Qualifications</a></li>
            </ul>
            <div class="qualifications_tab tab_panel">
               <%= h @pitch.skills %>
            </div>
         </div>
      </div>
   </div>
</div>
<commit_msg>moving deliverables, adding counts to assignments and story updates, only show how will it help if the field is not null (in effect for old pitches)<commit_after><% content_for :head do %>
  <%= auto_discovery_link_tag(:rss, {:controller => 'pitches', :action => 'blog_posts', :id => @pitch.id, :format => 'rss'}) %>
  <script>
    jQuery(document).ready(function($){
       jQuery("#show_action_items").click(function(){
          jQuery.facebox(jQuery("#action_buttons").html());
       });
       jQuery(".tab").click(function(){
          $(this).parent().parent().parent().find(".tab_panel").hide();
          $("." + $(this).attr("id")).show();
          $(this).parent().parent().find(".tab").removeClass("active");
          $(this).addClass("active");
          return false;
       });
    });
  </script>
<% end %>
<% @title = "Spot.us - Pitch: #{h @pitch.headline}" %>

<% if @subscriber && @subscriber.errors.any? %>
  <div class="error">
    <%= error_messages_for :subscriber %>
  </div>
<% end %>

<div id="news_item">
   <div id="news_item_header">
      <img width="62" height="53" align="left" style="padding-right: 10px;" src="/images/new_design/pitch.png"/>
      <h2 class="headline"><%= h @pitch.headline %></h2>
   </div>
   <div class="right-column">
      <%= render :partial => 'action_buttons', :locals => {:pitch => @pitch} %>
      <div class="right-panel-box">
         <div class="donate_option">
         <h2>MAKE A DIFFERENCE</h2>
         <%= render :partial => "donations/button", :locals => { :news_item => @pitch } %>
         <%= due_date_in_words(@pitch.expiration_date) %>
         </div>
         <div class="donate_option">
         <%= link_to image_tag("/images/new_design/donate-talent.png", :class => "display_block"), pitch_assignments_path(@pitch), :title => 'Join Reporting Team' %>
         <%= link_to(pluralize(@pitch.assignments.open.size, "assignments"), pitch_assignments_path(@pitch)) %>
         </div>
      </div>
   
      <div class="right-panel-box clearfix">
         <div class="share">
         <h3>Share</h3>
			<a title="Share this Pitch on Facebook" target="_blank" rel="nofollow" href="http://www.facebook.com/share.php?u=<%=@pitch.short_url(request.url)%>&amp;t=<%= h @pitch.status_update(false) %>">
		 		<%= image_tag("/images/new_design/facebook.png") %>
			</a>
			<a  target="_blank" rel="nofollow" href="http://twitter.com/home?status=<%=h @pitch.status_update %>%>" title="Share this Pitch on Twitter"><%= image_tag("/images/new_design/twitter.png") %></a>
         </div>
         <div class="subscribe">
         <%= render :partial => 'subscriber_form', :locals => {:pitch => @pitch} %>
         <img align="right" src="update-button.png"/>
         </div>
      </div>
      
      <div id="supporters">
          <%= render :partial => "news_items/organizational_supporters", :locals => {:news_item => @pitch} %>
          <%= render :partial => "group_supporters", :locals => {:news_item => @pitch} %>
          <%= render :partial => "supporters", :locals => {:news_item => @pitch} %>
      </div>
   </div>
   <div class="main-column">
      <div class="folded-headers-big">
         <div class="news_item_author">
            <%= link_to image_tag(@pitch.user.photo(:thumb), :class => "avatar"), profile_path(@pitch.user) %>
            <h5>Author</h5>
            <%= link_to @pitch.user.full_name, profile_path(@pitch.user), :class => "username" %>
         </div>
         <% if @pitch.peer_reviewer %>
         <div class="news_item_author">
            <%= link_to(image_tag(@pitch.peer_reviewer.photo.url(:thumb), :class => "avatar"), profile_path(@pitch.peer_reviewer)) %>
            <h5>Peer Review Editor</h5>
            <%= link_to(h(@pitch.peer_reviewer.full_name), profile_path(@pitch.peer_reviewer), :class => "username") %>
         </div>
         <% end %>
      </div>
      <% unless @pitch.video_embed.blank? %>
         <div class="media-box">
            <h3>Multimedia</h3>
            <div class="align-center">
               <%= @pitch.video_embed %>
            </div>
         </div>
      <% end %>
      <div id="news_item_info">
         <div>
            <ul class="tabs">
               <li><a id="description_tab" href="" class="tab active">Description</a></li>
               <li><a id="story_tab" href="" class="tab">Story updates (<%=@pitch.posts.size%>)</a></li>
               <li><a id="comments_tab" href="" class="tab">Comments (<%=@pitch.comments.size%>)</a></li>
               <li><a id="assignments_tab" href="" class="tab">Assignments (<%=@pitch.assignments.size%>)</a></li>
            </ul>
            <div class="description_tab tab_panel clearfix">
               <%= image_tag(@pitch.featured_image.url(:medium), :class => "featured_image") %>
               <%= @pitch.short_description %>
				<%unless @pitch.extended_description.blank?%>
            		<h3>How will it help?</h3>
					<p>
						<%= @pitch.extended_description %>
					</p>
				<%end%>
			</div>
            <div class="story_tab tab_panel hide">
               <h2>Story Updates</h2>
               <% if @pitch.posts.any? %>
                  <ul>
                  <% @pitch.posts.each do |post| %>
                     <li>
                        <h4 class="title"><%= link_to h(post.title), pitch_post_path(@pitch, post) %></h4>
                        <div class="date"><%= medium_date(post.created_at) %></div>
                        <%= post.body %>
                     </li>
                  <% end %>
                  </ul>
               <% else %>
                  <p>
                     <em>This story has no blog posts.</em>
                  </p>
               <% end %>
            </div>
            <div class="comments_tab tab_panel hide">
               <ul>
               <% @pitch.comments.each do |comment| %>
                  <li>
                     <h5><%= comment.title %></h5>
                     <%= link_to image_tag(comment.user.photo(:medium), :class => "avatar"), profile_path(comment.user) %>
                     <div class="comment"><%= comment.body %>
                        by <%= link_to comment.user.full_name, profile_path(comment.user) %> on <%= comment.created_at.to_s(:long_date) %>
                     </div>
                  </li>
               <% end %>
               <% if !@pitch.comments.any? %>
                  <li>There are no comments yet, be the first!</li>
               <% end %>
               </ul>
               <h3>Post A Comment</h3>
               <% form_for [@pitch, Comment.new(:commentable => @pitch)], :html => { :id => 'comments_form', :class => "auth" } do |f| %>
                  <%= render :partial => 'comments/form', :locals => {:f => f} %>
               <% end %>
            </div>
            <div class="assignments_tab tab_panel hide">
               <% if @pitch.assignments.any? %>
                  <%= render :partial => 'assignments', :locals => {:pitch => @pitch}%>
               <% else %>
                  no assignments
               <% end %>
            </div>
         </div>
         <br/><br/>
         <div>
            <ul class="tabs">
               <li><a id="qualifications_tab" href="" class="tab active">Qualifications</a></li>
				<li><a id="deliverables_tab" href="" class="tab">Deliverables</a></li>
            </ul>
            <div class="qualifications_tab tab_panel">
               <%= h @pitch.skills %>
            </div>
			<div class="deliverables_tab tab_panel hide">
               <%= h @pitch.delivery_description %>
            </div>
         </div>
      </div>
   </div>
</div>

{'fraction_non_alphanumeric': 0.19075412880546527, 'fraction_numerical': 0.003714266763945082, 'mean_word_length': 2.030144694533762, 'pattern_counts': {'":': 0, '<': 391, '<?xml version=': 0, '>': 473, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '497441', 'n_tokens_mistral': 5009, 'n_tokens_neox': 4529, 'n_words': 834}