edit_categories.tmpl

来自「1. 记录每个帖子的访问人情况」· TMPL 代码 · 共 165 行

TMPL
165
字号
<TMPL_INCLUDE NAME="header.tmpl"><div id="edit-categories"><script type="text/javascript"><!--// build array of each category's id and the header idvar categoryRows = new Array('0'<TMPL_LOOP NAME="CATEGORY_LOOP">,'<TMPL_VAR NAME=CATEGORY_ID>'</TMPL_LOOP>);function setCreateMode (id) {    if (document.all) {        getByID('create-' + id).style.display = 'block'; // show subcategory creation row    } else {        getByID('create-' + id).style.display = 'table-row';    }    // reset any fields that might be set from a previous failed attempt.    for (var i = 0; i < categoryRows.length; i++) {        getByID('category-new-parent-' + categoryRows[i]).value = '';        if (categoryRows[i] != id) {            el = getByID('create-' + categoryRows[i]);            if (el.style.display != 'none') el.style.display = 'none';        }    }    document.forms['cat_form'].move_cat_id.value = '0';    getByID('category-new-parent-' + id).focus();    getByID('action-col-head').style.display = 'none'; // hide header of actions column    for (var i = 0; i < categoryRows.length; i++) {        getByID('action-' + categoryRows[i]).style.display = 'none'; // hide actions column for category rows    }}function cancelCreateMode (id) {    getByID('create-' + id).style.display = 'none'; // hide subcategory creation row    if (document.all) {        getByID('action-col-head').style.display = 'block'; // show header of actions column    } else {        getByID('action-col-head').style.display = 'table-cell';    }    for (var i = 0; i < categoryRows.length; i++) {		if (document.all) {			getByID('action-' + categoryRows[i]).style.display = 'block'; // show actions column for category rows		} else {			getByID('action-' + categoryRows[i]).style.display = 'table-cell';		}    }}function setMoveMode (id) {    getByID('category-' + id).style.backgroundColor = '#FFE5BF'; // set background color of selected row to orange	getByID('move-radio-' + id).style.display = 'none'; // hide radio button of selected row	if (document.all) {		getByID('move-col-head').style.display = 'block'; // show header of radio button column        getByID('move-0').style.display = 'block'; // show top level row	} else {		getByID('move-col-head').style.display = 'table-cell';        getByID('move-0').style.display = 'table-row';	}	getByID('action-col-head').style.display = 'none'; // hide header of actions column	document.forms['cat_form'].move_cat_id.value = id;    for (var i = 0; i < categoryRows.length; i++) {		if (document.all) {			getByID('move-col-' + categoryRows[i]).style.display = 'block'; // show radio buttons for category rows		} else {			getByID('move-col-' + categoryRows[i]).style.display = 'table-cell';		}        getByID('action-' + categoryRows[i]).style.display = 'none'; // hide actions column for category rows    }}//--></script><h2><MT_TRANS phrase="Categories"></h2><p><MT_TRANS phrase="_USAGE_CATEGORIES"></p><TMPL_IF NAME=SAVED><div class="message"><MT_TRANS phrase="Your category changes and additions have been made."> <TMPL_INCLUDE NAME="rebuild-stub.tmpl"></div></TMPL_IF><TMPL_IF NAME=SAVED_DELETED><div class="message"><MT_TRANS phrase="You have successfully deleted the selected categories."> <TMPL_INCLUDE NAME="rebuild-stub.tmpl"></div></TMPL_IF><form method="post" action="<TMPL_VAR NAME=SCRIPT_URL>" name="cat_form"><input type="hidden" name="blog_id" value="<TMPL_VAR NAME=BLOG_ID>" /><input type="hidden" name="__mode" value="save_cat" /><input type="hidden" name="move_cat_id" value="" /><input type="hidden" name="magic_token" value="<TMPL_VAR NAME=MAGIC_TOKEN>" /><div align="right"><img alt="<MT_TRANS phrase="Create new top level category">" src="<TMPL_VAR NAME=STATIC_URI>images/create.gif" width="9" height="9" /> <a href="#" onclick="setCreateMode(0)"><MT_TRANS phrase="Create new top level category"></a></div><div class="list"><table cellspacing="0"><tr><th width="2%" class="move-col" id="move-col-head">&nbsp;</th><th><MT_TRANS phrase="Categories"></th><th width="20%" id="action-col-head"><MT_TRANS phrase="Actions"></th><th width="12%"><MT_TRANS phrase="Entries"></th><th width="12%"><MT_TRANS phrase="TrackBacks"></th><th width="6%"><MT_TRANS phrase="Delete"></th></tr><tr class="create-row" id="create-0"><td class="move-col">&nbsp;</td><td colspan="5"><input type="text" name="category-new-parent-0" id="category-new-parent-0" value="" maxlength="100" /> <input type="submit" name="save" value="<MT_TRANS phrase="Create Category">" /> <input type="submit" name="cancel" value="<MT_TRANS phrase="Cancel">" onclick="cancelCreateMode(0); return false" /></td></tr><tr class="move-row" id="move-0"><td class="move-col" id="move-col-0"><input type="radio" name="move-radio" id="move-radio-0" value="0" onclick="submit()" /></td><td><MT_TRANS phrase="Top Level"></td><td id="action-0" colspan="4">&nbsp;</td></tr><TMPL_LOOP NAME="CATEGORY_LOOP"><tr class="<TMPL_IF NAME=IS_ODD>odd<TMPL_ELSE>even</TMPL_IF>" id="category-<TMPL_VAR NAME=CATEGORY_ID>"><td class="move-col" id="move-col-<TMPL_VAR NAME=CATEGORY_ID>"><input type="radio" name="move-radio" id="move-radio-<TMPL_VAR NAME=CATEGORY_ID>" value="<TMPL_VAR NAME=CATEGORY_ID>" onclick="submit()" /></td><td><TMPL_IF NAME=CATEGORY_HAS_CHILDREN><TMPL_IF NAME=CATEGORY_IS_EXPANDED><a href="#" onclick="doCollapse(<TMPL_VAR NAME=CATEGORY_ID>)" title="<MT_TRANS phrase="Collapse">"><img alt="<MT_TRANS phrase="Collapse">" src="<TMPL_VAR NAME=STATIC_URI>images/collapse.gif" width="9" height="9" class="expcol" /></a><TMPL_ELSE><a href="#" onclick="doExpand(<TMPL_VAR NAME=CATEGORY_ID>)" title="<MT_TRANS phrase="Expand">"><img alt="<MT_TRANS phrase="Expand">" src="<TMPL_VAR NAME=STATIC_URI>images/expand.gif" width="9" height="9" class="expcol" /></a></TMPL_IF></TMPL_IF><span style="margin-left: <TMPL_VAR NAME=CATEGORY_PIXEL_DEPTH>px;"><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&amp;_type=category&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;id=<TMPL_VAR NAME=CATEGORY_ID>"><TMPL_VAR NAME=CATEGORY_LABEL></a></span></td><td id="action-<TMPL_VAR NAME=CATEGORY_ID>"><img alt="<MT_TRANS phrase="Create Subcategory">" src="<TMPL_VAR NAME=STATIC_URI>images/create.gif" width="9" height="9" /><a href="#" onclick="setCreateMode(<TMPL_VAR NAME=CATEGORY_ID>)" title="<MT_TRANS phrase="Create Subcategory">"><MT_TRANS phrase="Create"></a>&nbsp;<img alt="<MT_TRANS phrase="Move Category">" src="<TMPL_VAR NAME=STATIC_URI>images/move.gif" width="9" height="9" /><a href="#" onclick="setMoveMode(<TMPL_VAR NAME=CATEGORY_ID>)" title="<MT_TRANS phrase="Move Category">"><MT_TRANS phrase="Move"></a></td><td><TMPL_IF NAME=CATEGORY_ENTRYCOUNT><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_entries&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;filter=category_id&amp;filter_val=<TMPL_VAR NAME=CATEGORY_ID>"></TMPL_IF><MT_TRANS phrase="[quant,_1,entry,entries]" params="<TMPL_VAR NAME=CATEGORY_ENTRYCOUNT>"><TMPL_IF NAME=CATEGORY_ENTRYCOUNT></a></TMPL_IF></td><td><TMPL_IF NAME=HAS_TB><TMPL_IF NAME=CATEGORY_TBCOUNT><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;filter=category_id&amp;filter_val=<TMPL_VAR NAME=CATEGORY_ID>"></TMPL_IF><MT_TRANS phrase="[quant,_1,ping]" params="<TMPL_VAR NAME=CATEGORY_TBCOUNT>"><TMPL_IF NAME=CATEGORY_TBCOUNT></a></TMPL_IF><TMPL_ELSE>&nbsp;</TMPL_IF></td><td><input type="checkbox" name="id" value="<TMPL_VAR NAME=CATEGORY_ID>" /></td></tr><tr class="create-row" id="create-<TMPL_VAR NAME=CATEGORY_ID>"><td class="move-col">&nbsp;</td><td colspan="5" style="padding-left: 15px;"><span style="margin-left: <TMPL_VAR NAME=CATEGORY_PIXEL_DEPTH>px;"><input type="text" name="category-new-parent-<TMPL_VAR NAME=CATEGORY_ID>" id="category-new-parent-<TMPL_VAR NAME=CATEGORY_ID>" value="" maxlength="100" /> <input type="submit" name="save" value="<MT_TRANS phrase="Create Subcategory">" /> <input type="submit" name="cancel" value="<MT_TRANS phrase="Cancel">" onclick="cancelCreateMode(<TMPL_VAR NAME=CATEGORY_ID>); return false" /></td></tr></TMPL_LOOP></table></div><div style="float: right;"><input onclick="doRemoveItems(this.form, 'category&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>', 'categories')" type="button" name="delete" value="<MT_TRANS phrase="Delete">" /></div></form></div><TMPL_INCLUDE NAME="footer.tmpl">

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?