ea52b16131f17f9f884f6b1cf12eb1e3342708c7
[motion-next.git] /
1 <div
2   id="openchannelAccounts"
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.OPENCHANNELACCOUNTS"
18           >OpenchannelAccounts</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.selectedOpenchannelAccounts.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.selectedOpenchannelAccounts =[]"
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-openchannelAccounts-count">
71           <span>{{vm.selectedOpenchannelAccounts.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.selectAllOpenchannelAccounts()"
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.deselectOpenchannelAccounts()"
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.exportSelectedOpenchannelAccounts"
110           csv-label="true"
111           filename="openchannelAccounts.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.deleteSelectedOpenchannelAccounts($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       <!-- OPENCHANNELACCOUNT TABLE -->
135       <md-card>
136         <md-table-container>
137           <table
138             md-table
139             md-row-select
140             multiple
141             ng-model="vm.selectedOpenchannelAccounts"
142             md-progress="vm.promise"
143           >
144             <thead
145               md-head
146               md-order="vm.query.sort"
147               md-on-reorder="vm.getOpenchannelAccounts"
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="key">
162                   {{ 'OPENCHANNEL.KEY' | translate }}
163                 </th>
164                 <th md-column md-order-by="replyUri">
165                   {{ 'OPENCHANNEL.REPLYURI' | translate }}
166                 </th>
167                 <th md-column md-order-by="ListId">
168                   {{ 'OPENCHANNEL.LIST' | translate }}
169                 </th>
170                 <th md-column md-order-by="description">
171                   {{ 'OPENCHANNEL.DESCRIPTION' | translate }}
172                 </th>
173                 <th md-column width="10px"></th>
174               </tr>
175             </thead>
176             <tbody md-body>
177               <tr md-row ng-hide="vm.openchannelAccounts.rows.length">
178                 <td md-cell colspan="7">
179                   <div layout="row" layout-align="center center">
180                     <span translate="OPENCHANNEL.NO_AVAILABLE_INFO"
181                       >No Available Info</span
182                     >
183                   </div>
184                 </td>
185               </tr>
186               <tr
187                 md-row
188                 md-select="openchannelAccount"
189                 md-select-id="id"
190                 ng-repeat="openchannelAccount in vm.openchannelAccounts.rows"
191               >
192                 <td md-cell ng-if="openchannelAccount.userpic">
193                   <img
194                     class="avatar"
195                     alt="{{openchannelAccount.name}}"
196                     ng-src="api/users/{{openchannelAccount.id}}/avatar"
197                   />
198                 </td>
199                 <td
200                   md-cell
201                   ng-if="!openchannelAccount.userpic && (vm.table == 'users' || vm.table == 'agents')"
202                 >
203                   <img
204                     class="avatar"
205                     alt="{{openchannelAccount.name}}"
206                     ng-src="assets/images/avatars/profile.png"
207                   />
208                 </td>
209                 <td
210                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelAccount, ev) : vm.createOrEditOpenchannelAccount($event, openchannelAccount)"
211                   md-cell
212                   class="id"
213                 >
214                   {{openchannelAccount.id}}
215                 </td>
216                 <td
217                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelAccount, ev) : vm.createOrEditOpenchannelAccount($event, openchannelAccount)"
218                   md-cell
219                   class="name"
220                 >
221                   {{openchannelAccount.name}}
222                 </td>
223                 <td
224                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelAccount, ev) : vm.createOrEditOpenchannelAccount($event, openchannelAccount)"
225                   md-cell
226                   class="key"
227                 >
228                   {{openchannelAccount.key}}
229                 </td>
230                 <td
231                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelAccount, ev) : vm.createOrEditOpenchannelAccount($event, openchannelAccount)"
232                   md-cell
233                   class="replyUri"
234                 >
235                   {{openchannelAccount.replyUri}}
236                 </td>
237                 <td
238                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelAccount, ev) : vm.createOrEditOpenchannelAccount($event, openchannelAccount)"
239                   md-cell
240                   class="ListId"
241                 >
242                   {{ (vm.lists | filter : {'id':openchannelAccount.ListId} :
243                   true)[0].name }}
244                 </td>
245                 <td
246                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(openchannelAccount, ev) : vm.createOrEditOpenchannelAccount($event, openchannelAccount)"
247                   md-cell
248                   class="description"
249                 >
250                   {{openchannelAccount.description}}
251                 </td>
252
253                 <td md-cell class="actions">
254                   <md-menu>
255                     <md-button
256                       class="md-icon-button"
257                       aria-label="More"
258                       translate
259                       translate-attr-aria-label="OPENCHANNEL.MORE"
260                       ng-click="$mdMenu.open($event)"
261                     >
262                       <md-icon md-font-icon="icon-dots-vertical"></md-icon>
263                     </md-button>
264
265                     <md-menu-content width="3">
266                       <!-- SUBACTIONS -->
267
268                       <!-- ACTIONS -->
269
270                       <md-menu-item ng-if="vm.crudPermissions.canEdit">
271                         <md-button
272                           ng-click="vm.editstate(openchannelAccount, $event    )"
273                           translate="OPENCHANNEL.EDIT_OPENCHANNELACCOUNT"
274                         >
275                           Edit OpenchannelAccount
276                         </md-button>
277                       </md-menu-item>
278
279                       <!-- SUBACTIONS -->
280
281                       <!-- ACTIONS -->
282
283                       <md-menu-item>
284                         <md-button
285                           ng-click="vm.interactionsgoto(openchannelAccount, $event    )"
286                           translate="OPENCHANNEL.INTERACTIONS_OPENCHANNELACCOUNT"
287                         >
288                           Interactions OpenchannelAccount
289                         </md-button>
290                       </md-menu-item>
291
292                       <!-- SUBACTIONS -->
293
294                       <!-- ACTIONS -->
295
296                       <md-menu-item>
297                         <md-button
298                           ng-click="vm.agentadddialog(openchannelAccount, $event    )"
299                           translate="OPENCHANNEL.AGENTADD_OPENCHANNELACCOUNT"
300                         >
301                           AgentAdd OpenchannelAccount
302                         </md-button>
303                       </md-menu-item>
304
305                       <!-- SUBACTIONS -->
306
307                       <!-- ACTIONS -->
308
309                       <md-menu-item ng-if="vm.crudPermissions.canDelete">
310                         <md-button
311                           ng-click="vm.deleteconfirm(openchannelAccount, $event    )"
312                           translate="OPENCHANNEL.DELETE_OPENCHANNELACCOUNT"
313                         >
314                           Delete OpenchannelAccount
315                         </md-button>
316                       </md-menu-item>
317                     </md-menu-content>
318                   </md-menu>
319                 </td>
320               </tr>
321             </tbody>
322           </table>
323         </md-table-container>
324
325         <md-table-pagination
326           md-label="{page: '{{'OPENCHANNEL.PAGE' | translate}}:', rowsPerPage: '{{'OPENCHANNEL.ROWSPERPAGE' | translate}}:', of: '{{'OPENCHANNEL.OF' | translate}}'}"
327           md-limit="vm.query.limit"
328           md-limit-options="[10, 15, 20, 50, 100, 250]"
329           md-page="vm.query.page"
330           md-total="{{vm.openchannelAccounts.count}}"
331           md-on-paginate="vm.getOpenchannelAccounts"
332           md-page-select
333         ></md-table-pagination>
334       </md-card>
335       <!-- / OPENCHANNELACCOUNT TABLE -->
336       <!-- NO RESULTS -->
337
338       <!-- / NO RESULTS -->
339     </div>
340     <!-- / MAIN -->
341   </div>
342   <!-- / CONTENT -->
343
344   <!-- ADD OPENCHANNELACCOUNT BUTTON -->
345   <md-button
346     ng-if="vm.crudPermissions.canEdit"
347     class="md-fab md-accent add-item-button"
348     id="add-openchannelAccount-button"
349     ng-click="vm.createOrEditOpenchannelAccount($event)"
350     aria-label="add openchannelAccount"
351     translate
352     translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELACCOUNT"
353   >
354     <md-icon md-font-icon="icon-plus"></md-icon>
355   </md-button>
356   <!-- / ADD OPENCHANNELACCOUNT BUTTON -->
357 </div>