wikipoints/views/tracks/index.php

33 lines
1.2 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.

<table style="width: 100%;">
<tr>
<td>
<h3>Ваши треки</h3>
</td>
<td style="text-align: right;">
<form method="POST" action="/tracks/uploadfile/" enctype="multipart/form-data" class="form-inline">
<div class="form-group">
<label for="uploadfile">Загрузить новый файл</label>
<input type="file" name="file" id="uploadfile" class="form-control" accept=".gpx"/>
<button type="submit" class="btn btn-success" title="Загрузить выбранный файл"><span class="glyphicon glyphicon-upload" aria-hidden="true"></span></button>
&nbsp;
<a href="/tracks/files" class="btn btn-default" title="Раздел с файлами треков"><span class="glyphicon glyphicon-download" aria-hidden="true"></span></a>
</div>
</form>
</td>
</tr>
</table>
<hr/>
<?php
if ($trips) {
foreach ($trips as $trip):
?>
<?= $trip->id ?> — <a href="/?track=<?= $trip->id ?>"><?= $trip->name ?></a> (<?= $trip->createdAt ?>)<br/>
<?php
endforeach;
} else {
print 'Пока ничего не загружено. В заголовке справа представлена форма для загрузки файлов треков.';
}