<div>
    <table class="table table-bordered table-fixed weekview-header">
        <thead>
        <tr>
            <th data-ng-if="grouping && groupingdir !== 'desc'" class="calendar-sort-column" data-ng-click="setGroupingDir('desc')">
              {{groupingcfg[grouping]}}&nbsp;<i class="fa fa-sort-asc"></i>
            </th>
            <th data-ng-if="grouping && groupingdir === 'desc'" class="calendar-sort-column" data-ng-click="setGroupingDir('asc')">
              {{groupingcfg[grouping]}}&nbsp;<i class="fa fa-sort-desc"></i>
            </th>
            <th ng-repeat="dt in dates" class="text-center weekview-header-label">{{dt.date| date:formatWeekViewDayHeader}}</th>
            <th class="gutter-column" ng-style="{width: scrollBarWidth+'px'}"></th>
        </tr>
        </thead>
    </table>
    <div id="scrollweekview" class="scrollable" data-ng-style="{'height': getHeight(60)}">
        <table class="table table-bordered table-fixed">
            <tbody>
              <tr data-ng-repeat="cat in categories track by cat" data-row="{{cat}}">
              <td data-ng-if="grouping">{{cat}}</td>
              <td data-ng-repeat="dt in dates track by dt.date" class="datecell" data-date="{{dt.date| date: 'yyyy-MM-dd'}}">
                  <div data-ng-repeat="opplan in dt.events track by $index" class="card-month" data-ng-click="selectCard(opplan)"
                     data-ng-if="(!grouping || (opplan[grouping] || '') == (cat || '')) && displayEvent(opplan, dt)">
                     <ng-include src="'/input/card.html'"/>
                  </div>
              </td>
              </tr>
            </tbody>
        </table>
    </div>
</div>