
<?php $__env->startSection('css'); ?>
	<style type="text/css">

		.navbar.gallery-sub-header{
			display:none;
		}

		.item-large{
			width:100%;
			margin:0px auto;
		}

		div.pagination{
			padding-left:0px;
			padding-right:80px;
		}

	</style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('outer-content'); ?>
	<?php $user_points = DB::table('points')->where('user_id', '=', $user->id)->sum('points'); ?>
	<?php echo $__env->make('includes.profile-mobile', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

<?php $settings = Setting::first(); ?>

<div class="container main_home_container">


	<div class="well col-md-12">

	<div id="media" class="col-md-8 col-lg-8" style="display:block; clear:both; margin:0px auto; padding:0px; background:#fff; padding-bottom:70px;">

		<?php if(count($medias) == 0): ?>
			<h2 style="padding:10px 0px;"><i class="fa-meh-o fa"></i> <?php if(isset($likes)): ?><?php echo Lang::get('users.no_likes_yet'); ?><?php else: ?><?php echo Lang::get('users.no_uploads_yet'); ?><?php endif; ?></h2>
		<?php endif; ?>

		<?php foreach($medias as $item): ?>

			<?php
			if(isset($likes)){
			 	$item = $item->media();
			} 
			?>

			  
			<div class="col-sm-12 item animated single-left" data-href="<?php echo URL::to('media') . '/' . $item->id; ?>">

				<?php echo $__env->make('includes.media_item', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

			</div>
			  

		<?php endforeach; ?>	
		
		<div class="pagination-outter pull-right">
			<?php echo $medias->links(); ?>
		</div>

	</div><!-- #media -->


	<?php echo $__env->make('includes.profile-sidebar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>


</div>

	</div>

</div>

<?php if(!Auth::guest() && Auth::user()->id == $user->id): ?>

	<?php echo $__env->make('includes.edit-user-profile', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<?php endif; ?>

<?php echo $__env->make('includes.aboutpoints', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>


<script type="text/javascript">

	$(document).ready(function(){

		$('.hover_tooltip').tooltip({ placement: 'bottom' });

		$('.flag-user').click(function(){
				this_object = $(this);
				$.post("<?php echo URL::to('user') . '/add_flag'; ?>", { user_id: $(this).data('id') }, function(data){
					
					$.getJSON("<?php echo URL::to('api') . '/commentflags/'; ?>" + String($(this_object).data('id')), function(data){
						flagged_user = "<?php echo Lang::get('users.flagged_this_user'); ?>";
						flag_user = "<?php echo Lang::get('users.flag_user'); ?>";
						if($(this_object).find('.flag-message').text() == flagged_user)
						{	
							$(this_object).find('.flag-message').text(flag_user);
						} else {
							$(this_object).find('.flag-message').text(flagged_user);
						}
					});
				});
			});
	});

</script>

<?php echo $__env->make('includes.media-list-javascript', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>