@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phosweb009 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Current Path :
/
homepage
/
v-mt
/
tmpl
/
cms
/
Path :
Upload File :
New :
File
Dir
//homepage/v-mt/tmpl/cms/list_category.tmpl
<mt:setvarblock name="page_title"><__trans phrase="Manage Categories"></mt:setvarblock> <mt:setvarblock name="html_head" append="1"> <script type="text/javascript"> <!-- // build array of each category's id and the header id var categoryRows = new Array('0'<mt:loop name="category_loop">,'<mt:var name="category_id">'</mt:loop>); function submitMoveMode() { var f = getByID('category-listing-form'); f['__mode'].value = 'save_cat'; f.submit(); } function setCreateMode (id) { DOM.addClassName(getByID('create-new-link'), 'hidden'); var f = getByID('category-listing-form'); f['__mode'].value = 'save_cat'; if (getByID('msg-block')) { getByID('msg-block').style.display = 'none'; // hide any messaging } 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'; } } if (document.forms['category-listing-form'].move_cat_id) document.forms['category-listing-form'].move_cat_id.value = '0'; getByID('category-new-parent-' + id).focus(); if (getByID('action-col-head')) getByID('action-col-head').style.display = 'none'; // hide header of actions column if (getByID('delete-col-head')) getByID('delete-col-head').style.display = 'none'; // hide header of delete column for (var i = 0; i < categoryRows.length; i++) { if (getByID('action-' + categoryRows[i])) getByID('action-' + categoryRows[i]).style.display = 'none'; // hide actions column for category rows if (getByID('delete-' + categoryRows[i])) getByID('delete-' + categoryRows[i]).style.display = 'none'; // hide delete column for category rows } if (getByID('footer-list-actions')) { getByID('footer-list-actions').style.display = 'none'; } return false; } function cancelCreateMode (id) { DOM.removeClassName(getByID('create-new-link'), 'hidden'); getByID('create-' + id).style.display = 'none'; // hide subcategory creation row if (document.all) { if (getByID('action-col-head')) getByID('action-col-head').style.display = 'block'; // show header of actions column if (getByID('delete-col-head')) getByID('delete-col-head').style.display = 'block'; // show header of delete column } else { if (getByID('action-col-head')) getByID('action-col-head').style.display = 'table-cell'; if (getByID('delete-col-head')) getByID('delete-col-head').style.display = 'table-cell'; } for (var i = 0; i < categoryRows.length; i++) { if (document.all) { if (getByID('action-' + categoryRows[i])) getByID('action-' + categoryRows[i]).style.display = 'block'; // show actions column for category rows if (getByID('delete-' + categoryRows[i])) getByID('delete-' + categoryRows[i]).style.display = 'block'; // show delete column for category rows } else { if (getByID('action-' + categoryRows[i])) getByID('action-' + categoryRows[i]).style.display = 'table-cell'; if (getByID('delete-' + categoryRows[i])) getByID('delete-' + categoryRows[i]).style.display = 'table-cell'; } } if (getByID('footer-list-actions')) { getByID('footer-list-actions').style.display = 'block'; } } function setMoveMode (id) { var f = getByID('category-listing-form'); f['__mode'].value = 'save_cat'; if (getByID('msg-block')) { getByID('msg-block').style.display = 'none'; // hide any messaging } DOM.addClassName( getByID('category-' + id), "selected" ); 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 getByID('delete-col-head').style.display = 'none'; // hide header of delete column if (getByID('footer-list-actions')) { getByID('footer-list-actions').style.display = 'none'; } document.forms['category-listing-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 getByID('delete-' + categoryRows[i]).style.display = 'none'; // hide delete column for category rows } return false; } var tableSelect; function init() { // setup tableSelect = new TC.TableSelect( "category-listing-table" ); tableSelect.rowSelect = true; } TC.attachLoadEvent( init ); //--> </script> </mt:setvarblock> <mt:setvarblock name="system_msg"> <div id="msg-block"> <mt:if name="saved"> <mtapp:statusmsg id="saved" class="success" rebuild="all"> <__trans phrase="Your category changes and additions have been made."> </mtapp:statusmsg> </mt:if> <mt:if name="saved_deleted"> <mtapp:statusmsg id="saved-deleted" class="success" rebuild="all"> <__trans phrase="You have successfully deleted the selected category."> </mtapp:statusmsg> </mt:if> </div> </mt:setvarblock> <mt:setvarblock name="action_buttons"> <a href="javascript:void(0)" onclick="doRemoveItems(getByID('<$mt:var name="object_type"$>-listing-form'), '<__trans phrase="category" escape="js">', '<__trans phrase="categories" escape="js">'); return false;" accesskey="x" title="<__trans phrase="Delete selected category (x)">" ><__trans phrase="Delete"></a> </mt:setvarblock> <mt:setvarblock name="related_content"> <$MTApp:PageActions from="list_cat"$> </mt:setvarblock> <mt:var name="position_actions_top" value="1"> <mt:setvarblock name="content_header"> <p id="create-new-link"><a href="javascript:void(0)" onclick="return setCreateMode(0)" class="icon-left icon-create"><__trans phrase="Create top level category"></a></p> </mt:setvarblock> <mt:include name="include/header.tmpl"> <mtapp:listing hide_pager="1"> <mt:if __first__> <input type="hidden" name="move_cat_id" value="" /> <thead> <tr> <th id="delete-col-head" class="cb"><input type="checkbox" name="id-head" value="all" class="select" /></th> <th id="move-col-head" class="move-col"> </th> <th id="cat-categories" class="category"><mt:var name="object_label_plural"></th> <th id="action-col-head" class="actions"><__trans phrase="Actions"></th> <th id="cat-entries" class="entry"><mt:var name="entry_label_plural"></th> <th id="cat-trackbacks" class="trackback"><__trans phrase="TrackBacks"></th> </tr> </thead> <tbody> </mt:if> <tr class="create-row create-inline" id="create-0"> <td class="move-col" colspan="2"> </td> <td colspan="4"> <mt:setvarblock name="new_parent_label"><__trans phrase="New Parent [_1]" params="<mt:var name="object_label">"></mt:setvarblock> <mtapp:setting id="new-parent-category" label="$new_parent_label" label_class="inline field-no-header" hint="" show_hint="0"> <input type="text" name="category-new-parent-0" id="category-new-parent-0" value="" maxlength="100" /> </mtapp:setting> <mtapp:setting id="actions" label="<__trans phrase="Actions">" label_class="inline field-no-header" hint="" show_hint="0"> <span class="buttons"> <a href="javascript:void(0)" mt:command="submit" title="<__trans phrase="Create Category">" ><__trans phrase="Create"></a> <a href="javascript:void(0)" onclick="cancelCreateMode(0); return false" ><__trans phrase="Cancel"></a> </span> </mtapp:setting> </tr> <tr class="move-row" id="move-0"> <td id="delete-0"> </td> <td class="move-col" id="move-col-0"><input type="radio" name="move-radio" id="move-radio-0" value="0" onclick="submitMoveMode()" /></td> <td><__trans phrase="Top Level"></td> <td id="action-0"> </td> <td> </td> <td> </td> </tr> <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if>" id="category-<mt:var name="category_id">"> <td class="cb" id="delete-<mt:var name="category_id">"><input type="checkbox" name="id" value="<mt:var name="category_id">" class="select" /></td> <td class="move-col" id="move-col-<mt:var name="category_id">"><input type="radio" name="move-radio" id="move-radio-<mt:var name="category_id">" value="<mt:var name="category_id">" onclick="submitMoveMode()" /></td> <td class="category"> <mt:if name="category_has_children"> <mt:if name="category_is_expanded"> <a href="javascript:void(0)" onclick="return doCollapse(<mt:var name="category_id">)" title="<__trans phrase="Collapse">"><img alt="<__trans phrase="Collapse">" src="<mt:var name="static_uri">images/status_icons/collapse.gif" width="9" height="9" class="expcol" /></a> <mt:else> <a href="javascript:void(0)" onclick="return doExpand(<mt:var name="category_id">)" title="<__trans phrase="Expand">"><img alt="<__trans phrase="Expand">" src="<mt:var name="static_uri">images/status_icons/expand.gif" width="9" height="9" class="expcol" /></a> </mt:if> </mt:if> <div style="margin-left: <mt:var name="category_pixel_depth">px;"><a href="<mt:var name="script_url">?__mode=view&_type=<mt:var name="object_type">&blog_id=<mt:var name="blog_id">&id=<mt:var name="category_id">"><mt:var name="category_label_full"></a></div> </td> <td id="action-<mt:var name="category_id">" class="actions"> <a href="javascript:void(0)" onclick="return setCreateMode(<mt:var name="category_id">)" class="icon-left icon-create" title="<__trans phrase="Create Subcategory">"><__trans phrase="Create"></a> <a href="javascript:void(0)" onclick="return setMoveMode(<mt:var name="category_id">)" class="icon-left icon-move" title="<__trans phrase="Move Category">"><__trans phrase="Move"></a> </td> <td class="entry"> <mt:if name="category_entrycount"> <mt:if name="can_edit_entries"> <a href="<mt:var name="script_url">?__mode=list_entries&_type=<mt:var name="entry_type">&blog_id=<mt:var name="blog_id">&filter=category_id&filter_val=<mt:var name="category_id">"><__trans phrase="[quant,_1,entry,entries]" params="<mt:var name="category_entrycount">"></a> <mt:else> <__trans phrase="[quant,_1,entry,entries]" params="<mt:var name="category_entrycount">"> </mt:if> </mt:if> </td> <td class="trackback"> <mt:if name="has_tb"> <mt:if name="category_tbcount"> <mt:if name="can_edit_entries"> <a href="<mt:var name="script_url">?__mode=list_pings&filter=<$mt:var name="object_type"$>_id&blog_id=<mt:var name="blog_id">&filter_val=<mt:var name="category_id">"> <__trans phrase="[quant,_1,TrackBack,TrackBacks]" params="<mt:var name="category_tbcount">"> </a> </mt:if> <mt:else> <__trans phrase="[quant,_1,TrackBack,TrackBacks]" params="<mt:var name="category_tbcount">"> </mt:if> </mt:if> </td> </tr> <tr class="create-row create-inline" id="create-<mt:var name="category_id">"> <td class="move-col" colspan="2"> </td> <td colspan="4" style="padding-left: 15px;"> <div style="margin-left: <mt:var name="category_pixel_depth">px;"> <mt:setvarblock name="new_label"><__trans phrase="New [_1]" params="<mt:var name="object_label">"></mt:setvarblock> <mtapp:setting id="new_category" label="$new_label" label_class="inline field-no-header" hint="" show_hint="0"> <input type="text" name="category-new-parent-<mt:var name="category_id">" id="category-new-parent-<mt:var name="category_id">" value="" maxlength="100"/> </mtapp:setting> <mtapp:setting id="actions" label="<__trans phrase="Actions">" label_class="inline field-no-header" hint="" show_hint="0"> <span class="buttons"> <a href="javascript:void(0)" mt:command="submit" title="<__trans phrase="Create Category">" ><__trans phrase="Create"></a> <a href="javascript:void(0)" onclick="cancelCreateMode(<mt:var name="category_id">); return false" ><__trans phrase="Cancel"></a> </span> </mtapp:setting> </div></td> </tr> <mt:if __last__> </tbody> </mt:if> <mt:else> <mtapp:statusmsg id="zero-state" class="info zero-state"> <__trans phrase="No categories could be found."> </mtapp:statusmsg> <form id="category-listing-form" method="post" action="<$mt:var name="script_url"$>"> <input type="hidden" name="__mode" value="save_cat" /> <input type="hidden" name="_type" value="category" /> <input type="hidden" name="return_args" value="<$mt:var name="return_args" escape="html"$>" /> <input type="hidden" name="blog_id" value="<$mt:var name="blog_id"$>" /> <input type="hidden" name="magic_token" value="<$mt:var name="magic_token"$>" /> <table width="100%"> <tr id="create-0" class="create-row create-inline"> <td style="padding: 5px"> <mt:setvarblock name="new_label"><__trans phrase="New [_1]" params="<mt:var name="object_label">"></mt:setvarblock> <mtapp:setting id="new_category" label="$new_label" label_class="inline field-no-header" hint="" show_hint="0"> <input type="text" name="category-new-parent-0" id="category-new-parent-0" value="" maxlength="100" /> </mtapp:setting> <mtapp:setting id="actions" label="<__trans phrase="Actions">" label_class="inline field-no-header" hint="" show_hint="0"> <span class="buttons"> <a href="javascript:void(0)" mt:command="submit" title="<__trans phrase="Create Category">" ><__trans phrase="Create"></a> <a href="javascript:void(0)" onclick="cancelCreateMode(0); return false" ><__trans phrase="Cancel"></a> </span> </mtapp:setting> </td> </tr> </table> </form> </mtapp:listing> <mt:include name="include/footer.tmpl">