diff --git a/js/profile.js b/js/profile.js --- a/js/profile.js +++ b/js/profile.js @@ -1,44 +1,44 @@ var url= ''; (function ($, Drupal, drupalSettings) { $(".block-title").empty(); var lang = $(".lang").val(); var catname = $(".catname").val(); var address = $(".cat_address").val(); var data_th = 'รายชื่อธุรกิจในหมวด "'+catname+'" ที่อยู่ใน '+address+''; var data_en = 'Business on category "'+catname+'" at '+address+''; if(lang == "th") { - $(".block-title").css('line-height','1.75').append(data_th); + $(".block-title").css({'line-height':'1.75','border':'solid 1px #ddd','border-bottom':'0','background-color':'#fff'}).append(data_th); }else{ - $(".block-title").css('line-height','1.75').append(data_en); + $(".block-title").css({'line-height':'1.75','border':'solid 1px #ddd','border-bottom':'0','background-color':'#fff'}).append(data_en); } })(jQuery, Drupal, drupalSettings); function print_content(){ var printContents = jQuery("#block-bootstrap-content").html(); var originalContents = document.body.innerHTML; document.body.innerHTML = printContents; window.print(); document.body.innerHTML = originalContents; } function hover_share(data){ var src = data.getAttribute('src'); var hover = src.replace("1","2"); data.setAttribute('src',hover); } function out_share(data){ var src = data.getAttribute('src'); var hover = src.replace("2","1"); data.setAttribute('src',hover); } function sendmail(obj){ var data = jQuery(obj).attr('data-value'); var data_from = jQuery(obj).attr('data-from'); var from = data_from; var content = data; var link = "mailto:email@address.com" + "?subject="+from + "&body="+content; window.location.href = link; } \ No newline at end of file diff --git a/templates/typ-profile.html.twig b/templates/typ-profile.html.twig --- a/templates/typ-profile.html.twig +++ b/templates/typ-profile.html.twig @@ -1,480 +1,480 @@ {% set base_images = 'http://media.yellowpages.co.th/yellowpages' %} {% set base_promotion = 'http://promotion.yellowpages.co.th/media/promotion/' %}
{% trans %} Address {% endtrans %}: | {{ [profile.addr,profile.soi,profile.road,profile.subdistrictname,profile.districtname,profile.cityname,profile.postcode]|join(' ') }} |
{% trans %} Tel {% endtrans %}: |
{% if not profile.telno %}
{% else %}
{% if type == 'FL' %}
{{ profile._format.telno.0 }} {% else %} {% for key, tel in profile._format.telno %} {% if loop.last != key+1 %}{{ tel }}{{ "," }} {% else %}{{ tel }}{% endif %} {% endfor %} {% endif %} {% endif %} |
{% trans %} Fax {% endtrans %}: |
{% if not profile.fax %}
{% else %}
{% if type == 'FL' %}
{{ profile._format.fax.0 }} {% else %} {% for key, fax in profile._format.fax %} {% if loop.last != key+1 %}{{ fax }}{{ "," }} {% else %}{{ fax }}{% endif %} {% endfor %} {% endif %} {% endif %} |
{% trans %} Email {% endtrans %}: |
{% if not profile.email %}
{% else %}
{% if type == 'FL' %}
{% set email = profile.email|split(',') %}
{% for key , mail in email %}
{% if loop.last != key+1 %}{{ mail }}, {% else %}{{ mail }} {% endif %} {% endfor %} {% else %} {% set email = profile.email|split(',') %} {% for key , mail in email %} {% if loop.last != key+1 %}{{ mail }}, {% else %}{{ mail }} {% endif %} {% endfor %} {% endif %} {% endif %} |
{% trans %} Website {% endtrans %}: |
{% if not profile.website %}
{% else %}
{% set website = profile.website|split(',') %}
{% if type == 'FL' %}
{{ website.0 }}
{% else %}
{% for key , web in website %}
{% if loop.last != key+1 %}{{ web }}, {% else %}{{ web }} {% endif %} {% endfor %} {% endif %} {% endif %} |
{% trans %} Work-Time {% endtrans %}: |
{% if not profile.workinghours %}
{% else %}
{{ profile._format.workinghours }} {% endif %} |
":" ","
":" "}) }} {% endif %} {% else %} {% if not prodescription or prodescription is empty %} {% else %}