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