// new layout page stats, substitute fieldset by div, legend by h2, delete stylesheet on html

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10760 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vKham
2011-11-29 17:42:38 +00:00
parent 66a0d5e50f
commit ad65287eeb
9 changed files with 81 additions and 66 deletions
+10
View File
@@ -229,6 +229,7 @@ form#product_form h4 { font-size:18px; font-weight:normal;}
/*SIDEBAR*/
.sidebar { position:relative; float:left; width:220px; display:inline;}
.sidebar h3 { background-color:#ebedf4; font-weight:bold; display:block; padding:5px;}
.sidebar.navigation h3 {margin:0;}
.sidebar .subHeadline { font-weight:bold; float:right; margin-top:-28px; margin-right:5px;}
.sidebar ul.categorieList {}
.sidebar ul.categorieList li { border-top:1px solid #ccc; position:relative; line-height:20px;}
@@ -238,6 +239,15 @@ form#product_form h4 { font-size:18px; font-weight:normal;}
.sidebar ul.categorieList li div.count{ position:absolute; top:0; right:5px;}
.sidebar .categorieStatus { display:none;}
/*STATCONTAINER*/
#statsContainer {margin-left:220px; padding:0 0 0 20px;}
#statsContainer #calendar { background-color: #EBEDF4;border: 1px solid #C2C4D9; display: block; margin: 10px 0;min-height: 25px; padding: 10px;}
#statsContainer #calendar input, #statsContainer #calendar p { float:left; margin-right:5px;}
#statsContainer .blocStats { background-color: #EBEDF4;border: 1px solid #C2C4D9; display: block; position:relative; padding: 10px;}
#statsContainer .blocStats h2 { font-weight:normal; margin:0;}
#statsContainer .blocStats form { position:absolute; top:10px; right:5px;}
/*MODULECONTAINER*/
#moduleContainer { margin-left:220px; padding:13px 0 0 20px;}
#moduleContainer .table tr th { height:40px;}
+2 -2
View File
@@ -155,8 +155,8 @@
<option value="0">{l s='everywhere'}</option>
<option value="1" {if {$search_type} == 1} selected="selected" {/if}>{l s='catalog'}</option>
<optgroup label="{l s='customers'}:">
<option value="2" {if {$search_type} == 2} selected="selected" {/if}>{l s='by name'}</option>
<option value="6" {if {$search_type} == 6} selected="selected" {/if}>{l s='by ip address'}</option>
<option value="2" {if {$search_type} == 2} selected="selected" {/if}>{l s='by name'}</option>
<option value="6" {if {$search_type} == 6} selected="selected" {/if}>{l s='by ip address'}</option>
</optgroup>
<option value="3" {if {$search_type} == 3} selected="selected" {/if}>{l s='orders'}</option>
<option value="4" {if {$search_type} == 4} selected="selected" {/if}>{l s='invoices'}</option>
@@ -133,7 +133,8 @@
<td class="col-left"><label>{l s='Status:' }</label></td>
<td style="padding-bottom:5px;">
<input style="float:left;" onclick="toggleDraftWarning(false);showOptions(true);" type="radio" name="active" id="active_on" value="1" {if $product->active}checked="checked" {/if} />
<label for="active_on" class="t">
<label for="active_on" class="t"><img src="../img/admin/enabled.gif" alt="{l s='Enabled'}"
title="{l s='Enabled'}" style="float:left; padding:0px 5px 0px 5px;" />
{l s='Enabled'}</label>
<br class="clear" />
<input style="float:left;" onclick="toggleDraftWarning(true);showOptions(false);" type="radio" name="active" id="active_off" value="0" {if !$product->active}checked="checked"{/if} />
@@ -201,6 +202,21 @@
</a>
</td>
</tr>
<!--tr>
<td class="col-left"><label>{l s='Supplier:' }</label></td>
<td style="padding-bottom:5px;">
<select name="id_supplier" id="id_supplier">
<option value="0">-- {l s='Choose (optional)'} --</option>
{if $product->id_supplier}
<option value="{$product->id_supplier}" selected="selected">{$product->supplier_name}</option>
{/if}
<option disabled="disabled">----------</option>
</select>&nbsp;&nbsp;&nbsp;
<a href="{$link->getAdminLink('AdminSuppliers')}&addsupplier" onclick="return confirm('{l s='Are you sure you want to delete entered product information?' js=1}">
<img src="../img/admin/add.gif" alt="{l s='Create'}" title="{l s='Create'}" /> <b>{l s='Create'}</b>
</a>
</td>
</tr-->
</table>
<table cellpadding="5" cellspacing="0" border="0" style="width: 100%;"><tr><td><div class="separation"></div></td></tr></table>
{* [begin] pack product *}
@@ -560,13 +576,13 @@ $(document).ready(function(){
</tr>
{* @todo : prices related has to be moved in price subtab *}
<!--tr>
<tr>
<td class="col-left"><label>{l s='Pre-tax wholesale price:'}</label></td>
<td style="padding-bottom:5px;">
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" type="text" value="{$product->wholesale_price}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
<p class="preference_description">{l s='The wholesale price at which you bought this product'}</p>
</td>
</tr-->
</tr>
<tr>
<td class="col-left"><label>{l s='Pre-tax retail price:'}</label></td>
@@ -957,7 +973,7 @@ $(document).ready(function(){
<p class="preference_description">{l s='Tags separated by commas (e.g., dvd, dvd player, hifi)'}</p>
</td>
</tr>
<tr>
<td class="col-left"><label>{l s='Accessories:'}<br /><br /><i>{l s='(Do not forget to Save the product afterward)'}</i></label></td>
<td style="padding-bottom:5px;">
@@ -973,7 +989,7 @@ $(document).ready(function(){
var formProduct;
var accessories = new Array();
</script>
<div id="ajax_choose_product" style="padding:6px; padding-top:2px; width:600px;">
<p class="clear">{l s='Begin typing the first letters of the product name, then select the product from the drop-down list:'}</p>
<input type="text" value="" id="product_autocomplete_input" />
@@ -1019,7 +1035,7 @@ var accessories = new Array();
<br />
</div>
<script type="text/javascript">
toggleVirtualProduct(getE('is_virtual_good'));
unitPriceWithTax('unit');
+5 -15
View File
@@ -24,21 +24,15 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<div style="float:left">
<div id="statsContainer">
<div id="calendar">
<fieldset style="width:230px; font-size:13px;">
<legend>
<img src="../img/admin/date.png" />
{$translations.Calendar}
</legend>
<div>
<form action="{$current}&token={$token}{if $action && $table}&{$action}{$table}{/if}{if $identifier && $id}&{$identifier}={$id}{/if}" method="post" id="calendar_form" name="calendar_form">
<input type="submit" name="submitDateDay" class="button" value="{$translations.Day}">
<input type="submit" name="submitDateMonth" class="button" value="{$translations.Month}">
<input type="submit" name="submitDateYear" class="button" value="{$translations.Year}"><br />
<input type="submit" name="submitDateDayPrev" class="button" value="{$translations.Day}-1" style="margin-top:2px">
<input type="submit" name="submitDateMonthPrev" class="button" value="{$translations.Month}-1" style="margin-top:2px">
<input type="submit" name="submitDateYearPrev" class="button" value="{$translations.Year}-1" style="margin-top:2px">
<input type="submit" name="submitDateYear" class="button" value="{$translations.Year}">
<input type="submit" name="submitDateDayPrev" class="button" value="{$translations.Day}-1">
<input type="submit" name="submitDateMonthPrev" class="button" value="{$translations.Month}-1">
<input type="submit" name="submitDateYearPrev" class="button" value="{$translations.Year}-1">
<p>{if isset($translations.From)}{$translations.From}{else}{l s='From:'}{/if}
<input type="text" name="datepickerFrom" id="datepickerFrom" value="{$datepickerFrom}" class="datepicker">
</p>
@@ -58,8 +52,4 @@
});
});
</script>
</div>
</fieldset>
<div class="clear space">&nbsp;</div>
</div>
+8 -11
View File
@@ -23,25 +23,22 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<fieldset style="width:230px">
<legend>
<img src="../img/admin/navigation.png" /> {l s='Navigation'}
</legend>
<div id="container">
<div class="sidebar navigation">
<h3>{l s='Navigation'}</h3>
<ul class="categorieList">
{if count($modules)}
{foreach $modules as $module}
{if $module_instance[$module.name]}
<h4>
<img src="../modules/{$module.name}/logo.gif" />
<li>
<a href="{$current}&token={$token}&module={$module.name}">{$module_instance[$module.name]->displayName}</a>
</h4>
</li>
{/if}
{/foreach}
{else}
{l s='No module installed'}
{/if}
</fieldset>
<div class="clear space">&nbsp;</div>
</div>
</ul>
</div>
+4 -2
View File
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<div style="margin-left:280px;">
<div>
{if $module_name}
{if $module_instance && $module_instance->active}
{$hook}
@@ -35,5 +35,7 @@
<h3 class="space">{l s='Please select a module in the left column.'}</h3>
{/if}
</div>
<div class="clear"></div>
</div>
</div>
@@ -45,10 +45,9 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
$this->loadObject(true);
$this->content .= $this->initView();
}
$this->content .= $this->displayCalendar();
$this->content .= $this->displayEngines();
$this->content .= $this->displayMenu();
$this->content .= $this->displayCalendar();
$this->content .= $this->displayStats();
+2 -1
View File
@@ -28,7 +28,8 @@
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }
.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC);
background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; color: #212121/*{fcActive}*/; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues
+26 -26
View File
@@ -128,9 +128,9 @@ class StatsForecast extends Module
$dataTable[$row['fix_date']] = $row;
$this->_html .= '<div>
<fieldset><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->displayName.'</legend>
<p style="float:left">'.$this->l('All amounts are without taxes.').'</p>
<form id="granularity" action="'.$ru.'#granularity" method="post" style="float:right">
<div class="blocStats"><h2>'.$this->displayName.'</h2>
<p>'.$this->l('All amounts are without taxes.').'</p>
<form id="granularity" action="'.$ru.'#granularity" method="post">
<input type="hidden" name="submitGranularity" value="1" />
'.$this->l('Mode:').' <select name="stats_granularity" onchange="this.form.submit();" style="width:100px">
<option value="10">'.$this->l('Day').'</option>
@@ -139,7 +139,7 @@ class StatsForecast extends Module
<option value="4" '.($this->context->cookie->stats_granularity == '4' ? 'selected="selected"' : '').'>'.$this->l('Year').'</option>
</select>
</form>
<div class="clear">&nbsp;</div>
<table class="table" border="0" cellspacing="0" cellspacing="0">
<tr>
<th style="width:70px;text-align:center"></th>
@@ -259,7 +259,7 @@ class StatsForecast extends Module
<td style="font-weight: 700" align="right">'.Tools::displayPrice($this->t8 * $prop30, $currency).'</td>
</tr>
</table>
</fieldset>';
</div>';
$ca = $this->getRealCA();
@@ -304,7 +304,7 @@ class StatsForecast extends Module
$orders = Db::getInstance()->getValue($sql);
$this->_html .= '<br />
<fieldset><legend><img src="../modules/'.$this->name.'/funnel.png" /> '.$this->l('Conversion').'</legend>
<div class="blocStats"><h2>'.$this->l('Conversion').'</h2>
<span style="float:left;text-align:center;margin-right:10px;padding-top:15px">'.$this->l('Visitors').'<br />'.$visitors.'</span>
<span style="float:left;text-align:center;margin-right:10px">
<img src="../modules/'.$this->name.'/next.png"><br />'.round(100 * $customers / max(1, $visitors)).' %<br />
@@ -321,7 +321,7 @@ class StatsForecast extends Module
<span style="float:left;text-align:center;margin-right:10px;padding-top:15px">'.$this->l('Full carts').'<br />'.$fullcarts.'</span>
<span style="float:left;text-align:center;margin-right:10px;padding-top:15px"><img src="../modules/'.$this->name.'/next.png"><br />'.round(100 * $orders / max(1, $fullcarts)).' %</span>
<span style="float:left;text-align:center;margin-right:10px;padding-top:15px">'.$this->l('Orders').'<br />'.$orders.'</span>
<br class="clear" /><br class="clear" />
<br class="clear" />
<span style="float:left;text-align:center;margin-right:10px">'.$this->l('Registered visitors').'</span>
<span style="float:left;text-align:center;margin-right:10px">
<img src="../modules/'.$this->name.'/next.png"> '.round(100 * $orders / max(1, $customers), 2).' % <img src="../modules/'.$this->name.'/next.png">
@@ -333,11 +333,11 @@ class StatsForecast extends Module
<img src="../modules/'.$this->name.'/next.png"> <b>'.round(100 * $orders / max(1, $visitors), 2).' %</b> <img src="../modules/'.$this->name.'/next.png">
</span>
<span style="float:left;text-align:center;margin-right:10px">'.$this->l('Orders').'</span>
<div class="clear">&nbsp;</div>
'.$this->l('Turn your visitors into money:').'
<br />'.$this->l('Each visitor yields').' <b>'.Tools::displayPrice($ca['ventil']['total'] / max(1, $visitors), $currency).'.</b>
<br />'.$this->l('Each registered visitor yields').' <b>'.Tools::displayPrice($ca['ventil']['total'] / max(1, $customers), $currency).'</b>.
</fieldset>';
</div>';
$from = strtotime($employee->stats_date_from.' 00:00:00');
$to = strtotime($employee->stats_date_to.' 23:59:59');
@@ -346,8 +346,8 @@ class StatsForecast extends Module
$this->_html .= '
<br />';
$this->_html .= '<fieldset><legend id="payment"><img src="../img/t/AdminPayment.gif" />'.$this->l('Payment distibution').'</legend>
<form id="cat" action="'.$ru.'#payment" method="post" style="float:right">
$this->_html .= '<div class="blocStats"><h2>'.$this->l('Payment distibution').'</h2>
<form id="cat" action="'.$ru.'#payment" method="post" >
<input type="hidden" name="submitIdZone" value="1" />
'.$this->l('Zone:').' <select name="stats_id_zone" onchange="this.form.submit();">
<option value="0">'.$this->l('-- No filter --').'</option>';
@@ -355,7 +355,7 @@ class StatsForecast extends Module
$this->_html .= '<option value="'.(int)$zone['id_zone'].'" '.($this->context->cookie->stats_id_zone == $zone['id_zone'] ? 'selected="selected"' : '').'>'.$zone['name'].'</option>';
$this->_html .= '</select>
</form>
<table class="table float" border="0" cellspacing="0" cellspacing="0">
<table class="table" border="0" cellspacing="0" cellspacing="0">
<tr><th>'.$this->l('Module').'</th><th>'.$this->l('Count').'</th><th>'.$this->l('Total').'</th><th>'.$this->l('Cart').'</th></tr>';
foreach ($ca['payment'] as $payment)
$this->_html .= '
@@ -367,10 +367,10 @@ class StatsForecast extends Module
</tr>';
$this->_html .= '
</table>
</fieldset>
</div>
<br />
<fieldset><legend><img src="../img/t/AdminCatalog.gif" /> '.$this->l('Category distribution').'</legend>
<form id="cat" action="'.$ru.'#cat" method="post" style="float:right">
<div class="blocStats"><h2>'.$this->l('Category distribution').'</h2>
<form id="cat" action="'.$ru.'#cat" method="post" >
<input type="hidden" name="submitIdZone" value="1" />
'.$this->l('Zone:').' <select name="stats_id_zone" onchange="this.form.submit();">
<option value="0">'.$this->l('-- No filter --').'</option>';
@@ -378,7 +378,7 @@ class StatsForecast extends Module
$this->_html .= '<option value="'.(int)$zone['id_zone'].'" '.($this->context->cookie->stats_id_zone == $zone['id_zone'] ? 'selected="selected"' : '').'>'.$zone['name'].'</option>';
$this->_html .= ' </select>
</form>
<table class="table float" border="0" cellspacing="0" cellspacing="0">
<table class="table" border="0" cellspacing="0" cellspacing="0">
<tr><th style="width:50px">'.$this->l('Category').'</th><th>'.$this->l('Count').'</th><th>'.$this->l('Sales').'</th><th>'.$this->l('% Count').'</th><th>'.$this->l('% Sales').'</th><th>'.$this->l('Avg price').'</th></tr>';
foreach ($ca['cat'] as $catrow)
$this->_html .= '
@@ -392,9 +392,9 @@ class StatsForecast extends Module
</tr>';
$this->_html .= '
</table>
</fieldset>
</div>
<br />
<fieldset><legend><img src="../img/t/AdminLanguages.gif" /> '.$this->l('Language distribution').'</legend>
<div class="blocStats"><h2>'.$this->l('Language distribution').'</h2>
<table class="table" border="0" cellspacing="0" cellspacing="0">
<tr><th>'.$this->l('Customers').'</th><th>'.$this->l('Sales').'</th><th>'.$this->l('%').'</th><th colspan="2">'.$this->l('Growth').'</th></tr>';
foreach ($ca['lang'] as $ophone => $amount)
@@ -411,9 +411,9 @@ class StatsForecast extends Module
}
$this->_html .= '
</table>
</fieldset>
</div>
<br />
<fieldset><legend><img src="../img/t/AdminLanguages.gif" />'.$this->l('Zone distribution').'</legend>
<div class="blocStats"><h2>'.$this->l('Zone distribution').'</h2>
<table class="table" border="0" cellspacing="0" cellspacing="0">
<tr><th>'.$this->l('Zone').'</th><th>'.$this->l('Count').'</th><th>'.$this->l('Total').'</th><th>'.$this->l('% Count').'</th><th>'.$this->l('% Sales').'</th></tr>';
foreach ($ca['zones'] as $zone)
@@ -427,10 +427,10 @@ class StatsForecast extends Module
</tr>';
$this->_html .= '
</table>
</fieldset>
</div>
<br />
<fieldset><legend id="currencies"><img src="../img/t/AdminCurrencies.gif" />'.$this->l('Currency distribution').'</legend>
<form id="cat" action="'.$ru.'#currencies" method="post" style="float:right">
<div class="blocStats"><h2>'.$this->l('Currency distribution').'</h2>
<form id="cat" action="'.$ru.'#currencies" method="post" >
<input type="hidden" name="submitIdZone" value="1" />
'.$this->l('Zone:').' <select name="stats_id_zone" onchange="this.form.submit();">
<option value="0">'.$this->l('-- No filter --').'</option>';
@@ -451,9 +451,9 @@ class StatsForecast extends Module
</tr>';
$this->_html .= '
</table>
</fieldset>
</div>
<br />
<fieldset><legend><img src="../img/t/AdminCatalog.gif" />'.$this->l('Attribute distribution').'</legend>
<div class="blocStats"><h2>'.$this->l('Attribute distribution').'</h2>
<table class="table" border="0" cellspacing="0" cellspacing="0">
<tr><th>'.$this->l('Group').'</th><th>'.$this->l('Attribute').'</th><th>'.$this->l('Count').'</th></tr>';
foreach ($ca['attributes'] as $attribut)
@@ -464,7 +464,7 @@ class StatsForecast extends Module
<td align="right">'.(int)($attribut['total']).'</td>
</tr>';
$this->_html .= '</table>
</fieldset>
</div>
</div>';
return $this->_html;