]> git.mxchange.org Git - friendica.git/blob - templates/contacts-template.tpl
cleanup: remove the modal code from the contact page since it is now done with functi...
[friendica.git] / templates / contacts-template.tpl
1
2 <div id="contacts" class="standard-page">
3
4         {{$tabs}}
5
6         {{* The page headding with it's contacts counter *}}
7         <h2 class="headding">{{$header}} {{if $total}} ({{$total}}) {{/if}}</h2>
8
9         {{if $finding}}<h4>{{$finding}}</h4>{{/if}}
10
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>
19                                 </div>
20                         </div>
21                 </form>
22         </div>
23
24         <hr>
25         <div id="contacts-search-end"></div>
26
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>
34                                 </a>
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">
39                                         </li>
40                                 {{/foreach}}
41                                 </ul>
42                         </li>
43                 </ul>
44                 <div class="clear">
45
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>
50                 {{/foreach}}
51                 </ul>
52                 <div id="contact-edit-end"></div>
53         </form>
54
55         {{$paginate}}
56 </div>
57
58 <script>
59  $(document).ready(function() {
60   // javascript dialog to batch actions
61   $(".batch-action").click(function(e){
62     if (confirm($(this).attr('value')+" ?")) {
63      return true;
64     } else {
65      e.preventDefault();
66      return false;
67     }
68   });
69  
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}}")) {
75      return true;
76     } else {
77      e.preventDefault();
78      return false;
79     }
80    });
81    
82   });
83  });
84  </script>
85