<commit_before><!-- resources/views/opnotes/opnote_create.blade.php -->

@extends('layouts.app')

@section('content')
@if(is_null($machineId))
<h2>Add operational note</h2>
@else
<h2>Add operational note for {{ $machines->description }}</h2>
@endif

<ol>
@foreach ($opNotes as $opNote)
    <li>{{ $opNote->note }}
        <a href="{{ route('opnotes.edit', $opNote->id) }}" class="btn btn-default btn-xs" role="button" data-toggle="tooltip" title="Edit operational note">
            <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
    </li>
@endforeach
</ol>

<form class="form-inline" action="{{ route('opnotes.store')}}" method="post">
    <div class="form-group">
        {{ csrf_field() }}
        <p>
        @if(is_null($machineId))
        <label for="machineId">Select a machine: </label>
        <select class="form-control" name="machineId">
        @foreach ($machines as $machine)
            <option value="{{ $machine->id }}">{{ $machine->description }}</option>
        @endforeach
        </select>
        @else
        <input type="hidden" name="machineId" value="{{ $machines->id }}">
        @endif
        </p>
        <p><label for="note">Operational note</label><br>
           <textarea name="note" rows="8" cols="80" placeholder="Enter operational note"></textarea></p>
        <p><button type="submit" name="submit">Submit</button></p>
    </div>
</form>
@endsection<commit_msg>Fix error when no op notes available to display<commit_after><!-- resources/views/opnotes/opnote_create.blade.php -->

@extends('layouts.app')

@section('content')
@if(is_null($machineId))
<h2>Add operational note</h2>
@else
<h2>Add operational note for {{ $machines->description }}</h2>
@endif

<ol>
@if(!is_null($opNotes))
@foreach ($opNotes as $opNote)
    <li>{{ $opNote->note }}
        <a href="{{ route('opnotes.edit', $opNote->id) }}" class="btn btn-default btn-xs" role="button" data-toggle="tooltip" title="Edit operational note">
            <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
    </li>
@endforeach
@endif
</ol>

<form class="form-inline" action="{{ route('opnotes.store')}}" method="post">
    <div class="form-group">
        {{ csrf_field() }}
        <p>
        @if(is_null($machineId))
        <label for="machineId">Select a machine: </label>
        <select class="form-control" name="machineId">
        @foreach ($machines as $machine)
            <option value="{{ $machine->id }}">{{ $machine->description }}</option>
        @endforeach
        </select>
        @else
        <input type="hidden" name="machineId" value="{{ $machines->id }}">
        @endif
        </p>
        <p><label for="note">Operational note</label><br>
           <textarea name="note" rows="8" cols="80" placeholder="Enter operational note"></textarea></p>
        <p><button type="submit" name="submit">Submit</button></p>
    </div>
</form>
@endsection
{'fraction_non_alphanumeric': 0.20198562136254708, 'fraction_numerical': 0.004792879150975694, 'mean_word_length': 3.488479262672811, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 89, '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': '2882756', 'n_tokens_mistral': 946, 'n_tokens_neox': 926, 'n_words': 199}