blue-twilight/resources/views/themes/base/partials/user_profile_activity_grid....

30 lines
1.3 KiB
PHP

<table class="table activity-grid">
<thead>
<tr>
<th></th>
@foreach ($activity as $year => $months)
@foreach ($months as $month => $dates)
<th style="vertical-align: top;">{{ $month }}@if ($month == 'Jan')<br/>{{ $year }}@endif</th>
@endforeach
@endforeach
</tr>
</thead>
<tbody>
@for ($i = 1; $i <= 31; $i++)
<tr>
<th>{{ $i }}</th>
@foreach ($activity as $year => $months)
@foreach ($months as $month => $dates)
@if (isset($dates[$i]) && $dates[$i] > 0)
<td class="bg-primary" data-toggle="tooltip" data-placement="top" title="{{ trans_choice('gallery.user_profile.activity_summary', $dates[$i], ['count' => $dates[$i], 'date' => sprintf('%d %s %d', $i, $month, $year)]) }}">{{ $dates[$i] }}</td>
@elseif (isset($dates[$i]) && $dates[$i] == 0)
<td>&nbsp;</td>
@else
<td class="bg-light">&nbsp;</td>
@endif
@endforeach
@endforeach
</tr>
@endfor
</tbody>
</table>