]> git.mxchange.org Git - friendica.git/blob - view/templates/contacts-template.tpl
Merge pull request #10670 from MrPetovan/bug/10502-contact-block-unblock
[friendica.git] / view / templates / contacts-template.tpl
1
2 <h2>{{$header}}{{if $total}} ({{$total}}){{/if}}</h2>
3
4 {{if $finding}}<h4>{{$finding}}</h4>{{/if}}
5
6 <div id="contacts-search-wrapper">
7 <form id="contacts-search-form" action="{{$cmd}}" method="get">
8 <span class="contacts-search-desc">{{$desc nofilter}}</span>
9 <input type="text" name="search" id="contacts-search" class="search-input" onfocus="this.select();" value="{{$search}}" />
10 <input type="submit" name="submit" id="contacts-search-submit" value="{{$submit}}" />
11 </form>
12 </div>
13 <div id="contacts-search-end"></div>
14
15 {{$tabs nofilter}}
16
17 <form action="{{$baseurl}}/contact/batch/" method="POST">
18         <input type="hidden" name="redirect_url" value="{{$cmd}}"/>
19 {{foreach $contacts as $contact}}
20         {{include file="contact_template.tpl"}}
21 {{/foreach}}
22 <div id="contact-edit-end"></div>
23 <div id="contacts-actions">
24 {{foreach $batch_actions as $n=>$l}}
25  <input class="batch-action" name="{{$n}}" value="{{$l}}" type="submit">
26  {{/foreach}}
27  </div>
28 </form>
29 <script>
30  $(document).ready(function() {
31   // javascript dialog to batch actions
32   $(".batch-action").click(function(e){
33     if (confirm($(this).attr('value')+" ?")) {
34      return true;
35     } else {
36      e.preventDefault();
37      return false;
38     }
39   });
40  
41   // add javascript confirm dialog to "drop" links. Plain html url have "?confirm=1" to show confirmation form, we need to remove it
42   $(".drop").each(function() {
43    $(this).attr('href', $(this).attr('href').replace("confirm=1","") );
44    $(this).click(function(e){
45     if (confirm("{{$contact_drop_confirm}}")) {
46      return true;
47     } else {
48      e.preventDefault();
49      return false;
50     }
51    });
52    
53   });
54  });
55  </script>
56
57 {{$paginate nofilter}}
58
59
60
61