diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2010-03-30 16:36:04 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2010-03-30 16:36:04 +0400 |
commit | d17bbb4a1ed35a01ed2608aa78cedb2522d343fc (patch) | |
tree | 0457f4018b4a03f86069922932f39c5e66287cfc /core/SmartyPlugins | |
parent | 73d6b484b4b9d3c977982c293ecf9b1006f11d00 (diff) |
Fixes #1001 Adding currency setting per website
Defaulting currency to USD for all existing websites
Simplifying website admin screen by rolling all settings into the same form (still using ajax)
Adding SitesManager and UsersManager to the list of hidden plugins
Slightly refactored printing money values to accomodate per website preference
git-svn-id: http://dev.piwik.org/svn/trunk@2020 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/SmartyPlugins')
-rw-r--r-- | core/SmartyPlugins/modifier.inlineHelp.php | 4 | ||||
-rw-r--r-- | core/SmartyPlugins/modifier.money.php | 27 |
2 files changed, 29 insertions, 2 deletions
diff --git a/core/SmartyPlugins/modifier.inlineHelp.php b/core/SmartyPlugins/modifier.inlineHelp.php index 7da02c0717..bbd9892e61 100644 --- a/core/SmartyPlugins/modifier.inlineHelp.php +++ b/core/SmartyPlugins/modifier.inlineHelp.php @@ -16,8 +16,8 @@ function smarty_modifier_inlineHelp($text) { return - '<div style=\'width:200px\' class="ui-widget">'. - '<div class="ui-state-highlight ui-corner-all" style="margin-top:20px; padding:0 .7em;">'. + '<div class="ui-widget">'. + '<div class="ui-inline-help ui-state-highlight ui-corner-all">'. '<p style="font-size:8pt;"><span class="ui-icon ui-icon-info" style="float:left;margin-right:.3em;"></span>'. $text. '</p>'. diff --git a/core/SmartyPlugins/modifier.money.php b/core/SmartyPlugins/modifier.money.php new file mode 100644 index 0000000000..52acffd4fd --- /dev/null +++ b/core/SmartyPlugins/modifier.money.php @@ -0,0 +1,27 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id$ + * + * @category Piwik + * @package SmartyPlugins + */ + +/** + * Prints money, given the currency symbol. + * + * @return string The amount with the currency symbol + */ +function smarty_modifier_money($amount) +{ + if(func_num_args() != 2) + { + throw new Exception('the smarty modifier money expects one parameter: the idSite.'); + } + $idSite = func_get_args(); + $idSite = $idSite[1]; + return Piwik::getPrettyMoney($amount, $idSite); +} |