Seperated content in tabs
This commit is contained in:
parent
41505824ff
commit
e23bb22ea2
1 changed files with 9 additions and 2 deletions
11
ShowStop.php
11
ShowStop.php
|
@ -15,15 +15,22 @@ position of the bus on the map. The other table shows upcoming arrivals. There
|
|||
is also a map showing the location of the requested stop.</p>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
include 'libdata.php';
|
||||
|
||||
if (isValidStop($_GET["stop"])){
|
||||
$stop=getStopInfo($_GET["stop"]);
|
||||
echo '<header><h1>' . $stop['id'] . ' - ' . $stop['name'] . '</h1></header>';
|
||||
echo '<header><h1>Stop ' . $stop['id'] . ' - ' . $stop['name'] . '</h1></header>';
|
||||
echo '<ul class="nav nav-tabs" role="tablist" >';
|
||||
echo '<li role="presentation" class="active"><a href="#routes" aria-controls="routes" data-toggle="tab" role="tab">Routes</a></li>';
|
||||
echo '<li role="presentation"><a href="#map" onclick="setTimeout(function(){map.updateSize();}, 200);" aria-controls="map" data-toggle="tab" role="tab">Map</a></li>';
|
||||
echo '</ul>';
|
||||
echo '<div class="tab-content">';
|
||||
echo '<div id="routes" class="tab-pane fade in active" role="tabpanel">';
|
||||
PrintRoutes($_GET["stop"]);
|
||||
echo '</div><div id="map" class="tab-pane fade" role="tabpanel">';
|
||||
ShowMap($stop['lat'],$stop['lon']);
|
||||
echo '</div></div>';
|
||||
} else {
|
||||
echo '<span style="display:inline-block" class="alert alert-danger" role="alert">No such stop. <a href="javascript:history.back()">Go back?</a></span>';
|
||||
}
|
||||
|
|
Reference in a new issue