Inital commit
This commit is contained in:
@@ -1,131 +1,44 @@
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='bo.default'}
|
||||
|
||||
{form name="thelia.export"}
|
||||
<form action="{$URL}" method="post" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
<div class="modal fade" id="real-export-modal" tabindex="-1" role="dialog" aria-labelledby="export-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="export-modal-label">Export: {$TITLE}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{if $DESCRIPTION}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info">
|
||||
{$DESCRIPTION nofilter}
|
||||
</div>
|
||||
</div>
|
||||
{loop type="export" name="export" id=$exportId}
|
||||
{form name="thelia.export"}
|
||||
<form action="{$URL nofilter}" method="post" {form_enctype}>
|
||||
{form_hidden_fields}
|
||||
|
||||
<div id="real-export-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="export-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button class="close" type="button" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span><span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 id="export-modal-label" class="modal-title">
|
||||
{intl l="Export"} : {$TITLE}
|
||||
</h4>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{ifloop rel="export-formatters"}
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="formatter"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<select name="{$name}" id="{$label_attr.for}">
|
||||
{loop name="export-formatters" type="formatter" export=$ID}
|
||||
<option value="{$NAME}" {if $value == $NAME}selected{/if}>
|
||||
{$NAME} (.{$EXTENSION})
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{form_field form=$form field="language"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<select id="{$label_attr.for}" name="{$name}" required>
|
||||
{loop name="export-lang" type="lang"}
|
||||
<option value="{$ID}" {if $ID == $CURRENT_LANG_ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
{ifloop rel="export-archive-builder"}
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="do_compress"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<div data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-on="success" class="make-switch switch-small" id="export-compression-switch">
|
||||
<input type="checkbox" name="{$name}" id="{$label_attr.for}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row export-compression-selection-row">
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="archive_builder"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<select name="{$name}" id="{$label_attr.for}">
|
||||
{loop name="export-archive-builder" type="archive-builder"}
|
||||
<option value="{$NAME}" {if $value == $NAME}selected{/if}>
|
||||
{$NAME} (.{$EXTENSION})
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
{if $HAS_IMAGES}
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="images"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
|
||||
<div data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-on="success" class="make-switch switch-small">
|
||||
<input type="checkbox" name="{$name}" id="{$label_attr.for}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
{/if}
|
||||
{if $HAS_DOCUMENTS}
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="documents"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<div class="modal-body">
|
||||
{hook name="export.top" type="modal" id=$ID}
|
||||
|
||||
<div data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-on="success" class="make-switch switch-small">
|
||||
<input type="checkbox" name="{$name}" id="{$label_attr.for}" />
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
{/if}
|
||||
{/ifloop}
|
||||
{include 'includes/export-form-body.html'}
|
||||
|
||||
{hook name="export.bottom" type="modal" id=$ID}
|
||||
</div>
|
||||
|
||||
{ifloop rel="serializer"}
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default" type="button" data-dismiss="modal">
|
||||
{intl l="Close"}
|
||||
</button>
|
||||
<button class="btn btn-primary" type="submit">
|
||||
{intl l="Do this export"}
|
||||
</button>
|
||||
</div>
|
||||
{/ifloop}
|
||||
{elseloop rel="export-formatters"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
{intl l="You can't do exports, you don't have any formatter that handles this."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{intl l="Close"}</button>
|
||||
<button type="submit" class="btn btn-primary">{intl l="Export"}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</form>
|
||||
{/form}
|
||||
{/loop}
|
||||
|
||||
@@ -1,58 +1,38 @@
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='bo.default'}
|
||||
|
||||
{form name="thelia.import"}
|
||||
<form action="{$URL}" method="post" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
<div class="modal fade" id="real-import-modal" tabindex="-1" role="dialog" aria-labelledby="import-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="import-modal-label">Import: {$TITLE}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{if $DESCRIPTION}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info">
|
||||
{$DESCRIPTION nofilter}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{form_field form=$form field="language"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<select id="{$label_attr.for}" name="{$name}" required>
|
||||
{loop name="import-lang" type="lang"}
|
||||
<option value="{$ID}" {if $ID == $CURRENT_LANG_ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{form_field form=$form field="file_upload"}
|
||||
<label form="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
{loop type="import" name="import" id=$importId}
|
||||
{form name="thelia.import"}
|
||||
<form action="{$URL nofilter}" method="post" {form_enctype}>
|
||||
{form_hidden_fields}
|
||||
|
||||
<input type="file" required aria-required="true" name="{$name}" id="{$label_attr.for}" accept="{$ALLOWED_MIME_TYPES}"/>
|
||||
<div class="small">Accepted formats: {$ALLOWED_EXTENSIONS}</div>
|
||||
{/form_field}
|
||||
<div id="real-import-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="import-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button class="close" type="button" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span><span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 id="import-modal-label" class="modal-title">
|
||||
{intl l="Import"} : {$TITLE}
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
{include 'includes/import-form-body.html'}
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default" type="button" data-dismiss="modal">
|
||||
{intl l="Close"}
|
||||
</button>
|
||||
<button class="btn btn-primary" type="submit">
|
||||
{intl l="Import this file"}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary" title="{intl l="Import this file"}">{intl l="Import this file"}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</form>
|
||||
{/form}
|
||||
{/loop}
|
||||
|
||||
@@ -8,60 +8,68 @@
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "edit_lang_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
{form_field field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label} }" placeholder="{intl l='Label'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='code'}
|
||||
{form_field field='code'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Company'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='ISO Code'}">
|
||||
<span class="help-block">{intl l='<a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes" target="_other">Check the list</a> of ISO 639-1 codes'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
{form_field field='locale'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Company'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='en_US'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='date_format'}
|
||||
{form_field field='date_time_format'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Company'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='d-m-Y H:i:s'}">
|
||||
<span class="help-block">{intl l='The syntax used is identical to the PHP <a href="http://www.php.net/date" target="_other">date()</a> function'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='time_format'}
|
||||
{form_field field='date_format'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Company'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='d-m-Y'}">
|
||||
<span class="help-block">{intl l='The syntax used is identical to the PHP <a href="http://www.php.net/date" target="_other">date()</a> function'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='decimal_separator'}
|
||||
|
||||
{form_field field='time_format'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='H:i:s'}">
|
||||
<span class="help-block">{intl l='The syntax used is identical to the PHP <a href="http://www.php.net/date" target="_other">date()</a> function'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field field='decimal_separator'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='eg: . or ,'}">
|
||||
<span class="help-block">{intl l='Sets the separator for the decimal point'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='thousands_separator'}
|
||||
{form_field field='thousands_separator'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}">
|
||||
<span class="help-block">{intl l='Sets the thousands separator.'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='decimals'}
|
||||
{form_field field='decimals'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="2">
|
||||
@@ -73,19 +81,19 @@
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "edit_lang_dialog"
|
||||
dialog_title = {intl l="Edit a language"}
|
||||
dialog_body = {$smarty.capture.edit_lang_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Save changes"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
dialog_ok_label = {intl l="Save changes"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path="/admin/configuration/languages/save/{$lang_id}"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
form_action = {url path="/admin/configuration/languages/save/%id" id=$lang_id}
|
||||
form_enctype = {form_enctype}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
|
||||
{/form}
|
||||
@@ -2,9 +2,7 @@
|
||||
<ul id="logger-content">
|
||||
{foreach $entries as $entry}
|
||||
<li class="entry">
|
||||
<span class="head">{$entry.head}</span>
|
||||
:
|
||||
<span class="data">{$entry.data}</span>
|
||||
<span class="head">{$entry.head}</span> <span class="data">{$entry.data}</span>
|
||||
</li>
|
||||
{foreachelse}
|
||||
<li class="no-entry">NO ENTRIES FOUND</li>
|
||||
|
||||
152
templates/backOffice/default/ajax/module-information.html
Normal file
152
templates/backOffice/default/ajax/module-information.html
Normal file
@@ -0,0 +1,152 @@
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='bo.default'}
|
||||
{$locale = {lang attr='locale'}}
|
||||
{loop type="module" name="module-information" id=$moduleId lang=$locale}
|
||||
<h4>{intl l="Module detailed information"}</h4>
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
{if $TITLE}
|
||||
<tr>
|
||||
<th>{intl l="Title"}</th>
|
||||
<td>{$TITLE}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr>
|
||||
<th>{intl l="Module code"}</th>
|
||||
<td>{$CODE}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>{intl l="Module type"}</th>
|
||||
<td>{$moduleData.type}</td>
|
||||
</tr>
|
||||
|
||||
{if $CHAPO}
|
||||
<tr>
|
||||
<th>{intl l="Subtitle"}</th>
|
||||
<td>{$CHAPO}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $DESCRIPTION}
|
||||
<tr>
|
||||
<th>{intl l="Description"}</th>
|
||||
<td>{$DESCRIPTION nofilter}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $POSTSCRIPTUM}
|
||||
<tr>
|
||||
<th>{intl l="Postscriptum"}</th>
|
||||
<td>{$POSTSCRIPTUM}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $moduleData.tags.tag}
|
||||
<tr>
|
||||
<th>{intl l="Tags"}</th>
|
||||
<td>
|
||||
{foreach $moduleData.tags.tag as $label}{if $label@index > 0}, {/if}{$label}{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $moduleData.languages.language}
|
||||
<tr>
|
||||
<th>{intl l="Supported locales"}</th>
|
||||
<td>
|
||||
{foreach $moduleData.languages.language as $label}{if $label@index > 0}, {/if}{$label}{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr>
|
||||
<th>{intl l="Namespace of main class"}</th>
|
||||
<td><code>{$moduleData.fullnamespace}</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>{intl l="Minimum required Thelia version"}</th>
|
||||
<td>{$moduleData.thelia}</td>
|
||||
</tr>
|
||||
|
||||
{if $moduleData.required.module}
|
||||
<tr>
|
||||
<th>{intl l="Required modules"}</th>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
{foreach $moduleData.required.module as $module}
|
||||
<li>{$module}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr>
|
||||
<th>{intl l="Stability"}</th>
|
||||
<td>{$moduleData.stability}</td>
|
||||
</tr>
|
||||
|
||||
{if $moduleData.urlmiseajour}
|
||||
<tr>
|
||||
<th>{intl l="Update URL"}</th>
|
||||
<td><a href="{$moduleData.urlmiseajour}" target="_blank">{$moduleData.urlmiseajour}</a></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $moduleData.updateurl}
|
||||
<tr>
|
||||
<th>{intl l="Update URL"}</th>
|
||||
<td><a href="{$moduleData.updateurl}" target="_blank">{$moduleData.updateurl}</a></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $moduleData.authors.author}
|
||||
<tr>
|
||||
<th colspan="2">{intl l="Authors"}</th>
|
||||
</tr>
|
||||
|
||||
{foreach $moduleData.authors.author as $author}
|
||||
<tr>
|
||||
<th>
|
||||
<span class="glyphicon glyphicon-user"></span> {if $author.name}{$author.name}{else}{intl l='Unspecified'}{/if}{if $author.company}, {$author.company}{/if}
|
||||
</th>
|
||||
<td>
|
||||
{if $author.email}
|
||||
<i class="glyphicon glyphicon-envelope"></i> {mailto address=$author.email encode='hex'}
|
||||
{/if}
|
||||
|
||||
{if $author.website}
|
||||
<i class="glyphicon glyphicon-globe"></i> <a href="{$author.website}">{$author.website}</a>
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<th>{intl l="Author"}</th>
|
||||
<td>
|
||||
{if $moduleData.author.name}{$moduleData.author.name}{else}{intl l='Unspecified'}{/if}{if $moduleData.author.company}, {$moduleData.author.company}{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{if $moduleData.author.email}
|
||||
<tr>
|
||||
<th>{intl l="E-mail"}</th>
|
||||
<td>{mailto address=$moduleData.author.email encode='hex'}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $moduleData.author.website}
|
||||
<tr>
|
||||
<th>{intl l="Web site"}</th>
|
||||
<td><a href="{$moduleData.author.website}">{$moduleData.author.website}</a></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
</table>
|
||||
{/loop}
|
||||
{* fro debugging only <pre>{$moduleData|print_r}</pre> *}
|
||||
@@ -1,3 +1,5 @@
|
||||
{config_load file='variables.conf'}
|
||||
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='bo.default'}
|
||||
|
||||
@@ -7,7 +9,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p></p> {* <---- FIXME Lame ! *}
|
||||
<form method="POST" class="clearfix" action="{url path="/admin/product/$ID/set-product-template"}" id="product_template_form">
|
||||
<form method="POST" class="clearfix" action="{url path="/admin/product/%id/set-product-template" id=$ID}" id="product_template_form">
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="attributes" />
|
||||
@@ -34,7 +36,7 @@
|
||||
</select>
|
||||
|
||||
<span class="input-group-btn" id="apply_template_button">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit">{intl l="Apply"}</button>
|
||||
<button class="btn btn-primary action-btn" type="submit">{intl l="Apply"}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,16 +67,16 @@
|
||||
{* -- Begin attributes management ------------------------------- *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="well well-sm">
|
||||
<div class="form-group">
|
||||
<p class="title title-without-tabs">{intl l='Product Attributes'}</p>
|
||||
<div class="col-md-12">
|
||||
<div class="well well-sm">
|
||||
<div class="form-group">
|
||||
<p class="title title-without-tabs">{intl l='Product Attributes'}</p>
|
||||
|
||||
<p>
|
||||
{if $TEMPLATE}
|
||||
{intl
|
||||
l="You can change template attributes and their positions in <a href=\"%tpl_mgmt_url\" target=\"tpl_window\">the template configuration page</a>."
|
||||
tpl_mgmt_url={url path='/admin/configuration/templates/update' template_id=$TEMPLATE}
|
||||
l="You can change template attributes and their positions in <a href=\"%tpl_mgmt_url\" target=\"tpl_window\">the template configuration page</a>."
|
||||
tpl_mgmt_url={url path='/admin/configuration/templates/update' template_id=$TEMPLATE}
|
||||
}
|
||||
{else}
|
||||
{intl
|
||||
@@ -91,7 +93,7 @@
|
||||
<th>{intl l='ID'}</th>
|
||||
<th>{intl l='Attribute Name'}</th>
|
||||
|
||||
{module_include location='product_attributes_table_header'}
|
||||
{hook name="product.attributes-table-header" location="product_attributes_table_header" }
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -102,25 +104,25 @@
|
||||
|
||||
<td>{$TITLE}</td>
|
||||
|
||||
{module_include location='product_features_table_row'}
|
||||
{hook name="product.attributes-table-row" location="product_attributes_table_row" }
|
||||
</tr>
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="product-attributes"}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product template does not contains any features"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
{elseloop rel="product-attributes"}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product template does not contains any features"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- Begin features management ---------------------------------- *}
|
||||
@@ -153,7 +155,7 @@
|
||||
<th>{intl l='Feature Name'}</th>
|
||||
<th>{intl l='Feature value for this product'}</th>
|
||||
|
||||
{module_include location='product_features_table_header'}
|
||||
{hook name="product.features-table-header" location="product_features_table_header" }
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -178,53 +180,63 @@
|
||||
{$selected[] = $FEATURE_AV_ID}
|
||||
{/loop}
|
||||
|
||||
{capture "select_options"}
|
||||
{loop name="product-features-av" type="feature-availability" feature=$ID order="manual" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" {if in_array($ID, $selected)}selected="selected"{/if}>{$TITLE}</option>
|
||||
{capture name="select_options"}
|
||||
{loop name="product-features-av" type="feature-availability" feature=$ID order="manual" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" {if in_array($ID, $selected)}selected="selected"{/if}>{$TITLE}</option>
|
||||
|
||||
{$options_count = $LOOP_COUNT} {* LOOP_COUNT is only available inside the loop ! *}
|
||||
{/loop}
|
||||
{/capture}
|
||||
{$options_count = $LOOP_COUNT} {* LOOP_COUNT is only available inside the loop ! *}
|
||||
{/loop}
|
||||
|
||||
<div class="input-form">
|
||||
<select multiple="multiple" name="feature_value[{$ID}][]" id="feature_value_{$ID}" size="{$options_count}" class="form-control">
|
||||
{$smarty.capture.select_options nofilter}
|
||||
</select>
|
||||
</div>
|
||||
{if $options_count > #maximum_product_attribute_select_size#}
|
||||
{$select_size = #maximum_product_attribute_select_size#}
|
||||
{else}
|
||||
{$select_size = $options_count}
|
||||
{/if}
|
||||
{/capture}
|
||||
|
||||
<span class="help-block text-right">
|
||||
{intl l='Use Ctrl+click to select more than one value. You can also <a href="#" class="clear_feature_value" data-id="%id">clear selected values</a>.' id=$ID}
|
||||
</span>
|
||||
{/ifloop}
|
||||
<div class="input-form">
|
||||
<select multiple="multiple" name="feature_value[{$ID}][]" id="feature_value_{$ID}" size="{$select_size}" class="form-control">
|
||||
{$smarty.capture.select_options nofilter}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{* Free text *}
|
||||
<span class="help-block text-right">
|
||||
{intl l='Use Ctrl+click to select more than one value. You can also <a href="#" class="clear_feature_value" data-id="%id">clear selected values</a>.' id={$ID}}
|
||||
</span>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="product-features-av"}
|
||||
{* Get the free text value *}
|
||||
{* Free text *}
|
||||
|
||||
{elseloop rel="product-features-av"}
|
||||
{* Get the free text value *}
|
||||
{$feature_value=''}
|
||||
|
||||
{loop name="free-text-value" exclude_feature_availability="1" type="feature_value" product=$product_id feature=$ID backend_context="1" lang="$edit_language_id"}
|
||||
{$feature_value=$FREE_TEXT_VALUE}
|
||||
{/loop}
|
||||
{loop name="free-text-value" type="feature_value" product=$product_id feature=$ID backend_context="1" lang="$edit_language_id"}
|
||||
{if $IS_FREE_TEXT && $FREE_TEXT_VALUE != 1}
|
||||
{$feature_value=$FREE_TEXT_VALUE}
|
||||
{else}
|
||||
{$feature_value=$TITLE}
|
||||
{/if}
|
||||
{/loop}
|
||||
|
||||
<input type="text" id="feature_text_value_{$ID}" name="feature_text_value[{$ID}]" title="{intl l='Enter here the feature value as free text'}" placeholder="{intl l='Feature value'}" class="form-control" value="{$feature_value|default:''}">
|
||||
{/elseloop}
|
||||
<input type="text" id="feature_text_value_{$ID}" name="feature_text_value[{$ID}]" title="{intl l='Enter here the feature value as free text'}" placeholder="{intl l='Feature value'}" class="form-control" value="{$feature_value|default:''}">
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
{module_include location='product_features_table_row'}
|
||||
{hook name="product.features-table-row" location="product_features_table_row" }
|
||||
|
||||
</tr>
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="product-features"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product template does not contains any features"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
{elseloop rel="product-features"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product template does not contains any features"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<div class="form-group">
|
||||
<select name="folder_id" id="folder_id" class="form-control">
|
||||
<option value="">{intl l='Select a folder...'}</option>
|
||||
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||
{loop name="folders" type="folder-tree" folder="0" backend_context="1" visible="*" lang="$edit_language_id" return_url=false}
|
||||
<option value="{$ID}">{option_offset l=$LEVEL label={$TITLE}}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<option value="">{intl l='Select a folder content...'}</option>
|
||||
</select>
|
||||
<span class="input-group-btn" id="content_add_button">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
<button class="btn btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -76,19 +76,19 @@
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='product_contents_table_header'}
|
||||
{hook name="product.contents-table-header" location="product_contents_table_header" }
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_contents" type="associated_content" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
||||
{loop name="assigned_contents" type="associated_content" visible="*" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$CONTENT_ID}</td>
|
||||
|
||||
<td>
|
||||
<a href="{url path="/admin/content/update/{$CONTENT_ID}"}">{$TITLE}</a>
|
||||
<a href="{url path="/admin/content/update/%id" id=$CONTENT_ID}">{$TITLE}</a>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
@@ -103,16 +103,14 @@
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='product_contents_table_row'}
|
||||
{hook name="product.contents-table-row" location="product_contents_table_row-bottom" }
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$CONTENT_ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
{loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$CONTENT_ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
@@ -151,8 +149,8 @@
|
||||
<div class="form-group">
|
||||
<select name="accessory_category_id" id="accessory_category_id" class="form-control">
|
||||
<option value="">{intl l='Select a category...'}</option>
|
||||
{loop name="categories" type="category-tree" category="0" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||
{loop name="categories" type="category-tree" category="0" backend_context="1" visible="*" lang="$edit_language_id" return_url=false}
|
||||
<option value="{$ID}">{option_offset l=$LEVEL label={$TITLE}}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
@@ -165,7 +163,7 @@
|
||||
<option value="">{intl l='Select a product...'}</option>
|
||||
</select>
|
||||
<span class="input-group-btn" id="accessory_add_button">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
<button class="btn btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -197,14 +195,14 @@
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='product_accessories_table_header'}
|
||||
{hook name="product.accessories-table-header" location="product_accessories_table_header-bottom" }
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_accessories" order="accessory" type="accessory" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
||||
{loop name="assigned_accessories" order="accessory" visible="*" type="accessory" product="$product_id" backend_context="1" lang="$edit_language_id" return_url=false}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
@@ -224,16 +222,14 @@
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='product_accessories_table_row'}
|
||||
{hook name="product.accessories-table-row" location="product_accessories_table_row-bottom" }
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ACCESSORY_ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
{loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ACCESSORY_ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
@@ -268,12 +264,12 @@
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Additional categories'}</p>
|
||||
<p>{intl l='A product could be attached to more than one category. Select here the additional categories for this product.'}
|
||||
{loop name="default_category" type="category" id=$DEFAULT_CATEGORY}
|
||||
{loop name="default_category" visible="*" type="category" id=$DEFAULT_CATEGORY return_url=false}
|
||||
{intl l='You can change the default category (%title) in the "General" tab.' title={$TITLE}}
|
||||
{/loop}
|
||||
|
||||
{$exclude_from_tree = "-1"}
|
||||
{loop name="additional_categories" type="category" product=$product_id exclude=$DEFAULT_CATEGORY backend_context="1" lang="$edit_language_id"}
|
||||
{loop name="additional_categories" type="category" product=$product_id visible="*" exclude=$DEFAULT_CATEGORY backend_context="1" lang="$edit_language_id" return_url=false}
|
||||
{$exclude_from_tree = "$exclude_from_tree,$ID"}
|
||||
{/loop}
|
||||
|
||||
@@ -285,15 +281,15 @@
|
||||
|
||||
<select name="additional_category_id" id="accessory_category_id" class="form-control">
|
||||
<option value="">{intl l='Select a category...'}</option>
|
||||
{loop name="categories" type="category-tree" category="0" exclude=$exclude_from_tree backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_CATEGORY==$ID}disabled="disabled"{/if}>
|
||||
{$TITLE} {if $DEFAULT_CATEGORY==$ID}{intl l=' (default)'}{/if}
|
||||
{loop name="categories" type="category-tree" category="0" exclude=$exclude_from_tree visible="*" backend_context="1" lang="$edit_language_id" return_url=false}
|
||||
<option value="{$ID}" {if $DEFAULT_CATEGORY==$ID}disabled="disabled"{/if}>
|
||||
{option_offset l=$LEVEL label={$TITLE}}{if $DEFAULT_CATEGORY==$ID}{intl l=' (default)'}{/if}
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
<span class="input-group-btn" id="content_add_button">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
<button class="btn btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@@ -315,14 +311,14 @@
|
||||
|
||||
<th>{intl l='Category title'}</th>
|
||||
|
||||
{module_include location='product_categories_table_header'}
|
||||
{hook name="product.categories-table-header" location="product_categories_table_header" }
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="additional_categories" type="category" product=$product_id exclude=$DEFAULT_CATEGORY backend_context="1" lang="$edit_language_id"}
|
||||
{loop name="additional_categories" type="category" visible="*" product=$product_id exclude=$DEFAULT_CATEGORY backend_context="1" lang="$edit_language_id" return_url=false}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
@@ -330,16 +326,14 @@
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='product_categories_table_row'}
|
||||
{hook name="product.categories-table-row" location="product_categories_table_row" }
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-category" title="{intl l='Remove the product from this category'}" href="#delete_category_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-category" title="{intl l='Remove the product from this category'}" href="#delete_category_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
@@ -380,7 +374,7 @@
|
||||
dialog_title = {intl l="Remove related content"}
|
||||
dialog_message = {intl l="Do you really want to remove this related content from the product ?"}
|
||||
|
||||
form_action = {url path='/admin/products/content/delete'}
|
||||
form_action = {token_url path='/admin/products/content/delete'}
|
||||
form_content = {$smarty.capture.delete_content_dialog nofilter}
|
||||
}
|
||||
|
||||
@@ -401,7 +395,7 @@
|
||||
dialog_title = {intl l="Remove an accessory"}
|
||||
dialog_message = {intl l="Do you really want to remove this accessory from the product ?"}
|
||||
|
||||
form_action = {url path='/admin/products/accessory/delete'}
|
||||
form_action = {token_url path='/admin/products/accessory/delete'}
|
||||
form_content = {$smarty.capture.delete_accessory_dialog nofilter}
|
||||
}
|
||||
|
||||
@@ -421,7 +415,7 @@
|
||||
dialog_title = {intl l="Remove from category"}
|
||||
dialog_message = {intl l="Do you really want to remove the product from this category ?"}
|
||||
|
||||
form_action = {url path='/admin/products/category/delete'}
|
||||
form_action = {token_url path='/admin/products/category/delete'}
|
||||
form_content = {$smarty.capture.delete_category_dialog nofilter}
|
||||
}
|
||||
|
||||
@@ -578,4 +572,4 @@ $(function() {
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='bo.default'}
|
||||
|
||||
<div class="modal fade" id="pse-image-document-assoc-modal" tabindex="-1" role="dialog" aria-labelledby="associate_images_label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="associate_images_label">{$modal_title}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{if empty($items)}
|
||||
<div class="alert alert-danger">
|
||||
{if $error_message}
|
||||
{$error_message}
|
||||
{else}
|
||||
{intl l="An unknow error happend"}
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
{if $type == "image"}
|
||||
<div class='images-container'>
|
||||
<div class="row">
|
||||
{foreach from=$items key=key item=item}
|
||||
{if ($key % 4 == 0) && $key != 0}
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
{/if}
|
||||
<div class='col-md-3'>
|
||||
<div class='product-pse-image-container'>
|
||||
{if $item.is_associated}
|
||||
<i class='glyphicon glyphicon-ok product-pse-image-join-glyphicon'></i>
|
||||
{/if}
|
||||
<img data-id='{$item.id}' class='img-responsive do-associate {if $item.is_associated}is-associated{/if}' src='{$item.url nofilter}' alt='{$item.title}' />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{elseif $type == "document" || $type == "virtual" }
|
||||
<div class='documents-container'>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{intl l="ID"}
|
||||
</th>
|
||||
<th>
|
||||
{intl l="Filename"}
|
||||
</th>
|
||||
<th>
|
||||
{intl l="Title"}
|
||||
</th>
|
||||
<th>
|
||||
{intl l="Associated"}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{foreach from=$items item=item}
|
||||
<tr>
|
||||
<td>{$item.id}</td>
|
||||
<td>{$item.filename}</td>
|
||||
<td>{$item.title}</td>
|
||||
<td>
|
||||
<div class="switch-small do-associate document-switch" data-id="{$item.id}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox" {if $item.is_associated}checked{/if}>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(".document-switch").bootstrapSwitch();
|
||||
</script>
|
||||
@@ -0,0 +1,33 @@
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='bo.default'}
|
||||
|
||||
{loop type="product" name="product-info" id=$product_id}
|
||||
<p>{intl l="Select the attributes values of \"%title\" that should be included in this sale operation." title={$TITLE}}</p>
|
||||
{/loop}
|
||||
|
||||
<form>
|
||||
<input type="hidden" name="attribute-selector-product-id" value="{$product_id}">
|
||||
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
{loop name="product-attributes" type="attribute" product="{$product_id}"}
|
||||
{ifloop rel="product-attributes-av"}
|
||||
<tr>
|
||||
<th>{intl l="Attribute %title" title={$TITLE}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{loop name="product-attributes-av" type="attribute_availability" attribute="{$ID}" product="{$product_id}"}
|
||||
{$selected = in_array($ID, $selected_attributes_av_id)}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input {if $selected}checked {/if}type="checkbox" class="attribute-selector-box" value="{$ID}" name="attr[]"> {$TITLE}
|
||||
</label>
|
||||
</div>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/ifloop}
|
||||
</tr>
|
||||
{/loop}
|
||||
</table>
|
||||
</form>
|
||||
72
templates/backOffice/default/ajax/sale-edit-products.html
Normal file
72
templates/backOffice/default/ajax/sale-edit-products.html
Normal file
@@ -0,0 +1,72 @@
|
||||
{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *}
|
||||
{default_translation_domain domain='bo.default'}
|
||||
|
||||
{form name="thelia.admin.sale.modification"}
|
||||
{ifloop rel="product-list"}
|
||||
<div class="alert alert-default">
|
||||
{intl l="Select the products included in this sale operation. You can limit your selection to some product's attribute only, if required."}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
ID
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<input type="checkbox" title="{intl l='Select or deselect all products'}" class="invert-selection">
|
||||
</th>
|
||||
<th>{intl l="Product title"}</th>
|
||||
<th>{intl l="Reference"}</th>
|
||||
<th class="text-right">{intl l="Best taxed price"}</th>
|
||||
<th class="text-center">{intl l="Attributes"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{* protect ourselves against empty $category_list, which causes all products to be displayed *}
|
||||
{if empty($category_list)}{$category_list = '0'}{/if}
|
||||
{loop type="product" name="product-list" category_default="{$category_list}" backend_context=1 return_url=false}
|
||||
{$selected = in_array($ID, $product_list)}
|
||||
<tr data-product-id="{$ID}"{if $selected} class="success"{/if}>
|
||||
<td class="text-center">
|
||||
{$ID}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<input {if $selected}checked {/if}data-product-id="{$ID}" type="checkbox" {form_field_attributes field="products" value=$ID value_key=$ID extra_class="product-selector-checkbox"}>
|
||||
</td>
|
||||
|
||||
<td>{$TITLE}</td>
|
||||
|
||||
<td><a target="_blank" title="{intl l='View this product in a new page'}" href="{url path="/admin/products/update" product_id=$ID current_tab=prices}">{$REF}</a></td>
|
||||
|
||||
<td class="text-right">{format_money number=$BEST_TAXED_PRICE}</td>
|
||||
|
||||
<td class="text-center">
|
||||
{$has_combinations = false}
|
||||
{loop name="product.sales.elements.test" type="product_sale_elements" product=$ID currency=$edit_currency_id backend_context="1"}
|
||||
{loop name="product.combinations" type="attribute_combination" product_sale_elements=$ID backend_context="1"}
|
||||
{$has_combinations = true}
|
||||
{/loop}
|
||||
{/loop}
|
||||
{if $has_combinations}
|
||||
<button {if ! $selected}disabled="disabled"{/if} title="{intl l='Product\'s attributes included in this sale operation'}" class="btn btn-primary btn-xs product-attribute-selector" data-product-id="{$ID}">{intl l='All'}</button>
|
||||
<input data-product-id="{$ID}" type="hidden" {form_field_attributes field="product_attributes" value="" value_key=$ID extra_class="product-selected-attributes-ids"}>
|
||||
{else}
|
||||
{intl l="No attributes."}
|
||||
<input type="hidden" {form_field_attributes field="product_attributes" value='' value_key=$ID}>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="product-list"}
|
||||
<div class="alert alert-info">
|
||||
{intl l="Please select one or more categories which contains some products"}
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
{/form}
|
||||
@@ -15,7 +15,7 @@
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
<button class="btn btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='template_attributes_table_header'}
|
||||
{hook name="template.attributes-table-header" location="template_attributes_table_header" }
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
@@ -49,7 +49,7 @@
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>{$TITLE}</td>
|
||||
<td><a href="{url path="admin/configuration/attributes/update" attribute_id=$ID}">{$TITLE}</a></td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
@@ -63,16 +63,14 @@
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='template_attributes_table_row'}
|
||||
{hook name="template.attributes-table-row" location="template_attributes_table_row" }
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-attribute" title="{intl l='Delete this attribute'}" href="#delete_attribute_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-attribute" title="{intl l='Delete this attribute'}" href="#delete_attribute_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</a>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
@@ -101,9 +99,9 @@
|
||||
|
||||
dialog_id = "delete_attribute_dialog"
|
||||
dialog_title = {intl l="Remove attribute"}
|
||||
dialog_message = {intl l="Do you really want to remove this attribute from the template ?"}
|
||||
dialog_message = {intl l="Do you really want to remove this attribute from the template ? The attributes combinations that uses this attributes <strong>will be deleted</strong> for the products that uses this template."}
|
||||
|
||||
form_action = {url path='/admin/configuration/templates/attributes/delete'}
|
||||
form_action = {token_url path='/admin/configuration/templates/attributes/delete'}
|
||||
form_content = {$smarty.capture.delete_attribute_dialog nofilter}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
<button class="btn btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='template_features_table_header'}
|
||||
{hook name="template.features-table-header" location="template_features_table_header" }
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
@@ -50,7 +50,7 @@
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
<a href="{url path="admin/configuration/features/update" feature_id=$ID}">{$TITLE}</a>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
@@ -65,16 +65,14 @@
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='template_features_table_row'}
|
||||
{hook name="template.features-table-row" location="template_features_table_row" }
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-feature" title="{intl l='Delete this feature'}" href="#delete_feature_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-feature" title="{intl l='Delete this feature'}" href="#delete_feature_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</a>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
@@ -104,9 +102,9 @@
|
||||
|
||||
dialog_id = "delete_feature_dialog"
|
||||
dialog_title = {intl l="Remove feature"}
|
||||
dialog_message = {intl l="Do you really want to remove this feature from the template ?"}
|
||||
dialog_message = {intl l="Do you really want to remove this feature from the template ? It will also be removed from the products that uses this template."}
|
||||
|
||||
form_action = {url path='/admin/configuration/templates/features/delete'}
|
||||
form_action = {token_url path='/admin/configuration/templates/features/delete'}
|
||||
form_content = {$smarty.capture.delete_feature_dialog nofilter}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user