Page MenuHomePhabricator

No OneTemporary

diff --git a/js/profile.js b/js/profile.js
new file mode 100644
--- /dev/null
+++ b/js/profile.js
@@ -0,0 +1,12 @@
+(function ($, Drupal, drupalSettings) {
+ var url = jQuery('#url').val();
+ if(url != ''){
+ go_toStore(url);
+ }
+})(jQuery, Drupal, drupalSettings);
+
+function go_toStore(url){
+ if(confirm("Application YellowPages") == true){
+ window.location = "myapp://Thailand Yellowpages"
+ }
+}
\ No newline at end of file
diff --git a/src/Controller/TYPProfileController.php b/src/Controller/TYPProfileController.php
--- a/src/Controller/TYPProfileController.php
+++ b/src/Controller/TYPProfileController.php
@@ -1,206 +1,213 @@
<?php
/**
* @file
* Contains \Drupal\page_example\Controller\TableSortExampleController.
*/
/**/
namespace Drupal\typ_profile\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\Core\Database\Query;
use Drupal\Core\Url;
/**
* Controller routines for tablesort example routes.
*/
class TYPProfileController extends ControllerBase
{
/*public function profile_redirect(){
return $this->redirect("<front>");
}*/
public function formatPhoneNumber($s) {
foreach( explode(",", $s) as $p) {
$num_com = null;
$num_first = null;
$num_second = null;
$num_ex = explode("-", trim($p));
for($i = 0; $i < count($num_ex); $i++) {
if(($i+1) < count($num_ex)) {
$num_first .= $num_ex[$i];
} else {
$num_second .= $num_ex[$i];
}
}
if(empty($num_first)) {
$num_first = $num_second;
$num_second = null;
}
if(strlen($num_first) == 9) {
$num_com = substr($num_first, 0, 1) . '-'. substr($num_first, 1, 4). '-'. substr($num_first, 5,4);
if(!empty($num_second)) {
$num_com .= '-'.$num_second;
}
} else {
if(strlen($num_first) < 9) {
$num_first .= $num_second;
if(strlen($num_first) == 9) {
$num_com = substr($num_first, 0, 1) . '-'. substr($num_first, 1, 4). '-'. substr($num_first, 5,4);
} elseif(strlen($num_first) == 10){
$num_com = substr($num_first, 0, 2) . '-'. substr($num_first, 2, 4). '-'. substr($num_first, 6,7);
}else {
$num_com = substr($num_first, 0, 1) . '-'. substr($num_first, 1, 4). '-'. substr($num_first, 5,4).'-'.substr($num_first, 9,strlen($num_first));
}
} else {
if(strlen($num_first) == 10) {
$num_com = substr($num_first, 0, 2) . '-'. substr($num_first, 2, 4). '-'. substr($num_first, 6,7);
} else {
$num_first .= $num_second;
$num_com = substr($num_first, 0, 1) . '-'. substr($num_first, 1, 4). '-'. substr($num_first, 5,4).'-'.substr($num_first, 9,strlen($num_first));
}
}
}
$ps[] = $num_com;
}
return implode(", ", $ps);
}
public function formatWorkingHour($s) {
foreach( explode(",", $s) as $p) {
$ps[] = $p;
}
return implode(", ", $ps);
}
protected $data;
public function profileTitle($bizid) {
$this->data = \Drupal::service("typ.search")->getProfile($bizid ,AUTO);
if (!$this->data) return '';
else return $this->data['humanname'];
}
public function profilePage($bizid){
$this->data = \Drupal::service("typ.search")->getProfile($bizid ,AUTO);
$address_id = "";
$language = \Drupal::languageManager()->getCurrentLanguage()->getId();
$data = $this->data;
if (!$data) {
return $this->redirect("<front>");
}
/*if($data['landingpage'] == ""){
$address_id = $data['addressid'];
}
if(is_numeric($address_id)){
$result = \Drupal::service('typ.unvservice')->loadListing($data['customerid']);
$rs_details = (!empty($result['address'][$data['headingcod']][$address_id]['frontviews']))?$result['address'][$headingcode][$data['headingcod']]['frontviews']:array();
} else {
$result = \Drupal::service('typ.unvservice')->loadService($data['customerid']);
}*/
// PLEASE COMMENT?? WHY WE LOAD PROFILE AND THEN LOAD SERVICE?
$address_id = $data['addressid'];
$result = \Drupal::service('typ.unvservice')->loadListing($data['customerid']);
//(!empty($result['landingpages'][$data['headingcode']]))?$result['landingpages'][$data['headingcode']]:array();
//$type = '';
if($result['customertype'] == 'FL'){
$type = 'FL';
}else{
$result_olc = \Drupal::service('typ.catalog')->listData($data['customerid']);
}
$pos = strpos(html_entity_decode($data['proddesc']),"<p>");
if($pos !== false && $data['proddesc']){
$tempdesc = substr(html_entity_decode($data['proddesc']),3);
}else{
$tempdesc = html_entity_decode(html_entity_decode($data['proddesc'])) ;
//$tempdesc = $data['proddesc'];
}
$temp = '<p style="color:#000;">';
$tempdesc = $temp.$tempdesc;
$type = $data['customertype'];
if($type == "FL") {
$dataproddesct = iconv_substr($tempdesc,0,123,"UTF-8");
$dataproddesct .= '...';
}else{
$dataproddesct = $tempdesc;
}
if($type != "FL" && !empty($result_olc)){
$olcdata = $result_olc[0];
}
if (!empty($data['telno'])) {
foreach ($data['telno'] as $t) {
$data['_format']['telno'][] = $this->formatPhoneNumber($t);
}
}
if (!empty($data['fax'])) {
foreach ($data['fax'] as $t) {
$data['_format']['fax'][] = $this->formatPhoneNumber($t);
}
}
if($type == "FL"){
/*unset($data['_format']['telno']);
$data['_format']['telno'][] = $data['_format']['telno'][0];
unset($data['fax']);
$data['fax'][] = $data['fax'][0];
$exp = explode(",", $data['email']);
unset($data['email']);
$data['email'][] = $exp[0];*/
}else{
/*$exp = explode(",", $data['email']);
$data['email'] = $exp;*/
}
$thai_month_arr = array('01'=>'ม.ค.','02'=>'ก.พ.','03'=>'มี.ค.','04'=>'เม.ษ.','05'=>'พ.ค.','06'=>'มิ.ย.','07'=>'ก.ค.','08'=>'ส.ค.','09'=>'ก.ย.','10'=>'ต.ค.','11'=>'พ.ย.','12'=>'ธ.ค.');
list($year, $month,$day) = explode('-', $result['address'][$data['headingcode']][$data['addressid']]['promotion']['enddate']);
$date_e = $day." ".$thai_month_arr[$month]." ".($year+543);
list($year, $month,$day) = explode('-', $result['address'][$data['headingcode']][$data['addressid']]['promotion']['startdate']);
$date_s = $day." ".$thai_month_arr[$month]." ".($year+543);
$result['address'][$data['headingcode']][$data['addressid']]['promotion']['startdate'] = $date_s;
$result['address'][$data['headingcode']][$data['addressid']]['promotion']['enddate'] = $date_e;
$result['address'][$data['headingcode']][$data['addressid']]['promotion']['subject'] = preg_replace('/<p[^>]*?>/','<p style="color:#000">',html_entity_decode($result['address'][$data['headingcode']][$data['addressid']]['promotion']['subject']));
if(!empty($data['profile'])){
$data['profile'] = preg_replace('/<p[^>]*?>/','<p style="color:#000">',html_entity_decode($data['profile']));
}if (!empty($data['workinghours'])) $data['_format']['workinghours'] = $this->formatWorkingHour($data['workinghours']);
$data['customertyp'] = $data['customertype'];
$display[] = array(
'#theme' => 'typ_profile',
'#profile' => $data,
'#prodescription' => $dataproddesct,
'#catalog' => $olcdata,
'#type' => $type,
'#promotion' => $result['address'][$data['headingcode']][$data['addressid']]['promotion'],
);
if ($type != 'FL')
$display['#attached']['drupalSettings']['disableAds'] = TRUE;
return $display;
}
+ public function getTitlePromotion(){
+ return t('How to get promotion');
+ }
+
public function getPromotion(){
$mobileDetector = \Drupal::service('krs.mobile_detect');
if($mobileDetector->isAndroidOS()){
$url = 'https://play.google.com/store/apps/details?id=com.initialive.yellowpages.act&hl=th';
}elseif($mobileDetector->isIOS()){
$url = 'https://itunes.apple.com/th/app/thailand-yellowpages/id387848017?mt=8';
}else{
$url = '';
}
$display[] = array(
'#theme' => 'typ_promotion',
'#url' => $url
);
+ $display['#attached']['library'] = array(
+ 'typ_profile/profile.popup',
+ );
return $display;
}
}
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,420 +1,448 @@
{% set base_images = 'http://media.yellowpages.co.th/yellowpages'%}
{% set base_promotion = 'http://promotion.yellowpages.co.th/media/promotion/' %}
<div class="container-fluid">
<div class="col-xs-12 col-md-8 col-lg-8" >
<div class="row">
<div class="col-xs-12 col-md-12 col-lg-12">
{#{% if profile.logo %}#}
{#<div class="col-xs-12 col-md-5 col-lg-5">#}
- {#<img class="img-responsive" src="{{ [base_images,"/logo/",profile.logo]|join }}"/>#}
+ {#<img class="img-responsive" src="{{ [base_images,"/logo/",profile.logo]|join }}"/>#}
{#</div>#}
{#{% else %}#}
{#<div class="col-xs-12 col-md-3 col-lg-3">#}
- {#<img class="img-responsive" src="{{ '/themes/bootstrap/typ/images/icon-map/typ-map-default.jpg' }}"/>#}
+ {#<img class="img-responsive" src="{{ '/themes/bootstrap/typ/images/icon-map/typ-map-default.jpg' }}"/>#}
{#</div>#}
{#{% endif %}#}
<div class="col-xs-12 col-md-12 col-lg-12" style="padding: 0px;">
<h4>{{ profile.humanname|raw }}</h4>
{% trans %}Category{% endtrans %} : <a href="/heading/{{ profile.ypheadingname }}">{{ profile.headingname|raw }}</a><br>
</div>
</div>
</div>
<div class="row">
<!-- check FL close openx -->
{% if type != 'FL' %}
- <div id="customertype"
- data-customertype="{{ type }}" style="display: none"></div>
+ <div id="customertype"
+ data-customertype="{{ type }}" style="display: none"></div>
{% endif %}
<!-- check FL close openx -->
<br>
<div class="col-xs-12 col-sm-12 col-lg-12">
+
{% if type != 'FL' %}
{{ profile.profile|raw}}<br><br>
- {% else %}
+ {% else %}
{{ profile.profile|raw|slice(0, 100)}}{% if profile.profile|length > 100 %}{{ '...</p>' }}{% endif %}<br><br>
{% endif %}
{% trans %} Address {% endtrans %}
{{ [profile.addr,profile.soi,profile.road,profile.subdistrictname,
- profile.districtname,profile.cityname,profile.postcode]|join(' ') }}
+ profile.districtname,profile.cityname,profile.postcode]|join(' ') }}
{#{% if profile.location.lat %}#}
- {#<a href="/ypsearch?qm=#{{ profile.humanname|raw }}"><img src="/themes/bootstrap/typ/images/icon-map/icon-pin-map_r.png"></a> <br>#}
+ {#<a href="/ypsearch?qm=#{{ profile.humanname|raw }}"><img src="/themes/bootstrap/typ/images/icon-map/icon-pin-map_r.png"></a> <br>#}
{#{% else %}#}
- {#<a href="https://www.google.co.th/maps/search/{{ profile.fulladdr|url_encode }}" target="_blank"><img src="/themes/bootstrap/typ/images/icon-map/icon-pin-map_r.png"></a> <br>#}
+ {#<a href="https://www.google.co.th/maps/search/{{ profile.fulladdr|url_encode }}" target="_blank"><img src="/themes/bootstrap/typ/images/icon-map/icon-pin-map_r.png"></a> <br>#}
{#{% endif %}#}
+
<br><br>
<div class="row">
- <div class="col-xs-4 col-sm-3 col-lg-3 ">
- {% if not profile.telno %}{% else %}{% trans %} Tel {% endtrans %}{% if type == 'FL' %}{% set count = 1 %} {% set loop = 1 %}{% else %} {% set loop = profile._format.telno|length %}{% endif %}{% for i in 1..loop %}{% set count=count+1 %}{% if count == 5 %} {{ '<br>' }}{% set count = 1 %} {% endif %} {% endfor %}{{ '<br>' }}{% endif %}
- {% if not profile.fax %}{% else %}{% trans %} Fax {% endtrans %}{% if type == 'FL' %}{% set count = 1 %} {% set loop = 1 %}{% else %} {% set loop = profile._format.fax|length %}{% endif %}{% for i in 1..loop %}{% set count=count+1 %}{% if count == 5 %} {{ '<br>' }}{% set count = 1 %} {% endif %} {% endfor %}{{ '<br>' }}{% endif %}
- {% if not profile.email %}{% else %}{% trans %} Email {% endtrans %} {% set loop = profile.email|split(',') %}{% for i in 1..loop|length %} {{ '<br>' }} {% endfor %} {% endif %}
- {% if not profile.website %}{% else %}{% trans %} Website {% endtrans %} {% set loop = profile.website|split(',') %}{% for i in 1..loop|length %} {{ '<br>' }} {% endfor %} {% endif %}
- {% if not profile.workinghours %}{% else %}{% trans %} Work-Time {% endtrans %}{% endif %}
- </div>
- <div class="col-xs-8 col-sm-9 col-lg-9">
- {% if not profile.telno %}
- {% else %}
- {% if type == 'FL' %}
- <span>{{ profile._format.telno.0 }}</span><br>
- {% else %}
- {% for key, tel in profile._format.telno %}
- {% if loop.last != key+1 %}<a href="tel:{{ tel }}">{{ tel }}</a>{{ " ," }}
- {% else %}<a href="tel:{{ tel }}">{{ tel }}</a>{% endif %}
- {% endfor %}<br>
- {% endif %}
- {% endif %}
-
- {% if not profile.fax %}
- {% else %}
- {% if type == 'FL' %}
- <span>{{ profile._format.fax.0 }}</span><br>
- {% else %}
- {% for key, fax in profile._format.fax %}
- {% if loop.last != key+1 %}<a href="tel:{{ fax }}">{{ fax }}</a>{{ " ," }}
- {% else %}<a href="tel:{{ fax }}">{{ fax }}</a>{% endif %}
- {% endfor %}<br>
+ <div class="col-xs-12 col-sm-12 col-lg-12">
+ <table>
+ {% if not profile.telno %}{% else %}
+ <tr>
+ <td class="text-right">{% trans %} Tel {% endtrans %}</td>
+ <td class="table-right">
+ {% if not profile.telno %}
+ {% else %}
+ {% if type == 'FL' %}
+ <span>{{ profile._format.telno.0 }}</span><br>
+ {% else %}
+ {% for key, tel in profile._format.telno %}
+ {% if loop.last != key+1 %}<a href="tel:{{ tel }}">{{ tel }}</a>{{ " ," }}
+ {% else %}<a href="tel:{{ tel }}">{{ tel }}</a>{% endif %}
+ {% endfor %}<br>
+ {% endif %}
+ {% endif %}
+ </td>
+ </tr>
+ {% endif %}
+ {% if not profile.fax %}{% else %}
+ <tr>
+ <td class="text-right">{% trans %} Fax {% endtrans %}</td>
+ <td class="table-right">
+ {% if not profile.fax %}
+ {% else %}
+ {% if type == 'FL' %}
+ <span>{{ profile._format.fax.0 }}</span><br>
+ {% else %}
+ {% for key, fax in profile._format.fax %}
+ {% if loop.last != key+1 %}<a href="tel:{{ fax }}">{{ fax }}</a>{{ " ," }}
+ {% else %}<a href="tel:{{ fax }}">{{ fax }}</a>{% endif %}
+ {% endfor %}<br>
+ {% endif %}
+ {% endif %}
+ </td>
+ </tr>
{% endif %}
- {% endif %}
-
- {% if not profile.email %}
- {% else %}
- {% if type == 'FL' %}
- {% set email = profile.email|split(',') %}
- {% for key , mail in email %}
- {% if loop.last != key+1 %}{{ mail }} ,<br>
- {% else %}{{ mail }}<br>{% endif %}
- {% endfor %}
- {% else %}
- {% set email = profile.email|split(',') %}
- {% for key , mail in email %}
- {% if loop.last != key+1 %}<a href="mailto:{{ mail }}">{{ mail }}</a> ,<br>
- {% else %}<a href="mailto:{{ mail }}">{{ mail }}</a><br>{% endif %}
- {% endfor %}
+ {% if not profile.email %}{% else %}
+ <tr>
+ <td class="text-right">{% trans %} Email {% endtrans %}</td>
+ <td class="table-right">
+ {% if not profile.email %}
+ {% else %}
+ {% if type == 'FL' %}
+ {% set email = profile.email|split(',') %}
+ {% for key , mail in email %}
+ {% if loop.last != key+1 %}{{ mail }} ,<br>
+ {% else %}{{ mail }}<br>{% endif %}
+ {% endfor %}
+ {% else %}
+ {% set email = profile.email|split(',') %}
+ {% for key , mail in email %}
+ {% if loop.last != key+1 %}<a href="mailto:{{ mail }}">{{ mail }}</a> ,<br>
+ {% else %}<a href="mailto:{{ mail }}">{{ mail }}</a><br>{% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endif %}
+ </td>
+ </tr>
{% endif %}
- {% endif %}
-
- {% if not profile.website %}
- {% else %}
- {% set website = profile.website|split(',') %}
- {% for key , web in website %}
- {% if loop.last != key+1 %}<a href="http://{{ web }}" target="_blank">{{ web }}</a> ,<br>
- {% else %}<a href="http://{{ web }}" target="_blank">{{ web }}</a><br>{% endif %}
- {% endfor %}
- {% endif %}
-
- {% if not profile.workinghours %}
- {% else %}
- {{ profile._format.workinghours }}<br>
- {% endif %}
+ {% if not profile.website %}{% else %}
+ <tr>
+ <td class="text-right">{% trans %} Website {% endtrans %}</td>
+ <td class="table-right">
+ {% if not profile.website %}
+ {% else %}
+ {% set website = profile.website|split(',') %}
+ {% for key , web in website %}
+ {% if loop.last != key+1 %}<a href="http://{{ web }}" target="_blank">{{ web }}</a> ,<br>
+ {% else %}<a href="http://{{ web }}" target="_blank">{{ web }}</a><br>{% endif %}
+ {% endfor %}
+ {% endif %}
+ </td>
+ </tr>
+ {% endif %}
+ {% if not profile.workinghours %}{% else %}
+ <tr>
+ <td class="text-right">{% trans %} Work-Time {% endtrans %}</td>
+ <td class="table-right">
+ {% if not profile.workinghours %}
+ {% else %}
+ {{ profile._format.workinghours }}<br>
+ {% endif %}
+ </td>
+ </tr>
+ {% endif %}
+ </table>
</div>
<div class="row" style="margin-left: 0px;">
<div class="col-xs-12 col-md-12 col-lg-12">
{% if type != 'FL' %}
{% if not prodescription %}
- {% else %}
- <br>{% trans %} Product And Service {% endtrans %}<br><br>
- {{ prodescription|raw }}<br>
+ {% else %}
+ <br>{% trans %} Product And Service {% endtrans %}<br><br>
+ {{ prodescription|raw }}<br>
{% endif %}
{% if not profile.brandname %}
- {% else %}<br>{% trans %} Banner {% endtrans %} : {{ profile.brandname|replace({"<p>":" ","</p>":" "}) }}
+ {% else %}<br>{% trans %} Banner {% endtrans %} : {{ profile.brandname|replace({"<p>":" ","</p>":" "}) }}
{% endif %}
{% endif %}
<br><br><br>
{# TAB #}
{% if type == 'FL' %}
- <div class="mobile">
- <ul class="nav nav-tabs" {% if not promotion.promotionid and not profile.map %}style="display: none;"{% endif %}>
- {% if promotion.promotionid %}<li class="active" ><a data-toggle="tab" href="#menu3">{% trans %} Promotion {% endtrans %}</a></li>{% endif %}
- {% if profile.map %}<li {% if not promotion.promotionid %}{{ 'class="active"' }}{% endif %}><a data-toggle="tab" href="#menu4">{% trans %} Map Picture {% endtrans %}</a></li>{% endif %}
- </ul>
+ <div class="mobile">
+ <ul class="nav nav-tabs" {% if not promotion.promotionid and not profile.map %}style="display: none;"{% endif %}>
+ {% if promotion.promotionid %}<li class="active" ><a data-toggle="tab" href="#menu3">{% trans %} Promotion {% endtrans %}</a></li>{% endif %}
+ {% if profile.map %}<li {% if not promotion.promotionid %}{{ 'class="active"' }}{% endif %}><a data-toggle="tab" href="#menu4">{% trans %} Map Picture {% endtrans %}</a></li>{% endif %}
+ </ul>
- <div class="tab-content" {% if not promotion.promotionid and not profile.map %}style="display: none;"{% endif %}>
+ <div class="tab-content" {% if not promotion.promotionid and not profile.map %}style="display: none;"{% endif %}>
- {% if promotion.promotionid %}
- <div id="menu3" {% if not promotion.promotionid %}{{ ' class="tab-pane fade"' }}{% else %}{{ ' class="tab-pane fade in active"' }}{% endif %}>
- <br>
- <div class="col-xs-12 col-md-12 col-lg-12">
- <div class="col-xs-6 col-md-6 col-lg-6 text-left">
- {{ profile.humanname|raw }}
- <br>
- <b><span style="color:red">{% trans %}Promotion{% endtrans %} : </span> </b> {{ promotion.title }}
+ {% if promotion.promotionid %}
+ <div id="menu3" {% if not promotion.promotionid %}{{ ' class="tab-pane fade"' }}{% else %}{{ ' class="tab-pane fade in active"' }}{% endif %}>
+ <br>
+ <div class="col-xs-12 col-md-12 col-lg-12">
+ <div class="col-xs-6 col-md-6 col-lg-6 text-left">
+ {{ profile.humanname|raw }}
+ <br>
+ <b><span style="color:red">{% trans %}Promotion{% endtrans %} : </span> </b> {{ promotion.title }}
+ </div>
+ <div class="col-xs-6 col-md-6 col-lg-6 text-right">
+ <b>{% trans %}Start Date{% endtrans %} :</b> {{ promotion.startdate|raw }}
+ <br>
+ <b>{% trans %}End Date{% endtrans %} :</b> {{ promotion.enddate|raw }}
+ </div>
</div>
- <div class="col-xs-6 col-md-6 col-lg-6 text-right">
- <b>{% trans %}Start Date{% endtrans %} :</b> {{ promotion.startdate|raw }}
- <br>
- <b>{% trans %}End Date{% endtrans %} :</b> {{ promotion.enddate|raw }}
- </div>
- </div>
- <br><br><br>
- <div class="col-xs-12 col-md-12 col-lg-12 text-center">
- {% if promotion.promoimg %}
- <div {% if promotion.promoimg and not promotion.promoimg2 and not promotion.promoimg3 %} class="col-xs-4 col-md-4 col-lg-4 col-xs-offset-4 col-md-offset-4 col-lg-offset-4"
- {% elseif promotion.promoimg and promotion.promoimg2 and not promotion.promoimg3 %} class="col-xs-4 col-md-4 col-lg-4 col-xs-offset-4 col-md-offset-4 col-lg-offset-4"
- {% else %} class="col-md-4" {% endif %} >
- <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg }}" class="colorbox group1" title="{{ promotion.productimg }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg }}" /></a>
- </div>
- {% endif %}
- {% if promotion.promoimg2 %}
- <div class="col-md-4" >
- <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg2 }}" class="colorbox group1" title="{{ promotion.productimg2 }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg2 }}" /></a>
+ <br><br><br>
+ <div class="col-xs-12 col-md-12 col-lg-12 text-center">
+ {% if promotion.promoimg %}
+ <div {% if promotion.promoimg and not promotion.promoimg2 and not promotion.promoimg3 %} class="col-xs-4 col-md-4 col-lg-4 col-xs-offset-4 col-md-offset-4 col-lg-offset-4"
+ {% elseif promotion.promoimg and promotion.promoimg2 and not promotion.promoimg3 %} class="col-xs-4 col-md-4 col-lg-4 col-xs-offset-4 col-md-offset-4 col-lg-offset-4"
+ {% else %} class="col-md-4" {% endif %} >
+ <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg }}" class="colorbox group1" title="{{ promotion.productimg }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg }}" /></a>
+ </div>
+ {% endif %}
+ {% if promotion.promoimg2 %}
+ <div class="col-md-4" >
+ <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg2 }}" class="colorbox group1" title="{{ promotion.productimg2 }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg2 }}" /></a>
+ </div>
+ {% endif %}
+ {% if promotion.promoimg3 %}
+ <div class="col-md-4" >
+ <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg3 }}" class="colorbox group1" title="{{ promotion.productimg3 }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg3 }}" /></a>
+ </div>
+ {% endif %}
</div>
- {% endif %}
- {% if promotion.promoimg3 %}
- <div class="col-md-4" >
- <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg3 }}" class="colorbox group1" title="{{ promotion.productimg3 }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg3 }}" /></a>
- </div>
- {% endif %}
- </div>
- <br><br><br><br><br><br>
- <div style="padding-left: 29px;padding-right: 27px;">
- <b>{% trans %}Detail{% endtrans %} : </b>
- {{ promotion.subject|raw }}
- <br><br>
- <div class="text-center" style="width:80%;margin-left:10%;">
- <div style="border-radius: 10px 10px 10px 10px;-moz-border-radius: 10px 10px 10px 10px;-webkit-border-radius: 10px 10px 10px 10px;border: 0px solid #e84848;background-color:red;height:50px;padding-top:13px;">
- <a style="color:#ffffff" href="#">{% trans %}How to get promotion from{% endtrans %} TYPLive Plus</a>
+ <br><br><br><br><br><br>
+ <div style="padding-left: 29px;padding-right: 27px;">
+ <b>{% trans %}Detail{% endtrans %} : </b>
+ {{ promotion.subject|raw }}
+ <br><br>
+ <div class="text-center" style="width:80%;margin-left:10%;">
+ <div style="border-radius: 10px 10px 10px 10px;-moz-border-radius: 10px 10px 10px 10px;-webkit-border-radius: 10px 10px 10px 10px;border: 0px solid #e84848;background-color:red;height:50px;padding-top:13px;">
+ <a style="color:#ffffff" href="/profile/get-promotion">{% trans %}How to get promotion from{% endtrans %} TYPLive Plus</a>
+ </div>
</div>
</div>
</div>
- </div>
- {% endif %}
+ {% endif %}
- {% if profile.map %}
- <div id="menu4" {% if promotion.promotionid %}{{ ' class="tab-pane fade"' }}{% else %}{{ ' class="tab-pane fade in active"' }}{% endif %}>
- <div class="row">
- <div class="col-xs-12 col-sm-12 col-lg-12">
- <br>
- <a href="{{[base_images,"/map/th/",profile.map,".jpg"]|join}}" class="colorbox">
- <img class="img-responsive " src="{{[base_images,"/map/th/",profile.map,".jpg"]|join}}"/>
- </a>
+ {% if profile.map %}
+ <div id="menu4" {% if promotion.promotionid %}{{ ' class="tab-pane fade"' }}{% else %}{{ ' class="tab-pane fade in active"' }}{% endif %}>
+ <div class="row">
+ <div class="col-xs-12 col-sm-12 col-lg-12">
+ <br>
+ <a href="{{[base_images,"/map/th/",profile.map,".jpg"]|join}}" class="colorbox">
+ <img class="img-responsive " src="{{[base_images,"/map/th/",profile.map,".jpg"]|join}}"/>
+ </a>
+ </div>
</div>
</div>
- </div>
- {% endif %}
+ {% endif %}
+ </div>
</div>
- </div>
{% else %}
- <div class="mobile">
- <ul class="nav nav-tabs" {% if not promotion.promotionid and not profile.location.lat and not profile.printadst %} style="display: none;" {% endif %}>
- {#{% if profile.picturet1 %}<li class="active"><a data-toggle="tab" href="#home">{% trans %} Picture {% endtrans %}</a></li>{% endif %}#}
- {% if promotion.promotionid %}<li class="active" ><a data-toggle="tab" href="#menu1">{% trans %} Promotion {% endtrans %}</a></li>{% endif %}
- {% if profile.location.lat %}<li {% if not promotion.promotionid %} {{ 'class="active"' }} {% endif %}><a data-toggle="tab" href="#menu2">{% trans %} Digital Map {% endtrans %}</a></li>{% endif %}
- {% if profile.printadst %}<li {% if not promotion.promotionid and not profile.location.lat %}{{ 'class="active"' }}{% endif %}><a data-toggle="tab" href="#menu3">{% trans %} Advertisement {% endtrans %}</a></li>{% endif %}
- {#{% if profile.map %}<li {% if not profile.location.lat and not profile.printadst and not profile.promotion and not profile.onlinepromotion %}{{ 'class="active"' }}{% endif %}><a data-toggle="tab" href="#menu4">{% trans %} Map Picture {% endtrans %}</a></li>{% endif %}#}
- </ul>
+ <div class="mobile">
+ <ul class="nav nav-tabs" {% if not promotion.promotionid and not profile.location.lat and not profile.printadst %} style="display: none;" {% endif %}>
+ {#{% if profile.picturet1 %}<li class="active"><a data-toggle="tab" href="#home">{% trans %} Picture {% endtrans %}</a></li>{% endif %}#}
+ {% if promotion.promotionid %}<li class="active" ><a data-toggle="tab" href="#menu1">{% trans %} Promotion {% endtrans %}</a></li>{% endif %}
+ {% if profile.location.lat %}<li {% if not promotion.promotionid %} {{ 'class="active"' }} {% endif %}><a data-toggle="tab" href="#menu2">{% trans %} Digital Map {% endtrans %}</a></li>{% endif %}
+ {% if profile.printadst %}<li {% if not promotion.promotionid and not profile.location.lat %}{{ 'class="active"' }}{% endif %}><a data-toggle="tab" href="#menu3">{% trans %} Advertisement {% endtrans %}</a></li>{% endif %}
+ {#{% if profile.map %}<li {% if not profile.location.lat and not profile.printadst and not profile.promotion and not profile.onlinepromotion %}{{ 'class="active"' }}{% endif %}><a data-toggle="tab" href="#menu4">{% trans %} Map Picture {% endtrans %}</a></li>{% endif %}#}
+ </ul>
- <div class="tab-content" {% if not promotion.promotionid and not profile.location.lat and not profile.printadst %} style="display: none;" {% endif %}>
- {#{% if profile.picturet1 %}#}
- {#<div id="home" class="tab-pane fade in active">#}
- {#<br>#}
- {#<div class="row">#}
+ <div class="tab-content" {% if not promotion.promotionid and not profile.location.lat and not profile.printadst %} style="display: none;" {% endif %}>
+ {#{% if profile.picturet1 %}#}
+ {#<div id="home" class="tab-pane fade in active">#}
+ {#<br>#}
+ {#<div class="row">#}
{#{% if profile.picturet1 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet1]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet1]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet1]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet1]|join}}"/>#}
+ {#</a>#}
{#</div>#}
{#{% endif %}#}
{#{% if profile.picturet2 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet2]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet2]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet2]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet2]|join}}"/>#}
+ {#</a>#}
{#</div>#}
{#{% endif %}#}
{#{% if profile.picturet3 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet3]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet3]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet3]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet3]|join}}"/>#}
+ {#</a>#}
{#</div>#}
{#{% endif %}#}
{#{% if profile.picturet4 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet4]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet4]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet4]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet4]|join}}"/>#}
+ {#</a>#}
{#</div>#}
{#{% endif %}#}
{#{% if profile.picturet5 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet5]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet5]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet5]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet5]|join}}"/>#}
+ {#</a>#}
{#</div>#}
{#{% endif %}#}
{#{% if profile.picturet6 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet6]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet6]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet6]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet6]|join}}"/>#}
+ {#</a>#}
{#</div>#}
{#{% endif %}#}
{#{% if profile.picturet7 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet7]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet7]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet7]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet7]|join}}"/>#}
+ {#</a>#}
{#</div>#}
{#{% endif %}#}
{#{% if profile.picturet8 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet8]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet8]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet8]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet8]|join}}"/>#}
+ {#</a>#}
{#</div>#}
{#{% endif %}#}
{#{% if profile.picturet9 %}#}
{#<div class="col-xs-4 col-sm-4 col-lg-4">#}
- {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet9]|join}}" class="colorbox">#}
- {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet9]|join}}"/>#}
- {#</a>#}
+ {#<a href="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet9]|join}}" class="colorbox">#}
+ {#<img class="img-responsive" src="{{[base_images,"/products/th/",profile.customerid,"/",profile.picturet9]|join}}"/>#}
+ {#</a>#}
+ {#</div>#}
+ {#{% endif %}#}
+ {#</div>#}
{#</div>#}
{#{% endif %}#}
- {#</div>#}
- {#</div>#}
- {#{% endif %}#}
- {% if promotion.promotionid %}
- <div id="menu1" class="tab-pane fade in active" >
- <br>
- <div class="col-xs-12 col-md-12 col-lg-12">
- <div class="col-xs-6 col-md-6 col-lg-6 text-left">
- {{ profile.humanname|raw }}
+ {% if promotion.promotionid %}
+ <div id="menu1" class="tab-pane fade in active" >
<br>
- <b><span style="color:red">{% trans %}Promotion{% endtrans %} : </span> </b> {{ promotion.title }}
- </div>
- <div class="col-xs-6 col-md-6 col-lg-6 text-right">
- <b>{% trans %}Start Date{% endtrans %} :</b> {{ promotion.startdate|raw }}
- <br>
- <b>{% trans %}End Date{% endtrans %} :</b> {{ promotion.enddate|raw }}
- </div>
- </div>
+ <div class="col-xs-12 col-md-12 col-lg-12">
+ <div class="col-xs-6 col-md-6 col-lg-6 text-left">
+ {{ profile.humanname|raw }}
+ <br>
+ <b><span style="color:red">{% trans %}Promotion{% endtrans %} : </span> </b> {{ promotion.title }}
+ </div>
+ <div class="col-xs-6 col-md-6 col-lg-6 text-right">
+ <b>{% trans %}Start Date{% endtrans %} :</b> {{ promotion.startdate|raw }}
+ <br>
+ <b>{% trans %}End Date{% endtrans %} :</b> {{ promotion.enddate|raw }}
+ </div>
+ </div>
- <br><br><br>
- <div class="col-xs-12 col-md-12 col-lg-12 text-center">
- {% if promotion.promoimg %}
- <div {% if promotion.promoimg and not promotion.promoimg2 and not promotion.promoimg3 %} class="col-xs-4 col-md-4 col-lg-4 col-xs-offset-4 col-md-offset-4 col-lg-offset-4"
- {% elseif promotion.promoimg and promotion.promoimg2 and not promotion.promoimg3 %} class="col-xs-4 col-md-4 col-lg-4 col-xs-offset-4 col-md-offset-4 col-lg-offset-4"
- {% else %} class="col-md-4" {% endif %} >
- <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg }}" class="colorbox group1" title="{{ promotion.productimg }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg }}" /></a>
- </div>
- {% endif %}
- {% if promotion.promoimg2 %}
- <div class="col-md-4" >
- <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg2 }}" class="colorbox group1" title="{{ promotion.productimg2 }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg2 }}" /></a>
+ <br><br><br>
+ <div class="col-xs-12 col-md-12 col-lg-12 text-center">
+ {% if promotion.promoimg %}
+ <div {% if promotion.promoimg and not promotion.promoimg2 and not promotion.promoimg3 %} class="col-xs-4 col-md-4 col-lg-4 col-xs-offset-4 col-md-offset-4 col-lg-offset-4"
+ {% elseif promotion.promoimg and promotion.promoimg2 and not promotion.promoimg3 %} class="col-xs-4 col-md-4 col-lg-4 col-xs-offset-4 col-md-offset-4 col-lg-offset-4"
+ {% else %} class="col-md-4" {% endif %} >
+ <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg }}" class="colorbox group1" title="{{ promotion.productimg }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg }}" /></a>
+ </div>
+ {% endif %}
+ {% if promotion.promoimg2 %}
+ <div class="col-md-4" >
+ <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg2 }}" class="colorbox group1" title="{{ promotion.productimg2 }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg2 }}" /></a>
+ </div>
+ {% endif %}
+ {% if promotion.promoimg3 %}
+ <div class="col-md-4" >
+ <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg3 }}" class="colorbox group1" title="{{ promotion.productimg3 }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg3 }}" /></a>
+ </div>
+ {% endif %}
</div>
- {% endif %}
- {% if promotion.promoimg3 %}
- <div class="col-md-4" >
- <a href="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg3 }}" class="colorbox group1" title="{{ promotion.productimg3 }}"><img style="position: absolute;clip: rect(0px, 150px, 100px, 0px);object-position: center center;" class="img-responsive" src="{{ base_promotion }}/{{ promotion.customerid }}/{{ promotion.promoimg3 }}" /></a>
- </div>
- {% endif %}
- </div>
- <br><br><br><br><br><br>
- <div style="padding-left: 29px;padding-right: 27px;">
- <b>{% trans %}Detail{% endtrans %} : </b>
- {{ promotion.subject|raw }}
- <br><br>
- <div class="text-center" style="width:80%;margin-left:10%;">
- <div style="border-radius: 10px 10px 10px 10px;-moz-border-radius: 10px 10px 10px 10px;-webkit-border-radius: 10px 10px 10px 10px;border: 0px solid #e84848;background-color:red;height:50px;padding-top:13px;">
- <a style="color:#ffffff" href="#">{% trans %}How to get promotion from{% endtrans %} TYPLive Plus</a>
+ <br><br><br><br><br><br>
+ <div style="padding-left: 29px;padding-right: 27px;">
+ <b>{% trans %}Detail{% endtrans %} : </b>
+ {{ promotion.subject|raw }}
+ <br><br>
+ <div class="text-center" style="width:80%;margin-left:10%;">
+ <div style="border-radius: 10px 10px 10px 10px;-moz-border-radius: 10px 10px 10px 10px;-webkit-border-radius: 10px 10px 10px 10px;border: 0px solid #e84848;background-color:red;height:50px;padding-top:13px;">
+ <a style="color:#ffffff" href="http://www.yellowpages.co.th/profile/get-promotion">{% trans %}How to get promotion from{% endtrans %} TYPLive Plus</a>
+ </div>
+ </div>
</div>
</div>
- </div>
- </div>
- {% endif %}
+ {% endif %}
+
+ {% if profile.location.lat %}
+ <div id="menu2" {% if promotion.promotionid %} {{ 'class="tab-pane fade"' }} {% else %} {{ 'class="tab-pane fade in active"' }} {% endif %} >
+ <br>
+ <iframe width="100%" height="240" scrolling="no" frameborder="0" src="http://landingpage.yellowpages.co.th/yp_map.php?latitude={{ profile.location.lat }}&amp;longitude={{ profile.location.lon }}&amp;height=240&amp;width=445" allowtransparency="true" marginwidth="0" marginheight="0"></iframe>
+ </div>
+ {% endif %}
- {% if profile.location.lat %}
- <div id="menu2" {% if promotion.promotionid %} {{ 'class="tab-pane fade"' }} {% else %} {{ 'class="tab-pane fade in active"' }} {% endif %} >
- <br>
- <iframe width="100%" height="240" scrolling="no" frameborder="0" src="http://landingpage.yellowpages.co.th/yp_map.php?latitude={{ profile.location.lat }}&amp;longitude={{ profile.location.lon }}&amp;height=240&amp;width=445" allowtransparency="true" marginwidth="0" marginheight="0"></iframe>
- </div>
- {% endif %}
-
- {% if profile.printadst %}
- <div id="menu3" {% if promotion.promotionid or profile.location.lat %}{{ ' class="tab-pane fade"' }}{% else %}{{ ' class="tab-pane fade in active"' }}{% endif %}>
- <div class="row">
- <div class="col-xs-12 col-sm-12 col-lg-12">
- <br>
- <a href="{{[base_images,"/printads/th/",profile.printadst,".jpg"]|join}}" class="colorbox">
- <img class="img-responsive typ-profile-printads" src="{{[base_images,"/printads/th/",profile.printadst,".jpg"]|join}}"/>
- </a>
- </div>
+ {% if profile.printadst %}
+ <div id="menu3" {% if promotion.promotionid or profile.location.lat %}{{ ' class="tab-pane fade"' }}{% else %}{{ ' class="tab-pane fade in active"' }}{% endif %}>
+ <div class="row">
+ <div class="col-xs-12 col-sm-12 col-lg-12">
+ <br>
+ <a href="{{[base_images,"/printads/th/",profile.printadst,".jpg"]|join}}" class="colorbox">
+ <img class="img-responsive typ-profile-printads" src="{{[base_images,"/printads/th/",profile.printadst,".jpg"]|join}}"/>
+ </a>
+ </div>
+ </div>
+ </div>
+ {% endif %}
+
+ {#{% if profile.map %}#}
+ {#<div id="menu4" {% if profile.location.lat or profile.printadst or profile.promotion or profile.onlinepromotion %}{{ ' class="tab-pane fade"' }}{% else %}{{ ' class="tab-pane fade in active"' }}{% endif %}>#}
+ {#<div class="row">#}
+ {#<div class="col-xs-12 col-sm-12 col-lg-12">#}
+ {#<br>#}
+ {#<a href="{{[base_images,"/map/th/",profile.map,".jpg"]|join}}" class="colorbox">#}
+ {#<img class="img-responsive " src="{{[base_images,"/map/th/",profile.map,".jpg"]|join}}"/>#}
+ {#</a>#}
+ {#</div>#}
+ {#</div>#}
+ {#</div>#}
+ {#{% endif %}#}
</div>
</div>
- {% endif %}
-
- {#{% if profile.map %}#}
- {#<div id="menu4" {% if profile.location.lat or profile.printadst or profile.promotion or profile.onlinepromotion %}{{ ' class="tab-pane fade"' }}{% else %}{{ ' class="tab-pane fade in active"' }}{% endif %}>#}
- {#<div class="row">#}
- {#<div class="col-xs-12 col-sm-12 col-lg-12">#}
- {#<br>#}
- {#<a href="{{[base_images,"/map/th/",profile.map,".jpg"]|join}}" class="colorbox">#}
- {#<img class="img-responsive " src="{{[base_images,"/map/th/",profile.map,".jpg"]|join}}"/>#}
- {#</a>#}
- {#</div>#}
- {#</div>#}
- {#</div>#}
- {#{% endif %}#}
- </div>
- </div>
{% endif %}
{#<br><br><br>#}
{#{% if not profile.custname %}#}
- {#{% else %}#}
- {#{{ profile.custname|raw }} : แสดงความคิดเห็น#}
+ {#{% else %}#}
+ {#{{ profile.custname|raw }} : แสดงความคิดเห็น#}
{#{% endif %}#}
{#<br><br>#}
{# TAB #}
{#<div class="mobile">#}
- {#<ul class="nav nav-tabs">#}
- {#<li class="active"><a data-toggle="tab" href="#menu">{% trans %} Comment {% endtrans %}</a></li>#}
- {#<li><a data-toggle="tab" href="#menu">{% trans %} Picture Concerned {% endtrans %}</a></li>#}
- {#&#123;&#35;<li><a data-toggle="tab" href="#menu6">{% trans %} Advertise {% endtrans %}</a></li>&#35;&#125;#}
- {#</ul>#}
+ {#<ul class="nav nav-tabs">#}
+ {#<li class="active"><a data-toggle="tab" href="#menu">{% trans %} Comment {% endtrans %}</a></li>#}
+ {#<li><a data-toggle="tab" href="#menu">{% trans %} Picture Concerned {% endtrans %}</a></li>#}
+ {#&#123;&#35;<li><a data-toggle="tab" href="#menu6">{% trans %} Advertise {% endtrans %}</a></li>&#35;&#125;#}
+ {#</ul>#}
- {#<div class="tab-content">#}
- {#<div id="menu4" class="tab-pane fade in active">#}
- {#<h3>HOME</h3>#}
- {#<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>#}
- {#</div>#}
- {#<div id="menu5" class="tab-pane fade">#}
- {#<h3>Menu 1</h3>#}
- {#<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>#}
- {#</div>#}
- {#&#123;&#35;<div id="menu6" class="tab-pane fade">&#35;&#125;#}
- {#&#123;&#35;<h3>Menu 2</h3>&#35;&#125;#}
- {#&#123;&#35;<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>&#35;&#125;#}
- {#&#123;&#35;</div>&#35;&#125;#}
- {#</div>#}
+ {#<div class="tab-content">#}
+ {#<div id="menu4" class="tab-pane fade in active">#}
+ {#<h3>HOME</h3>#}
+ {#<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>#}
+ {#</div>#}
+ {#<div id="menu5" class="tab-pane fade">#}
+ {#<h3>Menu 1</h3>#}
+ {#<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>#}
+ {#</div>#}
+ {#&#123;&#35;<div id="menu6" class="tab-pane fade">&#35;&#125;#}
+ {#&#123;&#35;<h3>Menu 2</h3>&#35;&#125;#}
+ {#&#123;&#35;<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>&#35;&#125;#}
+ {#&#123;&#35;</div>&#35;&#125;#}
+ {#</div>#}
{#</div>#}
{# END TAB #}
<br><br>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-4 col-lg-4">
<div class="col-xs-12 col-md-12 col-lg-12">
</div>
</div>
</div>
diff --git a/templates/typ-promotion.html.twig b/templates/typ-promotion.html.twig
new file mode 100644
--- /dev/null
+++ b/templates/typ-promotion.html.twig
@@ -0,0 +1,5 @@
+<div class="row">
+ <div class="col-xs-12 col-md-12 col-lg-12">
+ <input type="hidden" id="url" name="url" value="{{ url }}">
+ </div>
+</div>
\ No newline at end of file
diff --git a/typ_profile.libraries.yml b/typ_profile.libraries.yml
new file mode 100644
--- /dev/null
+++ b/typ_profile.libraries.yml
@@ -0,0 +1,3 @@
+profile.popup:
+ js:
+ js/profile.js: {}
\ No newline at end of file
diff --git a/typ_profile.routing.yml b/typ_profile.routing.yml
--- a/typ_profile.routing.yml
+++ b/typ_profile.routing.yml
@@ -1,23 +1,23 @@
typ_profile_search:
path: '/profile/{bizid}'
defaults:
_controller: '\Drupal\typ_profile\Controller\TYPProfileController::profilePage'
_title_callback: '\Drupal\typ_profile\Controller\TYPProfileController::profileTitle'
requirements:
_permission: 'access content'
typ_profile_promotion:
path: '/profile/get-promotion'
defaults:
_controller: '\Drupal\typ_profile\Controller\TYPProfileController::getPromotion'
- _title_callback: '\Drupal\typ_profile\Controller\TYPProfileController::profileTitle'
+ _title_callback: '\Drupal\typ_profile\Controller\TYPProfileController::getTitlePromotion'
requirements:
_permission: 'access content'
#typ_profile_redirect:
# path: '/profile'
# defaults:
# _controller: '\Drupal\typ_profile\Controller\TYPProfileController::profileOverview'
# _title: 'Rredirect '
# requirements:
# _permission: 'access content'
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Expires
Tue, Apr 29, 9:48 PM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
213603

Event Timeline