5015b3883f8bf30eed7c351e21699519907a759c
[motion-next.git] /
1 <div
2   id="squareRecordings"
3   class="page-layout simple left-sidenav inner-sidenav motion-list"
4 >
5   <!-- HEADER -->
6   <div
7     class="header md-accent-bg"
8     layout="row"
9     layout-align="space-between center"
10   >
11     <!-- APP TITLE -->
12     <div layout="row" layout-align="start center">
13       <div class="logo" layout="row" layout-align="start center">
14         <span class="logo-icon">
15           <md-icon md-font-icon="icon-sitemap" class="s24"></md-icon>
16         </span>
17         <span class="logo-text" translate="CALLYSQUARE.SQUARERECORDINGS"
18           >SquareRecordings</span
19         >
20       </div>
21     </div>
22     <!-- / APP TITLE -->
23
24     <div layout="row">
25       <!-- SEARCH -->
26       <div
27         class="search-input-wrapper"
28         layout="row"
29         layout-align="start center"
30       >
31         <label for="search">
32           <md-icon md-font-icon="icon-magnify"></md-icon>
33         </label>
34         <md-input-container md-no-float class="m-0">
35           <input
36             id="search"
37             placeholder="Search for anyone"
38             type="text"
39             ng-model="vm.query.filter"
40             ng-model-options="{ debounce: 1000 }"
41             translate
42             translate-attr-placeholder="CALLYSQUARE.SEARCH_FOR_ANYONE"
43           />
44         </md-input-container>
45       </div>
46       <!-- / SEARCH -->
47     </div>
48   </div>
49   <!-- / HEADER -->
50
51   <!-- SELECTED BAR -->
52   <div
53     ng-show="vm.selectedSquareRecordings.length > 0"
54     class="selected-bar header animate-slide-down md-accent-bg"
55     layout="row"
56     layout-align="start center"
57   >
58     <div
59       class="close-button-wrapper"
60       ng-click="vm.selectedSquareRecordings =[]"
61     >
62       <md-button layout="row" layout-align="start center">
63         <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>
64         <span translate="CALLYSQUARE.BACK">Back</span>
65       </md-button>
66     </div>
67
68     <div flex layout="row" layout-align="space-between center">
69       <div>
70         <span class="selected-squareRecordings-count">
71           <span>{{vm.selectedSquareRecordings.length}}</span>
72           <span translate="CALLYSQUARE.SELECTED">selected</span>
73         </span>
74
75         <md-menu class="select-menu" ng-if="!vm.currentThread">
76           <md-button
77             class="md-icon-button"
78             ng-click="$mdMenu.open($event)"
79             aria-label="multi select toggle"
80             translate
81             translate-attr-aria-label="CALLYSQUARE.MULTI_SELECT_TOGGLE"
82           >
83             <md-icon md-font-icon="icon-menu-down"></md-icon>
84           </md-button>
85           <md-menu-content width="3">
86             <md-menu-item>
87               <md-button
88                 ng-click="vm.selectAllSquareRecordings()"
89                 translate="CALLYSQUARE.SELECT_ALL"
90               >
91                 Select all
92               </md-button>
93             </md-menu-item>
94             <md-menu-item>
95               <md-button
96                 ng-click="vm.deselectSquareRecordings()"
97                 translate="CALLYSQUARE.SELECT_NONE"
98               >
99                 Select none
100               </md-button>
101             </md-menu-item>
102           </md-menu-content>
103         </md-menu>
104       </div>
105
106       <div class="multi-select-actions">
107         <button
108           class="md-icon-button"
109           ng-csv="vm.exportSelectedSquareRecordings"
110           csv-label="true"
111           filename="squareRecordings.csv"
112         >
113           <md-icon md-font-icon="icon-file-excel"></md-icon>
114         </button>
115         <md-button
116           class="md-icon-button"
117           ng-if="vm.crudPermissions.canDelete"
118           ng-click="vm.deleteSelectedSquareRecordings($event)"
119           aria-label="delete selected"
120           translate
121           translate-attr-label="CALLYSQUARE.DELETE_SELECTED"
122         >
123           <md-icon md-font-icon="icon-delete"></md-icon>
124         </md-button>
125       </div>
126     </div>
127   </div>
128   <!-- / SELECTED BAR -->
129
130   <!-- CONTENT -->
131   <div class="content" md-background-bg layout="row" layout-align="start start">
132     <!-- MAIN -->
133     <div class="main scrollable" ms-scroll>
134       <!-- SQUARERECORDING TABLE -->
135       <md-card>
136         <md-table-container>
137           <table
138             md-table
139             md-row-select
140             multiple
141             ng-model="vm.selectedSquareRecordings"
142             md-progress="vm.promise"
143           >
144             <thead
145               md-head
146               md-order="vm.query.sort"
147               md-on-reorder="vm.getSquareRecordings"
148             >
149               <tr md-row>
150                 <th
151                   md-column
152                   ng-if="vm.table == 'users' || vm.table == 'agents'"
153                   width="20px"
154                 ></th>
155                 <th md-column md-order-by="filename">
156                   {{ 'CALLYSQUARE.FILENAME' | translate }}
157                 </th>
158                 <th md-column md-order-by="projectName">
159                   {{ 'CALLYSQUARE.PROJECT' | translate }}
160                 </th>
161                 <th md-column md-order-by="uniqueid">
162                   {{ 'CALLYSQUARE.UNIQUEID' | translate }}
163                 </th>
164                 <th md-column md-order-by="callerid">
165                   {{ 'CALLYSQUARE.PHONE' | translate }}
166                 </th>
167                 <th md-column md-order-by="extension">
168                   {{ 'CALLYSQUARE.EXTEN' | translate }}
169                 </th>
170                 <th md-column md-order-by="audio">
171                   {{ 'CALLYSQUARE.AUDIO' | translate }}
172                 </th>
173                 <th md-column md-order-by="createdAt">
174                   {{ 'CALLYSQUARE.CREATED_AT' | translate }}
175                 </th>
176                 <th md-column width="10px"></th>
177               </tr>
178             </thead>
179             <tbody md-body>
180               <tr md-row ng-hide="vm.squareRecordings.rows.length">
181                 <td md-cell colspan="8">
182                   <div layout="row" layout-align="center center">
183                     <span translate="CALLYSQUARE.NO_AVAILABLE_INFO"
184                       >No Available Info</span
185                     >
186                   </div>
187                 </td>
188               </tr>
189               <tr
190                 md-row
191                 md-select="squareRecording"
192                 md-select-id="id"
193                 ng-repeat="squareRecording in vm.squareRecordings.rows"
194               >
195                 <td md-cell ng-if="squareRecording.userpic">
196                   <img
197                     class="avatar"
198                     alt="{{squareRecording.name}}"
199                     ng-src="api/users/{{squareRecording.id}}/avatar"
200                   />
201                 </td>
202                 <td
203                   md-cell
204                   ng-if="!squareRecording.userpic && (vm.table == 'users' || vm.table == 'agents')"
205                 >
206                   <img
207                     class="avatar"
208                     alt="{{squareRecording.name}}"
209                     ng-src="assets/images/avatars/profile.png"
210                   />
211                 </td>
212                 <td
213                   ng-click="vm.createOrEditSquareRecording($event, squareRecording)"
214                   md-cell
215                   class="filename"
216                 >
217                   {{squareRecording.filename}}
218                 </td>
219                 <td
220                   ng-click="vm.createOrEditSquareRecording($event, squareRecording)"
221                   md-cell
222                   class="projectName"
223                 >
224                   {{squareRecording.projectName}}
225                 </td>
226                 <td
227                   ng-click="vm.createOrEditSquareRecording($event, squareRecording)"
228                   md-cell
229                   class="uniqueid"
230                 >
231                   {{squareRecording.uniqueid}}
232                 </td>
233                 <td
234                   ng-click="vm.createOrEditSquareRecording($event, squareRecording)"
235                   md-cell
236                   class="callerid"
237                 >
238                   {{squareRecording.callerid}}
239                 </td>
240                 <td
241                   ng-click="vm.createOrEditSquareRecording($event, squareRecording)"
242                   md-cell
243                   class="extension"
244                 >
245                   {{squareRecording.extension}}
246                 </td>
247                 <td md-cell class="audio" ng-switch="squareRecording.format">
248                   <!-- audio recording directive -->
249                   <ms-recording
250                     ng-switch-when=".wav"
251                     id="squareRecording.id"
252                   ></ms-recording>
253                   <!-- / audio recording directive -->
254                   <span ng-switch-when=".gsm|.WAV" ng-switch-when-separator="|">
255                     <em>{{ 'VOICE.CANT_PLAY_GSM_AUDIO_FILES' | translate }}</em>
256                   </span>
257                 </td>
258                 <td
259                   ng-click="vm.createOrEditSquareRecording($event, squareRecording)"
260                   md-cell
261                   class="createdAt"
262                 >
263                   {{squareRecording.createdAt | date:'medium' }}
264                 </td>
265
266                 <td md-cell class="actions">
267                   <md-menu>
268                     <md-button
269                       class="md-icon-button"
270                       aria-label="More"
271                       translate
272                       translate-attr-aria-label="CALLYSQUARE.MORE"
273                       ng-click="$mdMenu.open($event)"
274                     >
275                       <md-icon md-font-icon="icon-dots-vertical"></md-icon>
276                     </md-button>
277
278                     <md-menu-content width="3">
279                       <!-- SUBACTIONS -->
280
281                       <!-- ACTIONS -->
282
283                       <md-menu-item>
284                         <md-button
285                           ng-click="vm.downloadfile2(squareRecording, $event  , 'square/recordings'   )"
286                           translate="CALLYSQUARE.DOWNLOAD_SQUARERECORDING"
287                         >
288                           Download SquareRecording
289                         </md-button>
290                       </md-menu-item>
291
292                       <!-- SUBACTIONS -->
293
294                       <!-- ACTIONS -->
295
296                       <md-menu-item ng-if="vm.crudPermissions.canDelete">
297                         <md-button
298                           ng-click="vm.deleteconfirm(squareRecording, $event    )"
299                           translate="CALLYSQUARE.DELETE_SQUARERECORDING"
300                         >
301                           Delete SquareRecording
302                         </md-button>
303                       </md-menu-item>
304                     </md-menu-content>
305                   </md-menu>
306                 </td>
307               </tr>
308             </tbody>
309           </table>
310         </md-table-container>
311
312         <md-table-pagination
313           md-label="{page: '{{'CALLYSQUARE.PAGE' | translate}}:', rowsPerPage: '{{'CALLYSQUARE.ROWSPERPAGE' | translate}}:', of: '{{'CALLYSQUARE.OF' | translate}}'}"
314           md-limit="vm.query.limit"
315           md-limit-options="[10, 15, 20, 50, 100, 250]"
316           md-page="vm.query.page"
317           md-total="{{vm.squareRecordings.count}}"
318           md-on-paginate="vm.getSquareRecordings"
319           md-page-select
320         ></md-table-pagination>
321       </md-card>
322       <!-- / SQUARERECORDING TABLE -->
323       <!-- NO RESULTS -->
324
325       <!-- / NO RESULTS -->
326     </div>
327     <!-- / MAIN -->
328   </div>
329   <!-- / CONTENT -->
330
331   <!-- NO ADD BUTTON BUTTON -->
332 </div>