016d858a5c0e0816e527521732b90e26cd4dd9af
[motion-next.git] /
1 <section ng-if="type !== 'button'">
2   <span ng-if="!showMenu()">{{target}}</span>
3
4   <md-menu ng-if="showMenu()">
5     <a aria-label="Target" ng-click="$mdMenu.open($event)">
6       <span ng-if="prefix">{{prefix}}-</span>{{target}}
7     </a>
8
9     <md-menu-content width="2">
10       <md-menu-item>
11         <md-button ng-click="call(prefix ? prefix + target : target)">
12           {{'DASHBOARDS.CALL_NUMBER' | translate}} ({{prefix ? prefix + '-' +
13           target : target}})
14         </md-button>
15       </md-menu-item>
16       <md-menu-item>
17         <md-button ng-click="transfer(prefix ? prefix + target : target)">
18           {{'DASHBOARDS.TRANSFER_NUMBER' | translate}} ({{prefix ? prefix + '-'
19           + target : target}})
20         </md-button>
21       </md-menu-item>
22     </md-menu-content>
23   </md-menu>
24 </section>
25
26 <section ng-if="type === 'button'">
27   <md-button
28     ng-if="!showMenu()"
29     ng-disabled="true"
30     class="md-icon-button md-raised md-accent ng-scope md-ink-ripple"
31     title="NEW CALL"
32     aria-label="NEW CALL"
33   >
34     <md-icon md-font-icon="icon-phone"></md-icon>
35   </md-button>
36
37   <md-menu ng-if="showMenu()">
38     <md-button
39       class="md-icon-button md-raised md-accent ng-scope md-ink-ripple"
40       title="NEW CALL"
41       ng-click="$mdMenu.open($event)"
42       aria-label="NEW CALL"
43     >
44       <md-icon md-font-icon="icon-phone"></md-icon>
45     </md-button>
46
47     <md-menu-content width="2">
48       <md-menu-item>
49         <md-button ng-click="call(prefix ? prefix + target : target)">
50           {{'DASHBOARDS.CALL_NUMBER' | translate}} ({{prefix ? prefix + '-' +
51           target : target}})
52         </md-button>
53       </md-menu-item>
54       <md-menu-item>
55         <md-button ng-click="transfer(target)">
56           {{'DASHBOARDS.TRANSFER_NUMBER' | translate}} ({{prefix ? prefix + '-'
57           + target : target}})
58         </md-button>
59       </md-menu-item>
60     </md-menu-content>
61   </md-menu>
62 </section>