<commit_before>@extends('layout')

@section('resources')
<link rel="stylesheet" href="{{asset('assets/css/style.css')}}" />
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src=http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false"></script>
<script type="text/javascript">

function showAdvanced() {
    if (document.getElementById('advanced').checked) {
        document.getElementById('AdvancedField1').style.display = 'block';
		document.getElementById('AdvancedField2').style.display = 'block';
		document.getElementById('AdvancedField3').style.display = 'block';
    } else {
        document.getElementById('AdvancedField1').style.display = 'none';
		document.getElementById('AdvancedField2').style.display = 'none';
		document.getElementById('AdvancedField3').style.display = 'none';
    }
}

function initialize() {
    var mapProp = {
        center: new google.maps.LatLng(48.5, -122.4750),
        zoom: 8,
        mapTypeId: 'roadmap'
    };
    map = new google.maps.Map(document.getElementById("map-div"), mapProp);
    directionsDisplay = new google.maps.DirectionsRenderer();
}

function showRoute(routeDiv, to, from){

    var request = {
        origin: from,
        destination: to,
        travelMode: google.maps.TravelMode.DRIVING
    };

    directionsDisplay.setMap(map);
    directionService = new google.maps.DirectionsService();
    directionService.route(request, function(response, status){
        if(status == google.maps.DirectionsStatus.OK){
            //caching the response with a closure.
            routeDiv.onmouseover = function(){
                directionsDisplay.setDirections(response);
            }
            directionsDisplay.setDirections(response);
        }
    });
}

function hideRoute(){
    directionsDisplay.set('directions', null);
}

google.maps.event.addDomListener(window, 'load', initialize);

</script>
@stop

@section('content')

<h1 id="page-title">Find a Ride</h1>
<div id="map-div"></div>
<div id="rides-list">
    @if (Session::has('message'))
        <div class="alert alert-info">{{ Session::get('message') }}</div>
    @endif
    <div class="rides-list-tab">
        <input type="radio" id="tab-1" name="tab-group-1" checked>
        <label for="tab-1"><strong>Search Rides</strong></label>
        <div class="rides-list-content">
            {{ HTML::ul($errors->all()) }}
            <div id="rides-search-div">
                {{ Form::open(array('method'=>'get')) }}
                <div class="form-group">
                    {{ Form::label('to', 'To') }}
                    {{ Form::text('to', Input::old('to'), array('class' => 'form-control')) }}
                </div>
                <div class="form-group">
                    {{ Form::label('from', 'From') }}
                    {{ Form::text('from', Input::old('from'), array('class' => 'form-control')) }}
                </div>
                <div class="form-group">
                    {{ Form::label('advanced', 'Advanced') }}
                    {{ Form::checkbox('advanced', 1, false, array('id' => 'advanced', 'onclick' => 'showAdvanced()')) }}
                </div>
                <div class="form-group" id="AdvancedField1" style="display: none">
                	<label for="date">Date/Time</label>
                	<input class="form-control" type="datetime-local" name="date"/>
                </div>
                <div class="form-group" id="AdvancedField2" style="display: none"><commit_msg>Implemented places API but not working. Need some help.<commit_after>@extends('layout')

@section('resources')
<link rel="stylesheet" href="{{asset('assets/css/style.css')}}" />
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src=http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false&libraries=places"></script>
<script type="text/javascript">

function showAdvanced() {
    if (document.getElementById('advanced').checked) {
        document.getElementById('AdvancedField1').style.display = 'block';
		document.getElementById('AdvancedField2').style.display = 'block';
		document.getElementById('AdvancedField3').style.display = 'block';
    } else {
        document.getElementById('AdvancedField1').style.display = 'none';
		document.getElementById('AdvancedField2').style.display = 'none';
		document.getElementById('AdvancedField3').style.display = 'none';
    }
}

function initialize() {
    var mapProp = {
        center: new google.maps.LatLng(48.5, -122.4750),
        zoom: 8,
        mapTypeId: 'roadmap'
    };
    map = new google.maps.Map(document.getElementById("map-div"), mapProp);
    directionsDisplay = new google.maps.DirectionsRenderer();
	
	var input = document.getElementById('searchTextField');
	var options = {componentRestrictions: {country: 'us'}};
    
	var places = new google.maps.places.Autocomplete(input, options);
}

function showRoute(routeDiv, to, from){

    var request = {
        origin: from,
        destination: to,
        travelMode: google.maps.TravelMode.DRIVING
    };

    directionsDisplay.setMap(map);
    directionService = new google.maps.DirectionsService();
    directionService.route(request, function(response, status){
        if(status == google.maps.DirectionsStatus.OK){
            //caching the response with a closure.
            routeDiv.onmouseover = function(){
                directionsDisplay.setDirections(response);
            }
            directionsDisplay.setDirections(response);
        }
    });
}

function hideRoute(){
    directionsDisplay.set('directions', null);
}

google.maps.event.addDomListener(window, 'load', initialize);

</script>
@stop

@section('content')

<h1 id="page-title">Find a Ride</h1>
<div id="map-div"></div>
<div id="rides-list">
    @if (Session::has('message'))
        <div class="alert alert-info">{{ Session::get('message') }}</div>
    @endif
    <div class="rides-list-tab">
        <input type="radio" id="tab-1" name="tab-group-1" checked>
        <label for="tab-1"><strong>Search Rides</strong></label>
        <div class="rides-list-content">
            {{ HTML::ul($errors->all()) }}
            <div id="rides-search-div">
                {{ Form::open(array('method'=>'get')) }}
                <div class="form-group">
                    {{ Form::label('to', 'To') }}
                    {{ Form::text('to', Input::old('to'), array('id' => 'searchTextField', 'class' => 'form-control')) }}
                </div>
                <div class="form-group">
                    {{ Form::label('from', 'From') }}
                    {{ Form::text('from', Input::old('from'), array('class' => 'form-control')) }}
                </div>
                <div class="form-group">
                    {{ Form::label('advanced', 'Advanced') }}
                    {{ Form::checkbox('advanced', 1, false, array('id' => 'advanced', 'onclick' => 'showAdvanced()')) }}
                </div>
                <div class="form-group" id="AdvancedField1" style="display: none">
                	<label for="date">Date/Time</label>
                	<input class="form-control" type="datetime-local" name="date"/>
                </div>
                <div class="form-group" id="AdvancedField2" style="display: none">
{'fraction_non_alphanumeric': 0.17599130907115698, 'fraction_numerical': 0.008147745790331342, 'mean_word_length': 2.868172268907563, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 84, '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': '2206682', 'n_tokens_mistral': 2208, 'n_tokens_neox': 2114, 'n_words': 358}