article_edit.html
5.44 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<%
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
include("/pages/template/head.html"){}
%>
<% include("/pages/includes/my97.html"){} %>
<script type="text/javascript">
var oper = {
save:function(id){
if(!validForm()) {
return false;
}
id = id || '0';
var url = 'admin/article/save/'+id;
form1.action = url;
form1.submit();
return true;
}
};
</script>
<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal"
enctype="multipart/form-data" role="form">
<input type="hidden" name="model.id" value="${model.id}" />
<table class="table">
<% // 列表头部 %>
<tr>
<td width="15%">栏目</td>
<td width="33%">
<select name="model.folder_id" class="form-control" valid="vselect" validname="栏目">
${selectFolder }
</select>
</td>
<td width="15%">名称</td>
<td width="33%">
<input class="form-control" type="text" name="model.title" value="${model.title}"
valid="vtext" validname="名称" />
</td>
</tr>
<tr>
<td>发布者</td>
<td>
<% if(model.id!0 > 0) { %>
<input class="form-control" type="text" name="model.publish_user" value="${model.publish_user}" />
<% } else { %>
<input class="form-control" type="text" name="model.publish_user" value="${session.session_user.realname!session.session_user.username }" />
<% } %>
</td>
<td>发布时间</td>
<td>
<input class="form-control" type="text" name="model.publish_time"
value="${model.publish_time!flyfox.getNow()}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
</td>
</tr>
<tr>
<td>排序</td>
<td>
<input class="form-control" type="text" name="model.sort" value="${model.sort!'10'}"
valid="vnum_y" validname="排序" />
</td>
<td>状态</td>
<td>
<label class="radio-inline">
<input type="radio" name="model.status" id="" value="2" ${model.status=='2'?"checked":"" } > 隐藏
</label>
<label class="radio-inline">
<input type="radio" name="model.status" id="" value="1" ${model.status!='2'?"checked":"" } > 显示
</label>
</td>
</tr>
<tr>
<td>是否评论</td>
<td>
<label class="radio-inline">
<input type="radio" name="model.is_comment" id="" value="1" ${model.is_comment!=2?"checked":"" } > 是
</label>
<label class="radio-inline">
<input type="radio" name="model.is_comment" id="" value="2" ${model.is_comment==2?"checked":"" } > 否
</label>
</td>
<td>是否推荐</td>
<td>
<label class="radio-inline">
<input type="radio" name="model.is_recommend" id="" value="1" ${model.is_recommend==1?"checked":"" } > 是
</label>
<label class="radio-inline">
<input type="radio" name="model.is_recommend" id="" value="2" ${model.is_recommend!=1?"checked":"" } > 否
</label>
</td>
</tr>
<tr>
<td>开始时间</td>
<td>
<input class="form-control" type="text" name="model.start_time"
value="${model.start_time}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
</td>
<td>结束时间</td>
<td>
<input class="form-control" type="text" name="model.end_time"
value="${model.end_time}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
</td>
</tr>
<tr>
<td>类型</td>
<td>
<select name="model.type" class="form-control" >
${flyfox.dictSelect('articleType' , model.type!'11') }
</select>
</td>
<td>跳转地址</td>
<td>
<input type="text" class="form-control" name="model.jump_url"
value="${model.jump_url}" placeholder="跳转地址,设置直接跳转" />
</td>
</tr>
<tr>
<td>图片
<% if(!strutil.isEmpty(model.image_url)||!strutil.isEmpty(model.image_net_url)){ %>
<a href="${flyfox.getImage(model)}" target="_blank" style="text-decoration:none;">
<img alt="图片" title="点击浏览" src="${flyfox.getImage(model)}" width="40" height="40">
</a>
<% } %></td>
<td>
<input type="file" accept="image/*" class="form-control" name="model.image_url" />
</td>
<td colspan="2">
<input type="text" class="form-control" name="model.image_net_url"
value="${model.image_net_url}" placeholder="网络图片url" />
</td>
</tr>
<tr>
<td>附件</td>
<td>
<input type="file" accept="*/*" class="form-control" name="model.file_url" />
</td>
<td colspan="2">
<!-- 删除标记 -->
<input type="hidden" id="file_url_flag" class="form-control" name="file_url_flag" />
<% if(!strutil.isEmpty(model.file_url)){ %>
<div id="file_url_show" >
<a href="${flyfox.getFile(model,'file_url')}" target="_blank" style="text-decoration:none;">
${model.file_name}
</a>
<a href="javascript:void(0);"
onclick="$('#file_url_show').hide();$('#file_url_flag').val('1');"
style="color: red;">删除</a>
</div>
<% } %>
</td>
</tr>
</table>
<div style="height: 50px;clear: both;"> </div>
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
<button class="btn btn-primary" onclick="oper.save(${model.id!'0'});return false;">保 存</button>
<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
</div>
</nav>
</form>
<%}; %>
<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>