Initial commit

This commit is contained in:
2020-01-27 08:56:08 +01:00
commit b7525048d6
27129 changed files with 3409855 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="category-edit.html" server="51.254.220.106//web/" local="131360630400000000" remote="131360630400000000" />
<file name="content-edit.html" server="51.254.220.106//web/" local="131360630400000000" remote="131360630400000000" />
<file name="folder-edit.html" server="51.254.220.106//web/" local="131360630400000000" remote="131360630400000000" />
<file name="module-config-js.html" server="51.254.220.106//web/" local="131360630400000000" remote="131360630400000000" />
<file name="module_configuration.html" server="51.254.220.106//web/" local="131360630400000000" remote="131360630400000000" />
<file name="product-edit.html" server="51.254.220.106//web/" local="131360630400000000" remote="131360630400000000" />
</dwsync>

View File

@@ -0,0 +1,64 @@
<div class="keyword-module">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{intl l="Keywords" d='keyword'}</h3>
</div>
<div class="panel-body">
{form name="keyword.admin.category.modification"}
<form action="{url path="/admin/categories/update/{category attr='id'}/keyword"}" method="POST" role="form">
<legend>{intl l="Keywords association" d='keyword'}</legend>
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/admin/categories/update" category_id={category attr='id'} current_tab='modules'}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{ifloop rel="keyword_groups"}
<div class="row">
{loop name="keyword_groups" type="keyword_group"}
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">
<span class="panel-title">
<a data-toggle="collapse" href="#panel-{$CODE}">
{$TITLE}
</a>
</span>
</div>
<div class="panel-collapse collapse" id="panel-{$CODE}">
<div class="panel-body">
<div class="form-group">
{loop name="keywords" type="keyword" keyword_group=$ID}
<div class="checkbox">
<label>
{form_field form=$form field='keyword_list'}
<input type="checkbox" name="{$name}" value="{$ID}" {if in_array({category attr="id"}, $CATEGORIES_ASSOCIATION)}checked="checked"{/if}> {$TITLE}
{/form_field}
</label>
</div>
{/loop}
</div>
</div>
</div>
</div>
</div>
{/loop}
</div>
{/ifloop}
{elseloop rel="keyword_groups"}
<div class="alert alert-info">{intl l="You must first configure keywords to use them." d='keyword'}</div>
{/elseloop}
<button type="submit" class="btn btn-primary">{intl l="Save"}</button>
</form>
{/form}
</div>
</div>
</div>

View File

@@ -0,0 +1,64 @@
<div class="keyword-module">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{intl l="Keywords" d='keyword'}</h3>
</div>
<div class="panel-body">
{form name="keyword.admin.content.modification"}
<form action="{url path="/admin/content/update/{content attr='id'}/keyword"}" method="POST" role="form">
<legend>{intl l="Keywords association" d='keyword'}</legend>
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="admin/content/update/{content attr='id'}" current_tab='modules'}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{ifloop rel="keyword_groups"}
<div class="row">
{loop name="keyword_groups" type="keyword_group"}
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">
<span class="panel-title">
<a data-toggle="collapse" href="#panel-{$CODE}">
{$TITLE}
</a>
</span>
</div>
<div class="panel-collapse collapse" id="panel-{$CODE}">
<div class="panel-body">
<div class="form-group">
{loop name="keywords" type="keyword" keyword_group=$ID}
<div class="checkbox">
<label>
{form_field form=$form field='keyword_list'}
<input type="checkbox" name="{$name}" value="{$ID}" {if in_array({content attr="id"}, $CONTENTS_ASSOCIATION)}checked="checked"{/if}> {$TITLE}
{/form_field}
</label>
</div>
{/loop}
</div>
</div>
</div>
</div>
</div>
{/loop}
</div>
{/ifloop}
{elseloop rel="keyword_groups"}
<div class="alert alert-info">{intl l="You must first configure keywords to use them." d='keyword'}</div>
{/elseloop}
<button type="submit" class="btn btn-primary">{intl l="Save"}</button>
</form>
{/form}
</div>
</div>
</div>

View File

@@ -0,0 +1,65 @@
<div class="keyword-module">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{intl l="Keywords" d='keyword'}</h3>
</div>
<div class="panel-body">
{form name="keyword.admin.folder.modification"}
<form action="{url path="/admin/folders/update/{folder attr='id'}/keyword"}" method="POST" role="form">
<legend>{intl l="Keywords association" d='keyword'}</legend>
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/admin/folders/update/{folder attr='id'}" current_tab='modules'}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{ifloop rel="keyword_groups"}
<div class="row">
{loop name="keyword_groups" type="keyword_group"}
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">
<span class="panel-title">
<a data-toggle="collapse" href="#panel-{$CODE}">
{$TITLE}
</a>
</span>
</div>
<div class="panel-collapse collapse" id="panel-{$CODE}">
<div class="panel-body">
<div class="form-group">
{loop name="keywords" type="keyword" keyword_group=$ID}
<div class="checkbox">
<label>
{form_field form=$form field='keyword_list'}
<input type="checkbox" name="{$name}" value="{$ID}" {if in_array({folder attr="id"}, $FOLDERS_ASSOCIATION)}checked="checked"{/if}> {$TITLE}
{/form_field}
</label>
</div>
{/loop}
</div>
</div>
</div>
</div>
</div>
{/loop}
</div>
{/ifloop}
{elseloop rel="keyword_groups"}
<div class="alert alert-info">{intl l="You must first configure keywords to use them." d='keyword'}</div>
{/elseloop}
<button type="submit" class="btn btn-primary">{intl l="Save"}</button>
</form>
{/form}
</div>
</div>
</div>

View File

@@ -0,0 +1,47 @@
<script>
$.fn.bootstrapSwitch || {javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}document.write('<script src="{$asset_url}"><\/script>');{/javascripts}
window.bootstrapSwitch || {javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}document.write('<script src="{$asset_url}"><\/script>');{/javascripts}
</script>
<script>
$(function() {
$('a.keyword-group-delete').click(function(ev) {
$('#keyword_group_delete_id').val($(this).data('id'));
});
{* Inline editing of object position using bootstrap-editable *}
$('.keywordGroupPositionChange').editable({
type : 'text',
title : '{intl l="Enter new keyword group position" d="keyword"}',
mode : 'popup',
inputclass : 'input-mini',
placement : 'left',
success : function(response, newValue) {
// The URL template
var url = "{url path='/admin/module/Keyword/group/update-position' keyword_group_id='__ID__' position='__POS__' noamp=1}";
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id'))
.replace('__POS__', newValue);
// Reload the page
location.href = url;
}
});
{* Toggle object visibility *}
$(".keywordGroupVisibleToggle").on('switch-change', function(event, data) {
$.ajax({
url : "{url path='admin/module/Keyword/group/toggle-online'}",
data : {
keyword_group_id : $(this).data('id'),
action : 'visibilityToggle'
}
});
});
});
</script>

View File

@@ -0,0 +1,199 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="category_list">
<caption>
{intl l="Keyword Groups" d="keyword"}
{loop type="auth" name="can_create" role="ADMIN" resource="admin.keyword.group" access="CREATE"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new keyword group' d='keyword'}" href="#keyword_group_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="keyword_group_list"}
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Title'}</th>
<th>{intl l='Unique identifier' d='keyword'}</th>
<th>{intl l='Visible'}</th>
<th>{intl l='Position'}</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="keyword_group_list" type="keyword_group" visible="*" order="manual" backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td class="object-title">
<a title="{intl l='Browse this keyword group' d='keyword'}" href="{url path='/admin/module/Keyword/group/view' keyword_group_id=$ID}">
{$TITLE}
</a>
</td>
<td>
{$CODE}
</td>
<td>
{loop type="auth" name="can_change" role="ADMIN" resource="admin.keyword.group" access="UPDATE"}
<div class="make-switch switch-small keywordGroupVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="keywordGroupVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
resource="admin.keyword.group"
access="update"
path={url path='admin/module/Keyword/group/update-position' keyword_group_id=$ID}
url_parameter="keyword_group_id"
in_place_edit_class="keywordGroupPositionChange"
position=$POSITION
id=$ID
}
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this keyword group' d='keyword'}" href="{url path='/admin/module/Keyword/group/view' keyword_group_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" role="ADMIN" resource="admin.keyword.group" access="UPDATE"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this keyword group' d='keyword'}" href="{url path='/admin/module/Keyword/group/update' keyword_group_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.keyword.group" access="DELETE"}
<a class="btn btn-default btn-xs keyword-group-delete" title="{intl l='Delete this keyword group' d='keyword'}" href="#keyword_group_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="keyword_group_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" role="ADMIN" resource="admin.keyword.group" access="CREATE"}
{intl l="There is no keywords group. To create a new one, click the + button above." d="keyword"}
{/loop}
{elseloop rel="can_create"}
{intl l="There is no keywords group." d="keyword"}
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>
{* -- Adding a new keyword group -------------------------------------------------- *}
{form name="keyword.group.admin.creation"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "keyword_group_creation_dialog"}
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path='/admin/module/Keyword'}" />
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='title'}">
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.png"}" alt="$TITLE" /></span>
</div>
<div class="help-block">{intl l='Enter here the keyword group name in the default language (%title)' d='keyword' title="$TITLE"}</div>
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{/loop}
</div>
{/form_field}
{form_field form=$form field='code'}
<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}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='unique identifier' d='keyword'}">
<div class="help-block">{intl l='Enter here the unique identifier of the keyword group which must be use into your loops' d='keyword'}</div>
</div>
{/form_field}
{form_field form=$form field='visible'}
<div class="form-group {if $error}has-error{/if}">
<div class="checkbox">
<label for="{$label_attr.for}" class="control-label">
<input id="{$label_attr.for}" name="{$name}" type="checkbox" value="1" checked> {$label}
</label>
</div>
</div>
{/form_field}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "keyword_group_creation_dialog"
dialog_title = {intl l="Create a new keyword group" d='keyword'}
dialog_body = {$smarty.capture.keyword_group_creation_dialog nofilter}
dialog_ok_label = {intl l="Save"}
form_action = {url path='/admin/module/Keyword/group/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{* -- Delete keyword group confirmation dialog ----------------------------------- *}
{capture "keyword_group_delete_dialog"}
<input type="hidden" name="keyword_group_id" id="keyword_group_delete_id" value="" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "keyword_group_delete_dialog"
dialog_title = {intl l="Delete keyword group" d='keyword'}
dialog_message = {intl l="Do you really want to delete this keyword group and all its associations ?" d='keyword'}
form_action = {token_url path='/admin/module/Keyword/group/delete'}
form_content = {$smarty.capture.keyword_group_delete_dialog nofilter}
}

View File

@@ -0,0 +1,65 @@
<div class="keyword-module">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{intl l="Keywords" d='keyword'}</h3>
</div>
<div class="panel-body">
{form name="keyword.admin.product.modification"}
<form action="{url path="/admin/product/update/{product attr='id'}/keyword"}" method="POST" role="form">
<legend>{intl l="Keywords association" d='keyword'}</legend>
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/admin/products/update" product_id={product attr='id'} current_tab='modules'}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{ifloop rel="keyword_groups"}
<div class="row">
{loop name="keyword_groups" type="keyword_group"}
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">
<span class="panel-title">
<a data-toggle="collapse" href="#panel-{$CODE}">
{$TITLE}
</a>
</span>
</div>
<div class="panel-collapse collapse" id="panel-{$CODE}">
<div class="panel-body">
<div class="form-group">
{loop name="keywords" type="keyword" keyword_group=$ID}
<div class="checkbox">
<label>
{form_field form=$form field='keyword_list'}
<input type="checkbox" name="{$name}" value="{$ID}" {if in_array({product attr="id"}, $PRODUCTS_ASSOCIATION)}checked="checked"{/if}> {$TITLE}
{/form_field}
</label>
</div>
{/loop}
</div>
</div>
</div>
</div>
</div>
{/loop}
</div>
{/ifloop}
{elseloop rel="keyword_groups"}
<div class="alert alert-info">{intl l="You must first configure keywords to use them." d='keyword'}</div>
{/elseloop}
<button type="submit" class="btn btn-primary">{intl l="Save"}</button>
</form>
{/form}
</div>
</div>
</div>