示例#1
0
                <tr>
                    <td class="blank"></td>
                    <td class="title">08:00</td>
                    <td class="title">09:00</td>
                    <td class="title">10:00</td>
                    <td class="title">11:00</td>
                    <td class="title">12:00</td>
                    <td class="title">13:00</td>
                    <td class="title">14:00</td>
                    <td class="title">15:00</td>
                    <td class="title">16:00</td>
                    <td class="title">17:00</td>
                    <td class="title">18:00</td>
                </tr>
                <?php 
$kda = App\Timesheet::where('classroom_id', $ts->classroom_id)->get();
?>
                <tr>
                    <td class="time"  data-day='lundi' >Lundi</td>
                    <td class="drop" data-time="08:00">
                        @foreach($kda as $t)
                            @if($t->lundi == 'lundi' && $t->time == '08:00:00')
                                <div class="item  assigned"  value="{{ $t->id }}"
                                     style="width:50px;position: static;background-color:{{ $t->color }}

                                             ">{{ $t->matiere }}</div>
                            @endif

                        @endforeach
                    </td>
                    <td class="drop" data-time="09:00" >
示例#2
0
                <tr>
                    <td class="blank"></td>
                    <td class="title">8-9</td>
                    <td class="title">9-10</td>
                    <td class="title">10-11</td>
                    <td class="title">11-12</td>
                    <td class="title">12-13</td>
                    <td class="title">13-14</td>
                    <td class="title">14-15</td>
                    <td class="title">15-16</td>
                    <td class="title">16-17</td>
                    <td class="title">17-18</td>
                    <td class="title">18-19</td>
                </tr>
                <?php 
$kda = App\Timesheet::where('classroom_id', $ts->classroom_id)->CurrentYear()->where('user_id', \Auth::user()->id)->get();
?>
                <tr>
                    <td class="time"  data-day='lundi' >Lundi</td>
                    <td class="drop" data-time="08:00">
                        @foreach($kda as $t)
                            @if($t->lundi == 'lundi' && $t->time == '08:00:00')
                                <div class="item  assigned"
                                     value="{{ $t->id }}" style="width:50px;position: static;background-color:{{ $t->color }} !important;
                                        ">
                                    {{ $t->matter_id !== 0 ? \Auth::user()->matters()
                                    ->where('id',$t->matter_id)
                                    ->first()->code_matiere: \Auth::user()->rooms()
                                    ->where('id',$t->room_id)
                                    ->first()->nom_salle }}</div>
                            @endif