2 <div id="contacts" class="standard-page">
6 {{* The page headding with it's contacts counter *}}
7 <h2 class="headding">{{$header}} {{if $total}} ({{$total}}) {{/if}}</h2>
9 {{if $finding}}<h4>{{$finding}}</h4>{{/if}}
11 {{* The search input field to search for contacts *}}
12 <div id="contacts-search-wrapper">
13 <form id="contacts-search-form" class="navbar-form" action="{{$cmd}}" method="get" >
14 <label for="contacts-search" class="contacts-search-desc">{{$desc}}</label><br/>
15 <div class="input-group">
16 <input type="text" name="search" id="contacts-search" class="search-input form-control" onfocus="this.select();" value="{{$search|escape:'html'}}" />
17 <div class="input-group-btn">
18 <button class="btn btn-default" type="submit" name="submit" id="contacts-search-submit" value="{{$submit|escape:'html'}}"><i class="fa fa-search"></i></button>
25 <div id="contacts-search-end"></div>
27 {{* we need the form container to make batch actions work *}}
28 <form action="{{$baseurl}}/contacts/batch/" method="POST">
29 {{* We put the contact batch actions in a dropdown menu *}}
30 <ul class="nav nav-pills preferences">
31 <li class="dropdown pull-right">
32 <a class="btn btn-link dropdown-toggle" type="button" id="BatchActionDropdownMenuTools" data-toggle="dropdown" aria-expanded="true">
33 <i class="fa fa-angle-down"></i>
35 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="BatchActionDropdownMenuTools">
36 {{foreach $batch_actions as $n=>$l}}
37 <li role="presentation">
38 <input class="batch-action no-input fakelist" name="{{$n}}" value="{{$l|escape:'html'}}" type="submit">
46 {{* format each contact with the contact_template.tpl *}}
47 <ul id="viewcontact_wrapper" class="viewcontact_wrapper media-list">
48 {{foreach $contacts as $contact}}
49 <li>{{include file="contact_template.tpl"}}</li>
52 <div id="contact-edit-end"></div>
59 $(document).ready(function() {
60 // javascript dialog to batch actions
61 $(".batch-action").click(function(e){
62 if (confirm($(this).attr('value')+" ?")) {
70 // add javascript confirm dialog to "drop" links. Plain html url have "?confirm=1" to show confirmation form, we need to remove it
71 $(".drop").each(function() {
72 $(this).attr('href', $(this).attr('href').replace("confirm=1","") );
73 $(this).click(function(e){
74 if (confirm("{{$contact_drop_confirm}}")) {