kopia lustrzana https://github.com/FacilMap/facilmap
118 wiersze
2.5 KiB
Plaintext
118 wiersze
2.5 KiB
Plaintext
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title><%=padData.name%> – FacilMap</title>
|
||
<base href="../" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<%
|
||
if(!padData || padData.searchEngines) {
|
||
-%>
|
||
<meta name="robots" content="index,nofollow" />
|
||
<meta name="description" content="<%= padData && padData.description || "A fully-featured OpenStreetMap-based map where markers and lines can be added with live collaboration." %>" />
|
||
<%
|
||
} else {
|
||
-%>
|
||
<meta name="robots" content="noindex,nofollow" />
|
||
<%
|
||
}
|
||
-%>
|
||
<link rel="shortcut icon" href="../static/favicon.png">
|
||
</head>
|
||
<body>
|
||
<div class="container-fluid">
|
||
<h1><%=padData.name%> – FacilMap</h1>
|
||
<%
|
||
for(let type of Object.values(types)) {
|
||
-%>
|
||
<h2 role="button" data-toggle="collapse" data-target="#type-<%=type.id%>" aria-expanded="true" aria-controls="type-<%=type.id%>"><svg class="hidden-print" viewbox="0 0 11 15" height="15"><path d="M10.195 7.5l-7.5 7.5L0 12.305 4.805 7.5 0 2.695 2.695 0z"/></svg> <%=type.name%></h2>
|
||
<table id="type-<%=type.id%>" class="collapse in table table-striped table-bordered table-condensed tablesorter" data-sortlist="[[0,0]]">
|
||
<thead>
|
||
<tr>
|
||
<%
|
||
if(!hide.includes("Name")) {
|
||
-%>
|
||
<th>Name</th>
|
||
<%
|
||
}
|
||
|
||
if(type.type == "marker") {
|
||
if(!hide.includes("Position")) {
|
||
-%>
|
||
<th data-sorter="false">Position</th>
|
||
<%
|
||
}
|
||
} else {
|
||
if(!hide.includes("Distance")) {
|
||
-%>
|
||
<th>Distance</th>
|
||
<%
|
||
}
|
||
if(!hide.includes("Time")) {
|
||
-%>
|
||
<th>Time</th>
|
||
<%
|
||
}
|
||
}
|
||
|
||
for(let field of type.fields) {
|
||
if(!hide.includes(field.name)) {
|
||
-%>
|
||
<th><%=field.name%></th>
|
||
<%
|
||
}
|
||
}
|
||
-%>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<%
|
||
for(let object of type.type == "marker" ? type.markers : type.lines) {
|
||
-%>
|
||
<tr>
|
||
<%
|
||
if(!hide.includes("Name")) {
|
||
-%>
|
||
<td><%=object.name%></td>
|
||
<%
|
||
}
|
||
|
||
if(type.type == "marker") {
|
||
if(!hide.includes("Position")) {
|
||
-%>
|
||
<td><%=object.lat%>,<%=object.lon%></td>
|
||
<%
|
||
}
|
||
} else {
|
||
if(!hide.includes("Distance")) {
|
||
-%>
|
||
<td><%=format.round(object.distance, 2)%> km</td>
|
||
<%
|
||
}
|
||
if(!hide.includes("Time")) {
|
||
-%>
|
||
<td><% if(object.time != null) { %><%=format.formatTime(object.time)%> h <%=routing.formatRoutingMode(object.mode)%><% } %></td>
|
||
<%
|
||
}
|
||
}
|
||
|
||
for(let field of type.fields) {
|
||
if(!hide.includes(field.name)) {
|
||
-%>
|
||
<td><%-format.formatField(field, object.data[field.name]).trim()%></td>
|
||
<%
|
||
}
|
||
}
|
||
-%>
|
||
</tr>
|
||
<%
|
||
}
|
||
-%>
|
||
</tbody>
|
||
</table>
|
||
<%
|
||
}
|
||
-%>
|
||
</div>
|
||
</body>
|
||
</html> |