catalog_edit.vm
来自「一个简单的blog系统」· VM 代码 · 共 49 行
VM
49 行
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU Library General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## create a catalog
##
###############################################################################
#parse("/wml/_sub/_global.vm")
#set($page_title="修改日记分类")
#set($catalog_id = $dlog.param("cat_id",-1))
#set($catalog = $g_site.catalog($catalog_id))
<p>
#if($dlog.is_owner($g_site, $g_user))
#wml_error_msg()
分类名:<input type="text" size="20" maxlength="20" name="name" value="$!{catalog.name}"/><br/>
权限:<select name="type"><option value="1">公开</option><option value="0">私人</option></select><br/>
类别:<select name="catalog"> <option value="-1">[请选择类别]</option>
#set($__root_types = $TYPE_tool.root_types())
#foreach($__type in $__root_types)
<option value="$__type.id">${__type.name}</option>
#end
</select>
<anchor>更新分类
<go href="$link.setAction("wml/catalog")" method="post">
<postfield name="id" value="${catalog.id}"/>
<postfield name="cat_id" value="${catalog.id}"/>
<postfield name="sid" value="$g_site_id"/>
<postfield name="name" value="$(name)"/>
<postfield name="type" value="$(type)"/>
<postfield name="catalog" value="$(catalog)"/>
<postfield name="__ClientId" value="$dlog.gen_client_id()"/>
<postfield name="eventSubmit_UpdateCatalog" value="WML"/>
</go>
</anchor>
#else
对不起,你没有操作权限!
#end
</p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?