-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsearch.html
39 lines (33 loc) · 1.89 KB
/
search.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% include head.html %}
{% include header.html %}
<div id="main-content" class="container search-results" role="main">
<h1 style="display:none">Search results for '<span id="search-term"></span>'</h1>
{% include components/loading.html %}
<div class="results" data-imgpath="{{ site.baseurl }}/assets/img/goals/">
</div>
</div>
<script type="text/template" class="results">
<% if(resultsCount) { %>
<p><%= resultsCount %> indicator<% if(resultsCount != 1) { %>s<% } %> found in <%= searchResults.length %> goal<% if(searchResults.length != 1) { %>s<% } %></p>
<% _.each(searchResults, function(goal){ %>
<div class="row">
<div class="col col-xs-12">
<h2>Goal <%= goal.goalId %> - <%= goal.goalTitle %></h2>
</div>
</div>
<div class="row">
<div class="col col-xs-3 col-md-2">
<img src="<%= imgPath%><%= goal.goalId%>.png" />
</div>
<div class="col col-xs-9 col-md-10 indicator-cards">
<% _.each(goal.indicators, function(indicator){ %>
<a href="<%=indicator.href%>"><span><%= indicator.id %><span class="status <% if(indicator.status == 'notstarted') { %>danger<% } else if(indicator.status == 'inprogress') { %>warning<% } else if(indicator.status == 'complete') { %>success<% } %>"><% if(indicator.status == 'notstarted') { %>Exploring data sources<% } else if(indicator.status == 'inprogress') { %>Statistics in progress<% } else if(indicator.status == 'complete') { %>Reported online<% } %></span></span> <%=indicator.parsedTitle%><% if(indicator.hasDescription) { %><p class="description"><%=indicator.parsedDescription%></p><%}%><% if(indicator.hasKeywords) { %><p class="keywords">Keywords: <%=indicator.parsedKeywords%></p><%}%></a>
<% }); %>
</div>
</div>
<% }); %>
<% } else { %>
<p>No results</p>
<% } %>
</script>
{% include footer.html %}