2016-12-23 10:16:12 +00:00
|
|
|
|
<%- include('comm/header.html') %>
|
2018-01-29 02:27:28 +00:00
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-9 col-xs-12">
|
2018-01-29 07:29:19 +00:00
|
|
|
|
<ul class="list-group filter-list-group">
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<% metadatas.forEach(function(metadata){ %>
|
|
|
|
|
<div class="media metadata-list-group">
|
|
|
|
|
<div class="media-left">
|
|
|
|
|
<a href="http://www.sanjiangyuan.org.cn:4567/service/bigthumb/id/<%= metadata.id %>">
|
2018-01-31 03:18:11 +00:00
|
|
|
|
<img width="140" height="80" class="media-object"
|
|
|
|
|
src="http://www.sanjiangyuan.org.cn:4567/service/thumb/id/<%= metadata.id%>"
|
|
|
|
|
alt="<%= metadata.title %>">
|
2018-01-29 07:29:19 +00:00
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="media-body">
|
2018-01-31 03:18:11 +00:00
|
|
|
|
<h4 class="media-heading"><a href="http://www.sanjiangyuan.org.cn:4567/data/<%= metadata.uuid %>"><%=
|
|
|
|
|
metadata.title %></a></h4>
|
2018-01-29 07:29:19 +00:00
|
|
|
|
<%= metadata.description %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% }); %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-3 col-xs-12">
|
|
|
|
|
<h3>最新数据</h3>
|
|
|
|
|
<div class="separator"></div>
|
|
|
|
|
<div class="list-group">
|
|
|
|
|
<% latestMetadatas.forEach(function(metadata){ %>
|
|
|
|
|
<a href="http://www.sanjiangyuan.org.cn:4567/data/<%= metadata.uuid %>" class="list-group-item">
|
2018-01-30 07:01:13 +00:00
|
|
|
|
<h5 class="list-group-item-heading" style="color:#08c"><%= metadata.title %></h5>
|
2018-01-29 07:29:19 +00:00
|
|
|
|
<p class="list-group-item-text"><%= metadata.description.substring(0,50)+ '...' %></p>
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<% }); %>
|
|
|
|
|
</div>
|
2018-01-29 02:27:28 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-01-31 03:18:11 +00:00
|
|
|
|
<style type="text/css">
|
|
|
|
|
p.list-group-item-text {
|
|
|
|
|
color:#979797;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
2018-01-29 02:27:28 +00:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function () {
|
2018-02-01 05:44:52 +00:00
|
|
|
|
|
|
|
|
|
var pathname = window.location.pathname;
|
|
|
|
|
if (pathname.indexOf('data') === 1) {
|
|
|
|
|
$(".navbar-nav li a[href='/data']").addClass('active');
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-31 03:18:11 +00:00
|
|
|
|
$.getJSON("/json/keyword.json", function (data) {
|
|
|
|
|
var items = [];
|
|
|
|
|
$.each(data, function (index, value) {
|
2018-01-29 07:29:19 +00:00
|
|
|
|
var title = $("<span/>", {
|
2018-01-31 03:18:11 +00:00
|
|
|
|
"class": "title",
|
|
|
|
|
html: value.type + ":"
|
2018-01-29 07:29:19 +00:00
|
|
|
|
});
|
2018-01-31 03:18:11 +00:00
|
|
|
|
var keywords = [];
|
2018-01-29 07:29:19 +00:00
|
|
|
|
|
2018-01-31 03:18:11 +00:00
|
|
|
|
if (value.type === '数据发布单位') {
|
|
|
|
|
$.each(value.items, function (i, val) {
|
|
|
|
|
var keyword = $("<a/>", {
|
|
|
|
|
"class": "item",
|
|
|
|
|
"href": "http://www.sanjiangyuan.org.cn:4567/data/organization/name/" + encodeURIComponent(val),
|
|
|
|
|
html: val
|
|
|
|
|
});
|
|
|
|
|
keywords.push(keyword);
|
2018-01-29 07:29:19 +00:00
|
|
|
|
});
|
2018-01-31 03:18:11 +00:00
|
|
|
|
} else {
|
|
|
|
|
$.each(value.items, function (i, val) {
|
|
|
|
|
var keyword = $("<a/>", {
|
|
|
|
|
"class": "item",
|
|
|
|
|
"href": "http://www.sanjiangyuan.org.cn:4567/data/tag/" + encodeURIComponent(val),
|
|
|
|
|
html: val
|
|
|
|
|
});
|
|
|
|
|
keywords.push(keyword);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var li = $("<li/>", {
|
|
|
|
|
"class": "list-group-item"
|
2018-01-29 07:29:19 +00:00
|
|
|
|
});
|
2018-01-31 03:18:11 +00:00
|
|
|
|
li.append(title).append(keywords);
|
|
|
|
|
items.push(li);
|
2018-01-29 07:29:19 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('.filter-list-group').append(items);
|
2018-01-29 02:27:28 +00:00
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<%- include('comm/footer.html') %>
|