wikipoints/ground/views/indexTemplate.php

67 lines
3.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id="map"></div>
<div id="routeWindow" class="popover fade in">
<h3 class="popover-title">Мой маршрут <b id="routeDistance"></b></h3>
<div class="popover-content">
<div id="wayPoints"></div>
</div>
<div class="buttons" style="padding: 3px 14px;">
<button class="btn btn-default" type="button" onclick="$('#routeWindow').toggle(200)">Скрыть</button>
<?php if ($user): ?>
<button class="btn btn-default" onclick="saveRoute()"><span class="glyphicon glyphicon-cloud-upload"></span> Сохранить</button>
<?php endif; ?>
<button class="btn btn-info" onclick="buildRoute()"><span class="glyphicon glyphicon-send"></span> Проложить</button>
</div>
</div>
<?php if ($user): ?>
<div id="myRoutesWindow" class="popover fade in" style="display: none; position: absolute; top: 50px; right: 7px; left: auto; max-width: none;">
<h3 class="popover-title">Мои маршруты</h3>
<div class="popover-content">
<div id="routes">
<?php if ($routes): ?>
<?php foreach ($routes as $route) : ?>
<div class="route" onclick="loadRoute(<?= $route['id'] ?>)"><span onclick="deleteRoute(<?= $route['id'] ?>);$(this).parent().remove();event.stopPropagation();">&times;</span> <?= $route['name'] ?></div>
<?php endforeach; ?>
<?php else: ?>
У вас пока нет сохраненных маршрутов.
<?php endif; ?>
</div>
<button class="btn btn-default" type="button" onclick="$('#myRoutesWindow').toggle(200)">Скрыть</button>
</div>
</div>
<?php endif; ?>
<div id="footer">
<table width="100%">
<tr>
<td width="30%">
<div class="input-group">
<input type="text" id="addressField" class="form-control" placeholder="Поиск на карте..." onkeydown="if(event.keyCode == 13) {searchAdderess()}" />
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="searchAdderess()"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</td>
<td>
&nbsp;
</td>
<td>
<button class="btn btn-default" type="button" onclick="$('#myRoutesWindow').hide(200);$('#routeWindow').toggle(200)"><span class="glyphicon glyphicon-align-justify"></span> Маршрут</button>
<?php if ($user): ?>
<button class="btn btn-default" type="button" onclick="$('#routeWindow').hide(200);$('#myRoutesWindow').toggle(200);"><span class="glyphicon glyphicon-cloud-download"></span> Мои маршруты</button>
<?php endif; ?>
<button class="btn btn-default" type="button" onclick="showMeOnTheMap()"><span class="glyphicon glyphicon-screenshot"></span> Я на карте</button>
</td>
<td class="text-right">
<?php if ($user): ?>
<button class="btn btn-default" type="button" id="addPointButton" onclick="activateAddPoint()"><span class="glyphicon glyphicon-plus-sign"></span> Добавить точку</button>
<a class="btn btn-default" type="button" href="/index/logout"><span class="glyphicon glyphicon-ban-circle"></span> Выйти</a>
<?php else:?>
<button class="btn btn-success" type="button" id="loginButton" onclick="$('#loginModal').modal('show');"><span class="glyphicon glyphicon-user"></span> Войти для добавления точки</button>
<?php endif;?>
</td>
</tr>
</table>
</div>
<?= $user ? '' : self::renderPartial('modals/login.php', null, true) ?>
<?= $user ? self::renderPartial('modals/addPoint.php', array('categories' => $categories), true) : '' ?>
<?= self::renderPartial('modals/categories.php', array('categories' => $categories), true) ?>