Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Jerome Nadaud
2013-08-27 18:57:09 +02:00
6 changed files with 373 additions and 223 deletions
+116 -27
View File
@@ -353,7 +353,7 @@ small {
cite { cite {
font-style: normal; } font-style: normal; }
.text-muted { .text-muted, .hook_panel .module_description, .hook_panel_header .hook_description {
color: #999999; } color: #999999; }
.text-primary { .text-primary {
@@ -3966,7 +3966,7 @@ a.list-group-item {
.panel-info > .panel-footer + .panel-collapse .panel-body, #header_notifs_icon_wrapper .notifs_panel .panel-info > .notifs_panel_footer + .panel-collapse .panel-body { .panel-info > .panel-footer + .panel-collapse .panel-body, #header_notifs_icon_wrapper .notifs_panel .panel-info > .notifs_panel_footer + .panel-collapse .panel-body {
border-bottom-color: #bce8f1; } border-bottom-color: #bce8f1; }
.well { .well, .hook_panel {
min-height: 20px; min-height: 20px;
padding: 19px; padding: 19px;
margin-bottom: 20px; margin-bottom: 20px;
@@ -3975,7 +3975,7 @@ a.list-group-item {
border-radius: 3px; border-radius: 3px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); }
.well blockquote { .well blockquote, .hook_panel blockquote {
border-color: #ddd; border-color: #ddd;
border-color: rgba(0, 0, 0, 0.15); } border-color: rgba(0, 0, 0, 0.15); }
@@ -5449,7 +5449,7 @@ a .icon-flip-vertical:before {
.icon-repeat:before { .icon-repeat:before {
content: "\f01e"; } content: "\f01e"; }
.icon-refresh:before { .icon-refresh:before, .process-icon-refresh:before {
content: "\f021"; } content: "\f021"; }
.icon-list-alt:before { .icon-list-alt:before {
@@ -6228,7 +6228,7 @@ a .icon-flip-vertical:before {
.icon-css3:before { .icon-css3:before {
content: "\f13c"; } content: "\f13c"; }
.icon-anchor:before { .icon-anchor:before, .process-icon-anchor:before {
content: "\f13d"; } content: "\f13d"; }
.icon-unlock-alt:before { .icon-unlock-alt:before {
@@ -7044,21 +7044,6 @@ input[type="password"].input-tiny {
width: 80px; width: 80px;
float: left; } float: left; }
.fixed-width-XS {
width: 40px; }
.fixed-width-S {
width: 80px; }
.fixed-width-M {
width: 120px; }
.fixed-width-L {
width: 160px; }
.fixed-width-XL {
width: 200px; }
.btn-group-action { .btn-group-action {
display: inline-block; display: inline-block;
white-space: nowrap; } white-space: nowrap; }
@@ -7133,12 +7118,6 @@ hr {
.table tr th:last-child { .table tr th:last-child {
border-top-right-radius: 3px; border-top-right-radius: 3px;
border-bottom-right-radius: 3px; } border-bottom-right-radius: 3px; }
.table .btn-group {
float: right; }
.table .btn-group .btn {
float: left; }
.table .btn {
float: right; }
tr.filter { tr.filter {
background-color: #c5c5c5; } background-color: #c5c5c5; }
@@ -7223,11 +7202,28 @@ tr.filter {
color: white; color: white;
cursor: pointer; cursor: pointer;
font-size: 16px; font-size: 16px;
background-color: rgba(0, 0, 0, 0.8); } background-color: rgba(0, 0, 0, 0.5); }
#footer #go-top:hover {
background-color: black; }
#nobootstrap { #nobootstrap {
float: left; } float: left; }
.fixed-width-XS {
width: 40px; }
.fixed-width-S {
width: 80px; }
.fixed-width-M {
width: 120px; }
.fixed-width-L {
width: 160px; }
.fixed-width-XL {
width: 200px; }
.box-stats { .box-stats {
padding: 10px; padding: 10px;
margin-bottom: 20px; margin-bottom: 20px;
@@ -7334,3 +7330,96 @@ tr.filter {
display: inline; } display: inline; }
#topbar .submenu { #topbar .submenu {
display: none; } display: none; }
.hook_panel {
-webkit-box-shadow: rgba(255, 255, 255, 0.9) 0 0 0 1px inset;
box-shadow: rgba(255, 255, 255, 0.9) 0 0 0 1px inset;
padding: 10px 10px 5px 10px;
margin-bottom: 3px !important; }
.hook_panel .module_name {
font-size: 1.2em; }
.hook_panel_header {
margin: 0 -10px 0 -10px;
padding: 0 10px 10px 10px; }
.hook_panel_header .hook_name {
font-weight: 400;
font-size: 1.2em;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
color: #1d7878;
border: solid 1px #cccccc;
background-color: white;
padding: 0 4px; }
.hook_panel_header .hook_title {
text-transform: uppercase;
font-size: 1em; }
.hook_panel_header .hook_description {
padding: 3px 0 0 3px; }
.module_list .module_list_item {
display: table;
width: 100%;
padding: 5px 0;
margin-bottom: 4px;
background-color: white;
-webkit-box-shadow: rgba(0, 0, 0, 0.3) 0 0 3px, rgba(0, 0, 0, 0.1) 0 -2px 0 inset;
box-shadow: rgba(0, 0, 0, 0.3) 0 0 3px, rgba(0, 0, 0, 0.1) 0 -2px 0 inset;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px; }
.module_col_select {
display: table-cell;
vertical-align: middle;
text-align: center;
width: 22px;
min-height: 35px;
border-right: 1px solid #dddddd; }
.module_col_position {
display: table-cell;
vertical-align: middle;
width: 50px;
text-align: right; }
.module_col_position .positions {
font-family: "Ubuntu", sans-serif;
font-weight: 200;
text-shadow: white 1px 1px;
padding: 0 5px;
font-size: 1.6em;
color: #aaaaaa;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 3px inset;
box-shadow: rgba(0, 0, 0, 0.2) 0 1px 3px inset;
border: solid 1px #cccccc;
background-color: #eeeeee; }
.module_col_icon {
display: table-cell;
text-align: center;
vertical-align: middle;
width: 50px; }
.module_col_infos {
display: table-cell;
vertical-align: middle;
height: 50px; }
.module_col_actions {
width: 160px;
display: table-cell;
vertical-align: middle;
text-align: right;
padding: 0 10px; }
.module_col_actions .btn-group {
text-align: left; }
+114 -22
View File
@@ -116,6 +116,7 @@ html, body
margin: 0 margin: 0
.notifs_panel_footer .notifs_panel_footer
@extend .panel-footer @extend .panel-footer
#header_nav_toggle #header_nav_toggle
background-color: black background-color: black
border: none border: none
@@ -507,6 +508,10 @@ html, body
@extend .icon-remove @extend .icon-remove
.process-icon-new-url .process-icon-new-url
@extend .icon-plus-sign-alt @extend .icon-plus-sign-alt
.process-icon-anchor
@extend .icon-anchor
.process-icon-refresh
@extend .icon-refresh
.navbar-inner .navbar-inner
box-shadow: none!important box-shadow: none!important
@@ -544,18 +549,6 @@ input[type="password"].input-tiny
width: 80px width: 80px
float: left float: left
//some helpers to get fixed width
.fixed-width-XS
width: 40px
.fixed-width-S
width: 80px
.fixed-width-M
width: 120px
.fixed-width-L
width: 160px
.fixed-width-XL
width: 200px
.btn-group-action .btn-group-action
display: inline-block display: inline-block
white-space: nowrap white-space: nowrap
@@ -632,12 +625,6 @@ hr
tr th:last-child tr th:last-child
border-top-right-radius: 3px border-top-right-radius: 3px
border-bottom-right-radius: 3px border-bottom-right-radius: 3px
.btn-group
float: right
.btn
float: left
.btn
float: right
//filter table //filter table
tr.filter tr.filter
@@ -723,7 +710,9 @@ tr.filter
color: #fff color: #fff
cursor: pointer cursor: pointer
font-size: 16px font-size: 16px
background-color: rgba(0,0,0,0.8) background-color: rgba(0,0,0,0.5)
&:hover
background-color: black
#nobootstrap #nobootstrap
float: left float: left
@@ -731,12 +720,27 @@ tr.filter
//WIP //WIP
//some helpers to get fixed width
.fixed-width-XS
width: 40px
.fixed-width-S
width: 80px
.fixed-width-M
width: 120px
.fixed-width-L
width: 160px
.fixed-width-XL
width: 200px
// temp fix for latest bootstrap
input[type="text"],input[type="search"],input[type="password"], textarea, select input[type="text"],input[type="search"],input[type="password"], textarea, select
@extend .form-control @extend .form-control
fieldset > .row fieldset > .row
@extend .form-group @extend .form-group
.box-stats .box-stats
padding: 10px padding: 10px
margin-bottom: 20px margin-bottom: 20px
@@ -806,7 +810,7 @@ fieldset > .row
.highlighted .highlighted
background-color: blue background-color: blue
.list-toolbar-btn //.list-toolbar-btn
#topbar #topbar
@@ -835,4 +839,92 @@ fieldset > .row
li li
display: inline display: inline
.submenu .submenu
display: none display: none
.hook_panel
@extend .well
//@include background-image(linear-gradient(#fff, #ccc))
//@include box-shadow(rgba(black,0.10) 0 -2px 0 inset)
@include box-shadow(rgba(white,0.9) 0 0 0 1px inset)
padding: 10px 10px 5px 10px
margin-bottom: 3px!important
.module_name
font-size: 1.2em
.module_description
@extend .text-muted
.hook_panel_header
margin: 0 -10px 0 -10px
padding: 0 10px 10px 10px
.hook_name
font-weight: 400
font-size: 1.2em
@include border-radius(3px)
color: $brand-primary
border: solid 1px #ccc
background-color: white
padding: 0 4px
.hook_title
text-transform: uppercase
font-size: 1em
.hook_description
@extend .text-muted
padding: 3px 0 0 3px
.module_list
//@extend .list-group
.module_list_item
display: table
width: 100%
padding: 5px 0
margin-bottom: 4px
background-color: white
@include box-shadow(rgba(0,0,0,0.3) 0 0 3px,rgba(black,0.10) 0 -2px 0 inset)
@include border-radius(3px)
.module_col_select
display: table-cell
vertical-align: middle
text-align: center
width: 22px
min-height: 35px
border-right: 1px solid #ddd
.module_col_position
display: table-cell
vertical-align: middle
width: 50px
text-align: right
.positions
font-family: $headings-font-family
font-weight: 200
@include text-shadow(white 1px 1px)
padding: 0 5px
font-size: 1.6em
color: #aaa
@include border-radius(3px)
@include box-shadow(rgba(0,0,0,0.2) 0 1px 3px inset)
border: solid 1px #ccc
background-color: #eee
.module_col_icon
display: table-cell
text-align: center
vertical-align: middle
width: 50px
.module_col_infos
display: table-cell
vertical-align: middle
height: 50px
.module_col_actions
width: 160px
display: table-cell
vertical-align: middle
text-align: right
padding: 0 10px
.btn-group
text-align: left
@@ -24,6 +24,7 @@
*} *}
{if isset($module_content)} {if isset($module_content)}
{$module_content} {$module_content}
{else} {else}
{if !isset($smarty.get.configure)} {if !isset($smarty.get.configure)}
@@ -32,178 +32,141 @@
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
<div>{block name="leadin"}{/block}</div> <div>{block name="leadin"}{/block}</div>
<div class="well">
<form class="form-inline">
<label>{l s='Show'} :</label>
<span>
<select id="show_modules" onChange="autoUrl('show_modules', '{$url_show_modules}')" class="filter fixed-width-XL">
<option value="all">{l s='All modules'}&nbsp;</option>
<option>---------------</option>
{foreach $modules as $module}
<option value="{$module->id|intval}" {if $display_key == $module->id}selected="selected"{/if}>{$module->displayName}</option>
{/foreach}
</select>
</span>
<p class="checkbox">
<label class="control-label" for="hook_position">
<input type="checkbox" id="hook_position" onclick="autoUrlNoList('hook_position', '{$url_show_invisible}')" {if $hook_position}checked="checked"{/if} />
{l s='Display non-positionable hooks'}
</label>
</p>
</form>
</div>
<div class="row"> <div class="row">
<div id="modulePosition"> <div class="col-lg-9">
<div class="col-lg-9"> <div class="panel">
<form method="post" action="{$url_submit}"> <form class="form-inline well">
<span class="pull-right"> <label>{l s='Show'} :</label>
<button type="submit" class="btn btn-default" name="unhookform" onclick="modules_management('install')"> <span>
<i class="icon-minus-sign-alt"></i> <select id="show_modules" onChange="autoUrl('show_modules', '{$url_show_modules}')" class="filter fixed-width-XL">
{l s='Unhook the selection'} <option value="all">{l s='All modules'}&nbsp;</option>
</button> <option>---------------</option>
{foreach $modules as $module}
<option value="{$module->id|intval}" {if $display_key == $module->id}selected="selected"{/if}>{$module->displayName}</option>
{/foreach}
</select>
</span> </span>
{if !$can_move} <p class="checkbox">
<label class="control-label" for="hook_position">
<input type="checkbox" id="hook_position" onclick="autoUrlNoList('hook_position', '{$url_show_invisible}')" {if $hook_position}checked="checked"{/if} />
{l s='Display non-positionable hooks'}
</label>
</p>
</form>
<div id="modulePosition">
<form method="post" action="{$url_submit}" >
{if !$can_move}
<span class="alert"> <span class="alert">
{l s='If you want to order/move the following data, please select a shop from the shop list.'} {l s='If you want to order/move the following data, please select a shop from the shop list.'}
</span> </span>
{/if} {/if}
{foreach $hooks as $hook}
{foreach $hooks as $hook} <section class="hook_panel">
<div class="row-light clearfix">
<a name="{$hook['name']}"></a> <a name="{$hook['name']}"></a>
<table class="table {if $hook['module_count'] >= 2} tableDnD{/if}" id="{$hook['id_hook']}"> <header class="hook_panel_header">
<colgroup> <span class="hook_name">{$hook['name']}</span>
<col width="10"> <span class="hook_title">{$hook['title']}</span>
<col width="30">
<col width="40"> <span class="badge pull-right">
<col width=""> {if $hook['module_count'] && $can_move}
<col width="50"> <input type="checkbox" id="Ghook{$hook['id_hook']}" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/>
</colgroup> {/if}
<thead> {$hook['module_count']} {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if}
<tr class="nodrag nodrop"> </span>
{if $hook['module_count'] && $can_move} {if !empty($hook['description'])}
<th> <div class="hook_description">{$hook['description']}</div>
<input type="checkbox" id="Ghook{$hook['id_hook']}" style="margin-right: 2px;" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/> {/if}
</th> </header>
{/if}
<th colspan="5"> {if $hook['module_count']}
<h3> <section class="module_list">
{$hook['title']} - {foreach $hook['modules'] as $position => $module}
<span class="badge">{$hook['module_count']} {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if} </span> {if isset($module['instance'])}
<span>({l s='Technical name: '}{$hook['name']})</span> <div id="{$hook['id_hook']}_{$module['instance']->id}" class="module_list_item">
</h3> <div class="module_col_select">
</th> <input type="checkbox" id="mod{$hook['id_hook']}_{$module['instance']->id}" class="hook{$hook['id_hook']}" onclick="hookCheckboxes({$hook['id_hook']}, 1, this)" name="unhooks[]" value="{$hook['id_hook']}_{$module['instance']->id}"/>
</tr> </div>
</thead> {if !$display_key}
<tbody> <div class="module_col_position" {if $can_move && $hook['module_count'] >= 2}class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}">
{if !empty($hook['description'])} <span class="positions">{$module@iteration}</span>
<tr> {if $can_move}
<td colspan="5"> <a class="btn btn-default" {if {$module@iteration} == 1} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=0&token={$token}&changePosition#{$hook['name']}">
<p class="text-muted"> <i class="icon-chevron-up"></i>
[{$hook['description']}] </a>
</p>
</td> <a class="btn btn-default" {if {$module@iteration} == count($hook['modules'])} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=1&token={$token}&changePosition#{$hook['name']}">
</tr> <i class="icon-chevron-down"></i>
{/if} </a>
{if $hook['module_count']} {/if}
{foreach $hook['modules'] as $position => $module} </div>
{if isset($module['instance'])} {/if}
<tr id="{$hook['id_hook']}_{$module['instance']->id}" {cycle values='class="alt_row",'}> <div class="module_col_icon">
<td align="center"> <img src="../modules/{$module['instance']->name}/logo.png" alt="{$module['instance']->name|stripslashes}" />
<input type="checkbox" id="mod{$hook['id_hook']}_{$module['instance']->id}" class="hook{$hook['id_hook']}" onclick="hookCheckboxes({$hook['id_hook']}, 1, this)" name="unhooks[]" value="{$hook['id_hook']}_{$module['instance']->id}"/> </div>
</td> <div class="module_col_infos"><span class="module_name">
{if !$display_key} {$module['instance']->displayName|stripslashes} {if $module['instance']->version}
<td align="center" class="positions">{$module@iteration}</td> <small class="text-muted">&nbsp;-&nbsp;v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}</small>{/if}
<td {if $can_move && $hook['module_count'] >= 2} align=center class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}"> </span>
{if $can_move} <div class="module_description">{$module['instance']->description}</div></div>
<a {if {$module@iteration} == 1} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=0&token={$token}&changePosition#{$hook['name']}"> <div class="module_col_actions">
<img src="../img/admin/up.gif" alt="{l s='Up'}" title="{l s='Up'}" /> <!-- <div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}"></div> -->
</a><br />
<a {if {$module@iteration} == count($hook['modules'])} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=1&token={$token}&changePosition#{$hook['name']}">
<img src="../img/admin/down.gif" alt="{l s='Down'}" title="{l s='Down'}" />
</a>
{/if} <div class="btn-group">
</td> <a class="btn btn-default" href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&editGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
<td> <i class="icon-pencil"></i>
<div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}"> {l s='Edit'}
{else} </a>
<td colspan="3"> <a class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}"> <span class="caret"></span>&nbsp;
{/if} </a>
<h4> <ul class="dropdown-menu">
<img src="../modules/{$module['instance']->name}/logo.png" alt="{$module['instance']->name|stripslashes}" /> <li>
{$module['instance']->displayName|stripslashes} <a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&deleteGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
</h4> <i class="icon-minus-sign-alt"></i>
<dl class="dl-horizontal"> {l s='Unhook'}
<dt>{l s='Version:'}</dt> </a>
<dd> </li>
{if $module['instance']->version}v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}{/if} </ul>
</dd> </div>
<dt>{l s='Description:'}</dt> </div>
<dd>
{$module['instance']->description} </div>
</dd>
</dl> {/if}
</div> {/foreach}
</td> </section>
<td> {else}
<div class="btn-group btn-group-action"> <!-- <p>{l s='No module was found for this hook.'}</p> -->
<span class="btn btn-default">{l s='Choose an action'}</span> {/if}
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"> </section>
<span class="caret"></span>&nbsp; {/foreach}
</button> <div id="unhook_button_position_bottom">
<ul class="dropdown-menu"> <button type="submit" class="btn btn-default" name="unhookform">
<li> <i class="icon-minus-sign-alt"></i>
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&editGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}"> {l s='Unhook the selection'}
<i class="icon-pencil"></i> </button>
{l s='Edit'}
</a>
</li>
<li>
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&deleteGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
<i class="icon-trash"></i>
{l s='Delete'}
</a>
</li>
</ul>
</div>
</td>
</tr>
{/if}
{/foreach}
{else}
<tr>
<td colspan="5">
<p class="text-warning">{l s='No module was found for this hook.'}</p>
</td>
</tr>
{/if}
</tbody>
</table>
</div> </div>
{/foreach} </form>
<div id="unhook_button_position_bottom"> </div>
<span class="pull-right">
<button type="submit" class="btn btn-default" name="unhookform">
<i class="icon-minus-sign-alt"></i>
{l s='Unhook the selection'}
</button>
</span>
</div>
</form>
</div> </div>
<div class="col-lg-3"> </div>
<h2>{l s='LiveEdit'}</h2> <div class="col-lg-3">
<div class="panel">
<h3><i class="icon-eye-open"></i> {l s='LiveEdit'}</h3>
{if $live_edit} {if $live_edit}
<p>{l s='You have to select a shop to use LiveEdit'}</p> <p>{l s='You have to select a shop to use LiveEdit'}</p>
{else} {else}
<p>{l s='Click here to be redirected to the Front Office of your shop where you can move and delete modules directly.'}</p> <p>{l s='Click here to be redirected to the Front Office of your shop where you can move and delete modules directly.'}</p>
<a class="btn btn-default pull-right" href="{$url_live_edit}" target="_blank"> <a class="btn btn-default" href="{$url_live_edit}" target="_blank">
<i class="icon-edit"></i> <i class="icon-edit"></i>
{l s='Run LiveEdit'} {l s='Run LiveEdit'}
</a> </a>
{/if} {/if}
</div> </div>
</div> </div>
</div> </div>
@@ -58,6 +58,12 @@
{/if} {/if}
</div> </div>
<div id="go-top"><i class="icon-arrow-up"></i></div> <div id="go-top"><i class="icon-arrow-up"></i></div>
<script>
$("#go-top").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});
</script>
</div> </div>
<div id="ajax_confirmation" style="display:none"></div> <div id="ajax_confirmation" style="display:none"></div>
{* ajaxBox allows*} <div id="ajaxBox" style="display:none"></div> {* ajaxBox allows*} <div id="ajaxBox" style="display:none"></div>
+16 -17
View File
@@ -691,35 +691,33 @@ class AdminModulesControllerCore extends AdminController
$hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id; $hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id;
$tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&type=modules&lang='; $tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&type=modules&lang=';
$toolbar = '<table class="table" cellpadding="0" cellspacing="0" style="margin:auto;text-align:center"><tr> $language = '';
<th>'.$this->l('Module').' <span style="color: green;">'.$module->name.'</span></th> foreach (Language::getLanguages(false) as $language)
<th><a href="'.$backlink.'" style="padding:5px 10px">'.$this->l('Back').'</a></th> $language .= '<a href="'.$tradlink.$language['iso_code'].'#'.$module->name.'" ><img src="'._THEME_LANG_DIR_.$language['id_lang'].'.jpg" alt="'.$language['iso_code'].'" title="'.$language['iso_code'].'" /></a>';
<th><a href="'.$hooklink.'" style="padding:5px 10px">'.$this->l('Manage hooks').'</a></th>
<th style="padding:5px 10px">'.$this->l('Manage translations').' ';
foreach (Language::getLanguages(false) as $language)
$toolbar .= '<a href="'.$tradlink.$language['iso_code'].'#'.$module->name.'" style="margin-left:5px"><img src="'._THEME_LANG_DIR_.$language['id_lang'].'.jpg" alt="'.$language['iso_code'].'" title="'.$language['iso_code'].'" /></a>';
$toolbar .= '</th></tr>';
$this->context->smarty->assign(array(
'module_name' => $module->name,
'backlink' => $backlink,
'module_hooklink' => $hooklink,
'module_language' => $language
));
// Display checkbox in toolbar if multishop // Display checkbox in toolbar if multishop
if (Shop::isFeatureActive()) if (Shop::isFeatureActive())
{ {
$activateOnclick = 'onclick="location.href = \''.$this->getCurrentUrl('enable').'&enable=\'+(($(this).attr(\'checked\')) ? 1 : 0)"'; $activateOnclick = 'onclick="location.href = \''.$this->getCurrentUrl('enable').'&enable=\'+(($(this).attr(\'checked\')) ? 1 : 0)"';
$toolbar .= '<tr> $multishop = '<input type="checkbox" name="activateModule" value="1" '.(($module->active) ? 'checked="checked"' : '').' '.$activateOnclick.' /> '.$this->l('Activate module for').' ';
<th colspan="4">
<input type="checkbox" name="activateModule" value="1" '.(($module->active) ? 'checked="checked"' : '').' '.$activateOnclick.' /> '.$this->l('Activate module for').' ';
if (Shop::getContext() == Shop::CONTEXT_SHOP) if (Shop::getContext() == Shop::CONTEXT_SHOP)
$toolbar .= 'shop <b>'.$this->context->shop->name.'</b>'; $toolbar .= 'shop <b>'.$this->context->shop->name.'</b>';
elseif (Shop::getContext() == Shop::CONTEXT_GROUP) elseif (Shop::getContext() == Shop::CONTEXT_GROUP)
{ {
$shop_group = new ShopGroup((int)Shop::getContextShopGroupID()); $shop_group = new ShopGroup((int)Shop::getContextShopGroupID());
$toolbar .= 'all shops of group shop <b>'.$shop_group->name.'</b>'; $multishop .= 'all shops of group shop <b>'.$shop_group->name.'</b>';
} }
else else
$toolbar .= 'all shops'; $multishop .= 'all shops';
$toolbar .= '</th>
</tr>';
} }
$toolbar .= '</table>';
if (Shop::isFeatureActive() && isset(Context::getContext()->tmpOldShop)) if (Shop::isFeatureActive() && isset(Context::getContext()->tmpOldShop))
@@ -728,7 +726,8 @@ class AdminModulesControllerCore extends AdminController
unset(Context::getContext()->tmpOldShop); unset(Context::getContext()->tmpOldShop);
} }
// Display module configuration // Display module configuration
$this->context->smarty->assign('module_content', $toolbar.'<div class="clear">&nbsp;</div>'.$echo.'<div class="clear">&nbsp;</div>'.$toolbar); $header = $this->context->smarty->fetch('controllers/modules/configure.tpl');
$this->context->smarty->assign('module_content', $header.$echo );
} }
elseif ($echo === true) elseif ($echo === true)
{ {