Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, Feb 25, 7:50 AM

in-portal

Index: branches/RC/core/admin_templates/categories/permissions_tab.tpl
===================================================================
--- branches/RC/core/admin_templates/categories/permissions_tab.tpl (revision 11859)
+++ branches/RC/core/admin_templates/categories/permissions_tab.tpl (revision 11860)
@@ -1,77 +1,78 @@
+<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
<div id="<inp2:m_param name="item_prefix"/>_div" prefix="<inp2:m_param name="item_prefix"/>" group_id="-1" class="catalog-tab"><!-- IE minimal height problem fix --></div>
<script type="text/javascript">$PermManager.registerTab('<inp2:m_param name="item_prefix"/>');</script>
<inp2:m_else/>
<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
if ($request_visible) {
document.getElementById('<inp2:m_get name="item_prefix"/>_div').setAttribute('group_id', <inp2:m_get name="group_id"/>);
maximizeElement( jq('#<inp2:m_get name="item_prefix"/>_div') );
}
<inp2:m_if check="c_SaveWarning">
document.getElementById('save_warning').style.display = 'block';
$edit_mode = true;
</inp2:m_if>
#separator#
<inp2:m_DefineElement name="permission_element">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td>
<inp2:m_phrase name="$Description"/> [<inp2:m_param name="PermissionName"/>]
</td>
<td>
<!-- Inherited checkbox -->
<input
type="hidden"
id="<inp2:PermInputName sub_key="inherited"/>"
name="<inp2:PermInputName sub_key="inherited"/>"
value="<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">1<inp2:m_else/>0</inp2:m_if>" />
<input
type="checkbox"
id="_cb_<inp2:PermInputName sub_key="inherited"/>"
<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">checked</inp2:m_if>
onchange="update_checkbox(this, document.getElementById('<inp2:PermInputName sub_key="inherited"/>'));"
onclick="inherited_click('<inp2:m_param name="PermissionName"/>', <inp2:m_param name="InheritedValue"/>, this.checked, '_cb_<inp2:PermInputName sub_key="value"/>')" />
</td>
<td>
<inp2:CategoryPath cat_id="$InheritedFrom"/>
</td>
<td>
<!-- Access checkbox -->
<input
type="hidden"
id="<inp2:PermInputName sub_key="value"/>"
name="<inp2:PermInputName sub_key="value"/>"
value="<inp2:m_if check="m_ParamEquals" name="Value" value="1">1<inp2:m_else/>0</inp2:m_if>" />
<input
type="checkbox"
id="_cb_<inp2:PermInputName sub_key="value"/>"
<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">disabled="disabled"</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="Value" value="1">checked</inp2:m_if>
onchange="update_checkbox(this, document.getElementById('<inp2:PermInputName sub_key="value"/>'));"
onclick="update_light('<inp2:m_param name="PermissionName"/>', this.checked)" />
</td>
<td>
<img id="light_<inp2:m_param name="PermissionName"/>" src="img/perm_<inp2:m_if check="m_ParamEquals" name="Value" value="1">green<inp2:m_else/>red</inp2:m_if>.gif"/>
</td>
</tr>
</inp2:m_DefineElement>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder_full">
<inp2:m_set odd_even="table-color1"/>
<thead class="subsectiontitle">
<td><inp2:m_phrase name="la_col_Description"/></td>
<td><inp2:m_phrase name="la_col_Inherited"/></td>
<td><inp2:m_phrase name="la_col_InheritedFrom"/></td>
<td><inp2:m_phrase name="la_col_Access"/></td>
<td><inp2:m_phrase name="la_col_Effective"/></td>
</thead>
<inp2:c-perm_PrintPermissions render_as="permission_element"/>
</table>
</inp2:m_if>
\ No newline at end of file
Index: branches/RC/core/admin_templates/catalog_tab.tpl
===================================================================
--- branches/RC/core/admin_templates/catalog_tab.tpl (revision 11859)
+++ branches/RC/core/admin_templates/catalog_tab.tpl (revision 11860)
@@ -1,100 +1,101 @@
+<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
<inp2:m_DefineElement name="catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
a_toolbar.AddButton(
new ToolBarButton(
'new_cat',
'<inp2:m_phrase label="la_ToolTip_New_Category" escape="1"/>',
add_item,
true
)
);
</inp2:m_if>
<inp2:m_if check="m_Param" name="tab_init" equals_to="2">
<div id="categories_div" prefix="<inp2:m_param name='prefix'/>" view_template="catalog_tab" edit_template="categories/categories_edit" category_id="-1" dep_buttons="new_cat" class="catalog-tab"><!-- IE minimal height problem fix --></div>
<script type="text/javascript">$Catalog.registerTab('categories');</script>
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="3">
$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
</inp2:m_if>
<inp2:m_else/>
<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
<inp2:m_if check="m_Param" name="prefix" equals_to="c.showall">
<inp2:$prefix_InitList grid="$grid_name" parent_cat_id="any"/>
<inp2:m_else/>
<inp2:$prefix_InitList grid="$grid_name"/>
</inp2:m_if>
// substiture form action, like from was created from here
document.getElementById('categories_form').action = '<inp2:m_t pass="all" no_amp="1" js_escape="1"/>';
$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:$prefix_CatalogItemCount/>');
$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
<inp2:m_RenderElement name="structure_reload_element"/>
<inp2:m_DefineElement name="grid_parent_category_td" format="" no_special="">
<inp2:Field name="ParentId" result_to_var="item_category" db="db"/>
<inp2:m_if check="m_Get" name="type" equals_to="item_selector">
<inp2:CategoryName cat_id="$item_category"/>
<inp2:m_else/>
<a href="<inp2:m_Link template='catalog/catalog' m_cat_id='$item_category' no_pass_through='1'/>"><inp2:CategoryName cat_id="$item_category"/></a>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="page_browse_td" format="">
<inp2:m_if check="m_Get" name="type" equals_to="item_selector">
<a href="javascript:$Catalog.go_to_cat(<inp2:m_get name="c_id"/>, '<inp2:GetModulePrefix/>');" title="<inp2:m_Phrase name='la_alt_GoInside' html_escape='1'/>"><inp2:Field field="$field" grid="$grid" format="$format"/></a>
<inp2:m_else/>
<a href="<inp2:ItemEditLink/>" title="<inp2:m_Phrase name='la_Text_Edit'/>" onclick="return direct_edit('<inp2:m_param name="PrefixSpecial"/>', this.href);"><inp2:Field field="$field" grid="$grid" format="$format"/></a>
</inp2:m_if>
<!--##<span class="small-statistics">(<inp2:SubCatCount/> / <inp2:ItemCount/>)</span>##-->
<inp2:m_if check="BrowseModeAvailable" pass_params="1">
<a href="<inp2:PageBrowseLink/>" title="<inp2:m_Phrase name='la_alt_Browse' html_escape='1'/>">
<img src="<inp2:m_TemplatesBase/>/img/ic_browse_mode.gif" width="8" height="7" alt="<inp2:m_Phrase name='la_alt_Browse' html_escape='1'/>" border="0"/>
</a>
</inp2:m_if>
<inp2:m_if check="Field" field="IsSystem" db="db">
<span class="field-required" title="<inp2:m_Phrase name='la_System'/>">&nbsp;*</span>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="CategoryId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="$grid_name" ajax="1"/>
Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
<inp2:m_if check="{$prefix}_ModuleRootCategory">
a_toolbar.DisableButton('upcat');
a_toolbar.DisableButton('homecat');
<inp2:m_else/>
a_toolbar.EnableButton('upcat');
a_toolbar.EnableButton('homecat');
</inp2:m_if>
$Catalog.reflectPasteButton(<inp2:$prefix_HasClipboard/>);
<inp2:m_if check="m_Recall" name="root_delete_error">
alert('<inp2:m_Phrase name="la_error_RootCategoriesDelete"/>');
<inp2:m_RemoveVar name="root_delete_error"/>
</inp2:m_if>
#separator#
<!-- categories tab: begin -->
<inp2:m_RenderElement name="kernel_form" form_name="categories_form"/>
<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="CategoryId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- categories tab: end -->
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:c_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>
\ No newline at end of file
Index: branches/RC/core/admin_templates/reviews/reviews_tab.tpl
===================================================================
--- branches/RC/core/admin_templates/reviews/reviews_tab.tpl (revision 11859)
+++ branches/RC/core/admin_templates/reviews/reviews_tab.tpl (revision 11860)
@@ -1,43 +1,44 @@
+<inp2:m_RequireLogin permissions="in-portal:reviews.view" system="1"/>
<inp2:m_DefineElement name="catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="">
<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:$prefix_InitList grid="$grid_name"/>
$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', 0);
$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
<inp2:m_DefineElement name="grid_reviewtext_td">
<inp2:Field field="$field" cut_first="100"/>
<br />
<span class="small-statistics">
<a href="<inp2:ItemEditLink/>" onclick="return direct_edit('<inp2:m_param name="prefix"/>', this.href);"><inp2:Field field="CatalogItemName"/></a>
</span>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="ReviewId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_if check="m_ParamEquals" name="tab_dependant" value="yes">
Grids['<inp2:m_param name="prefix"/>'].AddAlternativeGrid('<inp2:m_param name="cat_prefix"/>', true);
</inp2:m_if>
Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
$Catalog.reflectPasteButton(<inp2:c_HasClipboard/>);
$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
<inp2:m_if check="m_ParamEquals" name="tab_mode" value="single">
Grids['<inp2:m_param name="prefix"/>'].DblClick = function() {return false};
</inp2:m_if>
#separator#
<!-- products tab: begin -->
<inp2:m_RenderElement name="kernel_form" form_name="{$tab_name}_form"/>
<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ReviewId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- products tab: end -->
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_Get name="item_prefix" result_to_var="prefix"/>
<inp2:{$prefix}_InitCatalogTab render_as="catalog_tab" default_grid="ReviewsSection" radio_grid="Radio"/>
\ No newline at end of file

Event Timeline