Skip to content

Instantly share code, notes, and snippets.

@chriskonnertz
Created March 25, 2016 16:16
Show Gist options
  • Save chriskonnertz/db7716ce49d425eb60a8 to your computer and use it in GitHub Desktop.
Save chriskonnertz/db7716ce49d425eb60a8 to your computer and use it in GitHub Desktop.
Modified Team Templates
<h1 class="page-title">{{ trans_object('teams') }}</h1>
@foreach ($teams as $team)
<article class="team">
<header>
<a href="{!! url('teams/'.$team->id.'/'.$team->slug) !!}">
<h2>{{ $team->title }}</h2>
@if ($team->image)
<div class="image">
<img class="img-responsive" src="{!! $team->uploadPath().$team->image !!}" alt="{{ $team->title }}">
</div>
@endif
</a>
</header>
<div class="content">
<ul class="list-inline">
@foreach ($team->users as $user)
<li class="text-center">
<a href="{!! url('users/'.$user->id.'/'.$user->slug) !!}"><img src="{!! $user->image ? $user->uploadPath().$user->image : asset('theme/user.png') !!}" alt="{{ $user->title }}" style="max-width: 142px; max-height: 142px;"><div>{{ $user->username }}</div></a>
@if ($user->pivot->task)
<div>({{ $user->pivot->task }})</div>
@endif
@if ($user->pivot->description)
<p>
{{ $user->pivot->description }}
</p>
@endif
</li>
@endforeach
</ul>
</div>
</article>
@endforeach
<article class="team">
<header>
<h1 class="page-title inside">{{ $team->title }}</h1>
@if ($team->image)
<div class="image">
<img class="img-responsive" src="{!! $team->uploadPath().$team->image !!}" alt="{{ $team->title }}">
</div>
@endif
</header>
<div class="content">
<ul class="list-inline">
@foreach ($team->users as $user)
<li class="text-center">
<a href="{!! url('users/'.$user->id.'/'.$user->slug) !!}"><img src="{!! $user->image ? $user->uploadPath().$user->image : asset('theme/user.png') !!}" alt="{{ $user->title }}" style="max-width: 142px; max-height: 142px;"><div>{{ $user->username }}</div></a>
@if ($user->pivot->task)
<div>({{ $user->pivot->task }})</div>
@endif
@if ($user->pivot->description)
<p>
{{ $user->pivot->description }}
</p>
@endif
</li>
@endforeach
</ul>
@if (sizeof($team->awards) > 0)
<div class="awards">
<h2>Awards</h2>
<table class="table" data-not-respsonsive="1">
<tbody>
@foreach ($team->awards as $award)
<tr>
<td>
{!! $award->positionIcon() !!}<br>
</td>
<td>
{{ $award->title }}<br>
</td>
<td>
{{ $award->tournament ? $award->tournament->short : null }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
</article>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment