<commit_before><h2>Apps</h2>

<table class="table table-bordered table-striped">
	<thead>
		<tr>
			<th>Name</th>
			<th>Bundle ID</th>
			<th>Total Versions</th>
			<th>Last version</th>
			<th>Last Uploader</th>
			<th>Manage</th>
		</tr>
	</thead>

	<tbody>
		<% @apps.each do |app| %>
			<tr>
				<% lastVersion = app.app_versions.last %>
				<%# name %>
				<td><%= lastVersion ? lastVersion.app_name : "unavailable" %></td>
				<%# bundle id %>
				<td><%= app.bundle_id %></td>	
				<%# total versions %>
				<td><%= link_to app.app_versions.count.to_s + ' versions', '/admin/apps/' + app.id.to_s + '/versions' %></td>
				<%# last version %>
				<% lastVersionString = lastVersion.version.to_s + '(' + lastVersion.short_version.to_s + ')' + ' #' + lastVersion.beta_version.to_s %>
				<td><%= link_to lastVersionString, '/admin/appversion/' + app.id.to_s %></td>
				<%# last uploader %>
				<td><%= mail_to lastVersion.uploader_email %></td>	
				<%# manage %>
				<td>
					<%= link_to 'Delete All Versions', '/admin/apps/' + app.id.to_s + '/delete', data: {
		 					confirm: 'Are you sure? All versions of this app will be deleted.' 
						}
					%>
				</td>
			</tr>
		<% end %>
	</tbody>
</table><commit_msg>notice user when no app available in apps page<commit_after><h2>Apps</h2>

<% if @apps.count == 0 %>
	<h4>No app available.</h4>
	<h4>Please upload new apps in <%= link_to "Upload", "/admin/upload"%> page first.<h4>
<% else %>
	<table class="table table-bordered table-striped">
		<thead>
			<tr>
				<th>Name</th>
				<th>Bundle ID</th>
				<th>Total Versions</th>
				<th>Last version</th>
				<th>Last Uploader</th>
				<th>Manage</th>
			</tr>
		</thead>

		<tbody>
			<% @apps.each do |app| %>
				<tr>
					<% lastVersion = app.app_versions.last %>
					<%# name %>
					<td><%= lastVersion ? lastVersion.app_name : "unavailable" %></td>
					<%# bundle id %>
					<td><%= app.bundle_id %></td>	
					<%# total versions %>
					<td><%= link_to app.app_versions.count.to_s + ' versions', '/admin/apps/' + app.id.to_s + '/versions' %></td>
					<%# last version %>
					<% lastVersionString = lastVersion.version.to_s + '(' + lastVersion.short_version.to_s + ')' + ' #' + lastVersion.beta_version.to_s %>
					<td><%= link_to lastVersionString, '/admin/appversion/' + app.id.to_s %></td>
					<%# last uploader %>
					<td><%= mail_to lastVersion.uploader_email %></td>	
					<%# manage %>
					<td>
						<%= link_to 'Delete All Versions', '/admin/apps/' + app.id.to_s + '/delete', data: {
			 					confirm: 'Are you sure? All versions of this app will be deleted.' 
							}
						%>
					</td>
				</tr>
			<% end %>
		</tbody>
	</table>
<% end %>
{'fraction_non_alphanumeric': 0.20964125560538116, 'fraction_numerical': 0.0033632286995515697, 'mean_word_length': 2.7917847025495752, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 0, '>': 115, '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': '2982884', 'n_tokens_mistral': 1273, 'n_tokens_neox': 1004, 'n_words': 209}