1515 * @var $page_views integer 
1616 * @var $mails_sent integer 
1717 */ 
18+ 
19+ $ bySection$ this sitebase ()->getUseruISetting ($ controller'dashboardLayout ' ) ?? 'list ' ) == 'by_section ' ;
1820$ this layout ('admin::layout ' , ['title '  => $ controllergetPageTitle ()] + get_defined_vars ()) ?> 
19- <div class="jumbotron p-4">
21+ <div class="jumbotron p-4 position-relative ">
2022    <div class="row">
2123        <div class="col-2 text-center">
2224            <?php  echo  $ this sitebase ()->getGravatar ($ current_useremail , 100 );?> 
2628            <div class="info"><?=  $ current_usergetEmail ();?>  (<?=  $ this sitebase ()->translate ('role ' );?> : <?=  $ current_usergetRole ()->getName ();?> )</div>
2729        </div>
2830    </div>
31+ 
32+     <div class="dashboard-bysection-switch position-absolute" style="top: 15px; right: 15px;">Group By Section 
33+         <label class="switch">
34+             <input type="checkbox" id="dashboard-layout-selector" value="" class="paginator-items-choice" style="width: 50px"<?php  if  ($ bySection?>  checked="checked"<?php  endif ;?> >
35+             <span class="slider"></span>
36+         </label>
37+     </div>
38+ 
2939</div>
3040
31- <div class="counters h6">
32-     <div class="row justify-content-md-center">
41+ <div class="counters container-fluid">
42+     <div class="row row-cols-3 justify-content-md-between">
43+ <?php  if  ($ bySection
44+     $ bySectionLinks
45+     foreach  ($ dashboard_linksas  $ link
46+         $ section$ link'section ' ] ?? 'general ' ;
47+         if  (!isset ($ bySectionLinks$ section
48+             $ bySectionLinks$ section
49+         }
50+         $ bySectionLinks$ section$ link
51+     }
52+     ksort ($ bySectionLinks
53+ ?> 
54+             <?php  foreach  ($ bySectionLinksas  $ sectionName$ chunk?> 
55+                 <div class="col">
56+                     <div class="h4 font-weight-bolder text-center"><?=  $ this sitebase ()->translate (ucfirst ($ sectionName?> </div>
57+                     <div class="mb-2"><hr /></div>
58+                     <?php  foreach  ($ chunkas  $ link?> 
59+                         <div class="counter mb-2 d-flex justify-content-between align-items-center">
60+                             <label class="text-left nowrap pl-5 d-inline-flex align-items-center">
61+                                 <a class="d-flex align-items-center" href="<?=  $ this sitebase ()->getUrl ($ link'route_name ' ]);?> ">
62+                                     <?php  $ this sitebase ()->drawIcon ($ link'icon ' ])?>  <?=  $ this sitebase ()->translate ($ link'label ' ]);?> 
63+                                 </a>
64+                             </label> 
65+                             <?=  $ link'data ' ];?> 
66+                         </div>
67+                     <?php  endforeach ; ?> 
68+                 </div>
69+             <?php  endforeach ;?> 
70+ 
71+             <div class="col">
72+ 
73+                 <div class="counter mb-2 d-flex justify-content-between"><hr /></div>
74+                 <div class="counter mb-2 d-flex justify-content-between"><label class="text-left nowrap pl-5 d-inline-flex align-items-center"><?php  $ this sitebase ()->drawIcon ('info ' )?>  <?=  $ this sitebase ()->translate ('Page Views ' );?> </label> <?=  $ page_views?> </div>
75+                 <div class="counter mb-2 d-flex justify-content-between"><label class="text-left nowrap pl-5 d-inline-flex align-items-center"><?php  $ this sitebase ()->drawIcon ('mail ' )?>  <?=  $ this sitebase ()->translate ('Mails sent ' );?> </label> <?=  $ mails_sent?> </div>
76+                 <?php  if  ($ controllercheckPermission ('administer_logs ' )) :?> 
77+                     <div class="text-left nowrap pl-5"><a class="btn btn-light d-flex align-items-center justify-content-center" href="<?=  $ this sitebase ()->getUrl ('admin.stats ' );?> "><?php  $ this sitebase ()->drawIcon ('bar-chart ' )?>  <?=  $ this sitebase ()->translate ('Stats ' );?> </a></div>
78+                 <?php  endif ; ?> 
79+ 
80+             </div>
81+ 
82+ <?php  else : ?> 
83+ 
3384        <?php  $ chunksarray_chunk ($ dashboard_linksceil (count ($ dashboard_links3  + 2 )); ?> 
3485        <?php  foreach  ($ chunksas  $ chunkIndex$ chunk?> 
35-             <div class="col-md-4  text-center">
86+             <div class="col text-center">
3687            <?php  foreach  ($ chunkas  $ link?> 
3788                <div class="counter mb-2 d-flex justify-content-between align-items-center">
3889                    <label class="text-left nowrap pl-5 d-inline-flex align-items-center">
53104                <?php  endif ; ?> 
54105            <?php  endif ; ?> 
55106
56- 
57107            </div>
58108        <?php  endforeach  ?> 
59-     </div>
60109
61- </div>
110+ <?php  endif ; ?> 
111+     </div>
112+ </div>
0 commit comments