LP2008252: Fix report output access when Shibboleth is enabled
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / share / grid / grid-body.component.html
1 <!-- uses dropdown menu CSS for easy stying, but it's not a dropdown -->
2 <ng-template #contextMenu let-gridContext="gridContext">
3   <eg-grid-toolbar-actions-menu [gridContext]="gridContext" [viaContextMenu]="true">
4   </eg-grid-toolbar-actions-menu>
5 </ng-template>
6
7 <!--
8   tabindex=1 so the grid body can capture keyboard events.
9 -->
10 <div class="eg-grid-body" tabindex="1" (keydown)="onGridKeyDown($event)">
11   <div role="row" class="eg-grid-row eg-grid-body-row {{context.rowClassCallback(row)}}"
12     [ngClass]="{'selected': context.rowSelector.contains(context.getRowIndex(row))}"
13     *ngFor="let row of context.dataSource.getPageOfRows(context.pager); let idx = index">
14
15     <ng-container *ngIf="!context.disableSelect">
16       <div class="eg-grid-cell eg-grid-checkbox-cell eg-grid-cell-skinny">
17         <input type='checkbox' 
18           [ngModel]="context.rowSelector.indexes[context.getRowIndex(row)]"
19           (ngModelChange)="context.rowSelector.toggle(context.getRowIndex(row))"
20           i18n-aria-label="e.g. Row 13" attr.aria-label="Row {{context.pager.rowNumber(idx)}}"
21           #rowContextMenu="ngbPopover"
22           popoverTitle="Actions for Selected Rows" i18n-popoverTitle
23           (contextmenu)="onRowContextClick($event, row, rowContextMenu)"
24           [ngbPopover]="contextMenu"
25           placement="right"
26           triggers="manual">
27       </div>
28     </ng-container>
29     <div class="eg-grid-cell eg-grid-number-cell eg-grid-cell-skinny-2">
30       {{context.pager.rowNumber(idx)}}
31     </div>
32     <div *ngIf="context.rowFlairIsEnabled" class="eg-grid-cell eg-grid-flair-cell">
33       <!-- using *ngIf allows us to assign the flair callback to a value,
34             obviating the need for multiple calls of the same function -->
35       <ng-container *ngIf="context.rowFlairCallback(row); let flair">
36         <ng-container *ngIf="flair.icon">
37           <!-- tooltip is disabled when no title is set -->
38           <span class="material-icons"
39             ngbTooltip="{{flair.title || ''}}" triggers="mouseenter:mouseleave">
40             {{flair.icon}}
41           </span>
42         </ng-container>
43       </ng-container>
44     </div>
45     <!-- contextMenu applied to cells instead of rows so the position
46          of the popover is close to the mouse.  As of writing, no way
47          to position the popover at the mouse -->
48     <div role="gridcell" class="eg-grid-cell eg-grid-body-cell"
49       [ngStyle]="{flex:col.flex}"
50       [ngClass]="{'eg-grid-cell-overflow': context.overflowCells}"
51       (dblclick)="onRowDblClick(row)"
52       (click)="onRowClick($event, row, idx)"
53       #rowContextMenu="ngbPopover"
54       popoverTitle="Actions for Selected Rows" i18n-popoverTitle
55       (contextmenu)="onRowContextClick($event, row, rowContextMenu)"
56       [ngbPopover]="contextMenu"
57       placement="bottom"
58       triggers="manual"
59       *ngFor="let col of context.columnSet.displayColumns()">
60
61       <eg-grid-body-cell [context]="context" [row]="row" [column]="col">
62       </eg-grid-body-cell>
63     </div>
64   </div>
65 </div>
66