<commit_before>@extends('layout.main')

@section('content')

<div class="container">
	<div class="row">
		<div class="col-xs-12 text-center">
			<h4>Search results for your pattern:</h4>
		</div>
	</div>

	<div class="row">
		<div class="col-xs-12">
			{{ Form::hidden('pattern', json_encode(Cache::get('pattern')[0]), array('id' => 'patternValue')) }}
			<canvas id="patternCanvas" width="700" height="180"></canvas>
		</div>
	</div>
</div>

<div class="row text-center">
	<div class="col-xs-12">
		<h4>found in:</h4>
		<h2><span id="artist">{{ ResultController::_getArtist($result->file_id) }}</span> - <span id="title">{{ ResultController::_getTitle($result->file_id) }}</span></h2>
		<h5>({{ ResultController::_getFilename($result->file_id) }})</h5>
	</div>
</div>

<div id="extract-carousel" class="carousel slide" data-ride="carousel" data-interval="false">

	<div class="carousel-inner" role="listbox">
		<?php $countResultOccurences = count($result->occurences); for ($i = 0; $i < $countResultOccurences; $i++): ?>
			<?php
				$resultItem = $result->occurences[$i];
				$resultItem->file_id = $result->file_id;
				$resultItem->file_url = $result->file_url;
			?>
			<div id="item<?php echo $i; ?>" class="item<?php if ($i==0) echo ' active'; ?>">
				<div class="facts-list martop30">
					<div class="col-xs-1 col-xs-offset-1">
						<button id="playResult" onclick="ga('send', 'event', { eventCategory: 'Result Detail: Play', eventAction: 'Click' })" type="button" class="playResult btn btn-lg btn-primary"><span class="glyphicon glyphicon-play"></span> <span>Play</span></button>
						<button id="stopResult" onclick="ga('send', 'event', { eventCategory: 'Result Detail: Stop', eventAction: 'Click' })" type="button" class="stopResult btn btn-lg btn-primary"><span class="glyphicon glyphicon-stop"></span> <span>Stop</span></button>
					</div>
					<div class="col-xs-2 col-xs-offset-1 martop40">
						<h4>About the finding:</h4>
					</div>
					<div class="col-xs-3 martop40">
						<ul class="no-list">
							<li class="partName"><strong>Part name (Instrument):</strong> {{ ResultController::_getInstrument($result->file_id, $resultItem->part_id) }}</li>
							<li class="partId"><strong>Part ID:</strong> {{ $resultItem->part_id }}</li>
							<li class="voice"><strong>Voice:</strong> {{ $resultItem->voice }}</li>
						</ul>
					</div>
					<div class="col-xs-3 martop40">
						<ul class="no-list">
							<li class="key"><strong>Key:</strong> {{ ResultController::_getKey($result->file_id) }}</li>
							<li class="measures"></li>
						</ul>
					</div>
					<div class="col-xs-1 pull-right martop40">
						<button type="button" class="exportButton btn btn-lg btn-success pull-right"><span class="glyphicon glyphicon-file"></span> <span>Export as PDF</span></button>
					</div>
				</div>
				<center id="canvasContainer<?php echo $i; ?>"><commit_msg>Update result detail layout (also working on md)<commit_after>@extends('layout.main')

@section('content')

<div class="container">
	<div class="row">
		<div class="col-xs-12 text-center">
			<h4>Search results for your pattern:</h4>
		</div>
	</div>

	<div class="row">
		<div class="col-xs-12">
			{{ Form::hidden('pattern', json_encode(Cache::get('pattern')[0]), array('id' => 'patternValue')) }}
			<canvas id="patternCanvas" width="700" height="180"></canvas>
		</div>
	</div>
</div>

<div class="row text-center">
	<div class="col-xs-12">
		<h4>found in:</h4>
		<h2><span id="artist">{{ ResultController::_getArtist($result->file_id) }}</span> - <span id="title">{{ ResultController::_getTitle($result->file_id) }}</span></h2>
		<h5>({{ ResultController::_getFilename($result->file_id) }})</h5>
	</div>
</div>

<div id="extract-carousel" class="carousel slide" data-ride="carousel" data-interval="false">

	<div class="carousel-inner" role="listbox">
		<?php $countResultOccurences = count($result->occurences); for ($i = 0; $i < $countResultOccurences; $i++): ?>
			<?php
				$resultItem = $result->occurences[$i];
				$resultItem->file_id = $result->file_id;
				$resultItem->file_url = $result->file_url;
			?>
			<div id="item<?php echo $i; ?>" class="item<?php if ($i==0) echo ' active'; ?>">
				<div class="row">
					<div class="col-xs-6 col-xs-offset-3 martop30 text-center">
						<h4>About the finding:</h4>
					</div>
				</div>
				<div class="facts-list">
					<div class="col-xs-2 col-xs-offset-1">
						<button id="playResult" onclick="ga('send', 'event', { eventCategory: 'Result Detail: Play', eventAction: 'Click' })" type="button" class="playResult btn btn-lg btn-primary"><span class="glyphicon glyphicon-play"></span> <span>Play</span></button>
						<button id="stopResult" onclick="ga('send', 'event', { eventCategory: 'Result Detail: Stop', eventAction: 'Click' })" type="button" class="stopResult btn btn-lg btn-primary"><span class="glyphicon glyphicon-stop"></span> <span>Stop</span></button>
					</div>
					<div class="col-xs-3">
						<ul class="no-list">
							<li class="partName"><strong>Part name (Instrument):</strong> {{ ResultController::_getInstrument($result->file_id, $resultItem->part_id) }}</li>
							<li class="partId"><strong>Part ID:</strong> {{ $resultItem->part_id }}</li>
							<li class="voice"><strong>Voice:</strong> {{ $resultItem->voice }}</li>
						</ul>
					</div>
					<div class="col-xs-3">
						<ul class="no-list">
							<li class="key"><strong>Key:</strong> {{ ResultController::_getKey($result->file_id) }}</li>
							<li class="measures"></li>
						</ul>
					</div>
					<div class="col-xs-2 pull-right">
						<button type="button" class="exportButton btn btn-lg btn-success pull-right"><span class="glyphicon glyphicon-file"></span> <span>Export as PDF</span></button>
					</div>
				</div>
				<center id="canvasContainer<?php echo $i; ?>">
{'fraction_non_alphanumeric': 0.22185886402753874, 'fraction_numerical': 0.013080895008605853, 'mean_word_length': 4.492438563327032, 'pattern_counts': {'":': 0, '<': 189, '<?xml version=': 0, '>': 217, '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': '649958', 'n_tokens_mistral': 2333, 'n_tokens_neox': 1997, 'n_words': 395}