visibility,refrsh and other corrections
authorKilian Saffran <ksaffran@dks.lu>
Tue, 25 Jun 2019 10:53:34 +0000 (12:53 +0200)
committerKilian Saffran <ksaffran@dks.lu>
Tue, 25 Jun 2019 10:53:34 +0000 (12:53 +0200)
backoffice/api/lib/session.pm
backoffice/index.cgi
backoffice/tmpl/block/topbar.tt
backoffice/tmpl/module/annuaire/index.tt
backoffice/tmpl/module/applications/index.tt
tmpl/block/avocatlist.tt
tmpl/block/domaines.tt
tmpl/block/head.tt
tmpl/block/topnav.tt
tmpl/page/avocat/index.tt

index 5d2af22..f9b6c64 100644 (file)
@@ -81,7 +81,7 @@ sub registeruser(){
   
   my $user = $self->{db}->dbquerysorted("select id from users where username='".$data->{email}."';");
   if (keys(%{$user}) > 0){
-    $ret->{message} = "Un utilisateur avec la même addresse e-mail existe déjà!";
+    $ret->{message} = "Un utilisateur avec la même adresse e-mail existe déjà!";
     return $ret; 
   }
   my $newpwd = $self->randomstring(12);
index 2c7d8da..6f3e75b 100644 (file)
@@ -172,9 +172,9 @@ $template->process($skl,$vars) || die "Template process failed: ", $template->er
 # }
 
 #  print Dumper($vars);
-print "/*";
-# print Dumper($p);
-print Dumper($vars);
-# print Dumper($sess);
-print "*/";
+print "/*";
+# print Dumper($p);
+print Dumper($vars);
+# print Dumper($sess);
+print "*/";
 
index 826bd45..e0fcf6c 100644 (file)
@@ -1,10 +1,10 @@
  <nav class="navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
             <div class="navbar-brand-wrapper d-flex justify-content-center">
         <div class="navbar-brand-inner-wrapper d-flex justify-content-between align-items-center w-100">  
-          <a class="navbar-brand brand-logo" href="index.html">
+          <a class="navbar-brand brand-logo" href="[% siteurl %]#annuairenav" >
             <img src="images/toplogo.svg" alt="JuriDig" />
           </a>
-          <a class="navbar-brand brand-logo-mini" href="index.html">
+          <a class="navbar-brand brand-logo-mini" href="[% siteurl %]#annuairenav">
             <img src="images/logo-juridig.png" alt="JuriDig" />
           </a>
           <!--<button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
index e71b291..844c8e3 100644 (file)
@@ -8,7 +8,7 @@ left join public.lawyercategories lca on (ca.id=lca.id_category and lca.id_catal
 <header>
     <nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
     <ul class="navbar-nav mr-auto">
-      URL du profile:&nbsp;<a href="[% siteurl %]/avocat/[% cat.profile_link %]" target="_blank">[% siteurl %]/avocat/[% cat.profile_link %].html</a>
+      URL de votre page:&nbsp;<a href="[% siteurl %]avocat/[% cat.profile_link %].html" target="_blank">[% siteurl %]avocat/[% cat.profile_link %].html</a>
     </ul>
     <ul class="navbar-nav ml-auto">
           <li class="nav-item">
@@ -19,7 +19,7 @@ left join public.lawyercategories lca on (ca.id=lca.id_category and lca.id_catal
                 checked
               [% END %]
               >
-              <label class="custom-control-label justify-content-start" for="appaccess_[% cat.access_id %]">Visible publique</label>
+              <label class="custom-control-label justify-content-start" for="appaccess_[% cat.access_id %]">Visible au public</label>
             </div>
           
           </li>
@@ -88,7 +88,7 @@ left join public.lawyercategories lca on (ca.id=lca.id_category and lca.id_catal
   <div class="col-sm-4">
   <div class="row">   
     <div class="form-group col-sm-12">
-      <label for="address">Addresse</label>
+      <label for="address">Adresse</label>
       <input type="text" class="form-control" id="address" name="lawyercatalog_address" value="[% cat.address %]">
     </div>
     <div class="form-group col-sm-4">
index d079077..4d42f39 100644 (file)
@@ -28,7 +28,7 @@
                         checked
                         [% END %]
                         >
-                        <label class="custom-control-label justify-content-start" for="appaccess_[% modules.id %]">Visible publique</label>
+                        <label class="custom-control-label justify-content-start" for="appaccess_[% modules.id %]">Visible au public</label>
                     </div>
                   </div>
               </div>
                                         <input type="text" class="form-control col-sm-10" id="recipient" name="recipient"   required data-rule="name|required" value="[% session.prename %] [% session.surname %]">
                   </div>
                   <div class="form-group form-inline frmdata">
-                                        <label for="address" class="col-sm-2">addresse</label>
+                                        <label for="address" class="col-sm-2">adresse</label>
                                         <input type="text" class="form-control col-sm-10" data-rule="minlength-4|required" id="address" name="address" required value="">
                   </div>
                   <div class="form-group form-inline frmdata">
-                                        <label for="userzip" class="col-sm-2">CP</label>
+                                        <label for="zip" class="col-sm-2">CP</label>
                                         <input type="text" class="form-control col-sm-3" id="zip" name="zip" data-rule="minlength-4|required" required value="">
-                                        <label for="usercity" class="col-sm-1">Ville</label>
+                                        <label for="city" class="col-sm-1">Ville</label>
                                         <input type="text" class="form-control col-sm-6" id="city" name="city" data-rule="minlength-3|required" required value="">
                   </div>
                   <div class="form-group form-inline frmdata">
index 35f430e..6bbc693 100644 (file)
@@ -1,7 +1,14 @@
 [% IF pagedir == 'domaine' %]
-  [% avolist = dksdb.prepare('select lc.profile_link,lc.prename,lc.surname,lc.company,lc.photo from lawyercatalog lc join lawyercategories lcat on (lc.id=lcat.id_catalog) join categories cat on (lcat.id_category=cat.id) where cat.link= ? order by lc.surname, lc.prename, lc.company;'); %]
+  [% avolist = dksdb.prepare('select lc.profile_link,lc.prename,lc.surname,lc.company,lc.photo 
+from lawyercatalog lc 
+join lawyercategories lcat on (lc.id=lcat.id_catalog) 
+join categories cat on (lcat.id_category=cat.id)
+join appaccess ap on (lc.id_user = ap.id_user)
+where cat.link= ? and lcat.selection=true and ap.publicenabled = true 
+group by lc.profile_link,lc.prename,lc.surname,lc.company,lc.photo 
+order by lc.surname, lc.prename, lc.company;'); %]
 [% ELSIF pagedir == 'lieu' %]
-  [% avolist = dksdb.prepare("select profile_link,prename,surname,company,photo from lawyercatalog where location_link =?;"); %]
+  [% avolist = dksdb.prepare("select profile_link,prename,surname,company,photo from lawyercatalog where location_link =? group by profile_link,prename,surname,company,photo order by surname, prename, company;"); %]
 [% END%]
 <div class="container">
 <div class="avocat-items col-lg-12 row">
index 250b016..5b437c6 100644 (file)
@@ -6,9 +6,9 @@
             [% FOREACH cats = dksdb.query("select cat.link,cat.category from lawyercategories lcat 
 join categories cat on (lcat.id_category=cat.id) 
 join lawyercatalog lc on (lcat.id_catalog=lc.id)
-join appaccess ac on (ac.id_user=lc.id_user and ac.id_app='2' and ac.publicenabled = true)
+join appaccess ac on (ac.id_user=lc.id_user and ac.id_app='2' and lcat.selection=true and ac.publicenabled = true)
 group by cat.id order by category;") %]
-            <li><a href="[% abspath%]domaines/[% cats.link %].html" >[% cats.category %]</a></li>
+            <li><a href="[% abspath%]domaine/[% cats.link %].html" >[% cats.category %]</a></li>
             
          [% END %] 
                     
index 9d0bfd7..05a8662 100644 (file)
@@ -7,6 +7,9 @@
     <meta name="copyright" content="DKS sarl">
     <meta name="audience" content="all">
     <meta name="robots" content="index,follow">
+    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
     <link rel="shortcut icon" href="[% abspath %]img/favicon.ico" type="image/x-icon">
     <link rel="apple-touch-icon" sizes="57x57" href="[% abspath %]img/apple-icon-57x57.png">
 <link rel="apple-touch-icon" sizes="60x60" href="[% abspath %]img/apple-icon-60x60.png">
index af55166..8bfc90a 100644 (file)
@@ -6,7 +6,7 @@
 
   <div class="collapse navbar-collapse justify-content-center" id="navbarjuridig">
     <ul class="navbar-nav">
-     <li class="nav-item"> <a  class="nav-link" href="/">Annuaire</a> </li>
+     <li class="nav-item"> <a  class="nav-link" href="[% baseurl %]#annuairenav">Annuaire</a> </li>
           <li class="nav-item"> <a   class="nav-link" href="[% basepath %]/backoffice/register.html">Vous êtes avocat?</a> </li>
           <li class="nav-item"> <a class="nav-link btn btn-secondary" href="[% basepath %]/backoffice/login.html">Se Connecter</a> </li>
       
index 7e4dc0d..f497f53 100644 (file)
@@ -1,9 +1,9 @@
-[% profile = dksdb.prepare("SELECT id, id_user, surname, prename, company, email, phone, address, zip, city, description, photo, price, profile_link, court, title, country, replace(replace(replace(council::TEXT,'[',''),']',''),'\"','') as council, replace(replace(replace(languages::TEXT,'[',''),']',''),'\"','') as languages, logo, website, location_link, location_url FROM lawyercatalog where profile_link= ?;") %]
+[% profile = dksdb.prepare("SELECT lc.id, lc.id_user, surname, prename, company, email, phone, address, zip, city, description, photo, price, profile_link, court, title, country, replace(replace(replace(council::TEXT,'[',''),']',''),'\"','') as council, replace(replace(replace(languages::TEXT,'[',''),']',''),'\"','') as languages, logo, website, location_link, location_url FROM lawyercatalog lc join appaccess ac on (lc.id_user=ac.id_user and ac.id_app='2') where lc.profile_link= ? and ac.publicenabled=true;") %]
 [% cnt = 0 %]
 [% FOREACH pr = profile.execute(link) %]
 [% cnt = cnt + 1 %]
 <div class="container" style="min-height: 80vh;">
-  <div class="row">
+  <div class="row" style="margin-top: 15px;">
     <div class="col-lg-12">
     <div class="row">
         <div class="col-sm-6">
@@ -64,7 +64,7 @@
                   <ul style="list-style: none;">
                     [% catall  = dksdb.prepare("select distinct cat.category from categories cat join lawyercategories lcat on (cat.id=lcat.id_category) 
                     join lawyercatalog lc on (lcat.id_catalog=lc.id)
-                    where lc.id = ? order by cat.category;") %]
+                    where lc.id = ? and lcat.selection=true order by cat.category;") %]
                     [% FOREACH cat = catall.execute(pr.id) %]
                     <li>[% cat.category %]</li>
                     [% END %]