Location enabled
authorKilian Saffran <ksaffran@dks.lu>
Tue, 9 Jul 2019 05:41:04 +0000 (07:41 +0200)
committerKilian Saffran <ksaffran@dks.lu>
Tue, 9 Jul 2019 05:41:04 +0000 (07:41 +0200)
tmpl/block/locations.tt
tmpl/page/index.tt

index d4cc370..8846ff7 100644 (file)
@@ -3,7 +3,11 @@
       <ul class="cat">
         <li>
           <ol class="type">
-            [% FOREACH loc = dksdb.query("select location_link,city,case when country <> 'LUX' then country else null end as country from lawyercatalog where city is not null ;") %]
+            [% FOREACH loc = dksdb.query("select lower(lc.location_link) as location_link,lc.city,case when lc.country <> 'LUX' then lc.country else null end as country 
+from lawyercatalog lc join users us on (lc.id_user = us.id)
+left join appaccess ac on (us.id=ac.id_user and ac.id_app=2)
+where lc.city is not null and us.blocked is null and ac.publicenabled=true
+group by lower(lc.location_link),lc.country,lc.city;") %]
             <li><a href="[% abspath %]lieu/[% loc.location_link %].html">[% loc.city %]
             [% IF loc.country %]
             &nbsp;([% loc.country %])
index 8aac4e9..dce4d8d 100644 (file)
@@ -9,11 +9,11 @@
       <hr>
     </div>
     [% INCLUDE block/domaines.tt %]
-    <!--<div class="section-title text-center center">
+    <div class="section-title text-center center">
       <h3>Lieus</h3>
       <hr>
-    </div>-->
-    [% # INCLUDE block/locations.tt %]    
+    </div>
+    [%  INCLUDE block/locations.tt %]    
         
       </div>