westdc-zf1/module/Metadata/view/metadata/index/datalist.phtml

41 lines
1.4 KiB
PHTML

<?php
if (!empty($this->codename)) $this->headTitle($this->codename);
$theme = new \Sookon\Helpers\Theme;
$theme->AppendPlus($this,'colorbox');
?>
<div class="container">
<div id="row">
<?= $this->partial('layout/metadata/subnav'); ?>
</div>
<?php if(!empty($this->unit)) { ?>
<h3>单位:<?= $this->unit ?> <small><?= !empty($this->count) ? $this->count."条数据":"" ?></small></h3>
<?php } ?>
<?php if (!empty($this->paginator)) : ?>
<div id='metacontent'>
<?php echo $this->paginator; ?>
<hr />
<?php foreach($this->paginator as $md) : ?>
<div class="mditem" style="border-bottom:1px dashed #DFDFDF; overflow:hidden">
<div class="thumb" >
<a href="/service/thumb/id/<?php echo $md['id'];?>" class="colorbox pull-left">
<img src="/service/thumb/id/<?php echo $md['id'];?>" style="padding-right:20px" />
</a>
</div>
<div >
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $md['title'];?></a></h2>
<p><?php echo mb_strlen($md['description'])>400? mb_substr($md['description'],0,400,'UTF-8').'...':$md['description'];?></p>
</div>
</div>
<?php endforeach; ?>
</div>
<?php echo $this->paginator; ?>
<?php endif ?>
</div>
<script>
$(document).ready(function(){
$(".colorbox").colorbox({rel:"colorbox",photo:"true",transition:"fade"});
$(".colorbox").colorbox({photo:"true"});
});
</script>