Index: branches/5.2.x/units/products/products_config.php =================================================================== diff -u -N -r16580 -r16676 --- branches/5.2.x/units/products/products_config.php (.../products_config.php) (revision 16580) +++ branches/5.2.x/units/products/products_config.php (.../products_config.php) (revision 16676) @@ -1,6 +1,6 @@ Array ( '' => Array ( + 'ModifiedBy' => 'IF (ISNULL(modified.Username), IF (%1$s.ModifiedById = ' . USER_ROOT . ', "root", IF (%1$s.ModifiedById = ' . USER_GUEST . ', "Guest", "n/a")), IF(modified.Username = "", modified.Email, modified.Username))', 'AltName' => 'img.AltName', 'SameImages' => 'img.SameImages', 'LocalThumb' => 'img.LocalThumb', @@ -386,6 +387,7 @@ ), 'showall' => Array ( + 'ModifiedBy' => 'IF (ISNULL(modified.Username), IF (%1$s.ModifiedById = ' . USER_ROOT . ', "root", IF (%1$s.ModifiedById = ' . USER_GUEST . ', "Guest", "n/a")), IF(modified.Username = "", modified.Email, modified.Username))', 'Price' => 'COALESCE(pricing.Price, 0)', 'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name', 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', @@ -411,6 +413,7 @@ LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1 LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1 LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId + LEFT JOIN ' . TABLE_PREFIX . 'Users modified ON %1$s.ModifiedById = modified.PortalUserId LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', 'showall' => 'SELECT %1$s.* %2$s FROM %1$s @@ -420,6 +423,7 @@ LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId {PERM_JOIN} LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId + LEFT JOIN ' . TABLE_PREFIX . 'Users modified ON %1$s.ModifiedById = modified.PortalUserId LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', ), @@ -440,6 +444,7 @@ LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1 LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1 LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId + LEFT JOIN ' . TABLE_PREFIX . 'Users modified ON %1$s.ModifiedById = modified.PortalUserId LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId', ), @@ -507,8 +512,8 @@ ), 'not_null' => 1, 'default' => 1, ), - 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'ModifiedById' => Array ('type' => 'int', 'default' => NULL), + 'Modified' => array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), + 'ModifiedById' => array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => array('invalid_option' => '!la_error_UserNotFound!'), 'options' => array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'default' => null), 'CreatedById' => Array ( 'type' => 'int', 'formatter' => 'kLEFTFormatter', @@ -564,6 +569,7 @@ 'VirtualFields' => Array ( 'Relevance' => Array ('type' => 'float', 'default' => 0), + 'ModifiedBy' => array('type' => 'string', 'default' => ''), 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'default' => 0), 'Price' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), 'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL), @@ -655,6 +661,8 @@ 'QtyInStock' => Array ('title' => 'column:la_fld_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ), 'QtyBackOrdered' => Array ('title' => 'column:la_fld_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ), 'OnSale' => Array ('title' => 'column:la_fld_OnSale', 'filter_block' => 'grid_options_filter', 'width' => 70, ), + 'Modified' => array('filter_block' => 'grid_date_range_filter', 'width' => 140), + 'ModifiedBy' => array('filter_block' => 'grid_like_filter', 'width' => 100), /*'Weight' => Array ( 'title' => 'la_col_ProductWeight', 'filter_block' => 'grid_range_filter', 'width' => 150, ), 'CreatedOn' => Array ( 'title' => 'la_col_ProductCreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), 'BackOrderDate' => Array ( 'title' => 'la_col_ProductBackOrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),*/ @@ -681,7 +689,8 @@ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), 'QtyInStock' => Array ('title' => 'column:la_fld_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ), 'QtyBackOrdered' => Array ('title' => 'column:la_fld_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ), - + 'Modified' => array('filter_block' => 'grid_date_range_filter', 'width' => 140), + 'ModifiedBy' => array('filter_block' => 'grid_like_filter', 'width' => 100), ), ), ), Index: branches/5.2.x/admin_templates/products/products_edit.tpl =================================================================== diff -u -N -r16580 -r16676 --- branches/5.2.x/admin_templates/products/products_edit.tpl (.../products_edit.tpl) (revision 16580) +++ branches/5.2.x/admin_templates/products/products_edit.tpl (.../products_edit.tpl) (revision 16676) @@ -133,6 +133,12 @@ + + + + + +