d85adba78466075e9b6d50bc16cd930be65524ae
[motion-next.git] /
1 <div id="extractedReports" class="page-layout simple left-sidenav inner-sidenav motion-list">
2   <!-- HEADER -->
3   <div class="header md-accent-bg" layout="row" layout-align="space-between center">
4     <!-- APP TITLE -->
5     <div layout="row" layout-align="start center">
6       <div class="logo" layout="row" layout-align="start center">
7         <span class="logo-icon">
8           <md-icon md-font-icon="icon-chart-line" class="s24"></md-icon>
9         </span>
10         <span class="logo-text" translate="ANALYTICS.EXTRACTEDREPORTS">ExtractedReports</span>
11       </div>
12     </div>
13     <!-- / APP TITLE -->
14
15     <div layout="row">
16       <!-- SEARCH -->
17       <div class="search-input-wrapper" layout="row" layout-align="start center">
18         <label for="search">
19           <md-icon md-font-icon="icon-magnify"></md-icon>
20         </label>
21         <md-input-container md-no-float class="m-0">
22           <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter"
23             ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="APP.SEARCH_FOR_ANYONE" />
24         </md-input-container>
25       </div>
26       <!-- / SEARCH -->
27     </div>
28   </div>
29   <!-- / HEADER -->
30
31   <!-- SELECTED BAR -->
32   <div ng-show="vm.selectedExtractedReports.length > 0" class="selected-bar header animate-slide-down md-accent-bg"
33     layout="row" layout-align="start center">
34     <div class="close-button-wrapper" ng-click="vm.selectedExtractedReports =[]">
35       <md-button layout="row" layout-align="start center">
36         <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>
37         <span translate="APP.BACK">Back</span>
38       </md-button>
39     </div>
40
41     <div flex layout="row" layout-align="space-between center">
42       <div>
43         <span class="selected-extractedReports-count">
44           <span>{{vm.selectedExtractedReports.length}}</span>
45           <span translate="APP.SELECTED">selected</span>
46         </span>
47
48         <md-menu class="select-menu" ng-if="!vm.currentThread">
49           <md-button class="md-icon-button" ng-click="$mdMenu.open($event)" aria-label="multi select toggle" translate
50             translate-attr-aria-label="ANALYTICS.MULTI_SELECT_TOGGLE">
51             <md-icon md-font-icon="icon-menu-down"></md-icon>
52           </md-button>
53           <md-menu-content width="3">
54             <md-menu-item>
55               <md-button ng-click="vm.selectAllExtractedReports()" translate="APP.SELECT_ALL">
56                 Select all
57               </md-button>
58             </md-menu-item>
59             <md-menu-item>
60               <md-button ng-click="vm.deselectExtractedReports()" translate="APP.SELECT_NONE">
61                 Select none
62               </md-button>
63             </md-menu-item>
64           </md-menu-content>
65         </md-menu>
66       </div>
67
68       <div class="multi-select-actions">
69         <button class="md-icon-button" ng-csv="vm.exportSelectedExtractedReports" csv-label="true"
70           filename="extractedReports.csv">
71           <md-icon md-font-icon="icon-file-excel"></md-icon>
72         </button>
73         <md-button class="md-icon-button" ng-if="vm.crudPermissions.canDelete"
74           ng-click="vm.deleteSelectedExtractedReports($event)" aria-label="delete selected" translate
75           translate-attr-label="APP.DELETE_SELECTED">
76           <md-icon md-font-icon="icon-delete"></md-icon>
77         </md-button>
78       </div>
79     </div>
80   </div>
81   <!-- / SELECTED BAR -->
82
83   <!-- CONTENT -->
84   <div class="content" md-background-bg layout="row" layout-align="start start">
85     <!-- MAIN -->
86     <div class="main scrollable" ms-scroll>
87       <!-- EXTRACTEDREPORT TABLE -->
88       <md-card>
89         <md-table-container>
90           <table md-table md-row-select multiple ng-model="vm.selectedExtractedReports" md-progress="vm.promise">
91             <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getExtractedReports">
92               <tr md-row>
93                 <th md-column ng-if="vm.table == 'users' || vm.table == 'agents'" width="20px"></th>
94                 <th md-column md-order-by="id">{{ 'APP.ID' | translate }}</th>
95                 <th md-column md-order-by="name">
96                   {{ 'ANALYTICS.REPORTNAME' | translate }}
97                 </th>
98                 <th md-column md-order-by="basename">
99                   {{ 'APP.NAME' | translate }}
100                 </th>
101                 <th md-column md-order-by="type">
102                   {{ 'APP.TYPE' | translate }}
103                 </th>
104                 <th md-column md-order-by="startDate">
105                   {{ 'ANALYTICS.DATE_RANGE_FROM' | translate }}
106                 </th>
107                 <th md-column md-order-by="endDate">
108                   {{ 'ANALYTICS.DATE_RANGE_TO' | translate }}
109                 </th>
110                 <th md-column md-order-by="createdAt">
111                   {{ 'ANALYTICS.GENERATED_AT' | translate }}
112                 </th>
113                 <th md-column md-order-by="status">
114                   {{ 'APP.STATUS' | translate }}
115                 </th>
116                 <th md-column md-order-by="output">
117                   {{ 'APP.OUTPUT' | translate }}
118                 </th>
119                 <th md-column width="10px"></th>
120               </tr>
121             </thead>
122             <tbody md-body>
123               <tr md-row ng-hide="vm.extractedReports.rows.length">
124                 <td md-cell colspan="10">
125                   <div layout="row" layout-align="center center">
126                     <span translate="APP.NO_AVAILABLE_INFO">No Available Info</span>
127                   </div>
128                 </td>
129               </tr>
130               <tr md-row md-select="extractedReport" md-select-id="id"
131                 ng-repeat="extractedReport in vm.extractedReports.rows">
132                 <td md-cell ng-if="extractedReport.userpic">
133                   <img class="avatar" alt="{{extractedReport.name}}" ng-src="api/users/{{extractedReport.id}}/avatar" />
134                 </td>
135                 <td md-cell ng-if="!extractedReport.userpic && (vm.table == 'users' || vm.table == 'agents')">
136                   <img class="avatar" alt="{{extractedReport.name}}" ng-src="assets/images/avatars/profile.png" />
137                 </td>
138                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="id">
139                   {{extractedReport.id}}
140                 </td>
141                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="name">
142                   {{extractedReport.name}}
143                 </td>
144                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="basename">
145                   {{extractedReport.basename}}
146                 </td>
147                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="type">
148                   {{extractedReport.type}}
149                 </td>
150                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="startDate">
151                   {{extractedReport.startDate | date:'medium' }}
152                 </td>
153                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="endDate">
154                   {{extractedReport.endDate | date:'medium' }}
155                 </td>
156                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="createdAt">
157                   {{extractedReport.createdAt | date:'medium' }}
158                 </td>
159                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="status">
160                   {{extractedReport.status}}
161                 </td>
162                 <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="output">
163                   {{extractedReport.output}}
164                 </td>
165
166                 <td md-cell class="actions">
167                   <md-menu>
168                     <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="APP.MORE"
169                       ng-click="$mdMenu.open($event)">
170                       <md-icon md-font-icon="icon-dots-vertical"></md-icon>
171                     </md-button>
172
173                     <md-menu-content width="3">
174                       <!-- SUBACTIONS -->
175
176                       <!-- ACTIONS -->
177
178                       <md-menu-item ng-if="vm.crudPermissions.canEdit">
179                         <md-button ng-click="vm.editdialog(extractedReport, $event    )"
180                           translate="ANALYTICS.EDIT_EXTRACTEDREPORT">
181                           Edit ExtractedReport
182                         </md-button>
183                       </md-menu-item>
184
185                       <!-- SUBACTIONS -->
186
187                       <!-- ACTIONS -->
188
189                       <md-menu-item ng-if="extractedReport.status == 'Completed'">
190                         <md-button
191                           ng-click="vm.downloadfile2(extractedReport, $event  , 'analytics/extracted_reports'   )"
192                           translate="ANALYTICS.DOWNLOAD_EXTRACTEDREPORT">
193                           Download ExtractedReport
194                         </md-button>
195                       </md-menu-item>
196
197                       <!-- SUBACTIONS -->
198
199                       <!-- ACTIONS -->
200
201                       <md-menu-item ng-if="vm.crudPermissions.canDelete">
202                         <md-button ng-click="vm.deleteconfirm(extractedReport, $event    )"
203                           translate="ANALYTICS.DELETE_EXTRACTEDREPORT">
204                           Delete ExtractedReport
205                         </md-button>
206                       </md-menu-item>
207                     </md-menu-content>
208                   </md-menu>
209                 </td>
210               </tr>
211             </tbody>
212           </table>
213         </md-table-container>
214
215         <md-table-pagination
216           md-label="{page: '{{'APP.PAGE' | translate}}:', rowsPerPage: '{{'APP.ROWSPERPAGE' | translate}}:', of: '{{'APP.OF' | translate}}'}"
217           md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"
218           md-total="{{vm.extractedReports.count}}" md-on-paginate="vm.getExtractedReports" md-page-select>
219         </md-table-pagination>
220       </md-card>
221       <!-- / EXTRACTEDREPORT TABLE -->
222       <!-- NO RESULTS -->
223
224       <!-- / NO RESULTS -->
225     </div>
226     <!-- / MAIN -->
227   </div>
228   <!-- / CONTENT -->
229
230   <!-- NO ADD BUTTON BUTTON -->
231 </div>