westdc-zf1/application/admin/views/scripts/data/sourceselect.phtml

82 lines
3.4 KiB
PHTML

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('项目来源管理');
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<p>为元数据《<?php echo $this->info['title'];?>》选择项目来源</p>
<div class="input-group">
<form method="get" action="" class="input-group">
<input type="text" value="" placeholder="搜索关键字" name="q" class="form-control q">
<span class="input-group-btn"><input type="submit" value="搜索" class="btn btn-default"></span>
</form>
</div>
<!-- search DIV -->
<form method="post">
<table class="stylized" width="700">
<thead>
<tr>
<td width='10%'>选择</td>
<td width='30%'>标题</td>
<td width='30%'>Code字符</td>
<td width='30%'>操作</td>
</tr>
</thead>
<?php if (count($this->paginator)): ?>
<tbody id="list">
<?php foreach ($this->paginator as $item): ?>
<tr>
<td><input type="radio" name="sourceid" value="<?php echo $item['id'];?>" <?php if($item['id']==$this->info['sourceid']) echo 'checked="checked"'; ?> /></td>
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
<td><?php echo $item['code'];?></td>
<td><a href="/admin/data/source/do/edit/id/<?php echo $item['id']?>">查看编辑</a></td>
</tr>
<?php endforeach; ?>
</tbody>
<?php endif; ?>
</table>
<input type="hidden" name="uuid" value="<?php echo $this->uuid;?>" />
<input type="hidden" name="do" value="datasource" />
<input type="hidden" name="submit" value="1" />
<?php
if(!empty($this->info['id']))
{
echo "此元数据已经选择了项目来源:".$this->info['stitle']."[".$this->info['code']."],操作将更改此元数据现有的项目来源<br />";
}
?>
<input type="submit" value="提交" />
</form>
<?php if(!empty($this->info['id'])) { ?>
<form method="post" action="/admin/data/source/">
<input type="hidden" name="uuid" value="<?php echo $this->uuid;?>" />
<input type="hidden" name="do" value="delsource" />
<input type="hidden" name="id" value="<?php echo $this->info['id'];?>" />
<input type="hidden" name="submit" value="1" />
<br /><button type="submit" class="btn btn-red" onclick="return confirm('是否确定删除该来源')">清除数据来源</button>
</form>
<?php
} ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<script>$("#list tr").mouseover(function () { $(this).addClass("high") }).mouseout(function () { $(this).removeClass("high") })</script>