]> git.mxchange.org Git - friendica.git/commitdiff
frio - some work on the admin contactblock template to be more consistant with other...
authorrabuzarus <rabuzarus@t-online.de>
Sun, 22 Apr 2018 21:06:06 +0000 (23:06 +0200)
committerrabuzarus <rabuzarus@t-online.de>
Sun, 22 Apr 2018 21:06:06 +0000 (23:06 +0200)
view/theme/frio/css/mod_admin.css
view/theme/frio/templates/admin/contactblock.tpl
view/theme/frio/templates/admin/users.tpl

index 5199d5a55d3de845464a142a7eea4995cd43fa16..b690577d1135d2062a7516ec1aeac17312002d97 100644 (file)
@@ -1,12 +1,10 @@
 
 #admin-users.adminpage > h1 { padding: 0 15px; }
 #admin-users.adminpage .panel-collapse { margin-left: -15px; margin-right: -15px; }
-#admin-users td { word-break: break-all; }
 
 #admin-users #users th:first-of-type { width: 1em; }
 #admin-users #users th:nth-of-type(2) { width: 40px; }
 #admin-users #users th:last-of-type { width: 1em; }
-#admin-users td > .checkbox { margin: 0; }
 #admin-users .admin-settings-footer-elements { padding-left: 8px; padding-right: 8px; }
 
 #admin-users #deleted th:first-of-type { width: 40px; }
@@ -14,5 +12,9 @@
 #admin-users #users img.avatar-nano, #deleted img.avatar-nano { height: 24px; width: 24px; }
 .opened .caret { transform: rotate(180deg); }
 tr.details td,
-tr.details th
-{ border-top: 0!important; }
+tr.details th {
+    border-top: 0!important;
+}
+
+.adminpage td > .checkbox { margin: 0; }
+.adminpage td { word-break: break-all; }
\ No newline at end of file
index 9c3f9165bcebd2d00150cff9df7908f51fc2c2b9..3173c238b65f7c0c53db6ef2269c1fa4ccd5ca38 100644 (file)
 <script type="text/javascript" src="view/theme/frio/js/mod_admin.js"></script>
-<div id="adminpage">
+<link rel="stylesheet" href="view/theme/frio/css/mod_admin.css" type="text/css" media="screen"/>
+
+<div id="admin-contactblock" class="adminpage generic-page-wrapper">
        <h1>{{$title}} - {{$page}}</h1>
        <p>{{$description}}</p>
-       <form action="{{$baseurl}}/admin/contactblock" method="post">
-               <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
-
-               <h3>{{$h_contacts}}</h3>
-               {{if $contacts}}
-               <table id="contactblock" class="table table-condensed table-striped">
-                       <thead>
-                               <tr>
-                                       <th><input type="checkbox" class="selecttoggle contacts_ckbx" data-select-class="contacts_ckbx" data-select-all="{{$select_all}}"  data-select-none="{{$select_none}}" title="{{$select_all}}"/></th>
-                                       {{foreach $th_contacts as $th}}
-                                               <th>
-                                                       {{$th}}
-                                               </th>
-                                       {{/foreach}}
-                                       <th></th>
-                               </tr>
-                       </thead>
-                       <tbody>
-                               {{foreach $contacts as $contact}}
-                                       <tr>
-                                               <td><input type="checkbox" class="contacts_ckbx" id="id_contact_{{$contact.id}}" name="contacts[]" value="{{$contact.id}}"/></td>
-                                               <td><img class="icon" src="{{$contact.micro}}" alt="{{$contact.nickname}}" title="{{$contact.addr}}"></td>
-                                               <td class="name">{{$contact.name}}</td>
-                                               <td class="addr" colspan="2"><a href="{{$contact.url}}" title="{{$contact.addr}}" >{{$contact.url}}</a></td>
-                                       </tr>
-                               {{/foreach}}
-                       </tbody>
-                       <tfoot>
-                               <tr>
-                                       <td><input type="checkbox" class="selecttoggle contacts_ckbx" data-select-class="contacts_ckbx" data-select-all="{{$select_all}}" data-select-none="{{$select_none}}" title="{{$select_all}}"/></td>
-                                       <td colspan="3">
-                                               {{$total_contacts}}
-                                       </td>
-                               </tr>
-                       </tfoot>
-               </table>
-               <div class="submit"><button type="submit" class="btn btn-small btn-default" name="page_contactblock_unblock" value="1">{{$unblock|escape:'html'}}</button></div>
-               {{$paginate}}
-               {{else}}
-               <p>{{$no_data|escape:'html'}}</p>
-               {{/if}}
-       </form>
-
-       <h3>{{$h_newblock}}</h3>
-       <form action="{{$baseurl}}/admin/contactblock" method="post">
-               <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
-               <table id="contactblock">
-                       <tbody>
-                               <tr>
-                                       <td>{{include file="field_input.tpl" field=$contacturl}}</td>
-                               </tr>
-                       </tbody>
-               </table>
-               <div class="submit"><button type="submit" class="btn btn-primary" name="page_contactblock_block" value="1">{{$submit|escape:'html'}}</button></div>
-       </form>
+
+       {{* We organize the settings in collapsable panel-groups *}}
+       <div class="panel-group panel-group-settings" id="admin-settings" role="tablist" aria-multiselectable="true">
+               {{* The form for entering user profile which should be blocked *}}
+               <div class="panel">
+                       <div class="section-subtitle-wrapper" role="tab" id="admin-settings-contactblock-block">
+                               <h4>
+                                       <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-contactblock-block-collapse" aria-expanded="false" aria-controls="admin-settings-contactblock-block-collapse">
+                                               {{$h_newblock}}
+                                       </a>
+                               </h4>
+                       </div>
+
+                       <div id="admin-settings-contactblock-block-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-contactblock-block">
+                               <form action="{{$baseurl}}/admin/contactblock" method="post">
+                                       <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
+
+                                       {{include file="field_input.tpl" field=$contacturl}}
+
+                                       <div class="admin-settings-submit-wrapper form-group pull-right">
+                                               <button type="submit" class="btn btn-primary" name="page_contactblock_block" value="1">{{$submit|escape:'html'}}</button>
+                                       </div>
+                                       <div class="clear"></div>
+                               </form>
+                       </div>
+               </div>
+
+               {{* The list of blocked user profiles with the possibility to unblock them *}}
+               <div class="panel">
+                       <div class="section-subtitle-wrapper" role="tab" id="admin-settings-contactblock-blocked">
+                               <h4>
+                                       <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-contactblock-blocked-collapse" aria-expanded="{{if count($contacts) > 0}}true{{else}}false{{/if}}" aria-controls="admin-settings-contactblock-blocked-collapse">
+                                               {{$h_contacts}} ({{count($contacts)}})
+                                       </a>
+                               </h4>
+                       </div>
+
+                       <div id="admin-settings-contactblock-blocked-collapse" class="panel-collapse collapse {{if count($contacts) > 0}}in{{/if}}" role="tabpanel" aria-labelledby="admin-settings-contactblock-blocked">
+                               <form action="{{$baseurl}}/admin/contactblock" method="post">
+                                       <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
+
+                                       {{if $contacts}}
+                                       <table id="contactblock" class="table table-condensed table-striped">
+                                               <thead>
+                                                       <tr>
+                                                               <th></th>
+                                                               {{foreach $th_contacts as $th}}
+                                                                       <th>
+                                                                               {{$th}}
+                                                                       </th>
+                                                               {{/foreach}}
+                                                               <th></th>
+                                                       </tr>
+                                               </thead>
+                                               <tbody>
+                                                       {{foreach $contacts as $contact}}
+                                                               <tr>
+                                                                       <td>
+                                                                               <div class="checkbox">
+                                                                                       <input type="checkbox" class="contacts_ckbx" id="id_contact_{{$contact.id}}" name="contacts[]" value="{{$contact.id}}"/>
+                                                                                       <label for="id_contact_{{$contact.id}}"></label>
+                                                                               </div>
+                                                                       </td>
+                                                                       <td><img class="icon" src="{{$contact.micro}}" alt="{{$contact.nickname}}" title="{{$contact.addr}}"></td>
+                                                                       <td class="name">{{$contact.name}}</td>
+                                                                       <td class="addr" colspan="3"><a href="{{$contact.url}}" title="{{$contact.addr}}" >{{$contact.url}}</a></td>
+                                                               </tr>
+                                                       {{/foreach}}
+                                               </tbody>
+                                               <tfoot>
+                                                       <tr>
+                                                               <td>
+                                                                       {{* Checkbox to select all blocked contacts *}}
+                                                                       <div class="checkbox">
+                                                                               <input type="checkbox" id="contactblock-select" class="selecttoggle contacts_ckbx" data-select-class="contacts_ckbx" data-select-all="{{$select_all}}" data-select-none="{{$select_none}}" title="{{$select_all}}"/>
+                                                                               <label for="contactblock-select"></label>
+                                                                       </div>
+                                                               </td>
+                                                               <td colspan="5">
+                                                                       {{$total_contacts}}
+                                                                       <div class="admin-settings-submit-wrapper form-group pull-right">
+                                                                               <button type="submit" class="btn btn-small btn-default pull-right" name="page_contactblock_unblock" value="1">{{$unblock|escape:'html'}}</button>
+                                                                       </div>
+                                                                       <div class="clear"></div>
+                                                               </td>
+                                                       </tr>
+                                               </tfoot>
+                                       </table>
+
+                                       {{$paginate}}
+
+                                       {{else}}
+                                       <p>{{$no_data|escape:'html'}}</p>
+                                       {{/if}}
+                               </form>
+                       </div>
+               </div>
+       </div>
 </div>
index 4d4d2a31ef076ab0b237e377fecc2a94a2f7c853..348ce8a2c02a4735f79c2bb48c56c1937f32d634 100644 (file)
@@ -1,7 +1,7 @@
 <script type="text/javascript" src="view/theme/frio/js/mod_admin.js"></script>
 <link rel="stylesheet" href="view/theme/frio/css/mod_admin.css" type="text/css" media="screen"/>
 
-<div id="admin-users" class="adminpage  generic-page-wrapper">
+<div id="admin-users" class="adminpage generic-page-wrapper">
        <h1>{{$title}} - {{$page}}</h1>
 
        <form action="{{$baseurl}}/admin/users" method="post">
@@ -20,7 +20,7 @@
                        <div class="panel">
                                <div class="section-subtitle-wrapper" role="tab" id="admin-settings-pending">
                                        <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-pending-collapse" aria-expanded="false" aria-controls="admin-settings-pending-collapse">
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-pending-collapse" aria-expanded="{{if count($pending) > 0}}true{{else}}false{{/if}}" aria-controls="admin-settings-pending-collapse">
                                                        {{$h_pending}} ({{count($pending)}})
                                                </a>
                                        </h4>