Merge branch 'master' of git://github.com/thelia/thelia into french_translation

* 'master' of git://github.com/thelia/thelia:
  add REF to product_sale_element loop and fix product tempalte
  Correct link "Go to admin page" alike thelia is installed in the root of virtual host or in a subdirectory
  Add correct url(subdiretory included) in config page
  Use getUriForPath() instead getSchemeAndHttpHost() for proper redirection for cases where Thelia is installed in a subdirectory
  Check if store_country has a value
  Fixed double '/' in generated assets URLs
  Add validation for Store configuration
  Use Store contact information
  Call the wrong AdminResources in saveAction
  Action buttons smaller
  Replace company_name and contact_email by store_name & store_email
  Add a new admin page to manage the basic store configurations
  Add routing for Store Configuration
  Add argument Title on Content Loop & Folder Loop
This commit is contained in:
gmorel
2013-11-27 19:16:17 +01:00
23 changed files with 518 additions and 54 deletions

View File

@@ -100,5 +100,7 @@ final class AdminResources
const SYSTEM_LOG = "admin.configuration.system-log";
const STORE = "admin.configuration.store";
const TRANSLATIONS = "admin.configuration.translations";
}

View File

@@ -345,6 +345,6 @@ class AsseticAssetManager implements AssetManagerInterface
$writer->writeAsset($asset);
}
return rtrim($output_url, '/') . '/' . $output_relative_web_path . $asset_target_filename;
return rtrim($output_url, '/') . '/' . ltrim($output_relative_web_path, '/') . $asset_target_filename;
}
}

View File

@@ -66,6 +66,7 @@ class Content extends BaseI18nLoop implements PropelSearchLoopInterface
Argument::createBooleanTypeArgument('current_folder'),
Argument::createIntTypeArgument('depth', 1),
Argument::createBooleanOrBothTypeArgument('visible', 1),
Argument::createAnyTypeArgument('title'),
new Argument(
'order',
new TypeCollection(
@@ -148,6 +149,11 @@ class Content extends BaseI18nLoop implements PropelSearchLoopInterface
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);
$title = $this->getTitle();
if (!is_null($title)) {
$search->where("CASE WHEN NOT ISNULL(`requested_locale_i18n`.ID) THEN `requested_locale_i18n`.`TITLE` ELSE `default_locale_i18n`.`TITLE` END ".Criteria::LIKE." ?", "%".$title."%", \PDO::PARAM_STR);
}
$orders = $this->getOrder();

View File

@@ -61,6 +61,7 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface
Argument::createBooleanTypeArgument('current'),
Argument::createBooleanTypeArgument('not_empty', 0),
Argument::createBooleanOrBothTypeArgument('visible', 1),
Argument::createAnyTypeArgument('title'),
new Argument(
'order',
new TypeCollection(
@@ -115,6 +116,12 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface
}
}
$title = $this->getTitle();
if (!is_null($title)) {
$search->where("CASE WHEN NOT ISNULL(`requested_locale_i18n`.ID) THEN `requested_locale_i18n`.`TITLE` ELSE `default_locale_i18n`.`TITLE` END ".Criteria::LIKE." ?", "%".$title."%", \PDO::PARAM_STR);
}
$visible = $this->getVisible();
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);

View File

@@ -174,6 +174,7 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface
->set("IS_NEW" , $PSEValue->getNewness() === 1 ? 1 : 0)
->set("IS_DEFAULT" , $PSEValue->getIsDefault() === 1 ? 1 : 0)
->set("WEIGHT" , $PSEValue->getWeight())
->set("REF" , $PSEValue->getRef())
->set("EAN_CODE" , $PSEValue->getEanCode())
->set("PRICE" , $price)
->set("PRICE_TAX" , $taxedPrice - $price)