display.html
4.84 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{template 'common/header'}
<style>
.table td span{display:inline-block;}
.table td input{margin-bottom:0;}
</style>
<script type="text/javascript">
$(function() {
$(".main").delegate("span.switch", "click", function() {
var sw;
var a = $(this).find("i");
var reid = $(this).attr("value");
if (a.attr("class") == 'fa fa-play') {
a.attr("class", "fa fa-stop");
a.parent().attr("title", "关闭");
sw = '1';
} else {
a.attr("class", "fa fa-play");
a.parent().attr("title", "开启");
sw = '0';
}
$.post(location.href, {'reid': reid, 'switch': sw}, function(dat) {
});
});
});
</script>
<ul class="nav nav-tabs">
<li class="active"><a href="{php echo $this->createWebUrl('display')}">预约活动列表</a></li>
<li><a href="{php echo $this->createWebUrl('post')}">新建预约活动</a></li>
</ul>
<div class="main">
<div class="panel panel-info">
<div class="panel-heading">筛选</div>
<div class="panel-body">
<form action="./index.php" method="get" class="form-horizontal" role="form">
<input type="hidden" name="c" value="site" />
<input type="hidden" name="a" value="entry" />
<input type="hidden" name="m" value="we7_research" />
<input type="hidden" name="do" value="display" />
<div class="form-group">
<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">状态</label>
<div class="col-xs-12 col-sm-8 col-lg-9">
<select name="status" class='form-control'>
<option value="1" {if $_GPC['status'] == '1'} selected{/if}>启用</option>
<option value="0" {if $_GPC['status'] == '0'} selected{/if}>禁用</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关键字</label>
<div class="col-xs-12 col-sm-8 col-lg-9">
<input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}">
</div>
<div class=" col-xs-12 col-sm-2 col-lg-2">
<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
</div>
</div>
</form>
</div>
</div>
<form action="" method="post">
<div class="panel panel-default">
<div class="panel-body table-responsive">
<table class="table table-hover">
<thead class="navbar-inner">
<tr>
<th style="width:200px;">预约活动名称</th>
<th style="width:260px;">直接链接</th>
<th style="width:200px;">启动时间</th>
<th style="width:160px; text-align:right;">操作</th>
</tr>
</thead>
<tbody>
{loop $ds $row}
<tr>
<td><a href="{php echo $this->createWebUrl('manage', array('id' => $row['reid']))}">{$row['title']}</a></td>
<td><input type="text" class="form-control" value="{$row['link']}" /></td>
<td>{if $row['isstart']}{php echo date('Y/m/d H:i:s', $row['starttime'])}{else}未开始{/if}</td>
<td style="text-align:right;">
<a href="{php echo $this->createWebUrl('manage', array('id' => $row['reid']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" title="预约详情"><i class="fa fa-search"></i></a>
<a href="{php echo $this->createWebUrl('post', array('id' => $row['reid']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" title="编辑"><i class="fa fa-edit"></i></a>
<a href="{php echo $this->createWebUrl('delete', array('id' => $row['reid']))}" onclick="return confirm('删除预约活动将删除所有关联的预约记录,确认吗?');
return false;" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" title="删除"><i class="fa fa-remove"></i></a>
<span class="btn btn-default btn-sm switch" data-toggle="tooltip" data-placement="bottom" value="{$row['reid']}" {if $row['switch'] == 0}title="开启"><i class="fa fa-play"></i>
{else}title="关闭"><i class="fa fa-stop"></i>{/if}</span>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</form>
</div>
<script>
require(['bootstrap'],function($){
$('.btn').hover(function(){
$(this).tooltip('show');
},function(){
$(this).tooltip('hide');
});
});
</script>
{template 'common/footer'}