<commit_before><!DOCTYPE html>
{% macro gamecontrols(game) %}
	<p class="row-fluid btn-group text-center">
		<a class="btn game-controls-view" href="{{ path('get_game', {'gId': game.id}) }}">View</a>
		<a class="btn game-controls-going" href="javascript:;" data-game-id="{{ game.id }}" data-game-player-count="{{ game.players|length }}">Going ({{ game.players|length }})</a>
		{% if game.originIp == app.request.server.get("REMOTE_ADDR") %}
		<!-- <a class="btn game-controls-edit" href="{{ path('edit_game', {'gId': game.id}) }}">Edit</a> -->
		<a class="btn game-controls-remove" href="{{ path('remove_game', {'gId': game.id}) }}">Remove</a>
		{% endif %}
	</p>
{% endmacro %}
{% macro playercontrols(game) %}
	<div class="row-fluid">
		<a class="btn span12 game-controls-going" href="javascript:;" data-game-id="{{ game.id }}" data-game-player-count="{{ game.players|length }}">Going ({{ game.players|length }})</a>
	</div>
{% endmacro %}
<html>
	<head>

		<meta charset="UTF-8" />
		<title>{% block title %}Ultimatefris.be{% endblock %}</title>
		<meta name="description" content="">
		<meta name="author" content="">
		<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
		{% javascripts
			'http://html5shiv.googlecode.com/svn/trunk/html5.js'
			%}
			<script type="text/javascript" src="{{ asset_url }}"></script>
		{% endjavascripts %}
		{% block stylesheets %}
			{% stylesheets filter="cssrewrite"
				'css/bootstrap.min.css'
				'css/bootstrap-responsive.min.css'
				'css/datetimepicker.css'
				'css/app.css'
				%}
				<link rel="stylesheet" href="{{ asset_url }}" />
		{% endstylesheets %}
			<!--[if lte IE 7]>
			{#<script src="{{ asset('css/icomoon-font/lte-ie7.js') }}"></script>#}
			<![endif]-->
		{% endblock %}
		<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
	</head>
	<body>
		<div id="fb-root"></div>
		<script>(function(d, s, id) {
			var js, fjs = d.getElementsByTagName(s)[0];
			if (d.getElementById(id)) return;
			js = d.createElement(s); js.id = id;
			js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=347872495314790";
			fjs.parentNode.insertBefore(js, fjs);
			}(document, 'script', 'facebook-jssdk'));</script>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
	{% block body %}
		<div class="container-fluid">

			<div class="masthead">
				<div class="span6 pull-right text-right">
					<div class="pull-right" style="margin-left:10px;"><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://ultimatefris.be" data-hashtags="ultimatefris.be">Tweet</a></div>
					<div class="pull-right" style="margin-left:10px;"><div class="fb-like" data-href="http://ultimatefris.be" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="lucida grande"></div></div>
					<div class="pull-right" style="margin-left:10px;"><div class="g-plusone" data-size="tall" data-annotation="none" data-href="http://ultimatefris.be"></div></div>
					<!-- <span class='st_googleplus_large pull-right' displayText='Google +'></span> -->
					<!-- <span class='st_facebook_large pull-right' displayText='Facebook'></span> -->
					<!-- <span class='st_twitter_large pull-right' displayText='Tweet'></span> -->
				</div>
				<h3 class="muted ">Ultimatefris.be</h3>
				<div class="navbar" data-spy="affix" data-offset-top="80">
					<div class="navbar-inner">
						<div class="container">
							<ul class="nav">
								<li class="{% if app.request.attributes.get('_route') == 'ultimate_default_index' %}active{% endif %}"><a href="{{ path('ultimate_default_index') }}">Home</a></li>
								<li class="{% if app.request.attributes.get('_route') == 'new_games' %}active{% endif %}"><a href="{{ path('new_games') }}"><span>Add<span class="visible-desktop"> a Game</span></span></a></li>
								<li class="{% if app.request.attributes.get('_route') == 'get_games' %}active{% endif %}"><a href="{{ path('get_games') }}"><span>Find<span class="visible-desktop"> a Game</span></span></a></li>
								<li class="{% if app.request.attributes.get('_route') == 'ultimate_default_about' %}active{% endif %}"><a href="{{ path('ultimate_default_about') }}">About</a></li>
								<li class="{% if app.request.attributes.get('_route') == 'ultimate_default_contact' %}active{% endif %}"><a href="{{ path('ultimate_default_contact') }}">Contact</a></li>
							</ul>
						</div>
					</div>
				</div><!-- /.navbar -->
			</div>

			<!-- Jumbotron -->
			{% block jumbotron %}
			<div class="jumbotron">
				<h1>Ultimate Frisbee!</h1>
				<!-- <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet.</p> -->
				<!-- <a class="btn btn-large btn-success" href="#">Get started today</a> -->
			</div>

			<hr>

			{% endblock jumbotron %}

			<!-- Example row of columns -->
			{% block content %}
			{% endblock content %}

			<hr>

			<div class="footer">
				<p class="text-right">
					<a class="pull-left" href="https://github.com/amsross/Ultimatefris.be"><img alt="Ultimatefris.be on GitHub" src="{{ asset('/img/1372377236_github_six_black.png') }}" width="32" height="32" /></a>
					<small>&copy; <a href="http://www.rhinorojo.com" target="_blank">Red Rhino</a> 2013</small>
				</p>
			</div>

		</div> <!-- /container -->
	{% endblock %}
	{% block javascripts %}
		{% javascripts
			'//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'
			'js/json2.js'
			'js/underscore-min.js'
			'js/backbone-min.js'
			'js/backbone.marionette.min.js'
			'bundles/fosjsrouting/js/router.js'
			'js/fos_js_routes.js'
			'js/bootstrap.min.js'
			'js/bootstrap-datetimepicker.min.js'
			%}
			<script type="text/javascript" src="{{ asset_url }}"></script>
		{% endjavascripts %}
		<!-- <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> -->
		<!-- <script type="text/javascript">stLight.options({publisher: "8270394b-e21e-4b5f-96e0-bb1de1cf7752", doNotHash: true, doNotCopy: true, hashAddressBar: true});</script> -->
		<script type="text/javascript">
			$(function() {

				$('.game-controls-going').on('click', function(evt) {

					var
						that = this,
						$targetBtn = $(evt.target)
						;
					
					$('.modal').modal('show');

					$('.modal').one('hidden', function (modal) {
						var
							$targetModal = $(modal.target),
							playerName = $targetModal.find('#player_name').val(),
							playerPhone = $targetModal.find('#player_phone').val(),
							playerCarrier = $targetModal.find('#player_carrier option:selected').val(),
							playerEmail = $targetModal.find('#player_email').val()
							;
						// console.log(modal);

						$.ajax({
							type: 'POST',
							url: Routing.generate('post_game_players', {gId: $targetBtn.data('game-id')}),
							data: {
								player: {
									name: playerName,
									phone: playerPhone,
									carrier: playerCarrier,
									email: playerEmail
								}
							}
						}).done(function(data) {
							$targetBtn.data('game-player-count', $targetBtn.data('game-player-count')+1);
							$targetBtn.html("Going ("+$targetBtn.data('game-player-count')+")")
						});
					});
				});
			});
		</script>
		<script type="text/javascript">
		  (function() {
		    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
		    po.src = 'https://apis.google.com/js/plusone.js';
		    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
		  })();
		</script>
	{% endblock %}
	<div class="modal hide fade">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>{% block modalHeader %}Notification Info <small class="muted">totally optional!</small>{% endblock modalHeader %}</h3>
		</div>
		<div class="modal-body">
			{% block modalBody %}
			<form class="row-fluid">
				<div class="row-fluid">
					<input type="text" id="player_name" name="player[name]" required="required" maxlength="255" placeholder="Name" class="span12">
				</div>
				<div class="row-fluid">
					<input type="text" id="player_phone" name="player[phone]" required="required" maxlength="255" placeholder="Mobile Phone" class="span6">
					<select class="span6" id="player_carrier" name="player[carrier]">
						<option value="">Carrier</option>
						<option value="alltel">Alltel</option>
						<option value="att">AT&amp;T</option>
						<option value="bellsouth">Bell South</option>
						<option value="cricket">Cricket</option>
						<option value="metropcs">MetroPCS</option>
						<option value="sprint">Sprint</option>
						<option value="tmobile">T-Mobile</option>
						<option value="verizon">Verizon</option>
					</select>
				</div><commit_msg>Fixed modal close on ESC<commit_after><!DOCTYPE html>
{% macro gamecontrols(game) %}
	<p class="row-fluid btn-group text-center">
		<a class="btn game-controls-view" href="{{ path('get_game', {'gId': game.id}) }}">View</a>
		<a class="btn game-controls-going" href="javascript:;" data-game-id="{{ game.id }}" data-game-player-count="{{ game.players|length }}">Going ({{ game.players|length }})</a>
		{% if game.originIp == app.request.server.get("REMOTE_ADDR") %}
		<!-- <a class="btn game-controls-edit" href="{{ path('edit_game', {'gId': game.id}) }}">Edit</a> -->
		<a class="btn game-controls-remove" href="{{ path('remove_game', {'gId': game.id}) }}">Remove</a>
		{% endif %}
	</p>
{% endmacro %}
{% macro playercontrols(game) %}
	<div class="row-fluid">
		<a class="btn span12 game-controls-going" href="javascript:;" data-game-id="{{ game.id }}" data-game-player-count="{{ game.players|length }}">Going ({{ game.players|length }})</a>
	</div>
{% endmacro %}
<html>
	<head>

		<meta charset="UTF-8" />
		<title>{% block title %}Ultimatefris.be{% endblock %}</title>
		<meta name="description" content="">
		<meta name="author" content="">
		<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
		{% javascripts
			'http://html5shiv.googlecode.com/svn/trunk/html5.js'
			%}
			<script type="text/javascript" src="{{ asset_url }}"></script>
		{% endjavascripts %}
		{% block stylesheets %}
			{% stylesheets filter="cssrewrite"
				'css/bootstrap.min.css'
				'css/bootstrap-responsive.min.css'
				'css/datetimepicker.css'
				'css/app.css'
				%}
				<link rel="stylesheet" href="{{ asset_url }}" />
		{% endstylesheets %}
			<!--[if lte IE 7]>
			{#<script src="{{ asset('css/icomoon-font/lte-ie7.js') }}"></script>#}
			<![endif]-->
		{% endblock %}
		<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
	</head>
	<body>
		<div id="fb-root"></div>
		<script>(function(d, s, id) {
			var js, fjs = d.getElementsByTagName(s)[0];
			if (d.getElementById(id)) return;
			js = d.createElement(s); js.id = id;
			js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=347872495314790";
			fjs.parentNode.insertBefore(js, fjs);
			}(document, 'script', 'facebook-jssdk'));</script>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
	{% block body %}
		<div class="container-fluid">

			<div class="masthead">
				<div class="span6 pull-right text-right">
					<div class="pull-right" style="margin-left:10px;"><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://ultimatefris.be" data-hashtags="ultimatefris.be">Tweet</a></div>
					<div class="pull-right" style="margin-left:10px;"><div class="fb-like" data-href="http://ultimatefris.be" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="lucida grande"></div></div>
					<div class="pull-right" style="margin-left:10px;"><div class="g-plusone" data-size="tall" data-annotation="none" data-href="http://ultimatefris.be"></div></div>
					<!-- <span class='st_googleplus_large pull-right' displayText='Google +'></span> -->
					<!-- <span class='st_facebook_large pull-right' displayText='Facebook'></span> -->
					<!-- <span class='st_twitter_large pull-right' displayText='Tweet'></span> -->
				</div>
				<h3 class="muted ">Ultimatefris.be</h3>
				<div class="navbar" data-spy="affix" data-offset-top="80">
					<div class="navbar-inner">
						<div class="container">
							<ul class="nav">
								<li class="{% if app.request.attributes.get('_route') == 'ultimate_default_index' %}active{% endif %}"><a href="{{ path('ultimate_default_index') }}">Home</a></li>
								<li class="{% if app.request.attributes.get('_route') == 'new_games' %}active{% endif %}"><a href="{{ path('new_games') }}"><span>Add<span class="visible-desktop"> a Game</span></span></a></li>
								<li class="{% if app.request.attributes.get('_route') == 'get_games' %}active{% endif %}"><a href="{{ path('get_games') }}"><span>Find<span class="visible-desktop"> a Game</span></span></a></li>
								<li class="{% if app.request.attributes.get('_route') == 'ultimate_default_about' %}active{% endif %}"><a href="{{ path('ultimate_default_about') }}">About</a></li>
								<li class="{% if app.request.attributes.get('_route') == 'ultimate_default_contact' %}active{% endif %}"><a href="{{ path('ultimate_default_contact') }}">Contact</a></li>
							</ul>
						</div>
					</div>
				</div><!-- /.navbar -->
			</div>

			<!-- Jumbotron -->
			{% block jumbotron %}
			<div class="jumbotron">
				<h1>Ultimate Frisbee!</h1>
				<!-- <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet.</p> -->
				<!-- <a class="btn btn-large btn-success" href="#">Get started today</a> -->
			</div>

			<hr>

			{% endblock jumbotron %}

			<!-- Example row of columns -->
			{% block content %}
			{% endblock content %}

			<hr>

			<div class="footer">
				<p class="text-right">
					<a class="pull-left" href="https://github.com/amsross/Ultimatefris.be"><img alt="Ultimatefris.be on GitHub" src="{{ asset('/img/1372377236_github_six_black.png') }}" width="32" height="32" /></a>
					<small>&copy; <a href="http://www.rhinorojo.com" target="_blank">Red Rhino</a> 2013</small>
				</p>
			</div>

		</div> <!-- /container -->
	{% endblock %}
	{% block javascripts %}
		{% javascripts
			'//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'
			'js/json2.js'
			'js/underscore-min.js'
			'js/backbone-min.js'
			'js/backbone.marionette.min.js'
			'bundles/fosjsrouting/js/router.js'
			'js/fos_js_routes.js'
			'js/bootstrap.min.js'
			'js/bootstrap-datetimepicker.min.js'
			%}
			<script type="text/javascript" src="{{ asset_url }}"></script>
		{% endjavascripts %}
		<!-- <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> -->
		<!-- <script type="text/javascript">stLight.options({publisher: "8270394b-e21e-4b5f-96e0-bb1de1cf7752", doNotHash: true, doNotCopy: true, hashAddressBar: true});</script> -->
		<script type="text/javascript">
			$(function() {

				$('.game-controls-going').on('click', function(evt) {

					var
						that = this,
						$targetBtn = $(evt.target)
						;
					
					$('.modal').modal('show');

					$('.modal').one('hidden', function (modal) {
						var
							$targetModal = $(modal.target),
							playerName = $targetModal.find('#player_name').val(),
							playerPhone = $targetModal.find('#player_phone').val(),
							playerCarrier = $targetModal.find('#player_carrier option:selected').val(),
							playerEmail = $targetModal.find('#player_email').val()
							;
						// console.log(modal);

						$.ajax({
							type: 'POST',
							url: Routing.generate('post_game_players', {gId: $targetBtn.data('game-id')}),
							data: {
								player: {
									name: playerName,
									phone: playerPhone,
									carrier: playerCarrier,
									email: playerEmail
								}
							}
						}).done(function(data) {
							$targetBtn.data('game-player-count', $targetBtn.data('game-player-count')+1);
							$targetBtn.html("Going ("+$targetBtn.data('game-player-count')+")")
						});
					});
				});
			});
		</script>
		<script type="text/javascript">
		  (function() {
		    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
		    po.src = 'https://apis.google.com/js/plusone.js';
		    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
		  })();
		</script>
	{% endblock %}
	<div class="modal hide fade" tabindex='-1'>
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>{% block modalHeader %}Notification Info <small class="muted">totally optional!</small>{% endblock modalHeader %}</h3>
		</div>
		<div class="modal-body">
			{% block modalBody %}
			<form class="row-fluid">
				<div class="row-fluid">
					<input type="text" id="player_name" name="player[name]" required="required" maxlength="255" placeholder="Name" class="span12">
				</div>
				<div class="row-fluid">
					<input type="text" id="player_phone" name="player[phone]" required="required" maxlength="255" placeholder="Mobile Phone" class="span6">
					<select class="span6" id="player_carrier" name="player[carrier]">
						<option value="">Carrier</option>
						<option value="alltel">Alltel</option>
						<option value="att">AT&amp;T</option>
						<option value="bellsouth">Bell South</option>
						<option value="cricket">Cricket</option>
						<option value="metropcs">MetroPCS</option>
						<option value="sprint">Sprint</option>
						<option value="tmobile">T-Mobile</option>
						<option value="verizon">Verizon</option>
					</select>
				</div>
{'fraction_non_alphanumeric': 0.21985620986773502, 'fraction_numerical': 0.010921464244552988, 'mean_word_length': 3.963770089893762, 'pattern_counts': {'":': 0, '<': 365, '<?xml version=': 0, '>': 365, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5088773', 'n_tokens_mistral': 7693, 'n_tokens_neox': 6237, 'n_words': 1078}