<commit_before><div class="manager-tools">
	<h2 class="font-1">Manage this campaign</h2>
	<div class="manager-tools-inner">
		
		<%- if !@campaign.recommended_assignments.empty? %>
		<div class="recommended-actions">
			<h3 class="font-1">Recommended actions</h3>
			<ul>
			  <%- @campaign.recommended_assignments.each do |assignment| %>
				<li>			  
				 	<a href="<%= edit_campaign_assignment_path(assignment.campaign, assignment) %>">
	  					<span class="icon big <%=assignment_icon(assignment) %>"></span>
 						<div>
							<h4><%= assignment_title(assignment) %></h4>
							<p><%= assignment_details(assignment) %></p>
						</div>
					</a>
				</li>
				<%- end %>
			</ul>
		</div>
		<%- end %>
		
		
		<div class="actions">
			<h3 class="font-1">Actions</h3>
			<ul>
				<li>
					<a href="<%= raw add_update_campaign_url(@campaign, :is_advice_request => true) %>" class="advice-trigger">
						<span class="icon question"></span>
						Ask an expert
					</a>
				</li>
				<li>
					<a href="<%= raw add_photos_campaign_url(@campaign) %>" class="add-photos-trigger">
						<span class="icon camera"></span>
						Add images
					</a>
				</li>
				<%- if @campaign.status != :successful %>
				  <%- form_for @campaign, :url => complete_campaign_url(@campaign), :html => { :method => 'POST', :id => 'campaign-complete' } do |f| %>
				<li>
					<button type="submit">
						<span class="icon tick"></span>
						Mark as complete
					</button>
				</li>
				  <%- end %>
				<%- end %>
				<li>
					<a href="<%=edit_campaign_path(@campaign) %>">
						<span class="icon pencil"></span>
						Edit description
					</a>
				</li>
				
				<%- @campaign.assignments.is_new.each do |assignment| %>
          <%- if assignment.task_type == 'find_transport_organization' %>
           <li>
   					 	<a href="<%= edit_campaign_assignment_path(assignment.problem.campaign, assignment) %>">
     						<span class="icon person"></span>
     						Find operator
     					</a>
   				</li>
           <%- end %>
           <%- if assignment.task_type == 'find_transport_organization_contact_details' %>
            <li>
    					 	<a href="<%= edit_campaign_assignment_path(assignment.problem.campaign, assignment) %>">
      						<span class="icon person"></span>
      						Add contact
      					</a>
    				</li>
            <%- end %>
        <%- end %>
			</ul>
		</div>
		
		<%- if !@campaign.existing_recipients.empty? %>
		
  		<div class="contacts">
  			<h3 class="font-1">Your contacts</h3>
  			<p>Useful people, that may be able to help with your campaign</p>
  			<ul>
  			  <%- @campaign.existing_recipients.each do |recipient| %>           
            <li>
    					<a href="<%= new_campaign_outgoing_message_path(@campaign, :recipient_type => recipient.type, :recipient_id => recipient.id) %>" class="button orange email right">Email</a>
    					<h4><%= recipient.name %></h4>
    					<p><%= contact_description(recipient.type.to_s, @campaign) %></p>
    				</li>
          <%- end %>
        
          <%- @campaign.assignments_with_contacts.each do |assignment| %>
             <li>
     					<a href="<%= new_campaign_outgoing_message_path(@campaign, :assignment_id => assignment.id) %>" class="button orange email right">Email</a>
     					<h4><%= assignment.data[:name] %></h4>
     					<p><%= assignment.data[:description] %></p>
     				</li>
          <%- end %>
  			</ul>
  		</div>
  		
		<%- end %>
		
		<div class="share-update">
			<h3 class="font-1">What's happening?</h3>
			<%- form_for @campaign_update ||= CampaignUpdate.new, :url => add_update_campaign_url(@campaign), :html => {:id => 'campaign-update-form-static'} do |f| %>
			<div class='fieldset'>
          		<div class='form-field'>
          			<div class='error', id="error-text" style="display: none;"></div>
              
            		<%= raw f.hidden_field :is_advice_request %>
      				<input type="text" name="campaign_update[text]" id="campaign_update_text"/>
      				<button type="submit">Post</button>
      				<label for="post-update">Keep supporters up-to-date on how the campaign is progressing.</label>          
				</div>
			</div>
			<%- end %>
		</div>
		
	</div>
</div><commit_msg>Nicer error message position for share an update bit.<commit_after><div class="manager-tools">
	<h2 class="font-1">Manage this campaign</h2>
	<div class="manager-tools-inner">
		
		<%- if !@campaign.recommended_assignments.empty? %>
		<div class="recommended-actions">
			<h3 class="font-1">Recommended actions</h3>
			<ul>
			  <%- @campaign.recommended_assignments.each do |assignment| %>
				<li>			  
				 	<a href="<%= edit_campaign_assignment_path(assignment.campaign, assignment) %>">
	  					<span class="icon big <%=assignment_icon(assignment) %>"></span>
 						<div>
							<h4><%= assignment_title(assignment) %></h4>
							<p><%= assignment_details(assignment) %></p>
						</div>
					</a>
				</li>
				<%- end %>
			</ul>
		</div>
		<%- end %>
		
		
		<div class="actions">
			<h3 class="font-1">Actions</h3>
			<ul>
				<li>
					<a href="<%= raw add_update_campaign_url(@campaign, :is_advice_request => true) %>" class="advice-trigger">
						<span class="icon question"></span>
						Ask an expert
					</a>
				</li>
				<li>
					<a href="<%= raw add_photos_campaign_url(@campaign) %>" class="add-photos-trigger">
						<span class="icon camera"></span>
						Add images
					</a>
				</li>
				<%- if @campaign.status != :successful %>
				  <%- form_for @campaign, :url => complete_campaign_url(@campaign), :html => { :method => 'POST', :id => 'campaign-complete' } do |f| %>
				<li>
					<button type="submit">
						<span class="icon tick"></span>
						Mark as complete
					</button>
				</li>
				  <%- end %>
				<%- end %>
				<li>
					<a href="<%=edit_campaign_path(@campaign) %>">
						<span class="icon pencil"></span>
						Edit description
					</a>
				</li>
				
				<%- @campaign.assignments.is_new.each do |assignment| %>
          <%- if assignment.task_type == 'find_transport_organization' %>
           <li>
   					 	<a href="<%= edit_campaign_assignment_path(assignment.problem.campaign, assignment) %>">
     						<span class="icon person"></span>
     						Find operator
     					</a>
   				</li>
           <%- end %>
           <%- if assignment.task_type == 'find_transport_organization_contact_details' %>
            <li>
    					 	<a href="<%= edit_campaign_assignment_path(assignment.problem.campaign, assignment) %>">
      						<span class="icon person"></span>
      						Add contact
      					</a>
    				</li>
            <%- end %>
        <%- end %>
			</ul>
		</div>
		
		<%- if !@campaign.existing_recipients.empty? %>
		
  		<div class="contacts">
  			<h3 class="font-1">Your contacts</h3>
  			<p>Useful people, that may be able to help with your campaign</p>
  			<ul>
  			  <%- @campaign.existing_recipients.each do |recipient| %>           
            <li>
    					<a href="<%= new_campaign_outgoing_message_path(@campaign, :recipient_type => recipient.type, :recipient_id => recipient.id) %>" class="button orange email right">Email</a>
    					<h4><%= recipient.name %></h4>
    					<p><%= contact_description(recipient.type.to_s, @campaign) %></p>
    				</li>
          <%- end %>
        
          <%- @campaign.assignments_with_contacts.each do |assignment| %>
             <li>
     					<a href="<%= new_campaign_outgoing_message_path(@campaign, :assignment_id => assignment.id) %>" class="button orange email right">Email</a>
     					<h4><%= assignment.data[:name] %></h4>
     					<p><%= assignment.data[:description] %></p>
     				</li>
          <%- end %>
  			</ul>
  		</div>
  		
		<%- end %>
		
		<div class="share-update">
			<h3 class="font-1">What's happening?</h3>
			<%- form_for @campaign_update ||= CampaignUpdate.new, :url => add_update_campaign_url(@campaign), :html => {:id => 'campaign-update-form-static'} do |f| %>
			<div class='fieldset'>
          		<div class='form-field'>
          			<%= raw f.hidden_field :is_advice_request %>
      				<input type="text" name="campaign_update[text]" id="campaign_update_text"/>
      				<button type="submit">Post</button>
					<div class='error', id="error-text" style="display: none;"></div>
      				<label for="post-update">Keep supporters up-to-date on how the campaign is progressing.</label>          
				</div>
			</div>
			<%- end %>
		</div>
		
	</div>
</div>
{'fraction_non_alphanumeric': 0.18419187145557656, 'fraction_numerical': 0.00496219281663516, 'mean_word_length': 2.4721082854799015, 'pattern_counts': {'":': 0, '<': 289, '<?xml version=': 0, '>': 311, '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': '4141139', 'n_tokens_mistral': 3661, 'n_tokens_neox': 2836, 'n_words': 543}