<commit_before><div id="droplet-list" class="trend-container cf">
	<h2 class="null no-content"><?php echo __('Nothing to display yet.'); ?></h2>
</div>
<div class="page_buttons cf" id="next_page_button">
    <p class="button-view"></p>
</div>

<script type="text/template" id="droplet-template">
	<div class="summary cf">
		<section class="source <%= channel %>">
			<a><img src="<%= identity_avatar %>" /></a>			
				<div class="actions">
					<span class="type"></span>
					<p class="button-change score"><a class="<%=scores ? 'scored' : '' %>"><span><%= scores ? scores : 0 %></span></a><p>
					<div class="clear"></div>					
					 <ul class="dropdown left">
						<!-- Show whether droplet has been scored before -->								
						<p style="<%= user_score ? '': 'display:none;' %>"><?php echo __("You have scored this droplet before. Change your score below?"); ?></p>						
					 	<li class="confirm" style="<%= parseInt(user_score) == 1 ? 'display:none;' : ''  %>"><a><?php echo  __("This is useful"); ?></a></li>
					 	<li class="not_useful" style="<%= parseInt(user_score) == -1 ? 'display:none;' : ''  %>"><a><?php echo __("This is not useful"); ?></a></li>
					 </ul>
				</div>
		</section>
		<section class="content">
			<hgroup>
				<p class="date"><%= new Date(droplet_date_pub).toLocaleString() %></p>
				<strong><a><%= droplet_title %></a></strong>
			</hgroup>
			<div class="body">
				<p><%= identity_name %></p>
			</div>
		</section>
		<section class="actions two_buttons">
			<p class="button-view"><a class="detail-view"><span class="icon"></span></a></p>
			<div class="button bucket">
				<p class="button-change checkbox-options"><a class="bucket-view"><span class="icon"></span></a></p>
				<div class="clear"></div>
				<div class="dropdown">
					<div class="container buckets-list">
						<h3><?php echo __("Add to Bucket"); ?></h3>
						<ul></ul>
					</div>
					<div class="container">
						<p class="create-new">
							<a class="plus"><?php echo __("Create new bucket"); ?></a>
							<div class="loading"></div>
							<div class="system_error" style="display:none"></div>
							<div class="create-name">
								<input id="new-bucket-name" maxlength="25" type="text" value="" name="bucket_name" placeholder="<?php echo __("Name your new bucket"); ?>">
								<div class="buttons">
									<button class="save"><?php echo __("Save"); ?></button>
									<button class="cancel"><?php echo __("Cancel"); ?></button>
								</div>
							</div>
						</p>
					</div>
				</div>
			</div>
		</section>
	</div>

	<div class="drawer">
		<div class="detail">
			<div class="arrow top"><span></span></div>
			<div class="canyon cf">
				<section class="meta">
					<?php if ($owner): ?>
						<div class="item actions cf">
							<p class="button-delete cf"><a><?php echo __("Delete Drop"); ?></a></p>
							<ul class="dropdown left delete-droplet">
								<p><?php echo __("Are you sure you want to delete this droplet?"); ?></p>
                    	
								<li class="confirm"><a onclick=""><?php echo __("Yep."); ?></a></li>
								<li class="cancel"><a onclick=""><?php echo __("No, nevermind.") ?></a></li>
							</ul>
						</div>
					<?php endif; ?>

					<div class="item cf">
						<% if(tags.length > 0) { %>
							<h2><?php echo __("Tags") ?></h2>
						<% } %>
						<ul class="tags cf"></ul>
						<div class="loading"></div>
						<div class="system_error" style="display:none"></div>
						<?php if ($owner): ?>
							<div class="container" id="add-tag">
								<p class="create-new">
									<p class="button-change"><a><?php echo __("Add tag") ?></a></p>
									<div class="create-name">
										<input id="new-tag-name" type="text" value="" name="bucket_name" placeholder="<?php echo __("Name your new tag"); ?>">
										<div class="buttons">
											<button class="save"><?php echo __("Save"); ?></button>
											<button class="cancel"><?php echo __("Cancel"); ?></button>
										</div>
									</div>
								</p>
							</div>
						<?php endif; ?>
						
					</div>

					<div class="item cf">
						<% if (places.length > 0) { %>
							<h2><?php echo __("Location"); ?></h2>
						<% } %>
						<ul class="places"></ul>
					</div>

					<div class="item cf links">
						<% if (links.length > 0) { %>
							<h2><?php echo __("Links"); ?></h2>
						<% } %>
					</div>
                
					<?php if ($owner): ?>
					   <!-- Hide this till we figure it out
						<div class="item cf">
							<p class="button-change"><a><?php echo __("Add attachment"); ?></a></p>
						</div>
						-->
					<?php endif; ?>
				</section>

			<div class="content">
				<article class="fullstory">
					<hgroup>
						<h2><?php echo __('Full story'); ?></h2>
						<h1><span title="text" onclick=""><%= droplet_title %></span></h1>
					</hgroup>
					<div>
						<span>
						</span>
					</div>
				</article>
				
				<section class="discussion">
					<hgroup>
						<h2><?php echo __("Comments"); ?></h2>
					</hgroup>
					<div class="loading"></div>
					<div class="system_error" style="display:none"></div>
					<article class="item add-reply">
						<div class="summary cf">
							<section class="source">
								<a><img src="<?php echo Swiftriver_Users::gravatar($user->email, 45); ?>"></a>
							</section>
							<section class="content">
								<textarea rows="8" cols="60"></textarea>
								<p class="button-go"><a><?php echo __("Add Comment"); ?></a></p>
							</section>
						</div>
					</article>
				</section>
				
			</div>
		</div>
		<div class="arrow bottom"><a class="close"><?php echo __('Hide detail'); ?></a></div>
	</div>
	<div class="clear"></div>
</script>

<script type="text/template" id="bucket-template">
	<a class="<%= _.find(droplet_buckets, function(droplet_bucket) { return droplet_bucket['id'] == id }) ? 'selected' : '' %>"><span class="input"></span><%= bucket_name %></a>
</script>

<script type="text/template" id="tag-template">
	<?php if ($owner): ?>
		<span class="actions">
			<a href="#" class="button-delete cross"></a>
			<ul class="dropdown left">
				<p><?php echo __("Are you sure you want to remove this tag?"); ?></p>
		
				<li class="confirm"><a onclick=""><?php echo __("Yep."); ?></a></li>
				<li class="cancel"><a onclick=""><?php echo __("No, nevermind.") ?></a></li>
			</ul>
		</span>
	<?php endif; ?>
	<a class="tag-name"><%= tag %></a>
</script>

<script type="text/template" id="link-template">
	<% var link_short = url.substr(0, 27) + "..."; %>
	<span title="<%= url %>"><a href="<%= url %>"><%= link_short %></a></span>
</script><commit_msg>Fix to handle null url<commit_after><div id="droplet-list" class="trend-container cf">
	<h2 class="null no-content"><?php echo __('Nothing to display yet.'); ?></h2>
</div>
<div class="page_buttons cf" id="next_page_button">
    <p class="button-view"></p>
</div>

<script type="text/template" id="droplet-template">
	<div class="summary cf">
		<section class="source <%= channel %>">
			<a><img src="<%= identity_avatar %>" /></a>			
				<div class="actions">
					<span class="type"></span>
					<p class="button-change score"><a class="<%=scores ? 'scored' : '' %>"><span><%= scores ? scores : 0 %></span></a><p>
					<div class="clear"></div>					
					 <ul class="dropdown left">
						<!-- Show whether droplet has been scored before -->								
						<p style="<%= user_score ? '': 'display:none;' %>"><?php echo __("You have scored this droplet before. Change your score below?"); ?></p>						
					 	<li class="confirm" style="<%= parseInt(user_score) == 1 ? 'display:none;' : ''  %>"><a><?php echo  __("This is useful"); ?></a></li>
					 	<li class="not_useful" style="<%= parseInt(user_score) == -1 ? 'display:none;' : ''  %>"><a><?php echo __("This is not useful"); ?></a></li>
					 </ul>
				</div>
		</section>
		<section class="content">
			<hgroup>
				<p class="date"><%= new Date(droplet_date_pub).toLocaleString() %></p>
				<strong><a><%= droplet_title %></a></strong>
			</hgroup>
			<div class="body">
				<p><%= identity_name %></p>
			</div>
		</section>
		<section class="actions two_buttons">
			<p class="button-view"><a class="detail-view"><span class="icon"></span></a></p>
			<div class="button bucket">
				<p class="button-change checkbox-options"><a class="bucket-view"><span class="icon"></span></a></p>
				<div class="clear"></div>
				<div class="dropdown">
					<div class="container buckets-list">
						<h3><?php echo __("Add to Bucket"); ?></h3>
						<ul></ul>
					</div>
					<div class="container">
						<p class="create-new">
							<a class="plus"><?php echo __("Create new bucket"); ?></a>
							<div class="loading"></div>
							<div class="system_error" style="display:none"></div>
							<div class="create-name">
								<input id="new-bucket-name" maxlength="25" type="text" value="" name="bucket_name" placeholder="<?php echo __("Name your new bucket"); ?>">
								<div class="buttons">
									<button class="save"><?php echo __("Save"); ?></button>
									<button class="cancel"><?php echo __("Cancel"); ?></button>
								</div>
							</div>
						</p>
					</div>
				</div>
			</div>
		</section>
	</div>

	<div class="drawer">
		<div class="detail">
			<div class="arrow top"><span></span></div>
			<div class="canyon cf">
				<section class="meta">
					<?php if ($owner): ?>
						<div class="item actions cf">
							<p class="button-delete cf"><a><?php echo __("Delete Drop"); ?></a></p>
							<ul class="dropdown left delete-droplet">
								<p><?php echo __("Are you sure you want to delete this droplet?"); ?></p>
                    	
								<li class="confirm"><a onclick=""><?php echo __("Yep."); ?></a></li>
								<li class="cancel"><a onclick=""><?php echo __("No, nevermind.") ?></a></li>
							</ul>
						</div>
					<?php endif; ?>

					<div class="item cf">
						<% if(tags.length > 0) { %>
							<h2><?php echo __("Tags") ?></h2>
						<% } %>
						<ul class="tags cf"></ul>
						<div class="loading"></div>
						<div class="system_error" style="display:none"></div>
						<?php if ($owner): ?>
							<div class="container" id="add-tag">
								<p class="create-new">
									<p class="button-change"><a><?php echo __("Add tag") ?></a></p>
									<div class="create-name">
										<input id="new-tag-name" type="text" value="" name="bucket_name" placeholder="<?php echo __("Name your new tag"); ?>">
										<div class="buttons">
											<button class="save"><?php echo __("Save"); ?></button>
											<button class="cancel"><?php echo __("Cancel"); ?></button>
										</div>
									</div>
								</p>
							</div>
						<?php endif; ?>
						
					</div>

					<div class="item cf">
						<% if (places.length > 0) { %>
							<h2><?php echo __("Location"); ?></h2>
						<% } %>
						<ul class="places"></ul>
					</div>

					<div class="item cf links">
						<% if (links.length > 0) { %>
							<h2><?php echo __("Links"); ?></h2>
						<% } %>
					</div>
                
					<?php if ($owner): ?>
					   <!-- Hide this till we figure it out
						<div class="item cf">
							<p class="button-change"><a><?php echo __("Add attachment"); ?></a></p>
						</div>
						-->
					<?php endif; ?>
				</section>

			<div class="content">
				<article class="fullstory">
					<hgroup>
						<h2><?php echo __('Full story'); ?></h2>
						<h1><span title="text" onclick=""><%= droplet_title %></span></h1>
					</hgroup>
					<div>
						<span>
						</span>
					</div>
				</article>
				
				<section class="discussion">
					<hgroup>
						<h2><?php echo __("Comments"); ?></h2>
					</hgroup>
					<div class="loading"></div>
					<div class="system_error" style="display:none"></div>
					<article class="item add-reply">
						<div class="summary cf">
							<section class="source">
								<a><img src="<?php echo Swiftriver_Users::gravatar($user->email, 45); ?>"></a>
							</section>
							<section class="content">
								<textarea rows="8" cols="60"></textarea>
								<p class="button-go"><a><?php echo __("Add Comment"); ?></a></p>
							</section>
						</div>
					</article>
				</section>
				
			</div>
		</div>
		<div class="arrow bottom"><a class="close"><?php echo __('Hide detail'); ?></a></div>
	</div>
	<div class="clear"></div>
</script>

<script type="text/template" id="bucket-template">
	<a class="<%= _.find(droplet_buckets, function(droplet_bucket) { return droplet_bucket['id'] == id }) ? 'selected' : '' %>"><span class="input"></span><%= bucket_name %></a>
</script>

<script type="text/template" id="tag-template">
	<?php if ($owner): ?>
		<span class="actions">
			<a href="#" class="button-delete cross"></a>
			<ul class="dropdown left">
				<p><?php echo __("Are you sure you want to remove this tag?"); ?></p>
		
				<li class="confirm"><a onclick=""><?php echo __("Yep."); ?></a></li>
				<li class="cancel"><a onclick=""><?php echo __("No, nevermind.") ?></a></li>
			</ul>
		</span>
	<?php endif; ?>
	<a class="tag-name"><%= tag %></a>
</script>

<script type="text/template" id="link-template">
    <% if (url) { %>
		<% var link_short = url.substr(0, 27) + "..."; %>
		<span title="<%= url %>"><a href="<%= url %>"><%= link_short %></a></span>
	<% } %>
</script>
{'fraction_non_alphanumeric': 0.24182463560154066, 'fraction_numerical': 0.004833471792160713, 'mean_word_length': 2.894705882352941, 'pattern_counts': {'":': 0, '<': 637, '<?xml version=': 0, '>': 645, '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': '1877877', 'n_tokens_mistral': 5816, 'n_tokens_neox': 4399, 'n_words': 1071}