update metadata list function

This commit is contained in:
jack 2018-08-15 01:45:32 +08:00
parent 5967034307
commit 7d0ff8e858
3 changed files with 38 additions and 4 deletions

View File

@ -85,6 +85,7 @@
<?php if (!isset($item['stid']) || !$item['stid']>0) : ?>
<a class="label label-primary" href="/admin/data/spatial/ac/edit/uuid/<?php echo $item['uuid']; ?>">数据时空范围采集</a>
<?php endif; ?>
<a class="label label-primary" id="data-list-btn" data-uuid="<?php echo $item['uuid']; ?>">数据列表</a>
</p>
<?php if($item['author']) :?>
<p>数据贡献者:<?= $item['author']; ?></p>
@ -98,10 +99,45 @@
<?php echo $this->paginator; ?>
</div>
</div>
<div class="modal fade" id="file-list" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="gridSystemModalLabel">文件列表</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-12" id="file-list-content">加载中...</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script>
$(".iframe").colorbox({ iframe: true, width: "50%", height: "50%" });
$(".inline").colorbox({ inline: true, width: "50%" });
function Alert(html) {
$.colorbox({ 'innerWidth': '50%', 'html': '<h4 style="font-size:16px;font-weight:bold;">' + html + '</h4>' });
}
$('#data-list-btn').click(function(){
$('#file-list').modal('show')
$.get('/service/filelist/uuid/' + $(this).data('uuid')).success(function(data){
var list = []
for(var i in data){
list.push('<tr><td>' + data[i].filename + '</td><td>' + data[i].filesize + '</td></tr>\n')
}
$('#file-list-content').html('<table class="table table-striped">\n' +
'<thead><tr><td>文件名</td><td>大小</td></tr></thead>' +
'<tbody>' +
list.join('') +
'</tbody></table>')
})
})
</script>

View File

@ -10,12 +10,10 @@
<xsl:param name="citation" select="defaultstring"/>
<xsl:param name="fund" select="defaultstring"/>
<xsl:template match="/">
<img>
<xsl:attribute name="src">http://westdc.westgis.ac.cn/images/westdc-logo-1.png</xsl:attribute>
</img>
<h1 style="text-align:center">时空三极环境大数据平台</h1>
<div id="uuid" style="color:red"><u>
<xsl:variable name="uuid" select="//Metadata/mdFileID"/>
<a href="http://westdc.westgis.ac.cn/data/{$uuid}">
<a href="http://www.poles.ac.cn/data/{$uuid}">
本数据地址:<xsl:value-of select="//Metadata/mdFileID"/>
</a>
</u></div>

Binary file not shown.