4f4a84287f46fac10991d29d925efb18b52ccb9b
[motion-next.git] /
1 <div
2   id="openchannelQueues"
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-google-earth" class="s24"></md-icon>
16         </span>
17         <span class="logo-text" translate="OPENCHANNEL.OPENCHANNELQUEUES"
18           >OpenchannelQueues</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="OPENCHANNEL.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.selectedOpenchannelQueues.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.selectedOpenchannelQueues =[]"
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="OPENCHANNEL.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-openchannelQueues-count">
71           <span>{{vm.selectedOpenchannelQueues.length}}</span>
72           <span translate="OPENCHANNEL.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="OPENCHANNEL.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.selectAllOpenchannelQueues()"
89                 translate="OPENCHANNEL.SELECT_ALL"
90               >
91                 Select all
92               </md-button>
93             </md-menu-item>
94             <md-menu-item>
95               <md-button
96                 ng-click="vm.deselectOpenchannelQueues()"
97                 translate="OPENCHANNEL.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.exportSelectedOpenchannelQueues"
110           csv-label="true"
111           filename="openchannelQueues.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.deleteSelectedOpenchannelQueues($event)"
119           aria-label="delete selected"
120           translate
121           translate-attr-label="OPENCHANNEL.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       <!-- OPENCHANNELQUEUE TABLE -->
135       <md-card>
136         <md-table-container>
137           <table
138             md-table
139             md-row-select
140             multiple
141             ng-model="vm.selectedOpenchannelQueues"
142             md-progress="vm.promise"
143           >
144             <thead
145               md-head
146               md-order="vm.query.sort"
147               md-on-reorder="vm.getOpenchannelQueues"
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="id">
156                   {{ 'OPENCHANNEL.ID' | translate }}
157                 </th>
158                 <th md-column md-order-by="name">
159                   {{ 'OPENCHANNEL.NAME' | translate }}
160                 </th>
161                 <th md-column md-order-by="strategy">
162                   {{ 'OPENCHANNEL.STRATEGY' | translate }}
163                 </th>
164                 <th md-column width="10px"></th>
165               </tr>
166             </thead>
167             <tbody md-body>
168               <tr md-row ng-hide="vm.openchannelQueues.rows.length">
169                 <td md-cell colspan="4">
170                   <div layout="row" layout-align="center center">
171                     <span translate="OPENCHANNEL.NO_AVAILABLE_INFO"
172                       >No Available Info</span
173                     >
174                   </div>
175                 </td>
176               </tr>
177               <tr
178                 md-row
179                 md-select="openchannelQueue"
180                 md-select-id="id"
181                 ng-repeat="openchannelQueue in vm.openchannelQueues.rows"
182               >
183                 <td md-cell ng-if="openchannelQueue.userpic">
184                   <img
185                     class="avatar"
186                     alt="{{openchannelQueue.name}}"
187                     ng-src="api/users/{{openchannelQueue.id}}/avatar"
188                   />
189                 </td>
190                 <td
191                   md-cell
192                   ng-if="!openchannelQueue.userpic && (vm.table == 'users' || vm.table == 'agents')"
193                 >
194                   <img
195                     class="avatar"
196                     alt="{{openchannelQueue.name}}"
197                     ng-src="assets/images/avatars/profile.png"
198                   />
199                 </td>
200                 <td
201                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelQueue, ev) : vm.createOrEditOpenchannelQueue($event, openchannelQueue)"
202                   md-cell
203                   class="id"
204                 >
205                   {{openchannelQueue.id}}
206                 </td>
207                 <td
208                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelQueue, ev) : vm.createOrEditOpenchannelQueue($event, openchannelQueue)"
209                   md-cell
210                   class="name"
211                 >
212                   {{openchannelQueue.name}}
213                 </td>
214                 <td
215                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelQueue, ev) : vm.createOrEditOpenchannelQueue($event, openchannelQueue)"
216                   md-cell
217                   class="strategy"
218                 >
219                   {{ vm.arraystrategy[openchannelQueue.strategy].option }}
220                 </td>
221
222                 <td md-cell class="actions">
223                   <md-menu>
224                     <md-button
225                       class="md-icon-button"
226                       aria-label="More"
227                       translate
228                       translate-attr-aria-label="OPENCHANNEL.MORE"
229                       ng-click="$mdMenu.open($event)"
230                     >
231                       <md-icon md-font-icon="icon-dots-vertical"></md-icon>
232                     </md-button>
233
234                     <md-menu-content width="3">
235                       <!-- SUBACTIONS -->
236
237                       <!-- ACTIONS -->
238
239                       <md-menu-item ng-if="vm.crudPermissions.canEdit">
240                         <md-button
241                           ng-click="vm.editstate(openchannelQueue, $event    )"
242                           translate="OPENCHANNEL.EDIT_OPENCHANNELQUEUE"
243                         >
244                           Edit OpenchannelQueue
245                         </md-button>
246                       </md-menu-item>
247
248                       <!-- SUBACTIONS -->
249
250                       <!-- ACTIONS -->
251
252                       <md-menu-item>
253                         <md-button
254                           ng-click="vm.teamadddialog(openchannelQueue, $event    )"
255                           translate="OPENCHANNEL.TEAMADD_OPENCHANNELQUEUE"
256                         >
257                           teamadd OpenchannelQueue
258                         </md-button>
259                       </md-menu-item>
260
261                       <!-- SUBACTIONS -->
262
263                       <!-- ACTIONS -->
264
265                       <md-menu-item>
266                         <md-button
267                           ng-click="vm.agentadddialog(openchannelQueue, $event    )"
268                           translate="OPENCHANNEL.AGENTADD_OPENCHANNELQUEUE"
269                         >
270                           agentadd OpenchannelQueue
271                         </md-button>
272                       </md-menu-item>
273
274                       <!-- SUBACTIONS -->
275
276                       <!-- ACTIONS -->
277
278                       <md-menu-item ng-if="vm.crudPermissions.canDelete">
279                         <md-button
280                           ng-click="vm.deleteconfirm(openchannelQueue, $event    )"
281                           translate="OPENCHANNEL.DELETE_OPENCHANNELQUEUE"
282                         >
283                           Delete OpenchannelQueue
284                         </md-button>
285                       </md-menu-item>
286
287                       <!-- SUBACTIONS -->
288
289                       <!-- ACTIONS -->
290
291                       <md-menu-item>
292                         <md-button
293                           ng-click="vm.gotorealtimegoto(openchannelQueue, $event    )"
294                           translate="OPENCHANNEL.GOTOREALTIME_OPENCHANNELQUEUE"
295                         >
296                           goToRealtime OpenchannelQueue
297                         </md-button>
298                       </md-menu-item>
299                     </md-menu-content>
300                   </md-menu>
301                 </td>
302               </tr>
303             </tbody>
304           </table>
305         </md-table-container>
306
307         <md-table-pagination
308           md-label="{page: '{{'OPENCHANNEL.PAGE' | translate}}:', rowsPerPage: '{{'OPENCHANNEL.ROWSPERPAGE' | translate}}:', of: '{{'OPENCHANNEL.OF' | translate}}'}"
309           md-limit="vm.query.limit"
310           md-limit-options="[10, 15, 20, 50, 100, 250]"
311           md-page="vm.query.page"
312           md-total="{{vm.openchannelQueues.count}}"
313           md-on-paginate="vm.getOpenchannelQueues"
314           md-page-select
315         ></md-table-pagination>
316       </md-card>
317       <!-- / OPENCHANNELQUEUE TABLE -->
318       <!-- NO RESULTS -->
319
320       <!-- / NO RESULTS -->
321     </div>
322     <!-- / MAIN -->
323   </div>
324   <!-- / CONTENT -->
325
326   <!-- ADD OPENCHANNELQUEUE BUTTON -->
327   <md-button
328     ng-if="vm.crudPermissions.canEdit"
329     class="md-fab md-accent add-item-button"
330     id="add-openchannelQueue-button"
331     ng-click="vm.createOrEditOpenchannelQueue($event)"
332     aria-label="add openchannelQueue"
333     translate
334     translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELQUEUE"
335   >
336     <md-icon md-font-icon="icon-plus"></md-icon>
337   </md-button>
338   <!-- / ADD OPENCHANNELQUEUE BUTTON -->
339 </div>