Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1214020
in-portal
No One
Temporary
Actions
View 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
Tue, Nov 11, 7:02 AM
Size
29 KB
Mime Type
text/x-diff
Expires
Thu, Nov 13, 7:02 AM (53 m, 4 s)
Engine
blob
Format
Raw Data
Handle
793961
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/tools/system_tools.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/tools/system_tools.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/tools/system_tools.tpl (revision 6111)
@@ -0,0 +1,48 @@
+<inp2:m_RequireLogin permissions="in-portal:service.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" icon="icon46_modules" title="!la_title_SystemTools!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="adm" title_preset="system_tools" module="in-portal" icon="icon46_modules"/>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" id="config_table">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text" style="width: 300px">
+ <inp2:m_phrase label="la_Service_ResetModRwCache"/>:
+ </td>
+ <td valign="top" width="100"><input class="button" type="submit" name="events[adm][OnResetModRwCache]" value="Go"></td>
+ <td class="error"> </td>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text" style="width: 300px">
+ <inp2:m_phrase label="la_Service_ResetCMSMenuCache"/>:
+ </td>
+ <td valign="top" width="100"><input class="button" type="submit" name="events[adm][OnResetCMSMenuCache]" value="Go"></td>
+ <td class="error"> </td>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text" style="width: 300px">
+ <inp2:m_phrase label="la_Service_ResetSections"/>:
+ </td>
+ <td valign="top" width="100"><input class="button" type="submit" name="events[adm][OnResetSections]" value="Go"></td>
+ <td class="error"> </td>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text" style="width: 300px">
+ <inp2:m_phrase label="la_Service_ConfigCache"/>:
+ </td>
+ <td valign="top" width="100"><input class="button" type="submit" name="events[adm][OnResetConfigsCache]" value="Go"></td>
+ <td class="error"> </td>
+ </tr>
+
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/tools/system_tools.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/advanced_view.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/advanced_view.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/advanced_view.tpl (revision 6111)
@@ -0,0 +1,118 @@
+<inp2:m_RequireLogin permissions="in-portal:advanced_view.view" system="1" ajax="yes"/>
+<inp2:m_include t="incs/header" nobody="yes" noform="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="$Catalog.Init();">
+<inp2:m_ParseBlock name="section_header" prefix="c" icon="icon46_advanced_view" module="in-portal" title="!la_title_AdvancedView!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="c" title_preset="advanced_view" module="in-portal"/>
+
+<!-- main kernel_form: begin -->
+<inp2:m_RenderElement name="kernel_form"/>
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <input type="hidden" name="m_cat_id" value="<inp2:m_get name="m_cat_id"/>"/>
+ <script type="text/javascript" src="incs/fw_menu.js"></script>
+ <script type="text/javascript" src="incs/ajax.js"></script>
+ <script type="text/javascript" src="incs/catalog.js"></script>
+ <script type="text/javascript">
+ Request.progressText = '<inp2:m_phrase name="la_title_Loading" escape="1"/>';
+
+ Catalog.prototype.AfterInit = function() {
+ this.switchTab();
+ }
+
+ var $Catalog = new Catalog('<inp2:m_Link template="#TEMPLATE_NAME#" pass_through="ts,td" ts="showall" td="no" m_cat_id="#CATEGORY_ID#" no_amp="1"/>', 'advanced_view_', 0);
+ var a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ var $template = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'view_template');
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ std_delete_items($Catalog.ActivePrefix, $template, 1);
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ $Catalog.submit_event($Catalog.ActivePrefix, 'OnMassApprove');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ $Catalog.submit_event($Catalog.ActivePrefix, 'OnMassDecline');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar, 'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ function edit()
+ {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ var $kf = document.getElementById($form_name);
+ var $prev_action = $kf.action;
+ $kf.action = '<inp2:m_t pass="all" no_pass_through="1"/>';
+
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + ']', 1);
+ std_edit_item($Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'));
+
+ $kf.action = $prev_action;
+ }
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+<inp2:m_RenderElement name="kernel_form_end"/>
+<!-- main kernel_form: end -->
+
+<br />
+
+<!-- item tabs: begin -->
+<table cellpadding="0" cellspacing="0">
+ <tr>
+ <inp2:m_DefineElement name="item_tab" title="">
+ <td nowrap="nowrap" width="140">
+ <table id="<inp2:m_param name="prefix"/>.showall_tab" cellpadding="0" cellspacing="0" width="100%" class="catalog-tab-unselected" onclick="$Catalog.switchTab('<inp2:m_param name="prefix"/>.showall');">
+ <tr>
+ <td class="catalog-tab-left">
+ <img src="img/spacer.gif" height="22" width="9" />
+ </td>
+ <td class="catalog-tab-middle" width="100%" valign="middle" nowrap="nowrap">
+ <inp2:m_phrase name="$title"/> <span class="cats_stats">(<span id="<inp2:m_param name="prefix"/>.showall_item_count">?</span>)</span>
+ </td>
+ <td class="catalog-tab-right">
+ <img src="img/spacer.gif" height="22" width="9" />
+ </td>
+ <td style="background-color: #FFFFFF;">
+ <img src="img/spacer.gif" height="1" width="5" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_DefineElement>
+ <inp2:adm_ListCatalogTabs render_as="item_tab" title_property="ViewMenuPhrase" replace_m="yes"/>
+ </tr>
+</table>
+<!-- item tabs: end -->
+<inp2:m_set ts="showall" td="no"/>
+<inp2:m_ModuleInclude template="catalog_tab" tab_init="2"/>
+
+<inp2:m_include t="incs/footer" noform="yes"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/advanced_view.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/catalog_tab.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/catalog_tab.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/catalog_tab.tpl (revision 6111)
@@ -0,0 +1,71 @@
+<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
+ <div id="categories_div" prefix="c.showall" view_template="catalog_tab" edit_template="categories/categories_edit" category_id="-1" dep_buttons="" class="catalog-tab"></div>
+ <script type="text/javascript">$Catalog.registerTab('categories');</script>
+<inp2:m_else/>
+ <inp2:m_include t="incs/blocks"/>
+ <inp2:m_include t="incs/grid_blocks"/>
+ <inp2:m_include t="categories/ci_blocks"/>
+ <inp2:c.showall_InitList parent_cat_id="any" no_special="1"/>
+ $Catalog.setItemCount('c.showall', '<inp2:c.showall_CatalogItemCount no_special="1"/>');
+ $Catalog.setCurrentCategory('c.showall', <inp2:m_get name="m_cat_id"/>);
+ <inp2:m_if check="m_CheckPermission" permissions="CATEGORY.VIEW" pass_params="true">
+ <inp2:m_RenderElement name="grid_js" selected_class="table_white_selected" tag_name="td" PrefixSpecial="c.showall" IdField="CategoryId" grid="Default" menu_filters="yes"/>
+ <inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="c.showall" grid="Default" ajax="1"/>
+ Grids['c.showall'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline'));
+ <inp2:m_if check="m_GetEquals" name="tm" value="single">
+ Grids['c.showall'].RadioMode = true;
+ Grids['c.showall'].DblClick = function() {return false};
+ </inp2:m_if>
+ </inp2:m_if>
+ #separator#
+ <inp2:m_if check="m_CheckPermission" permissions="CATEGORY.VIEW" pass_params="true">
+ <!-- categories tab: begin -->
+ <inp2:m_ParseBlock name="kernel_form" form_name="categories_form"/>
+
+ <inp2:m_DefineElement name="category_td">
+ <td valign="top" class="table_white text" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:Field field="CategoryId"/>" width="50%">
+ <input type="<inp2:m_if check="m_GetEquals" name="tm" value="single">radio<inp2:m_else/>checkbox</inp2:m_if>" name="<inp2:InputName field="$IdField"/>" id="<inp2:InputName field="$IdField"/>">
+ <img src="<inp2:ModulePath />img/itemicons/<inp2:ItemIcon grid="Default"/>"> <span class="priority"><inp2:m_if check="FieldEquals" field="Priority" value="0" inverse="inverse"><sup><inp2:Field field="Priority"/></sup></inp2:m_if></span>
+ <span class="link"><b><inp2:Field name="Name" no_special="1"/></b></span><span class="cat_desc">:</span>
+ <inp2:m_RenderElement name="status_mark" field="EditorsPick" type="pick" PrefixSpecial="$PrefixSpecial"/>
+ <inp2:m_RenderElement name="status_mark" field="IsNew" type="new" PrefixSpecial="$PrefixSpecial"/>
+ <span class="cats_stats">(<inp2:SubCatCount/> / <inp2:ItemCount/>)</span><br>
+ <div style="padding-left: 3px;">
+ <span class="cat_desc"><inp2:Field field="Description" no_special="1"/></span><br>
+ <inp2:m_if check="m_IsDebugMode">
+ <span class="cat_desc">ParentPath: <b><inp2:Field name="ParentPath"/></b></span><br />
+ </inp2:m_if>
+ <span class="cats_stats">(<inp2:Field field="CreatedOn" format="_regional_DateFormat"/>)</span>
+ </div>
+ </td>
+ </inp2:m_DefineElement>
+
+ <inp2:c.showall_SaveWarning name="grid_save_warning" no_toolbar="no_toolbar"/>
+ <inp2:m_if check="m_RecallEquals" var="c.showall_search_keyword" value="" inverse="inverse">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="table_border_nobottom">
+ <tr>
+ <td valign="top" class="hint_red">
+ <inp2:m_phrase name="la_Warning_Filter"/>
+ </td>
+ </tr>
+ </table>
+ </inp2:m_if>
+
+ <inp2:m_ParseBlock name="grid_pagination" grid="Default" PrefixSpecial="c.showall" no_special="1" search="on" no_toolbar="no_toolbar" ajax="1"/>
+ <br />
+
+ <inp2:m_DefineElement name="wg_empty_cell">
+ <td width="<inp2:m_param name="column_width"/>%"> </td>
+ </inp2:m_DefineElement>
+
+ <table width="100%" border="0" cellspacing="2" cellpadding="4">
+ <inp2:m_set c.showall_sequence="1" odd_even="table_color1"/>
+ <inp2:c.showall_PrintList2 block="category_td" no_special="1" IdField="CategoryId" empty_cell_render_as="wg_empty_cell" direction="V" columns="2"/>
+ </table>
+
+ <inp2:m_ParseBlock name="kernel_form_end"/>
+ <!-- categories tab: end -->
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="no_perm_grid" perm_label="la_text_NoCategories"/>
+ </inp2:m_if>
+</inp2:m_if>
Property changes on: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/catalog_tab.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/core/kernel/utility/formatters/upload_formatter.php
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/core/kernel/utility/formatters/upload_formatter.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/core/kernel/utility/formatters/upload_formatter.php (revision 6111)
@@ -0,0 +1,172 @@
+<?php
+
+class kUploadFormatter extends kFormatter
+{
+ var $DestinationPath;
+ var $FullPath;
+
+ function kUploadFormatter()
+ {
+ if ($this->DestinationPath)
+ {
+ $this->FullPath = FULL_PATH.$this->DestinationPath;
+ }
+ parent::kBase();
+ }
+
+
+//function Parse($value, $options, &$errors)
+ function Parse($value, $field_name, &$object)
+ {
+ $ret = '';
+ $options = $object->GetFieldOptions($field_name);
+
+ if(getArrayValue($options, 'upload_dir'))
+ {
+ $this->DestinationPath = $options['upload_dir'];
+ $this->FullPath = FULL_PATH.$this->DestinationPath;
+ }
+
+ if (getArrayValue($value, 'upload') && getArrayValue($value, 'error') == UPLOAD_ERR_NO_FILE) {
+ // file was not uploaded this time, but was uploaded before, then use previously uploaded file (from db)
+ return getArrayValue($value, 'upload');
+ }
+
+ if ( is_array($value) && $value['size'] )
+ {
+ if ( is_array($value) && $value['error'] === UPLOAD_ERR_OK )
+ {
+ if ( getArrayValue($options, 'allowed_types') && !in_array($value['type'], $options['allowed_types']) )
+ {
+ $object->FieldErrors[$field_name]['pseudo'] = 'bad_file_format';
+ }
+ elseif ( $value['size'] > ($options['max_size'] ? $options['max_size'] : MAX_UPLOAD_SIZE) )
+ {
+ $object->FieldErrors[$field_name]['pseudo'] = 'bad_file_size';
+ }
+ elseif ( !is_writable($this->FullPath) )
+ {
+ $object->FieldErrors[$field_name]['pseudo'] = 'cant_save_file';
+ }
+ else
+ {
+ $real_name = $this->ValidateFileName($this->FullPath, $value['name']);
+ $file_name = $this->FullPath.$real_name;
+ if ( !move_uploaded_file($value['tmp_name'], $file_name) )
+ {
+ $object->FieldErrors[$field_name]['pseudo'] = 'cant_save_file';
+ }
+ else
+ {
+ @chmod($file_name, 0666);
+ if(getArrayValue($options, 'size_field'))
+ {
+ $object->SetDBField($options['size_field'], $value['size']);
+ }
+ if(getArrayValue($options, 'orig_name_field'))
+ {
+ $object->SetDBField($options['orig_name_field'], $value['name']);
+ }
+ if(getArrayValue($options, 'content_type_field'))
+ {
+ $object->SetDBField($options['content_type_field'], $value['type']);
+ }
+ $ret = getArrayValue($options, 'upload_dir') ? $real_name : $this->DestinationPath.$real_name;
+ }
+ }
+ }
+ else
+ {
+ $object->FieldErrors[$field_name]['pseudo'] = 'cant_save_file';
+ }
+ }
+ else
+ {
+ if(getArrayValue($options, 'required'))
+ {
+ $object->FieldErrors[$field_name]['pseudo'] = 'required';
+ }
+ }
+
+ if ($value['error'] && !( $value['error'] == UPLOAD_ERR_NO_FILE ) && !$object->FieldErrors[$field_name]['pseudo'])
+ {
+ $object->FieldErrors[$field_name]['pseudo'] = 'cant_save_file';
+ }
+
+ return $ret;
+ }
+
+ function Format($value, $field_name, &$object, $format=null)
+ {
+ if ( is_null($value) ) return '';
+
+ $options = $object->GetFieldOptions($field_name);
+ if ( isset($format) ) $options['format'] = $format;
+ $tc_value = $this->TypeCast($value, $options);
+ if( ($tc_value === false) || ($tc_value != $value) ) return $value; // for leaving badly formatted date on the form
+
+ return $this->GetFormatted($tc_value, $options);
+ }
+
+ function GetFormatted($tc_value, &$options)
+ {
+ if (isset($options['format'])) {
+ switch ($options['format']) {
+ case 'full_url':
+ $upload_dir = isset($options['upload_dir']) ? $options['upload_dir'] : $this->DestinationPath;
+ return rtrim($this->Application->BaseURL(), '/').$upload_dir.$tc_value;
+ break;
+
+ default:
+ return sprintf($options['format'], $tc_value);
+ break;
+ }
+ }
+
+ return $tc_value;
+ }
+
+ function ValidateFileName($path, $name)
+ {
+ $parts = pathinfo($name);
+ $ext = '.'.$parts['extension'];
+ $filename = substr($parts['basename'], 0, -strlen($ext));
+ $new_name = $filename.$ext;
+ while ( file_exists($path.'/'.$new_name) )
+ {
+ if ( preg_match("/({$filename}_)([0-9]*)($ext)/", $new_name, $regs) ) {
+ $new_name = $regs[1].($regs[2]+1).$regs[3];
+ }
+ else {
+ $new_name = $filename.'_1'.$ext;
+ }
+ }
+ return $new_name;
+ }
+
+}
+
+class kPictureFormatter extends kUploadFormatter
+{
+
+ function kPictureFormatter()
+ {
+ $this->NakeLookupPath = IMAGES_PATH;
+ $this->DestinationPath = IMAGES_PENDING_PATH;
+ parent::kUploadFormatter();
+ }
+
+ function GetFormatted($tc_value, &$options)
+ {
+ if ($options['format'] == 'img_size') {
+ $upload_dir = isset($options['upload_dir']) ? $options['upload_dir'] : $this->DestinationPath;
+ $img_path = FULL_PATH.'/'.$upload_dir.$tc_value;
+
+ $image_info = @getimagesize($img_path);
+ return ' width="'.$image_info[0].'" height="'.$image_info[1].'"';
+ }
+
+ return parent::GetFormatted($tc_value, $options);
+ }
+
+}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/core/kernel/utility/formatters/upload_formatter.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/catalog/advanced_view.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/core/admin_templates/catalog/advanced_view.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/core/admin_templates/catalog/advanced_view.tpl (revision 6111)
@@ -0,0 +1,118 @@
+<inp2:m_RequireLogin permissions="in-portal:advanced_view.view" system="1" ajax="yes"/>
+<inp2:m_include t="incs/header" nobody="yes" noform="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="$Catalog.Init();">
+<inp2:m_ParseBlock name="section_header" prefix="c" icon="icon46_advanced_view" module="in-portal" title="!la_title_AdvancedView!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="c" title_preset="advanced_view" module="in-portal"/>
+
+<!-- main kernel_form: begin -->
+<inp2:m_RenderElement name="kernel_form"/>
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <input type="hidden" name="m_cat_id" value="<inp2:m_get name="m_cat_id"/>"/>
+ <script type="text/javascript" src="incs/fw_menu.js"></script>
+ <script type="text/javascript" src="incs/ajax.js"></script>
+ <script type="text/javascript" src="incs/catalog.js"></script>
+ <script type="text/javascript">
+ Request.progressText = '<inp2:m_phrase name="la_title_Loading" escape="1"/>';
+
+ Catalog.prototype.AfterInit = function() {
+ this.switchTab();
+ }
+
+ var $Catalog = new Catalog('<inp2:m_Link template="#TEMPLATE_NAME#" pass_through="ts,td" ts="showall" td="no" m_cat_id="#CATEGORY_ID#" no_amp="1"/>', 'advanced_view_', 0);
+ var a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ var $template = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'view_template');
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ std_delete_items($Catalog.ActivePrefix, $template, 1);
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ $Catalog.submit_event($Catalog.ActivePrefix, 'OnMassApprove');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ $Catalog.submit_event($Catalog.ActivePrefix, 'OnMassDecline');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar, 'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ function edit()
+ {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ var $kf = document.getElementById($form_name);
+ var $prev_action = $kf.action;
+ $kf.action = '<inp2:m_t pass="all" no_pass_through="1"/>';
+
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + ']', 1);
+ std_edit_item($Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'));
+
+ $kf.action = $prev_action;
+ }
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+<inp2:m_RenderElement name="kernel_form_end"/>
+<!-- main kernel_form: end -->
+
+<br />
+
+<!-- item tabs: begin -->
+<table cellpadding="0" cellspacing="0">
+ <tr>
+ <inp2:m_DefineElement name="item_tab" title="">
+ <td nowrap="nowrap" width="140">
+ <table id="<inp2:m_param name="prefix"/>.showall_tab" cellpadding="0" cellspacing="0" width="100%" class="catalog-tab-unselected" onclick="$Catalog.switchTab('<inp2:m_param name="prefix"/>.showall');">
+ <tr>
+ <td class="catalog-tab-left">
+ <img src="img/spacer.gif" height="22" width="9" />
+ </td>
+ <td class="catalog-tab-middle" width="100%" valign="middle" nowrap="nowrap">
+ <inp2:m_phrase name="$title"/> <span class="cats_stats">(<span id="<inp2:m_param name="prefix"/>.showall_item_count">?</span>)</span>
+ </td>
+ <td class="catalog-tab-right">
+ <img src="img/spacer.gif" height="22" width="9" />
+ </td>
+ <td style="background-color: #FFFFFF;">
+ <img src="img/spacer.gif" height="1" width="5" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_DefineElement>
+ <inp2:adm_ListCatalogTabs render_as="item_tab" title_property="ViewMenuPhrase" replace_m="yes"/>
+ </tr>
+</table>
+<!-- item tabs: end -->
+<inp2:m_set ts="showall" td="no"/>
+<inp2:m_ModuleInclude template="catalog_tab" tab_init="2"/>
+
+<inp2:m_include t="incs/footer" noform="yes"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/catalog/advanced_view.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/catalog_tab.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/core/admin_templates/catalog_tab.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/core/admin_templates/catalog_tab.tpl (revision 6111)
@@ -0,0 +1,71 @@
+<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
+ <div id="categories_div" prefix="c.showall" view_template="catalog_tab" edit_template="categories/categories_edit" category_id="-1" dep_buttons="" class="catalog-tab"></div>
+ <script type="text/javascript">$Catalog.registerTab('categories');</script>
+<inp2:m_else/>
+ <inp2:m_include t="incs/blocks"/>
+ <inp2:m_include t="incs/grid_blocks"/>
+ <inp2:m_include t="categories/ci_blocks"/>
+ <inp2:c.showall_InitList parent_cat_id="any" no_special="1"/>
+ $Catalog.setItemCount('c.showall', '<inp2:c.showall_CatalogItemCount no_special="1"/>');
+ $Catalog.setCurrentCategory('c.showall', <inp2:m_get name="m_cat_id"/>);
+ <inp2:m_if check="m_CheckPermission" permissions="CATEGORY.VIEW" pass_params="true">
+ <inp2:m_RenderElement name="grid_js" selected_class="table_white_selected" tag_name="td" PrefixSpecial="c.showall" IdField="CategoryId" grid="Default" menu_filters="yes"/>
+ <inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="c.showall" grid="Default" ajax="1"/>
+ Grids['c.showall'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline'));
+ <inp2:m_if check="m_GetEquals" name="tm" value="single">
+ Grids['c.showall'].RadioMode = true;
+ Grids['c.showall'].DblClick = function() {return false};
+ </inp2:m_if>
+ </inp2:m_if>
+ #separator#
+ <inp2:m_if check="m_CheckPermission" permissions="CATEGORY.VIEW" pass_params="true">
+ <!-- categories tab: begin -->
+ <inp2:m_ParseBlock name="kernel_form" form_name="categories_form"/>
+
+ <inp2:m_DefineElement name="category_td">
+ <td valign="top" class="table_white text" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:Field field="CategoryId"/>" width="50%">
+ <input type="<inp2:m_if check="m_GetEquals" name="tm" value="single">radio<inp2:m_else/>checkbox</inp2:m_if>" name="<inp2:InputName field="$IdField"/>" id="<inp2:InputName field="$IdField"/>">
+ <img src="<inp2:ModulePath />img/itemicons/<inp2:ItemIcon grid="Default"/>"> <span class="priority"><inp2:m_if check="FieldEquals" field="Priority" value="0" inverse="inverse"><sup><inp2:Field field="Priority"/></sup></inp2:m_if></span>
+ <span class="link"><b><inp2:Field name="Name" no_special="1"/></b></span><span class="cat_desc">:</span>
+ <inp2:m_RenderElement name="status_mark" field="EditorsPick" type="pick" PrefixSpecial="$PrefixSpecial"/>
+ <inp2:m_RenderElement name="status_mark" field="IsNew" type="new" PrefixSpecial="$PrefixSpecial"/>
+ <span class="cats_stats">(<inp2:SubCatCount/> / <inp2:ItemCount/>)</span><br>
+ <div style="padding-left: 3px;">
+ <span class="cat_desc"><inp2:Field field="Description" no_special="1"/></span><br>
+ <inp2:m_if check="m_IsDebugMode">
+ <span class="cat_desc">ParentPath: <b><inp2:Field name="ParentPath"/></b></span><br />
+ </inp2:m_if>
+ <span class="cats_stats">(<inp2:Field field="CreatedOn" format="_regional_DateFormat"/>)</span>
+ </div>
+ </td>
+ </inp2:m_DefineElement>
+
+ <inp2:c.showall_SaveWarning name="grid_save_warning" no_toolbar="no_toolbar"/>
+ <inp2:m_if check="m_RecallEquals" var="c.showall_search_keyword" value="" inverse="inverse">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="table_border_nobottom">
+ <tr>
+ <td valign="top" class="hint_red">
+ <inp2:m_phrase name="la_Warning_Filter"/>
+ </td>
+ </tr>
+ </table>
+ </inp2:m_if>
+
+ <inp2:m_ParseBlock name="grid_pagination" grid="Default" PrefixSpecial="c.showall" no_special="1" search="on" no_toolbar="no_toolbar" ajax="1"/>
+ <br />
+
+ <inp2:m_DefineElement name="wg_empty_cell">
+ <td width="<inp2:m_param name="column_width"/>%"> </td>
+ </inp2:m_DefineElement>
+
+ <table width="100%" border="0" cellspacing="2" cellpadding="4">
+ <inp2:m_set c.showall_sequence="1" odd_even="table_color1"/>
+ <inp2:c.showall_PrintList2 block="category_td" no_special="1" IdField="CategoryId" empty_cell_render_as="wg_empty_cell" direction="V" columns="2"/>
+ </table>
+
+ <inp2:m_ParseBlock name="kernel_form_end"/>
+ <!-- categories tab: end -->
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="no_perm_grid" perm_label="la_text_NoCategories"/>
+ </inp2:m_if>
+</inp2:m_if>
Property changes on: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/catalog_tab.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Event Timeline
Log In to Comment