index.blade.php 1.25 KB
@extends('layouts.default')

@section('title', FootyRoom\Support\Utils\Helpers::title('Search Matches'))

@section('content')
	<div class="search-msg" ng-non-bindable>
		Showing search results for "{{ $q }}". <a href="/">Click here to cancel search.</a>
	</div>

	<div class="site-tree">
		<a href="/">Home</a>
		<div class="separator"></div>
		<a href="/search?q={{ urlencode($q) }}">Search Matches</a>
		<div class="separator"></div>
	</div>

	<script type="text/javascript">
		DataStore.search = {!! json_encode($q) !!};
		DataStore.postsEndpointUrl = '/posts-pagelet';
	</script>

	<div id="infinite-scroll" class="full-width grid-card--match" fr-fixed-header fr-infinite-scroll>
		@if ($page !== 1)
			<div class="info-box last-page"><a href="/">Click here to load the latest games.</a></div>
		@endif

		@compose('posts.grid', 'PostsGridComposer', $posts, $page)

		<div class="error mb10" ng-if="infiniteScrollError" ng-bind="infiniteScrollError"></div>
	</div>

	<div class="info-box text-center" ng-if="postsLoading && !loadMoreEnabled" ng-cloak>Loading <span class="spinner"></span></div>

	<div class="clearfix">
		<div class="btn btn-default col-xs-12" fr-ladda="postsLoading" ng-click="enableInfiniteScroll()" ng-if="loadMoreEnabled">Load more</div>
	</div>
@endsection