0320a8089eb84cbea6dc112cde33730d500cc8e0
[motion-next.git] /
1 <div
2   id="voicePrefixes"
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.VOICEPREFIXES"
18           >VoicePrefixes</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="VOICE.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.selectedVoicePrefixes.length > 0"
54     class="selected-bar header animate-slide-down md-accent-bg"
55     layout="row"
56     layout-align="start center"
57   >
58     <div class="close-button-wrapper" ng-click="vm.selectedVoicePrefixes =[]">
59       <md-button layout="row" layout-align="start center">
60         <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>
61         <span translate="VOICE.BACK">Back</span>
62       </md-button>
63     </div>
64
65     <div flex layout="row" layout-align="space-between center">
66       <div>
67         <span class="selected-voicePrefixes-count">
68           <span>{{vm.selectedVoicePrefixes.length}}</span>
69           <span translate="VOICE.SELECTED">selected</span>
70         </span>
71
72         <md-menu class="select-menu" ng-if="!vm.currentThread">
73           <md-button
74             class="md-icon-button"
75             ng-click="$mdMenu.open($event)"
76             aria-label="multi select toggle"
77             translate
78             translate-attr-aria-label="VOICE.MULTI_SELECT_TOGGLE"
79           >
80             <md-icon md-font-icon="icon-menu-down"></md-icon>
81           </md-button>
82           <md-menu-content width="3">
83             <md-menu-item>
84               <md-button
85                 ng-click="vm.selectAllVoicePrefixes()"
86                 translate="VOICE.SELECT_ALL"
87               >
88                 Select all
89               </md-button>
90             </md-menu-item>
91             <md-menu-item>
92               <md-button
93                 ng-click="vm.deselectVoicePrefixes()"
94                 translate="VOICE.SELECT_NONE"
95               >
96                 Select none
97               </md-button>
98             </md-menu-item>
99           </md-menu-content>
100         </md-menu>
101       </div>
102
103       <div class="multi-select-actions">
104         <button
105           class="md-icon-button"
106           ng-csv="vm.exportSelectedVoicePrefixes"
107           csv-label="true"
108           filename="voicePrefixes.csv"
109         >
110           <md-icon md-font-icon="icon-file-excel"></md-icon>
111         </button>
112         <md-button
113           class="md-icon-button"
114           ng-if="vm.crudPermissions.canDelete"
115           ng-click="vm.deleteSelectedVoicePrefixes($event)"
116           aria-label="delete selected"
117           translate
118           translate-attr-label="VOICE.DELETE_SELECTED"
119         >
120           <md-icon md-font-icon="icon-delete"></md-icon>
121         </md-button>
122       </div>
123     </div>
124   </div>
125   <!-- / SELECTED BAR -->
126
127   <!-- CONTENT -->
128   <div class="content" md-background-bg layout="row" layout-align="start start">
129     <!-- MAIN -->
130     <div class="main scrollable" ms-scroll>
131       <!-- VOICEPREFIX TABLE -->
132       <md-card>
133         <md-table-container>
134           <table
135             md-table
136             md-row-select
137             multiple
138             ng-model="vm.selectedVoicePrefixes"
139             md-progress="vm.promise"
140           >
141             <thead
142               md-head
143               md-order="vm.query.sort"
144               md-on-reorder="vm.getVoicePrefixes"
145             >
146               <tr md-row>
147                 <th
148                   md-column
149                   ng-if="vm.table == 'users' || vm.table == 'agents'"
150                   width="20px"
151                 ></th>
152                 <th md-column md-order-by="id">{{ 'VOICE.ID' | translate }}</th>
153                 <th md-column md-order-by="name">
154                   {{ 'VOICE.NAME' | translate }}
155                 </th>
156                 <th md-column md-order-by="VoiceExtensionId">
157                   {{ 'VOICE.OUTBOUNDROUTE' | translate }}
158                 </th>
159                 <th md-column md-order-by="callerIdAll">
160                   {{ 'VOICE.CALLERIDALL' | translate }}
161                 </th>
162                 <th md-column md-order-by="description">
163                   {{ 'VOICE.DESCRIPTION' | translate }}
164                 </th>
165                 <th md-column width="10px"></th>
166               </tr>
167             </thead>
168             <tbody md-body>
169               <tr md-row ng-hide="vm.voicePrefixes.rows.length">
170                 <td md-cell colspan="6">
171                   <div layout="row" layout-align="center center">
172                     <span translate="VOICE.NO_AVAILABLE_INFO"
173                       >No Available Info</span
174                     >
175                   </div>
176                 </td>
177               </tr>
178               <tr
179                 md-row
180                 md-select="voicePrefix"
181                 md-select-id="id"
182                 ng-repeat="voicePrefix in vm.voicePrefixes.rows"
183               >
184                 <td md-cell ng-if="voicePrefix.userpic">
185                   <img
186                     class="avatar"
187                     alt="{{voicePrefix.name}}"
188                     ng-src="api/users/{{voicePrefix.id}}/avatar"
189                   />
190                 </td>
191                 <td
192                   md-cell
193                   ng-if="!voicePrefix.userpic && (vm.table == 'users' || vm.table == 'agents')"
194                 >
195                   <img
196                     class="avatar"
197                     alt="{{voicePrefix.name}}"
198                     ng-src="assets/images/avatars/profile.png"
199                   />
200                 </td>
201                 <td
202                   ng-click="vm.createOrEditvoicePrefix($event, voicePrefix)"
203                   md-cell
204                   class="id"
205                 >
206                   {{voicePrefix.id}}
207                 </td>
208                 <td
209                   ng-click="vm.createOrEditvoicePrefix($event, voicePrefix)"
210                   md-cell
211                   class="name"
212                 >
213                   {{voicePrefix.name}}
214                 </td>
215                 <td
216                   ng-click="vm.createOrEditvoicePrefix($event, voicePrefix)"
217                   md-cell
218                   class="VoiceExtensionId"
219                 >
220                   {{ (vm.outboundRoutes | filter :
221                   {'id':voicePrefix.VoiceExtensionId} : true)[0].exten }}
222                 </td>
223                 <td
224                   ng-click="vm.createOrEditvoicePrefix($event, voicePrefix)"
225                   md-cell
226                   class="callerIdAll"
227                 >
228                   {{voicePrefix.callerIdAll}}
229                 </td>
230                 <td
231                   ng-click="vm.createOrEditvoicePrefix($event, voicePrefix)"
232                   md-cell
233                   class="description"
234                 >
235                   {{voicePrefix.description}}
236                 </td>
237
238                 <td md-cell class="actions">
239                   <md-menu>
240                     <md-button
241                       class="md-icon-button"
242                       aria-label="More"
243                       translate
244                       translate-attr-aria-label="VOICE.MORE"
245                       ng-click="$mdMenu.open($event)"
246                     >
247                       <md-icon md-font-icon="icon-dots-vertical"></md-icon>
248                     </md-button>
249
250                     <md-menu-content width="3">
251                       <!-- SUBACTIONS -->
252
253                       <!-- ACTIONS -->
254
255                       <md-menu-item ng-if="vm.crudPermissions.canEdit">
256                         <md-button
257                           ng-click="vm.editdialog(voicePrefix, $event    )"
258                           translate="VOICE.EDIT_VOICEPREFIX"
259                         >
260                           Edit voicePrefix
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(voicePrefix, $event    )"
271                           translate="VOICE.AGENTADD_VOICEPREFIX"
272                         >
273                           AgentAdd voicePrefix
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(voicePrefix, $event    )"
284                           translate="VOICE.DELETE_VOICEPREFIX"
285                         >
286                           Delete voicePrefix
287                         </md-button>
288                       </md-menu-item>
289                     </md-menu-content>
290                   </md-menu>
291                 </td>
292               </tr>
293             </tbody>
294           </table>
295         </md-table-container>
296
297         <md-table-pagination
298           md-label="{page: '{{'VOICE.PAGE' | translate}}:', rowsPerPage: '{{'VOICE.ROWSPERPAGE' | translate}}:', of: '{{'VOICE.OF' | translate}}'}"
299           md-limit="vm.query.limit"
300           md-limit-options="[10, 15, 20, 50, 100, 250]"
301           md-page="vm.query.page"
302           md-total="{{vm.voicePrefixes.count}}"
303           md-on-paginate="vm.getVoicePrefixes"
304           md-page-select
305         ></md-table-pagination>
306       </md-card>
307       <!-- / VOICEPREFIX TABLE -->
308       <!-- NO RESULTS -->
309
310       <!-- / NO RESULTS -->
311     </div>
312     <!-- / MAIN -->
313   </div>
314   <!-- / CONTENT -->
315
316   <!-- ADD VOICEPREFIX BUTTON -->
317   <md-button
318     ng-if="vm.crudPermissions.canEdit"
319     class="md-fab md-accent add-item-button"
320     id="add-voicePrefix-button"
321     ng-click="vm.createOrEditvoicePrefix($event)"
322     aria-label="add voicePrefix"
323     translate
324     translate-attr-aria-label="VOICE.ADD_VOICEPREFIX"
325   >
326     <md-icon md-font-icon="icon-plus"></md-icon>
327   </md-button>
328   <!-- / ADD VOICEPREFIX BUTTON -->
329 </div>