Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1376641
catalog_tab.tpl
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 1, 9:29 PM
Size
4 KB
Mime Type
text/html
Expires
Tue, Feb 3, 9:29 PM (3 h, 48 m)
Engine
blob
Format
Raw Data
Handle
884833
Attached To
rMINC Modules.In-Commerce
catalog_tab.tpl
View Options
<
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"
>
function createProductMenu()
{
prod_menu = menuMgr.createMenu(rs('new_prod_menu'));
prod_menu.applyBorder(false, false, false, false);
prod_menu.dropShadow("none");
prod_menu.showIcon = true;
<
inp2:m_DefineElement
name
=
"product_type_elem"
>
prod_menu.addItem(rs('product.type.
<
inp2:m_param
name
=
"key"
/>
'),'
<
inp2:m_phrase
name
=
"
$
option"
escape
=
"1"
/>
','javascript:new_product(
<
inp2:m_param
name
=
"key"
/>
);');
</
inp2:m_DefineElement
>
<
inp2:
{$
prefix
}
_PredefinedOptions
selected
=
"selected"
field
=
"Type"
block
=
"product_type_elem"
skip_autoload
=
"true"
/>
}
a_toolbar.AddButton( new ToolBarButton('new_item', '
<
inp2:m_phrase
label
=
"la_ToolTip_NewProduct"
escape
=
"1"
/>
::
<
inp2:m_phrase
label
=
"la_ToolTip_NewProduct"
escape
=
"1"
/>
', function() {
renderMenus();
nls_showMenu(rs('new_prod_menu'), a_toolbar.GetButtonImage('new_item'))
}, true
) );
function new_product(
$
type)
{
$
form_name =
$
Catalog.queryTabRegistry('prefix', '
<
inp2:m_param
name
=
"prefix"
/>
', 'tab_id') + '_form';
set_hidden_field('
<
inp2:m_param
name
=
"prefix"
/>
_new_type',
$
type);
std_precreate_item('
<
inp2:m_param
name
=
"prefix"
/>
', 'in-commerce/products/products_edit');
}
createProductMenu();
</
inp2:m_if
>
<
inp2:m_if
check
=
"m_ParamEquals"
name
=
"tab_init"
value
=
"2"
>
<
div
id
=
"products_div"
prefix
=
"<inp2:m_param name="
prefix
"
/>
" view_template="in-commerce/catalog_tab" edit_template="in-commerce/products/products_edit" category_id="-1" dep_buttons="new_item" class="catalog-tab">
</
div
>
<
script
type
=
"text/javascript"
>
$
Catalog
.
registerTab
(
'products'
);</
script
>
</
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/grid_blocks"
/>
<
inp2:m_include
t
=
"in-portal/categories/ci_blocks"
/>
$
Catalog.setItemCount('
<
inp2:m_param
name
=
"prefix"
/>
', '
<
inp2:
{$
prefix
}
_CatalogItemCount
/>
');
$
Catalog.setCurrentCategory('
<
inp2:m_param
name
=
"prefix"
/>
',
<
inp2:m_get
name
=
"m_cat_id"
/>
);
<
inp2:m_RenderElement
name
=
"grid_js"
selected_class
=
"selected_div"
tag_name
=
"tr"
PrefixSpecial
=
"
$
prefix"
IdField
=
"ProductId"
grid
=
"Default"
menu_filters
=
"yes"
/>
<
inp2:m_RenderElement
name
=
"grid_search_buttons"
PrefixSpecial
=
"
$
prefix"
grid
=
"Default"
ajax
=
"1"
/>
<
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"
/>
'].EnableRadioMode();
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
=
"products_form"
/>
<
inp2:m_DefineElement
name
=
"qty_td"
>
<
td
valign
=
"top"
class
=
"text"
>
<
inp2:Field
field
=
"QtyInStock"
grid
=
"
$
grid"
/>
/
<
inp2:Field
field
=
"QtyReserved"
grid
=
"
$
grid"
/>
</
td
>
</
inp2:m_DefineElement
>
<
input
type
=
"hidden"
name
=
"<inp2:m_param name="
prefix
"
/>
_new_type" id="
<
inp2:m_param
name
=
"prefix"
/>
_new_type" value="">
<
inp2:m_if
check
=
"m_ParamEquals"
name
=
"tab_mode"
value
=
"multi"
>
<
inp2:m_RenderElement
name
=
"grid"
ajax
=
"1"
PrefixSpecial
=
"
$
prefix"
IdField
=
"ProductId"
grid
=
"Default"
no_toolbar
=
"no_toolbar"
menu_filters
=
"yes"
/>
<
inp2:m_else
/>
<
inp2:m_RenderElement
name
=
"grid"
ajax
=
"1"
PrefixSpecial
=
"
$
prefix"
IdField
=
"ProductId"
grid
=
"Radio"
no_toolbar
=
"no_toolbar"
menu_filters
=
"yes"
/>
</
inp2:m_if
>
<
inp2:m_RenderElement
name
=
"kernel_form_end"
/>
<!-- products tab: end -->
</
inp2:m_if
>
</
inp2:m_DefineElement
>
<
inp2:p_InitCatalogTab
render_as
=
"catalog_tab"
/>
Event Timeline
Log In to Comment