

<?php $__env->startSection('css_page_level'); ?>
<link href="<?php echo e(asset('/assets/global/plugins/fancybox/source/jquery.fancybox.css')); ?>" rel="stylesheet" type="text/css"/>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('page-content'); ?>
            <!-- CONTENT -->
			<meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
            <div class="wrap-fluid" id="paper-bg">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="box">
                            <div class="box-header">
                                <!-- tools box -->
                                <div class="pull-right box-tools">
                                </div>
                                <h3 class="box-title"><i class="fontello-doc"></i> 
                                    <span>房屋租售</span>
                                </h3>
                            </div>
                            <!-- /.box-header -->
                            <div class="box-body" align="center">
                                <div class="thumbnail">
                                    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                                      <!-- Indicators -->
                                      <ol class="carousel-indicators">
                                        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                                        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                                        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
										<li data-target="#carousel-example-generic" data-slide-to="3"></li>
										<li data-target="#carousel-example-generic" data-slide-to="4"></li>
                                      </ol>

                                      <!-- Wrapper for slides -->
                                      <div class="carousel-inner" role="listbox">
                                        <?php if($rentsale->image1 != ''): ?>
                                        <div class="item active">
                                          <img src="<?php echo e($rentsale->image1); ?>" style="height:50%;" alt="...">
                                          <div class="carousel-caption">
                                          </div>
                                        </div>
                                        <?php endif; ?>
                                        <?php if($rentsale->image2 != ''): ?>
                                        <div class="item">
                                          <img src="<?php echo e($rentsale->image2); ?>" style="height:50%;" alt="...">
                                          <div class="carousel-caption">
                                          </div>
                                        </div>
                                        <?php endif; ?>
                                        <?php if($rentsale->image3 != ''): ?>
                                        <div class="item">
                                          <img src="<?php echo e($rentsale->image3); ?>" style="height:50%;" alt="...">
                                          <div class="carousel-caption">
                                          </div>
                                        </div>
                                        <?php endif; ?>
                                        <?php if($rentsale->image4 != ''): ?>
                                        <div class="item">
                                          <img src="<?php echo e($rentsale->image4); ?>" style="height:50%;" alt="...">
                                          <div class="carousel-caption">
                                          </div>
                                        </div>
                                        <?php endif; ?>
                                        <?php if($rentsale->image5 != ''): ?>
                                        <div class="item">
                                          <img src="<?php echo e($rentsale->image5); ?>" style="height:50%;" alt="...">
                                          <div class="carousel-caption">
                                          </div>
                                        </div>
                                        <?php endif; ?>
                                      </div>

                                      <!-- Controls -->
                                      <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                                        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                                        <span class="sr-only">Previous</span>
                                      </a>
                                      <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                                        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                                        <span class="sr-only">Next</span>
                                      </a>
                                    </div>
                                    <div class="caption-full">
                                        <h4><a href="#"><?php echo e($rentsale->title); ?></a>
                                        </h4>
                                        <div class="row">
                                            <div class="col-md-8" style="table-layout: fixed;word-wrap: break-word;overflow: hidden;  ">
                                                <?php echo $rentsale->content; ?>

                                            </div>
                                            <div class="col-md-4 pull-left">
											<!--
                                                <a class="btn btn-app">
                                                    <span class="badge bg-aqua"></span>
                                                    <i class="fa fontello-thumbs-up-1"></i> 喜歡
                                                </a>
											-->
                                                <a onclick="pruduct_buy()" class="btn btn-app">
                                                    <i class="fa fontello-basket"></i> 發送購買通知
                                                </a>
<!--
                                                <a class="btn btn-app">
                                                     <span class="badge bg-aqua">12</span>
                                                    <i class="fa fontello-pencil"></i> ¥Zµn
                                                </a>
-->
                                                <div class="panel panel-default">
                                                  <div class="panel-heading">
                                                    <h3 class="panel-title">此項房屋資訊</h3>
                                                  </div>
                                                  <table class="table" style="font-size:18px;">
                                                    <tr>
                                                        <td>主題</td><td><?php echo e($rentsale->title); ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td>類型</td><td><?php echo e($rentsale->type); ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td>金額</td><td><span style="font-size:x-large;color:red;"><?php echo e($rentsale->fee); ?></span></td>
                                                    </tr>
                                                    <tr>
                                                        <td>押金</td><td><span style="font-size:x-large;color:red;"><?php echo e($rentsale->spawn); ?></span></td>
                                                    </tr>
                                                    <tr>
                                                        <td>房屋格局</td><td><?php echo e($rentsale->house_pattern); ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td>房屋用途</td><td><?php echo e($rentsale->house_use); ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td>房屋坪數</td><td><?php echo e($rentsale->house_footage); ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td>房屋型態</td><td><?php echo e($rentsale->house_type); ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td>樓層</td><td><?php echo e($rentsale->house_floor); ?></td>
                                                    </tr>
													<tr>
                                                        <td>經辦者</td><td><?php echo e($rentsale->contact_1); ?></td>
                                                    </tr>
													<tr>
                                                        <td>聯絡人</td><td><?php echo e($rentsale->contact_2); ?></td>
                                                    </tr>
													<tr>
                                                        <td>Email</td><td><?php echo e($rentsale->contact_email); ?></td>
                                                    </tr>
													<tr>
                                                        <td>行動電話</td><td><?php echo e($rentsale->contact_phone); ?></td>
                                                    </tr>
													<tr>
                                                        <td>固定電話</td><td><?php echo e($rentsale->contact_tel); ?></td>
                                                    </tr>
													<tr>
                                                        <td>管理方式</td><td><?php echo e($rentsale->manage_method); ?></td>
                                                    </tr>
													<tr>
                                                        <td>車位</td><td><?php echo e($rentsale->parking_lot); ?></td>
                                                    </tr>
                                                  </table>
                                                </div>
											
                                                
                                            </div>
											
											<div class="col-md-4 pull-right">
												<div class="panel panel-default">
                                                  <div class="panel-heading">
                                                    <h3 class="panel-title">房屋詳細資訊</h3>
                                                  </div>
                                                  <table class="table" style="font-size:18px;">
													<tr>
                                                        <td>所屬社區</td><td><?php echo e($rentsale->community); ?></td>
                                                    </tr>
													<tr>
                                                        <td>朝向</td><td><?php echo e($rentsale->toward); ?></td>
                                                    </tr>
													<tr>
                                                        <td>最短租期</td><td><?php echo e($rentsale->short_rent); ?></td>
                                                    </tr>
													<tr>
                                                        <td>開伙</td><td><?php echo e($rentsale->can_cook); ?></td>
                                                    </tr>
													<tr>
                                                        <td>性別限定</td><td><?php echo e($rentsale->require_sexual); ?></td>
                                                    </tr>
													<tr>
                                                        <td>身分限定</td><td><?php echo e($rentsale->require_position); ?></td>
                                                    </tr>
													<tr>
                                                        <td>養寵物</td><td><?php echo e($rentsale->can_pet); ?></td>
                                                    </tr>
													<tr>
                                                        <td>房東同住</td><td><?php echo e($rentsale->require_host); ?></td>
                                                    </tr>
													<tr>
                                                        <td>可搬入時間</td><td><?php echo e($rentsale->time_movein); ?></td>
                                                    </tr>
													<tr>
                                                        <td>地址</td><td><?php echo e($rentsale->address); ?></td>
                                                    </tr>
													<tr>
                                                        <td>生活機能</td><td><?php echo e($rentsale->life_function); ?></td>
                                                    </tr>
													<tr>
                                                        <td>提供設備</td><td><?php echo e($rentsale->offer_facility); ?></td>
                                                    </tr>
													<tr>
                                                        <td>提供家具</td><td> <?php echo e($rentsale->offer_furniture); ?></td>
                                                    </tr>
													<tr>
                                                        <td>附近地標</td><td><?php echo e($rentsale->building_mark); ?></td>
                                                    </tr>
                                                  </table>
                                                </div>
											</div>
                                        </div>
                                        
                                    </div>
                                    <?php /* <div class="ratings">
                                        <p class="pull-right">3 reviews</p>
                                        <p>
                                            <span class="glyphicon glyphicon-star"></span>
                                            <span class="glyphicon glyphicon-star"></span>
                                            <span class="glyphicon glyphicon-star"></span>
                                            <span class="glyphicon glyphicon-star"></span>
                                            <span class="glyphicon glyphicon-star-empty"></span>
                                            4.0 stars
                                        </p>
                                    </div> */ ?>
                                </div>
                                <div class="panel panel-default">
								<?php $setting = app('anlutro\LaravelSettings\Facade'); ?>
                                    <div class="panel-heading">地圖資訊</div>
				    <div style="border:1px solid #dcdcde; margin-top:10px; width:100%;height:400px;" id="map_canvas"></div>
                                    <div class="panel-body">Google Map</div>
                                </div>
                                <!-- /.box-body -->
                            </div>
                            <!-- /.box-body -->
                        </div>
                        <!-- /.box -->
                    </div>
                </div>


            </div>
			
            <!-- #/paper bg -->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('plugins_page_level'); ?>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/fancybox/source/jquery.fancybox.pack.js')); ?>"></script>
<script src="http://ditu.google.com/maps?file=api&amp;v=2.x&amp;key=AIzaSyBwO048p23eWOsmHbPU4H0uUEIm2TEXaCU" type="text/javascript"></script>
<script type="text/javascript">
//want to buy product 
function pruduct_buy() {
    var data = prompt("請留下聯絡方式 (電話 或是 E-Mail)", "");
	var id = <?php echo e($rentsale->id); ?>;
    if (data != null) {
        $.ajax({
				headers: {
					'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
				},
				type:"POST",
                dataType:'text',
                url: '<?php echo e(action('FrontController@rentsale_buy')); ?>',
                data: {
					data:data,
					id,id
				},
				
                success: function(){
                    alert('發送訊息成功！！ 請靜候佳音');
                },

                 error:function(){ 
                    alert('訊息發送失敗，請聯繫工作人員進行處理'); 
                 }
            });
    }
}

//Google map
	var cm_baseIcon = new GIcon();
	cm_baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
	cm_baseIcon.iconSize = new GSize(34, 34);
	cm_baseIcon.shadowSize = new GSize(37, 34);
	cm_baseIcon.iconAnchor = new GPoint(9, 34);
	cm_baseIcon.infoWindowAnchor = new GPoint(9, 2);
	cm_baseIcon.infoShadowAnchor = new GPoint(18, 25);

    var map = null;
    var geocoder = null;

    function initialize() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));
		    map.setMapType(G_NORMAL_MAP);
        map.addControl(new GSmallZoomControl());
        map.addControl(new GMenuMapTypeControl());
        map.setCenter(new GLatLng(121.6,24.9), 13);
        geocoder = new GClientGeocoder();
      }
    }

    function showAddress(address) {
		var markerOpts = {};
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
            } else {
				/*var nIcon = new GIcon(cm_baseIcon);
				nIcon.image ="images/home.png";
				markerOpts.icon = nIcon;*/
				markerOpts.title=address;

        map.setCenter(point);
              var marker = new GMarker(point,markerOpts);
			  marker.openInfoWindowHtml("<strong><?=mb_substr($rentsale->title,0,8,"utf-8")?>...</strong><br />"+address);
			  GEvent.addListener(marker, "click", function() {
							   marker.openInfoWindowHtml("<strong><?=mb_substr($rentsale->title,0,8,"utf-8")?></strong>...<br />"+address);
							  });
              map.addOverlay(marker);


            }
          }
        );
      }
    }
		window.onload=function(){
		   initialize();
		   showAddress("<?=$rentsale->location ?>");
		   }

//send message to seller

</script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js_page_level'); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.front', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>