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