drogon/examples/simple_example/ListParaView.csp
2018-10-17 13:48:28 +08:00

31 lines
593 B
Plaintext
Executable File

<!DOCTYPE html>
<html>
<%c++
auto para=@@.get<std::map<std::string,std::string>>("parameters");
%>
<head>
<meta charset="UTF-8">
<title>{{ title }}</title>
</head>
<body>
<%view header %>
<%c++ if(para.size()>0){%>
<H1>Parameters</H1>
<table border="1">
<tr>
<th>name</th>
<th>value</th>
</tr>
<%c++ for(auto iter:para){%>
<tr>
<td><%c++ $$<<iter.first;%></td>
<td><%c++ $$<<iter.second;%></td>
</tr>
<%c++}%>
</table>
<%c++ }else{%>
<H1>no parameter</H1>
<%c++}%>
</body>
</html>