1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

14
LAMPIRAN 1. Index.php (Halaman Beranda) <?php use common\models\Artikel; /* @var $this yii\web\View */ $this->title = 'DINKOP UMKM Kab. Magetan'; $artikel = Artikel::find()->orderBy(['id' => SORT_DESC])->limit(3)->all(); ?> <section class="section" id="home"> <div class="container-fullwidth"> <div class="row"> <div class="col-md-12"> <div class="fullwidthbanner-container"> <div class="tp-banner"> <ul> <li data-masterspeed="300" data-saveperformance="off" data- slotamount="5" data-transition="fade"> <div class="background-overlay grid-overlay-0" style="background-color: rgba(0,0,0,0.7);"></div> <img alt="img21" data-bgfit="100" data-bgfitend="110" data- bgposition="center center" data-bgpositionend="center center" data-duration="9000" data-ease="Linear.easeNone" data-kenburns="on" src="http://localhost/umkm/frontend/web/lambda/images/batik.jpg"> <div class="tp-caption lfb ltb rs-parallaxlevel-0" data-x="0" data- y="150" data- customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;ske wX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;" data-speed="800" data-start="1800" data- easing="Power3.easeInOut" data-elementdelay="0.1" data-endelementdelay="0.1" style="z-index: 2;"> <img width="492px" src="http://localhost/umkm/frontend/web/lambda/images/kerajinan.png"> </div> <div class="tp-caption corporateblackbig sfr tp-resizeme rs- parallaxlevel-0" data-x="500" data-y="150" data-speed="600" data-start="800" data- easing="Power3.easeInOut" data-splitin="chars" data-splitout="none" data-elementdelay="0.1" data-endelementdelay="0.1" style="z- index: 7; max-width: auto; max-height: auto; white-space: nowrap; color: #fff;">DINKOP UMKM</div>

Transcript of 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

Page 1: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

LAMPIRAN

1. Index.php (Halaman Beranda)

<?php

use common\models\Artikel;

/* @var $this yii\web\View */

$this->title = 'DINKOP UMKM Kab. Magetan';

$artikel = Artikel::find()->orderBy(['id' => SORT_DESC])->limit(3)->all();

?>

<section class="section" id="home">

<div class="container-fullwidth">

<div class="row">

<div class="col-md-12">

<div class="fullwidthbanner-container">

<div class="tp-banner">

<ul>

<li data-masterspeed="300" data-saveperformance="off" data-

slotamount="5" data-transition="fade">

<div

class="background-overlay grid-overlay-0" style="background-color:

rgba(0,0,0,0.7);"></div>

<img alt="img21" data-bgfit="100" data-bgfitend="110" data-

bgposition="center center" data-bgpositionend="center center" data-duration="9000"

data-ease="Linear.easeNone" data-kenburns="on"

src="http://localhost/umkm/frontend/web/lambda/images/batik.jpg">

<div class="tp-caption lfb ltb rs-parallaxlevel-0" data-x="0" data-

y="150" data-

customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;ske

wX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;"

data-speed="800" data-start="1800" data-

easing="Power3.easeInOut" data-elementdelay="0.1" data-endelementdelay="0.1"

style="z-index: 2;"> <img width="492px"

src="http://localhost/umkm/frontend/web/lambda/images/kerajinan.png"> </div>

<div class="tp-caption corporateblackbig sfr tp-resizeme rs-

parallaxlevel-0" data-x="500" data-y="150" data-speed="600" data-start="800" data-

easing="Power3.easeInOut" data-splitin="chars" data-splitout="none"

data-elementdelay="0.1" data-endelementdelay="0.1" style="z-

index: 7; max-width: auto; max-height: auto; white-space: nowrap; color:

#fff;">DINKOP UMKM</div>

Page 2: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

<div class="tp-caption corporateblackbigstrong sfr tp-resizeme rs-

parallaxlevel-0" data-x="860" data-y="150" data-speed="600" data-start="1400" data-

easing="Power3.easeInOut" data-splitin="chars" data-splitout="none"

data-elementdelay="0.1" data-endelementdelay="0.1" style="z-

index: 8; max-width: auto; max-height: auto; white-space: nowrap; color: #fff;">KAB.

MAGETAN</div>

<div class="tp-caption corporateblacknormal sfr tp-resizeme rs-

parallaxlevel-0" data-x="500" data-y="225" data-speed="600" data-start="2500" data-

easing="Power3.easeInOut" data-splitout="none" data-elementdelay="0.1"

data-endelementdelay="0.1" style="z-index: 9; max-width: auto;

max-height: auto; white-space: nowrap; color: #fff; text-align: left;">Selangkah lebih

maju membangun negeri sepenuh hati</div>

</li>

</ul>

<div class="tp-bannertimer"></div>

</div>

</div>

</div>

</div>

</div>

</section>

<section class="section">

<div class="background-overlay" style="background-color:

rgba(1,192,225,1);"></div>

<div class="container container-vertical-middle">

<div class="row vertical-middle">

<div class="col-md-10">

<h2 class="text-center element-top-60 element-bottom-60 text-light os-

animation big light" data-os-animation="fadeInLeft" data-os-animation-delay="0s">

Wujudkan industri kreatif di kota Magetan

</h2> </div>

</div>

</div>

</section>

<section class="section">

<div class="container">

<div class="row">

<div class="col-md-12">

<h1 class="text-center element-top-70 os-animation big" data-os-

animation="fadeIn" data-os-animation-delay="0s">

Tujuan Kami

</h1>

<div class="divider-border divider-border-center element-top-10 element-

bottom-10 os-animation" data-os-animation="fadeIn" data-os-animation-delay="0.1s"

style="height:3px;">

<div class="divider-border-inner" style="width:60px;"> </div>

</div>

Page 3: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

<p class="lead text-center center element-top-30 element-bottom-40 os-

animation" data-os-animation="fadeIn" data-os-animation-delay="0.2s"> Ciptakan

Koperasi dan UMK berdaya saing Regional, Nasional, bahkan Mancanegera

<br> Produk berkualitas, unik, tampil beda merupakan <strong>harga

mati</strong> pelaku usaha di Magetan</p>

<div class="list-container row element-bottom-50 os-animation" data-os-

animation="fadeInUp" data-os-animation-delay="0.1s">

<div class="col-md-4 element-bottom-20 text-center os-animation" data-

os-animation="fadeInUp" data-os-animation-delay="0.1s"> <span class="service-simple-

image">

<img alt="Visualise"

src="http://localhost/umkm/frontend/web/lambda/images/corporate/idea.png">

</span>

<h2>Inovatif</h2>

</div>

<div class="col-md-4 element-bottom-20 text-center os-animation" data-

os-animation="fadeInUp" data-os-animation-delay="0.2s"> <span class="service-simple-

image">

<img alt="Research"

src="http://localhost/umkm/frontend/web/lambda/images/corporate/research.png">

</span>

<h2>Riset</h2>

</div>

<div class="col-md-4 element-bottom-20 text-center os-animation" data-

os-animation="fadeInUp" data-os-animation-delay="0.3s"> <span class="service-simple-

image">

<img alt="Develop"

src="http://localhost/umkm/frontend/web/lambda/images/corporate/development.png">

</span>

<h2>Berkarya</h2>

</div>

</div>

</div>

</div>

</div>

</section>

<section class="section">

<div class="background-media" data-0-top-bottom="background-position: 50%

50px" data-start="background-position: 50% -31px" style="background-image: url();

background-repeat:no-repeat; background-size:cover; background-attachment:fixed;

background-position: 50% 0%;">

</div>

<div class="background-overlay" style="background-color:

rgba(3,194,227,0.9);"></div>

<div class="container-fullwidth container-vertical-middle">

<div class="row vertical-middle">

<div class="col-md-3 text-center" style="background:rgba(0, 0, 0, 0.2);">

<div class="divider-wrapper">

<div class="visible-xs element-height-30"></div>

Page 4: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

<div class="visible-sm element-height-30"></div>

<div class="visible-md element-height-30"></div>

<div class="visible-lg element-height-30"></div>

</div> <i class="fa fa-thumbs-up text-light" style="font-size:42px"></i>

<div class="counter text-center element-top-10 text-light os-animation"

data-count="2542" data-format="(,ddd)" data-os-animation="fadeIn" data-os-animation-

delay="0s">

<span class="value odometer-counter super regular">0</span> </div>

<div class="divider-border divider-border-center element-bottom-10 os-

animation" data-os-animation="fadeIn" data-os-animation-delay="0.1s"

style="height:3px;">

<div class="divider-border-inner" style="background:rgba(255, 255, 255,

0.81); width:60px;"> </div>

</div>

<h3 class="text-center text-light os-animation normal" data-os-

animation="fadeIn" data-os-animation-delay="0.1s">

Inovasi

</h3>

<div class="divider-wrapper">

<div class="visible-xs element-height-30"></div>

<div class="visible-sm element-height-30"></div>

<div class="visible-md element-height-30"></div>

<div class="visible-lg element-height-30"></div>

</div>

</div>

<div class="col-md-3 text-center" style="background:rgba(0, 0, 0, 0.15);">

<div class="divider-wrapper">

<div class="visible-xs element-height-30"></div>

<div class="visible-sm element-height-30"></div>

<div class="visible-md element-height-30"></div>

<div class="visible-lg element-height-30"></div>

</div> <i class="fa fa-child text-light" style="font-size:42px"></i>

<div class="counter text-center element-top-10 text-light os-animation"

data-count="10462" data-format="(,ddd)" data-os-animation="fadeIn" data-os-animation-

delay="0.3s">

<span class="value odometer-counter super regular">0</span> </div>

<div class="divider-border divider-border-center element-bottom-10 os-

animation" data-os-animation="fadeIn" data-os-animation-delay="0.4s"

style="height:3px;">

<div class="divider-border-inner" style="background:rgba(255, 255, 255,

0.81); width:60px;"> </div>

</div>

<h3 class="text-center text-light os-animation normal" data-os-

animation="fadeIn" data-os-animation-delay="0.4s">

Pelaku UMKM

</h3>

<div class="divider-wrapper">

<div class="visible-xs element-height-30"></div>

<div class="visible-sm element-height-30"></div>

Page 5: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

<div class="visible-md element-height-30"></div>

<div class="visible-lg element-height-30"></div>

</div>

</div>

<div class="col-md-3 text-center" style="background:rgba(0, 0, 0, 0.1);">

<div class="divider-wrapper">

<div class="visible-xs element-height-30"></div>

<div class="visible-sm element-height-30"></div>

<div class="visible-md element-height-30"></div>

<div class="visible-lg element-height-30"></div>

</div> <i class="fa fa-tachometer text-light" style="font-size:42px"></i>

<div class="counter text-center element-top-10 text-light os-animation"

data-count="13654" data-format="(,ddd)" data-os-animation="fadeIn" data-os-animation-

delay="0.6s">

<span class="value odometer-counter super regular">0</span> </div>

<div class="divider-border divider-border-center element-bottom-10 os-

animation" data-os-animation="fadeIn" data-os-animation-delay="0.7s"

style="height:3px;">

<div class="divider-border-inner" style="background:rgba(255, 255, 255,

0.81); width:60px;"> </div>

</div>

<h3 class="text-center text-light os-animation normal" data-os-

animation="fadeIn" data-os-animation-delay="0.7s">

Jam Terbang

</h3>

<div class="divider-wrapper">

<div class="visible-xs element-height-30"></div>

<div class="visible-sm element-height-30"></div>

<div class="visible-md element-height-30"></div>

<div class="visible-lg element-height-30"></div>

</div>

</div>

<div class="col-md-3 text-center" style="background:rgba(0, 0, 0, 0.05);">

<div class="divider-wrapper">

<div class="visible-xs element-height-30"></div>

<div class="visible-sm element-height-30"></div>

<div class="visible-md element-height-30"></div>

<div class="visible-lg element-height-30"></div>

</div> <i class="fa fa-coffee text-light" style="font-size:42px"></i>

<div class="counter text-center element-top-10 text-light os-animation"

data-count="5398" data-format="(,ddd)" data-os-animation="fadeIn" data-os-animation-

delay="0.9s">

<span class="value odometer-counter super regular">0</span> </div>

<div class="divider-border divider-border-center element-bottom-10 os-

animation" data-os-animation="fadeIn" data-os-animation-delay="1s"

style="height:3px;">

<div class="divider-border-inner" style="background:rgba(255, 255, 255,

0.81); width:60px;"> </div>

</div>

Page 6: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

<h3 class="text-center text-light os-animation normal" data-os-

animation="fadeIn" data-os-animation-delay="1s">

Karya Menakjubkan

</h3>

<div class="divider-wrapper">

<div class="visible-xs element-height-30"></div>

<div class="visible-sm element-height-30"></div>

<div class="visible-md element-height-30"></div>

<div class="visible-lg element-height-30"></div>

</div>

</div>

</div>

</div>

</section>

<section class="section">

<div class="background-overlay grid-overlay-0" style="background-color:

rgba(255,255,255,1);"></div>

<div class="container-fullwidth">

<div class="row">

<div class="col-md-12">

<h1 class="text-center element-top-70 os-animation big" data-os-

animation="fadeIn" data-os-animation-delay="0s">

Usaha Kreatif Unggulan

</h1>

<div class="divider-border divider-border-center element-top-10 element-

bottom-10 os-animation" data-os-animation="fadeIn" data-os-animation-delay="0.1s"

style="height:3px;">

<div class="divider-border-inner" style="width:60px;"> </div>

</div>

<p class="lead text-center center element-bottom-40 os-animation" data-os-

animation="fadeIn" data-os-animation-delay="0.2s"> Kami telah menghasilkan berbagai

macam inovasi berkualitas dengan daya jual tinggi<br>dengan tetap mengedepankan

kebutuhan konsumen</p>

<div class="flexslider flex-controls-bottom element-top-20 element-bottom-

60" data-flex-animation="slide" data-flex-captionhorizontal="left" data-flex-

controls="hide" data-flex-controlsalign="center"

data-flex-controlsposition="inside" data-flex-controlsvertical="bottom"

data-flex-directions="hide" data-flex-duration="600" data-flex-itemwidth="258" data-

flex-sliderdirection="horizontal" data-flex-slideshow="true" data-flex-speed="7000"

data-os-animation="none" data-os-animation-delay="0s" id="flexslider-74">

<ul class="slides">

<li>

<figure> <img alt="produk1" data-original-title="produk1" data-

toggle="tooltip" height="200"

src="http://localhost/umkm/frontend/web/lambda/images/umkm/produk/1.jpg"

width="200"> </figure>

</li>

<li>

Page 7: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

<figure> <img alt="produk2" data-original-title="produk2" data-

toggle="tooltip" height="200"

src="http://localhost/umkm/frontend/web/lambda/images/umkm/produk/2.jpg"

width="200"> </figure>

</li>

<li>

<figure> <img alt="produk3" data-original-title="produk3" data-

toggle="tooltip" height="200"

src="http://localhost/umkm/frontend/web/lambda/images/umkm/produk/3.jpg"

width="200"> </figure>

</li>

<li>

<figure> <img alt="produk4" data-original-title="produk4" data-

toggle="tooltip" height="200"

src="http://localhost/umkm/frontend/web/lambda/images/umkm/produk/4.jpg"

width="200"> </figure>

</li>

<li>

<figure> <img alt="produk5" data-original-title="produk5" data-

toggle="tooltip" height="200"

src="http://localhost/umkm/frontend/web/lambda/images/umkm/produk/5.jpg"

width="200"> </figure>

</li>

<li>

<figure> <img alt="produk6" data-original-title="produk6" data-

toggle="tooltip" height="200"

src="http://localhost/umkm/frontend/web/lambda/images/umkm/produk/6.jpg"

width="200"> </figure>

</li>

<li>

<figure> <img alt="produk7" data-original-title="produk7" data-

toggle="tooltip" height="200"

src="http://localhost/umkm/frontend/web/lambda/images/umkm/produk/7.jpg"

width="200"> </figure>

</li>

</ul>

</div>

</div>

</div>

</div>

</section>

<section class="section">

<div class="background-overlay grid-overlay-0" style="background-color:

rgba(250,250,250,1);"></div>

<div class="container">

<div class="row">

<div class="col-md-12">

<h1 class="text-center element-top-70 os-animation big" data-os-

animation="fadeIn" data-os-animation-delay="0s">

Page 8: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

Berita Terbaru

</h1>

<div class="divider-border divider-border-center element-top-10 element-

bottom-10 os-animation" data-os-animation="fadeIn" data-os-animation-delay="0.1s"

style="height:3px;">

<div class="divider-border-inner" style="width:60px;"> </div>

</div>

<p class="lead text-center center element-bottom-40 os-animation" data-os-

animation="fadeIn" data-os-animation-delay="0.2s">Berikut ini beberapa berita terbaru

yang menarik untuk Anda simak</p>

<div class="element-bottom-50 recent-simple-os-container row">

<?php if ($artikel == NULL) { ?>

<h4 class="text-center">Berita kosong</h4>

<?php } else { ?>

<?php foreach ($artikel as $row) { ?>

<div class="col-md-4" data-os-animation="none" data-os-animation-

delay="0s">

<article class="post-grid post-grid-overlay element-bottom-20 text-left"

style="background-image: url(<?php echo Yii::$app->urlManagerBackend-

>createUrl('uploads/artikel/' . $row->thumbnail); ?>)">

<a href="<?php echo Yii::$app->urlManager->createUrl('artikel/' .

$row->slug); ?>">

<div class="post-grid-content">

<h3 class="post-grid-content-title"><?php echo $row-

>judul_artikel; ?></h3>

<div class="post-grid-content-footer"><?php echo $row-

>idUser->username; ?> - <?php echo Yii::$app->formatter->asDatetime($row->tanggal);

?></div>

</div>

</a>

</article>

</div>

<?php } ?>

<?php } ?>

</div>

</div>

</div>

</div>

</section>

2. Index.php (Halaman Dashboard)

<?php

/* @var $this yii\web\View */

use common\models\Artikel;

use common\models\Kontak;

use common\models\Umkm;

use common\models\KategoriUmkm;

Page 9: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

$this->title = 'Beranda';

$count_artikel = Artikel::find()->count();

$count_kontak = Kontak::find()->count();

$count_umkm = Umkm::find()->count();

$count_kategoriumkm= KategoriUmkm::find()->count();

?>

<div class="row">

<div class="col-sm-12">

<div class="jumbotron">

<h1>Hai <?php

echo Yii::$app->user->identity->nama_lengkap; ?>!</h1>

<p

class="lead">Selamat datang di halaman dashboard</p>

</div>

<div class="card-box

widget-inline">

<div

class="row">

<div

class="col-lg-3 col-sm-6">

<div class="widget-inline-box text-center">

<h3 class="m-t-10"><i class="text-custom mdi mdi-airplay"></i> <b data-

plugin="counterup"><?php echo $count_umkm; ?></b></h3>

<p class="text-muted">Jumlah UMKM</p>

</div>

</div>

<div

class="col-lg-3 col-sm-6">

<div class="widget-inline-box text-center">

<h3 class="m-t-10"><i class="text-info mdi mdi-black-mesa"></i> <b data-

plugin="counterup"><?php echo $count_kategoriumkm; ?></b></h3>

<p class="text-muted">Jumlah Kategori UMKM</p>

</div>

</div>

<div

class="col-lg-3 col-sm-6">

<div class="widget-inline-box text-center">

Page 10: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

<h3 class="m-t-10"><i class="text-primary mdi mdi-access-point-network"></i> <b

data-plugin="counterup"><?php echo $count_artikel; ?></b></h3>

<p class="text-muted">Jumlah Artikel</p>

</div>

</div>

<div

class="col-lg-3 col-sm-6">

<div class="widget-inline-box text-center b-0">

<h3 class="m-t-10"><i class="text-danger mdi mdi-cellphone-link"></i> <b data-

plugin="counterup"><?php echo $count_kontak; ?></b></h3>

<p class="text-muted">Jumlah Pesan Masuk</p>

</div>

</div>

</div>

</div>

</div>

</div>

<!--end row -->

3. Index.php (Halaman Pemetaan)

<?php

use yii\helpers\Html;

use yii\grid\GridView;

/* @var $this yii\web\View */

/* @var $searchModel common\models\ArtikelSearch */

/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Pemetaan';

$query = Yii::$app->db->createCommand('select u.nama_perusahaan as nama_perusahaan,

u.nama_pengusaha as nama_pengusaha, u.tahun_berdiri as tahun_berdiri,

u.badan_hukum_usaha as badan_hukum_usaha, u.alamat as alamat, u.wilayah_pemasaran

as wilayah_pemasaran, u.skala_usaha as skala_usaha, t.laki_laki as laki_laki, t.perempuan

as perempuan, t.jumlah as jumlah, l.longitude as longitude, l.latitude as latitude,

k.nama_kategori as nama_kategori from umkm u, tenaga_kerja t, lokasi_umkm l,

kategori_umkm k where u.id = t.id_umkm and u.id = l.id_umkm and k.id = u.id_kategori

order by u.id')->queryAll();

Page 11: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

$this->registerCss('

#map_canvas {

width: 100%;

height: 600px;

margin: 0 auto;

}

#map_container {

width: 100%;

height: 100%;

}

#map_nav {

z-index: 100;

position: absolute;

top: 0;

right: 0;

background-color: #fff;

min-width: 300px;

}

');

?>

<script

src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDo76N11O33nC37EL6Sbf5m

Q3X_bVIIaos"></script>

<script type="text/javascript">

//<![CDATA[

// arrays to hold copies of the markers and html used by the side_bar

// because the function closure trick doesnt work there

var gmarkers = [];

var map = null;

function initialize() {

// create the map

var myOptions = {

zoom: 11,

center: new google.maps.LatLng(-7.656149181037321,

111.32817506790161),

mapTypeControl: true,

mapTypeControlOptions: {style:

google.maps.MapTypeControlStyle.DROPDOWN_MENU},

navigationControl: true,

mapTypeId: google.maps.MapTypeId.ROADMAP

}

map = new

google.maps.Map(document.getElementById("map_canvas"), myOptions);

google.maps.event.addListener(map, 'click', function() {

infowindow.close();

});

Page 12: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

// Add markers to the map

// Set up three markers with info windows

// add the points

<?php foreach ($query as $data) { ?>

var point = new google.maps.LatLng(<?php echo $data['latitude']; ?>,

<?php echo $data['longitude']; ?>);

var marker = createMarker(point, "<?php echo

$data['nama_perusahaan']; ?>", "<div class='info_content' align='center' style='line-

height: 20px;'><strong style='font-size: 20px;'><?php echo $data['nama_perusahaan'];

?></strong><br /><strong>Kategori</strong>: <?php echo $data['nama_kategori']; ?><br

/><strong>Tahun Berdiri</strong>: <?php echo $data['tahun_berdiri']; ?><br

/><strong>Badan Hukum Usaha</strong>: <?php echo $data['badan_hukum_usaha'];

?><br /><strong>Wilayah Pemasaran</strong>: <?php echo $data['wilayah_pemasaran'];

?><br /><strong>Skala Usaha</strong>: <?php echo $data['skala_usaha']; ?><br

/><strong>Jumlah Tenaga Kerja</strong>: <?php echo $data['laki_laki']; ?> orang laki-

laki dan <?php echo $data['perempuan']; ?> orang perempuan<br />(Total ada <?php

echo $data['jumlah']; ?> tenaga kerja)<br /><strong>Lokasi</strong>: <?php echo

$data['longitude']; ?> longitude, <?php echo $data['latitude']; ?> latitude</div>")

<?php } ?>

}

var infowindow = new google.maps.InfoWindow();

// This function picks up the click and opens the corresponding info

window

function myclick(i) {

google.maps.event.trigger(gmarkers[i], "click");

}

// A function to create the marker and set up the event window function

function createMarker(latlng, name, html) {

var contentString = html;

var marker = new google.maps.Marker({

position: latlng,

map: map,

zIndex: Math.round(latlng.lat()*-100000)<<5

});

google.maps.event.addListener(marker, 'click', function() {

infowindow.setContent(contentString);

infowindow.open(map,marker);

});

// save the info we need to use later for the side_bar

gmarkers.push(marker);

}

google.maps.event.addDomListener(window, 'load', initialize);

</script>

<section class="section">

Page 13: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

<div id="map_container">

<div id="map_nav">

<div class="panel-default">

<div class="panel-heading">

<a class="accordion-toggle

collapsed" data-toggle="collapse" href="#menu">Daftar UMKM Kab. Magetan</a>

</div>

<div class="panel-collapse collapse"

id="menu">

<div class="panel-body"

style="max-height:560px;overflow-y:scroll;overflow-x:hidden;">

<?= GridView::widget([

'dataProvider' =>

$dataProvider,

// 'filterModel' =>

$searchModel,

'emptyText' =>

'Data UMKM tidak ditemukan',

'tableOptions' =>

['class' => 'table table-hover'],

'layout' =>

'{items}',

'columns' => [

['class'

=> 'yii\grid\SerialColumn'],

[

'attribute' => 'nama_perusahaan',

'value' => function($model, $key, $index) {

return '<a title="Lihat di maps" class="accordion-toggle collapsed" data-

toggle="collapse" href="#menu" onclick="myclick(' . $index . ')"><strong>' . $model-

>nama_perusahaan . '</strong></a>';

},

'format' => 'raw',

],

[

'attribute' => 'alamat',

'value' => function($model) {

return $model->alamat;

},

Page 14: 1. Index.php (Halaman Beranda)eprints.umpo.ac.id/3294/7/LAMPIRAN.pdf ·

'format' => 'raw',

],

],

]); ?>

</div>

</div>

</div>

</div>

<div id="map_canvas"></div>

</div>

</section>