first commit
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><i class="fa fa-cog"></i> {{ heading_title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_signup }}</div>
|
||||
<div class="form-group">
|
||||
<label for="input-username">{{ entry_username }}</label>
|
||||
<input type="text" name="opencart_username" value="" placeholder="{{ entry_username }}" id="input-username" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="input-secret">{{ entry_secret }}</label>
|
||||
<textarea name="opencart_secret" placeholder="{{ entry_secret }}" rows="8" id="input-secret" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button type="button" id="button-save" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_save }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-save').on('click', function(e) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/api/save&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: $('#modal-opencart :input'),
|
||||
beforeSend: function() {
|
||||
$('#button-save').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-save').button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible, .text-danger').remove();
|
||||
|
||||
if (json['error']) {
|
||||
if (json['error']['warning']) {
|
||||
$('#modal-opencart .modal-body').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error']['warning'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['error']['username']) {
|
||||
$('input[name="username"]').after('<div class="text-danger">' + json['error']['username'] + '</div>');
|
||||
}
|
||||
|
||||
if (json['error']['secret']) {
|
||||
$('textarea[name="secret"]').after('<div class="text-danger">' + json['error']['secret'] + '</div>');
|
||||
}
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#modal-opencart .modal-body').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
window.location.reload();
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
@@ -0,0 +1,94 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-event').submit() : false;"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid"> {% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_event }}</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-event">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
|
||||
<td class="text-left">{% if sort == 'code' %}<a href="{{ sort_code }}" class="{{ order|lower }}">{{ column_code }}</a>{% else %}<a href="{{ sort_code }}">{{ column_code }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'status' %}<a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a>{% else %}<a href="{{ sort_status }}">{{ column_status }}</a>{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'sort_order' %}<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>{% else %}<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if events %}
|
||||
{% for event in events %}
|
||||
<tr>
|
||||
<td class="text-center">{% if event.event_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ event.event_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ event.event_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ event.code }}</td>
|
||||
<td class="text-left">{{ event.status }}</td>
|
||||
<td class="text-right">{{ event.sort_order }}</td>
|
||||
<td class="text-right"><button type="button" data-toggle="modal" data-target="#modal-event{{ event.event_id }}" class="btn btn-info"><i class="fa fa-info-circle"></i></button>
|
||||
{% if not event.enabled %}<a href="{{ event.enable }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-success"><i class="fa fa-plus-circle"></i></a>{% else %}<a href="{{ event.disable }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></a>{% endif %}
|
||||
<div id="modal-event{{ event.event_id }}" class="modal text-left">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">{{ text_info }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><strong>{{ text_trigger }}</strong></p>
|
||||
<p>{{ event.trigger }}</p>
|
||||
<p><strong>{{ text_action }}</strong></p>
|
||||
<p>{{ event.action }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="5">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-right">{{ results }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,117 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-puzzle-piece"></i> {{ text_list }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<fieldset>
|
||||
<legend>{{ text_type }}</legend>
|
||||
<div class="well">
|
||||
<div class="input-group">
|
||||
<select name="type" class="form-control">
|
||||
{% for category in categories %}
|
||||
{% if type == category.code %}
|
||||
<option value="{{ category.href }}" selected="selected">{{ category.text }}</option>
|
||||
{% else %}
|
||||
<option value="{{ category.href }}">{{ category.text }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="input-group-addon"><i class="fa fa-filter"></i> {{ text_filter }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div id="extension"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if categories %}
|
||||
<script type="text/javascript"><!--
|
||||
$('select[name="type"]').on('change', function() {
|
||||
$.ajax({
|
||||
url: $('select[name="type"]').val(),
|
||||
dataType: 'html',
|
||||
beforeSend: function() {
|
||||
$('.fa-filter').addClass('fa-circle-o-notch fa-spin');
|
||||
$('.fa-filter').removeClass('fa-filter');
|
||||
$('select[name=\'type\']').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('.fa-circle-o-notch').addClass('fa-filter');
|
||||
$('.fa-circle-o-notch').removeClass('fa-circle-o-notch fa-spin');
|
||||
$('select[name=\'type\']').prop('disabled', false);
|
||||
},
|
||||
success: function(html) {
|
||||
$('#extension').html(html);
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('select[name="type"]').trigger('change');
|
||||
|
||||
$('#extension').on('click', '.btn-success', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).attr('href'),
|
||||
dataType: 'html',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#extension').html(html);
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#extension').on('click', '.btn-danger, .btn-warning', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (confirm('{{ text_confirm }}')) {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).attr('href'),
|
||||
dataType: 'html',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#extension').html(html);
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,182 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-puzzle-piece"></i> {{ text_upload }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal">
|
||||
<fieldset>
|
||||
<legend>{{ text_upload }}</legend>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="button-upload"><span data-toggle="tooltip" title="{{ help_upload }}">{{ entry_upload }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<button type="button" id="button-upload" data-loading-text="{{ text_loading }}" class="btn btn-primary"><i class="fa fa-upload"></i> {{ button_upload }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br />
|
||||
<fieldset>
|
||||
<legend>{{ text_progress }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_progress }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="progress">
|
||||
<div id="progress-bar" class="progress-bar" style="width: 0%;"></div>
|
||||
</div>
|
||||
<div id="progress-text"></div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br />
|
||||
<fieldset>
|
||||
<legend>{{ text_history }}</legend>
|
||||
<div id="history"></div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#history').delegate('.pagination a', 'click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#history').load(this.href);
|
||||
});
|
||||
|
||||
$('#history').load('index.php?route=marketplace/installer/history&user_token={{ user_token }}');
|
||||
|
||||
$('#button-upload').on('click', function() {
|
||||
$('#form-upload').remove();
|
||||
|
||||
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
|
||||
|
||||
$('#form-upload input[name=\'file\']').trigger('click');
|
||||
|
||||
if (typeof timer != 'undefined') {
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
timer = setInterval(function() {
|
||||
if ($('#form-upload input[name=\'file\']').val() != '') {
|
||||
clearInterval(timer);
|
||||
|
||||
// Reset everything
|
||||
$('.alert-dismissible').remove();
|
||||
$('#progress-bar').css('width', '0%');
|
||||
$('#progress-bar').removeClass('progress-bar-danger progress-bar-success');
|
||||
$('#progress-text').html('');
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/installer/upload&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: new FormData($('#form-upload')[0]),
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
beforeSend: function() {
|
||||
$('#button-upload').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-upload').button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html('<div class="text-danger">' + json['error'] + '</div>');
|
||||
}
|
||||
|
||||
if (json['text']) {
|
||||
$('#progress-bar').css('width', '20%');
|
||||
$('#progress-text').html(json['text']);
|
||||
}
|
||||
|
||||
if (json['next']) {
|
||||
next(json['next'], 1);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
function next(url, i) {
|
||||
i = i + 1;
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
$('#progress-bar').css('width', (i * 20) + '%');
|
||||
|
||||
if (json['error']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html('<div class="text-danger">' + json['error'] + '</div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#progress-bar').addClass('progress-bar-success');
|
||||
$('#progress-text').html('<span class="text-success">' + json['success'] + '</span>');
|
||||
|
||||
$('#history').load('index.php?route=marketplace/installer/history&user_token={{ user_token }}');
|
||||
}
|
||||
|
||||
if (json['text']) {
|
||||
$('#progress-text').html(json['text']);
|
||||
}
|
||||
|
||||
if (json['next']) {
|
||||
next(json['next'], i);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Uninstall
|
||||
$('#history').on('click', '.btn-danger', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/install/uninstall&user_token={{ user_token }}&extension_install_id=' + $(this).attr('value'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['success']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
$('#history').load('index.php?route=marketplace/installer/history&user_token={{ user_token }}');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,32 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ column_filename }}</th>
|
||||
<th>{{ column_date_added }}</th>
|
||||
<th class="text-right">{{ column_action }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if histories %}
|
||||
{% for history in histories %}
|
||||
<tr>
|
||||
<td>{{ history.filename }}</td>
|
||||
<td>{{ history.date_added }}</td>
|
||||
<td class="text-right"><button type="button" value="{{ history.extension_install_id }}" data-loading="{{ text_loading }}" data-toggle="tooltip" title="{{ button_uninstall }}" class="btn btn-danger"><i class="fa fa-trash-o"></i></button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-right">{{ results }}</div>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
{% if comments %}
|
||||
{% for comment in comments %}
|
||||
<div id="comment{{ comment.extension_comment_id }}" class="media">
|
||||
<div class="media-left"><img src="{{ comment.image }}" alt="{{ comment.member }}" title="{{ comment.member }}" class="media-object" /></div>
|
||||
<div class="media-body">
|
||||
<p class="media-heading">{{ comment.member }} <span>{{ comment.date_added }}</span></p>
|
||||
<p>{{ comment.comment }}</p>
|
||||
<div class="reply">
|
||||
<div> {% if comment.reply %}
|
||||
|
||||
{% for reply in comment.reply %}
|
||||
<div class="media">
|
||||
<div class="media-left"><img src="{{ reply.image }}" alt="{{ reply.member }}" title="{{ reply.member }}" class="media-object" /></div>
|
||||
<div class="media-body">
|
||||
<p class="media-heading">{{ reply.member }} <span>{{ reply.date_added }}</span></p>
|
||||
<p>{{ reply.comment }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if comment.next %}
|
||||
<div class="text-center"><a href="{{ comment.next }}" class="btn btn-block">{{ text_see_more }}</a></div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %} <a href="{{ comment.refresh }}" class="reply-refresh hide">{{ button_refresh }}</a> </div>
|
||||
</div>
|
||||
<p class="text-right">
|
||||
<button type="button" class="btn btn-link btn-xs">{{ button_reply }}</button>
|
||||
</p>
|
||||
<div class="reply-input-box" style="display: none;">
|
||||
<div class="media">
|
||||
<div class="media-body">
|
||||
<div class="form-group">
|
||||
<label for="input-comment{{ comment.extension_comment_id }}">{{ text_comment_add }}</label>
|
||||
<textarea name="comment" placeholder="Write your comment here..." id="input-comment{{ comment.extension_comment_id }}" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="text-right"><a href="{{ comment.add }}" class="btn btn-primary btn-sm">{{ button_comment }}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %} <br />
|
||||
<div class="text-center">{{ pagination }}</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,524 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">{% if not error_signature %}
|
||||
<button type="button" id="button-opencart" data-toggle="tooltip" title="{{ button_opencart }}" class="btn btn-info"><i class="fa fa-cog"></i></button>
|
||||
{% else %}
|
||||
<button type="button" id="button-opencart" data-toggle="tooltip" title="{{ error_signature }}" data-placement="left" class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i></button>
|
||||
{% endif %} <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="marketplace-extension-info" class="container-fluid">{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-puzzle-piece"></i> {{ name }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row extension-info">
|
||||
<div class="col-sm-8">{% if banner %}
|
||||
<div id="banner" class="text-center thumbnail"><img src="{{ banner }}" title="{{ name }}" alt="{{ name }}" class="img-responsive" /></div>
|
||||
{% endif %}
|
||||
<div class="row thumbnails">{% for image in images %}
|
||||
<div class="col-xs-4 col-sm-2"><a href="{{ image.popup }}" class="thumbnail"><img src="{{ image.thumb }}" alt="{{ image.name }}" title="{{ image.name }}" class="img-responsive" /></a></div>
|
||||
{% endfor %} </div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-description" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-documentation" data-toggle="tab">{{ tab_documentation }}</a></li>
|
||||
<li><a href="#tab-download" data-toggle="tab">{{ tab_download }}</a></li>
|
||||
<li><a href="#tab-comment" data-toggle="tab">{{ tab_comment }} ({{ comment_total }})</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-description" class="tab-pane active">{{ description }}</div>
|
||||
<div id="tab-documentation" class="tab-pane">{{ documentation }}</div>
|
||||
<div id="tab-download" class="tab-pane">
|
||||
<fieldset>
|
||||
<legend>{{ text_progress }}</legend>
|
||||
<div id="progress">
|
||||
<div class="progress">
|
||||
<div id="progress-bar" class="progress-bar" style="width: 0%;"></div>
|
||||
</div>
|
||||
<div id="progress-text"></div>
|
||||
</div>
|
||||
<hr />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_available }}</legend>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>{{ text_name }}</th>
|
||||
<th>{{ text_date_added }}</th>
|
||||
<th class="text-right">{{ text_action }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if downloads %}
|
||||
{% for download in downloads %}
|
||||
<tr>
|
||||
<td>{{ download.name }}</td>
|
||||
<td>{{ download.date_added }}</td>
|
||||
<td class="text-right">{% if download.extension_install_id %}
|
||||
<button type="button" data-install="{{ download.extension_download_id }}" data-uninstall="{{ download.extension_install_id }}" data-loading="{{ text_loading }}" class="btn btn-danger"><i class="fa fa-trash-o"></i> {{ button_uninstall }}</button>
|
||||
{% elseif download.filename|slice(-10) == '.ocmod.zip' %}
|
||||
<button type="button" data-install="{{ download.extension_download_id }}" data-uninstall="" data-loading="{{ text_loading }}" class="btn btn-primary"{% if not download.status %} disabled{% endif %}><i class="fa fa-download"></i> {{ button_install }}</button>
|
||||
{% else %}
|
||||
<button type="button" data-install="{{ download.extension_download_id }}" data-uninstall="" data-loading="{{ text_loading }}" class="btn btn-primary"{% if not download.status %} disabled{% endif %}><i class="fa fa-download"></i> {{ button_download }}</button>
|
||||
{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="tab-comment" class="tab-pane">
|
||||
<fieldset>
|
||||
<legend>{{ text_comment_add }}</legend>
|
||||
<div class="form-group">
|
||||
<textarea name="comment" rows="5" placeholder="{{ text_write }}" id="input-comment" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="button" id="button-comment" class="btn btn-primary">{{ button_comment }}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br />
|
||||
<fieldset>
|
||||
<legend>{{ text_comment }}</legend>
|
||||
<div id="comment"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div id="buy" class="well">{% if license == '1' and not purchased %}
|
||||
<button id="button-buy" class="btn btn-success btn-lg btn-block">{{ button_purchase }}</button>
|
||||
{% endif %}
|
||||
<div id="price" class="row">
|
||||
<div class="col-xs-5"><strong>{{ text_price }}</strong></div>
|
||||
<div class="col-xs-7 text-right">{% if license %}
|
||||
{{ price }}
|
||||
{% else %}
|
||||
{{ text_free }}
|
||||
{% endif %}</div>
|
||||
</div>
|
||||
<hr>
|
||||
<ul class="list-check">
|
||||
<li>{{ text_partner }}</li>
|
||||
<li>{{ text_support }}</li>
|
||||
<li>{{ text_documentation }}</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-xs-5"><strong>{{ text_rating }}</strong></div>
|
||||
<div class="col-xs-7 text-right">{% for i in 1..5 %}
|
||||
{% if rating >= i %}<i class="fa fa-star"></i>{% else %}<i class="fa fa-star-o"></i>{% endif %}
|
||||
{% endfor %} ({{ rating_total }})</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-xs-5"><strong>{{ text_date_modified }}</strong></div>
|
||||
<div class="col-xs-7 text-right">{{ date_modified }}</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-xs-5"><strong>{{ text_date_added }}</strong></div>
|
||||
<div class="col-xs-7 text-right">{{ date_added }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sales" class="well"><i class="opencart-icon-cart-mini"></i> <strong>{{ sales }}</strong> {{ text_sales }}</div>
|
||||
<div id="sales" class="well"><i class="opencart-icon-cart-mini"></i> <strong>{{ downloaded }}</strong> {{ text_downloaded }}</div>
|
||||
<div class="well">
|
||||
<div class="media">
|
||||
<div class="media-left media-middle"><img src="{{ member_image }}" alt="{{ member_username }}" title="{{ member_username }}" class="media-object img-circle"></div>
|
||||
<div class="media-body"> <span><a href="{{ filter_member }}">{{ member_username }}</a></span><br>
|
||||
<small>{{ text_member_since }} {{ member_date_added }}</small></div>
|
||||
</div>
|
||||
<br />
|
||||
<a href="{{ filter_member }}" class="btn btn-primary btn-lg btn-block">{{ button_view_all }}</a> <a href="https://www.opencart.com/index.php?route=support/seller&extension_id={{ extension_id }}" target="_blank" class="btn btn-ghost-dark btn-lg btn-block">{{ button_get_support }}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-opencart').on('click', function(e) {
|
||||
$('#modal-opencart').remove();
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/api&user_token={{ user_token }}',
|
||||
dataType: 'html',
|
||||
beforeSend: function() {
|
||||
$('#button-opencart').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-opencart').button('reset');
|
||||
},
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-opencart" class="modal">' + html + '</div>');
|
||||
|
||||
$('#modal-opencart').modal('show');
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-buy').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-purchase').remove();
|
||||
|
||||
html = '<div id="modal-purchase" class="modal">';
|
||||
html += ' <div class="modal-dialog">';
|
||||
html += ' <div class="modal-content">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>';
|
||||
html += ' <h4 class="modal-title">{{ text_purchase }}</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body">';
|
||||
html += ' <p>{{ text_pin }}</p>';
|
||||
html += ' <p>{{ text_secure }}</p>';
|
||||
html += ' <div class="form-group">';
|
||||
html += ' <label for="input-pin">{{ entry_pin }}</label>';
|
||||
html += ' <input type="password" name="pin" value="" placeholder="{{ entry_pin }}" id="input-pin" class="form-control" />';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group text-right">';
|
||||
html += ' <button type="button" id="button-purchase" data-loading-text="{{ text_loading }}" class="btn btn-primary btn-lg">{{ button_purchase }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#modal-purchase').modal('show');
|
||||
});
|
||||
|
||||
$('body').on('click', '#modal-purchase #button-purchase', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/marketplace/purchase&user_token={{ user_token }}&extension_id={{ extension_id }}',
|
||||
type: 'post',
|
||||
data: $('input[name=\'pin\']'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#modal-purchase .modal-body').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
$('#modal-purchase').modal('hide');
|
||||
|
||||
$('#tab-download .btn-primary').prop('disabled', false);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Install
|
||||
$('#tab-download').on('click', '.btn-primary', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
// Reset everything
|
||||
$('#progress-bar').css('width', '0%');
|
||||
$('#progress-bar').removeClass('progress-bar-success');
|
||||
$('#progress-text').html('');
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/marketplace/download&user_token={{ user_token }}&extension_id={{ extension_id }}&extension_download_id=' + $(this).attr('data-install'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#tab-download').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button</div>');
|
||||
}
|
||||
|
||||
if (json['redirect']) {
|
||||
location = json['redirect'];
|
||||
}
|
||||
|
||||
if (json['text']) {
|
||||
$('#progress-bar').css('width', '20%');
|
||||
$('#progress-text').html(json['text']);
|
||||
}
|
||||
|
||||
if (json['extension_install_id']) {
|
||||
$(element).replaceWith('<button type="button" data-install="' + $(element).attr('data-install') + '" data-uninstall="' + json['extension_install_id'] + '" data-loading="{{ text_loading }}" class="btn btn-danger"><i class="fa fa-trash-o"></i> {{ button_uninstall }}</button>');
|
||||
}
|
||||
|
||||
if (json['next']) {
|
||||
next(json['next'], element, 1);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function next(url, element, i) {
|
||||
i = i + 1;
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
$('#progress-bar').css('width', (i * 20) + '%');
|
||||
|
||||
if (json['error']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html('<div class="text-danger">' + json['error'] + '</div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#progress-bar').addClass('progress-bar-success');
|
||||
$('#progress-text').html('<span class="text-success">' + json['success'] + '</span>');
|
||||
}
|
||||
|
||||
if (json['text']) {
|
||||
$('#progress-text').html(json['text']);
|
||||
}
|
||||
|
||||
if (json['next']) {
|
||||
next(json['next'], element, i);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Uninstall
|
||||
$('#tab-download').on('click', ' .btn-danger', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$('#progress-bar').css('width', '0%');
|
||||
$('#progress-bar').removeClass('progress-bar-danger progress-bar-success');
|
||||
$('#progress-text').html('');
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/install/uninstall&user_token={{ user_token }}&extension_install_id=' + $(this).attr('data-uninstall'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html(json['error']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#progress-bar').css('width', '100%');
|
||||
$('#progress-bar').addClass('progress-bar-success');
|
||||
$('#progress-text').html(json['success']);
|
||||
|
||||
$(element).replaceWith('<button type="button" data-install="' + $(element).attr('data-install') + '" data-uninstall="" data-loading="{{ text_loading }}" class="btn btn-primary"><i class="fa fa-download"></i> {{ button_install }}</button>');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#comment').delegate('.pagination a', 'click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#comment').load(this.href);
|
||||
});
|
||||
|
||||
// Comment
|
||||
$('#comment').load('index.php?route=marketplace/marketplace/comment&user_token={{ user_token }}&extension_id={{ extension_id }}');
|
||||
|
||||
// Add comment
|
||||
$('#button-comment').on('click', function() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/marketplace/addcomment&user_token={{ user_token }}&extension_id={{ extension_id }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: 'comment=' + encodeURIComponent($('textarea[name=\'comment\']').val()),
|
||||
beforeSend: function() {
|
||||
$('#button-comment').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-comment').button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#tab-comment').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#tab-comment').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
$('#comment').load('index.php?route=marketplace/marketplace/comment&user_token={{ user_token }}&extension_id={{ extension_id }}');
|
||||
|
||||
$('textarea[name=\'comment\']').val('');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Next replies
|
||||
$('#comment').on('click', '.btn-block', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).attr('href'),
|
||||
dataType: 'html',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(html) {
|
||||
$(element).parent().parent().parent().append(html);
|
||||
|
||||
$(element).parent().remove();
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Reply
|
||||
$('#comment').on('click', '.btn-link', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$(this).parent().parent().find('.reply-input-box').toggle();
|
||||
});
|
||||
|
||||
// Add reply
|
||||
$('#comment').on('click', '.btn-primary', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).attr('href'),
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: 'comment=' + encodeURIComponent($(element).parents('.reply-input-box').find('textarea[name=\'comment\']').val()),
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$(element).parents('.reply-input-box').before('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$(element).parents('.reply-input-box').before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
$(element).parents('.reply-input-box').parents('.media').find('.reply-refresh').last().trigger('click');
|
||||
|
||||
$(element).parents('.reply-input-box').find('textarea[name=\'comment\']').val('');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Refresh
|
||||
$('#comment').on('click', '.reply-refresh', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).attr('href'),
|
||||
dataType: 'html',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(html) {
|
||||
$(element).parent().replaceWith(html);
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$(document).ready(function() {
|
||||
$('.thumbnails').magnificPopup({
|
||||
type:'image',
|
||||
delegate: 'a',
|
||||
gallery: {
|
||||
enabled:true
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,205 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">{% if not error_signature %}
|
||||
<button type="button" id="button-opencart" data-toggle="tooltip" title="{{ button_opencart }}" class="btn btn-info"><i class="fa fa-cog"></i></button>
|
||||
{% else %}
|
||||
<button type="button" id="button-opencart" data-toggle="tooltip" title="{{ error_signature }}" data-placement="left" class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i></button>
|
||||
{% endif %}</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-puzzle-piece"></i> {{ text_list }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="well">
|
||||
<div class="input-group" id="extension-filter">
|
||||
<input type="text" name="filter_search" value="{{ filter_search }}" placeholder="{{ text_search }}" class="form-control" />
|
||||
<div class="input-group-btn">{% for category in categories %}
|
||||
{% if category.value == filter_category %}
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ text_category }} ({{ category.text }}) <span class="caret"></span></button>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<ul class="dropdown-menu">
|
||||
{% for category in categories %}
|
||||
<li><a href="{{ category.href }}">{{ category.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<input type="hidden" name="filter_category_id" value="{{ filter_category_id }}" class="form-control" />
|
||||
<input type="hidden" name="filter_download_id" value="{{ filter_download_id }}" class="form-control" />
|
||||
<input type="hidden" name="filter_rating" value="{{ filter_rating }}" class="form-control" />
|
||||
<input type="hidden" name="filter_license" value="{{ filter_license }}" class="form-control" />
|
||||
<input type="hidden" name="filter_partner" value="{{ filter_partner }}" class="form-control" />
|
||||
<input type="hidden" name="sort" value="{{ sort }}" class="form-control" />
|
||||
<button type="button" id="button-filter" class="btn btn-primary"><i class="fa fa-filter"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-xs-7">
|
||||
<div class="btn-group">{% for license in licenses %}
|
||||
{% if license.value == filter_license %}<a href="{{ license.href }}" class="btn btn-default active">{{ license.text }}</a>{% else %}<a href="{{ license.href }}" class="btn btn-default">{{ license.text }}</a>{% endif %}
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
<div class="col-sm-3 col-xs-5">
|
||||
<div class="input-group pull-right">
|
||||
<div class="input-group-addon"><i class="fa fa-sort-amount-asc"></i></div>
|
||||
<select onchange="location = this.value;" class="form-control">
|
||||
|
||||
|
||||
|
||||
|
||||
{% for sorts in sorts %}
|
||||
{% if sorts.value == sort %}
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="{{ sorts.href }}" selected="selected">{{ sorts.text }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="{{ sorts.href }}">{{ sorts.text }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="extension-list">{% if promotions %}
|
||||
<h3>Featured</h3>
|
||||
<div class="row">{% for extension in promotions %}
|
||||
{% if extension %}
|
||||
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
|
||||
<section>
|
||||
<div class="extension-preview"><a href="{{ extension.href }}">
|
||||
<div class="extension-description"></div>
|
||||
<img src="{{ extension.image }}" alt="{{ extension.name }}" title="{{ extension.name }}" class="img-responsive" /></a></div>
|
||||
<div class="extension-name">
|
||||
<h4><a href="{{ extension.href }}">{{ extension.name }}</a></h4>
|
||||
{{ extension.price }}</div>
|
||||
<div class="extension-rate">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">{% for i in 1..5 %}
|
||||
{% if extension.rating >= i %}<i class="fa fa-star"></i>{% else %}<i class="fa fa-star-o"></i>{% endif %}
|
||||
{% endfor %}</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="text-right">{{ extension.rating_total }} {{ text_reviews }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}</div>
|
||||
<hr />
|
||||
{% endif %}
|
||||
|
||||
{% if extensions %}
|
||||
<div class="row"> {% for extension in extensions %}
|
||||
|
||||
{% if extension %}
|
||||
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
|
||||
<section>
|
||||
<div class="extension-preview"><a href="{{ extension.href }}">
|
||||
<div class="extension-description"></div>
|
||||
<img src="{{ extension.image }}" alt="{{ extension.name }}" title="{{ extension.name }}" class="img-responsive" /></a></div>
|
||||
<div class="extension-name">
|
||||
<h4><a href="{{ extension.href }}">{{ extension.name }}</a></h4>
|
||||
{{ extension.price }}</div>
|
||||
<div class="extension-rate">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">{% for i in 1..5 %}
|
||||
{% if extension.rating >= i %}<i class="fa fa-star"></i>{% else %}<i class="fa fa-star-o"></i>{% endif %}
|
||||
{% endfor %}</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="text-right">{{ extension.rating_total }} {{ text_reviews }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %} </div>
|
||||
{% else %}
|
||||
<p class="text-center">{{ text_no_results }}</p>
|
||||
{% endif %} </div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">{{ pagination }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-opencart').on('click', function(e) {
|
||||
$('#modal-opencart').remove();
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/api&user_token={{ user_token }}',
|
||||
dataType: 'html',
|
||||
beforeSend: function() {
|
||||
$('#button-opencart').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-opencart').button('reset');
|
||||
},
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-opencart" class="modal">' + html + '</div>');
|
||||
|
||||
$('#modal-opencart').modal('show');
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-filter').on('click', function(e) {
|
||||
var url = 'index.php?route=marketplace/marketplace&user_token={{ user_token }}';
|
||||
|
||||
var input = $('#extension-filter :input');
|
||||
|
||||
for (i = 0; i < input.length; i++) {
|
||||
if ($(input[i]).val() != '' && $(input[i]).val() != null) {
|
||||
url += '&' + $(input[i]).attr('name') + '=' + $(input[i]).val()
|
||||
}
|
||||
}
|
||||
|
||||
location = url;
|
||||
});
|
||||
|
||||
$('input[name="filter_search"]').keydown(function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#button-filter').trigger('click');
|
||||
}
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,20 @@
|
||||
<div>
|
||||
{% if replies %}
|
||||
{% for reply in replies %}
|
||||
<div class="media">
|
||||
<div class="media-left"><img src="{{ reply.image }}" alt="{{ reply.member }}" title="{{ reply.member }}" class="media-object" /></div>
|
||||
<div class="media-body">
|
||||
<p class="media-heading">{{ reply.member }} <span>{{ reply.date_added }}</span> </p>
|
||||
<p>{{ reply.comment }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if next %}
|
||||
<div class="text-center"><a href="{{ next }}" class="btn btn-block">{{ text_see_more }}</a></div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ refresh }}" class="reply-refresh hide">{{ button_refresh }}</a>
|
||||
</div>
|
||||
@@ -0,0 +1,252 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
|
||||
<a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-success"><i class="fa fa-plus"></i></a>
|
||||
<a href="{{ refresh }}" data-toggle="tooltip" title="{{ button_refresh }}" class="btn btn-info"><i class="fa fa-refresh"></i></a>
|
||||
<a href="{{ clear }}" data-toggle="tooltip" title="{{ button_clear }}" class="btn btn-warning"><i class="fa fa-eraser"></i></a>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-modification').submit() : false;"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_refresh }}</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if modifications %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_progress }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="progress">
|
||||
<div id="progress-bar" class="progress-bar" style="width: 0%;"></div>
|
||||
</div>
|
||||
<div id="progress-text"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-log" data-toggle="tab">{{ tab_log }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-general">
|
||||
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-modification">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
|
||||
<td class="text-left">{% if sort == 'name' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_name }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'author' %}
|
||||
<a href="{{ sort_author }}" class="{{ order|lower }}">{{ column_author }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_author }}">{{ column_author }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'version' %}
|
||||
<a href="{{ sort_version }}" class="{{ order|lower }}">{{ column_version }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_version }}">{{ column_version }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'status' %}
|
||||
<a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_status }}">{{ column_status }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'date_added' %}
|
||||
<a href="{{ sort_date_added }}" class="{{ order|lower }}">{{ column_date_added }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_date_added }}">{{ column_date_added }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if modifications %}
|
||||
{% for modification in modifications %}
|
||||
<tr>
|
||||
<td class="text-center">{% if modification.modification_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ modification.modification_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ modification.modification_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ modification.name }}</td>
|
||||
<td class="text-left">{{ modification.author }}</td>
|
||||
<td class="text-left">{{ modification.version }}</td>
|
||||
<td class="text-left">{{ modification.status }}</td>
|
||||
<td class="text-left">{{ modification.date_added }}</td>
|
||||
<td class="text-right">
|
||||
<a href="{{modification.edit}}" data-toggle="tooltip" title="{{button_edit}}" class="btn btn-success"><i class="fa fa-pencil"></i></a>
|
||||
<a href="{{modification.download}}" data-toggle="tooltip" title="{{button_download}}" class="btn btn-primary" download="{{modification.filename}}"><i class="fa fa-download"></i></a>
|
||||
<button type="button" data-loading-text="{{text_loading}}" data-modification-id="{{modification.modification_id}}" data-toggle="tooltip" title="{{button_upload}}" class="btn btn-primary button-upload"><i class="fa fa-upload"></i></button>
|
||||
{% if modification.link %}
|
||||
<a href="{{ modification.link }}" data-toggle="tooltip" title="{{ button_link }}" class="btn btn-info" target="_blank"><i class="fa fa-link"></i></a>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-info" disabled="disabled"><i class="fa fa-link"></i></button>
|
||||
{% endif %}
|
||||
{% if not modification.enabled %}
|
||||
<a href="{{ modification.enable }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-success"><i class="fa fa-plus-circle"></i></a>
|
||||
{% else %}
|
||||
<a href="{{ modification.disable }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></a>
|
||||
{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="7">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-right">{{ results }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-log">
|
||||
<p>
|
||||
<textarea wrap="off" rows="15" class="form-control">{{ log }}</textarea>
|
||||
</p>
|
||||
<div class="text-center"><a href="{{ clear_log }}" class="btn btn-danger"><i class="fa fa-eraser"></i> {{ button_clear }}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
var step = new Array();
|
||||
var total = 0;
|
||||
|
||||
$('.button-upload').on('click', function() {
|
||||
$('#form-upload').remove();
|
||||
var modification_id = $(this).attr('data-modification-id');
|
||||
|
||||
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
|
||||
|
||||
$('#form-upload input[name=\'file\']').trigger('click');
|
||||
|
||||
if (typeof timer != 'undefined') {
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
timer = setInterval(function() {
|
||||
if ($('#form-upload input[name=\'file\']').val() != '') {
|
||||
clearInterval(timer);
|
||||
|
||||
// Reset everything
|
||||
$('.alert').remove();
|
||||
$('#progress-bar').css('width', '0%');
|
||||
$('#progress-bar').removeClass('progress-bar-danger progress-bar-success');
|
||||
$('#progress-text').html('');
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/modification/upload&user_token={{user_token}}&modification_id='+modification_id,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: new FormData($('#form-upload')[0]),
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
beforeSend: function() {
|
||||
$('#button-upload').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-upload').button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html('<div class="text-danger">' + json['error'] + '</div>');
|
||||
}
|
||||
|
||||
if (json['step']) {
|
||||
step = json['step'];
|
||||
total = step.length;
|
||||
|
||||
if (json['overwrite'].length) {
|
||||
html = '';
|
||||
|
||||
for (i = 0; i < json['overwrite'].length; i++) {
|
||||
html += json['overwrite'][i] + "\n";
|
||||
}
|
||||
|
||||
$('#overwrite').html(html);
|
||||
|
||||
$('#button-continue').prop('disabled', false);
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
function next() {
|
||||
data = step.shift();
|
||||
|
||||
if (data) {
|
||||
$('#progress-bar').css('width', (100 - (step.length / total) * 100) + '%');
|
||||
$('#progress-text').html('<span class="text-info">' + data['text'] + '</span>');
|
||||
|
||||
$.ajax({
|
||||
url: data.url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: 'path=' + data.path,
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html('<div class="text-danger">' + json['error'] + '</div>');
|
||||
$('#button-clear').prop('disabled', false);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#progress-bar').addClass('progress-bar-success');
|
||||
$('#progress-text').html('<span class="text-success">' + json['success'] + '</span>');
|
||||
}
|
||||
|
||||
if (!json['error'] && !json['success']) {
|
||||
next();
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//--></script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,42 @@
|
||||
<div class="panel panel-default" data-file="{{ file_row }}">
|
||||
|
||||
<div class="panel-heading" role="tab" id="heading-{{ file_row }}">
|
||||
<h4 class="panel-title">
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="{{ entry_filename }}" name="newxml[files][{{ file_row }}][filename]" value="{{ file.attributes.path }}">
|
||||
<a class="input-group-addon" role="button" class="btn btn-primary" data-toggle="collapse" href="#accordion-modification-files-{{ file_row }}" aria-expanded="false" aria-controls="collapse-{{ file_row }}">{{ text_collapse }}</a>
|
||||
<a type="button" class="btn btn-danger input-group-addon" onclick="(confirm('{{ text_file_remove }}')) ? FileRemove({{ file_row }}) : ''"><i class="fa fa-trash-o"></i></a>
|
||||
</div>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="accordion-modification-files-{{ file_row }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-{{ file_row }}">
|
||||
<div class="panel-body">
|
||||
|
||||
|
||||
<div class="panel-group" id="accordion-modification-operations-{{ file_row }}" role="tablist" aria-multiselectable="true">
|
||||
|
||||
{% if file.operation.0.search is defined %}
|
||||
{% set operations = file.operation %}
|
||||
{% else %}
|
||||
{% set operations = [file.operation] %}
|
||||
{% endif %}
|
||||
|
||||
{% set operation_row = 0 %}
|
||||
|
||||
|
||||
{% for operation in operations %}
|
||||
{% include 'marketplace/modification_operation.twig' %}
|
||||
{% set operation_row = operation_row + 1 %}
|
||||
|
||||
{% endfor %}
|
||||
<div class="form-group col-sm-12">
|
||||
<button type="button" class="btn btn-primary" onclick="OperationAdd({{ file_row }}, this)">{{ text_add }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,230 @@
|
||||
{{header}}{{column_left}}
|
||||
|
||||
<div id="content">
|
||||
<style>
|
||||
.CodeMirror {
|
||||
height: auto;
|
||||
border: 1px solid #cccccc;
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
}
|
||||
.CodeMirror-scroll {
|
||||
max-height: 300px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function updateTextArea() {
|
||||
editor.save();
|
||||
}
|
||||
</script>
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<a type="button" onclick="update()" data-toggle="tooltip" title="{{button_update}}" class="btn btn-success"><i class="fa fa-check"></i></a>
|
||||
<button type="submit" form="form-modification" data-toggle="tooltip" title="{{button_save}}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{cancel}}" data-toggle="tooltip" title="{{button_cancel}}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{heading_title}}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{error_warning}}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{text_form}}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{action}}" method="post" enctype="multipart/form-data" id="form-modification" class="form-horizontal">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{tab_general}}</a></li>
|
||||
<li><a href="#tab-backup" data-toggle="tab">{{tab_backup}}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-general">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-name">{{entry_name}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-code">{{entry_code}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="code" value="{{ newxml.code }}" placeholder="{{ entry_code }}" id="input-name" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-version">{{entry_version}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="version" value="{{ newxml.version }}" placeholder="{{ entry_version }}" id="input-name" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-author">{{entry_author}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="author" value="{{ newxml.author }}" placeholder="{{ entry_author }}" id="input-name" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-link">{{entry_link}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="link" value="{{ newxml.link }}" placeholder="{{ entry_link }}" id="input-name" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-group" id="accordion-modification-files" role="tablist" aria-multiselectable="true">
|
||||
|
||||
{% set file_row = 0 %}
|
||||
{% for file in newxml.file %}
|
||||
|
||||
|
||||
{% include 'marketplace/modification_file.twig' %}
|
||||
|
||||
|
||||
|
||||
{% set file_row = file_row + 1 %}
|
||||
{% endfor %}
|
||||
<div class="form-group col-sm-12">
|
||||
<button type="button" class="btn btn-primary" onclick="FileAdd(this)">{{ text_file_add }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-backup">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{column_id}}</td>
|
||||
<td class="text-left">{{column_code}}</td>
|
||||
<td class="text-left">{{column_date_added}}</td>
|
||||
<td class="text-right">{{column_restore}} <a type="button" href="{{history}}" data-toggle="tooltip" title="{{button_history}}" class="btn btn-default"><i class="fa fa-trash"></i></a></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if backups %}
|
||||
{% for backup in backups %}
|
||||
<tr>
|
||||
<td class="text-left">{{backup['backup_id']}}</td>
|
||||
<td class="text-left">{{backup['code']}}</td>
|
||||
<td class="text-left">{{backup['date_added']}}</td>
|
||||
<td class="text-right"><a href="{{backup['restore']}}" data-toggle="tooltip" title="{{button_restore}}" class="btn btn-primary"><i class="fa fa-share-square"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{text_no_results}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
function UpdateTextOperation(element){
|
||||
var span = $(element).attr("data-id-text");
|
||||
switch($(element).val()){
|
||||
case 'after':
|
||||
$(span).text('{{ text_help_after }}');
|
||||
break;
|
||||
case 'before':
|
||||
$(span).text('{{ text_help_before }}');
|
||||
break;
|
||||
case 'replace':
|
||||
$(span).text('{{ text_help_replace }}');
|
||||
break;
|
||||
}
|
||||
}
|
||||
$("#form-modification").on("change", "select.select-operation", function(){
|
||||
UpdateTextOperation(this);
|
||||
})
|
||||
$(document).ready(function(){
|
||||
$("#form-modification select.select-operation").each(function(){
|
||||
UpdateTextOperation(this);
|
||||
})
|
||||
})
|
||||
|
||||
function OperationRemove(operation_row, file_row){
|
||||
|
||||
$("[data-file='"+file_row+"'] [data-operation='"+operation_row+"']").remove();
|
||||
}
|
||||
|
||||
function OperationAdd(file_row, element){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var data = {
|
||||
operation_row: parseInt($("[data-file='"+file_row+"'] [data-operation]").last().attr('data-operation')) + 1,
|
||||
file_row: file_row,
|
||||
};
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/modification/addoperation&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
type: 'post',
|
||||
data: data,
|
||||
success: function(json) {
|
||||
if(json['prepend']){
|
||||
$(element).parent().before(json['prepend']);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function FileAdd(element){
|
||||
|
||||
|
||||
|
||||
var data = {
|
||||
file_row: parseInt($("[data-file").last().attr('data-file')) + 1,
|
||||
};
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/modification/addfile&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
type: 'post',
|
||||
data: data,
|
||||
success: function(json) {
|
||||
|
||||
if(json['prepend']){
|
||||
$(element).parent().before(json['prepend']);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function FileRemove(file_row){
|
||||
$("[data-file='"+file_row+"']").remove();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function update () {
|
||||
var action = $('form#form-modification').attr('action');
|
||||
$('form#form-modification').attr('action', action+"&update=1");
|
||||
$('form#form-modification').submit();
|
||||
}
|
||||
--></script>
|
||||
{{footer}}
|
||||
@@ -0,0 +1,97 @@
|
||||
{% if operation %}
|
||||
<div class="panel panel-default" data-operation="{{ operation_row }}">
|
||||
|
||||
<div class="panel-heading" role="tab" id="heading-{{ file_row }}-{{ operation_row }}">
|
||||
<h4 class="panel-title">
|
||||
|
||||
{% if operation.attributes.info %}<div style="margin-bottom: 10px;" class="alert alert-info" role="alert">{{ operation.attributes.info }}</div>{% endif %}
|
||||
<div class="input-group">
|
||||
|
||||
<select class="form-control select-operation" name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][action]" data-id-text="#title-operation-{{ file_row }}-{{ operation_row }}">
|
||||
|
||||
<option value="replace" {% if operation.add.attributes.position == "replace" %}selected{% endif %}>{{ select_action_replace }}</option>
|
||||
<option value="before"{% if operation.add.attributes.position == "before" %}selected{% endif %}>{{ select_action_before }}</option>
|
||||
<option value="after"{% if operation.add.attributes.position == "after" %}selected{% endif %}>{{ select_action_after }}</option>
|
||||
</select>
|
||||
<a class="input-group-addon" role="button" class="btn btn-primary" data-toggle="collapse" href="#accordion-modification-operations-{{ file_row }}-{{ operation_row }}" aria-expanded="false" aria-controls="collapse-{{ file_row }}-{{ operation_row }}">{{ text_collapse }}</a>
|
||||
<a type="button" class="btn btn-danger input-group-addon" onclick="(confirm('{{ text_remove_1 }}')) ? OperationRemove({{ operation_row }}, {{ file_row }}) : ''"><i class="fa fa-trash-o"></i></a>
|
||||
</div>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="accordion-modification-operations-{{ file_row }}-{{ operation_row }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-{{ file_row }}-{{ operation_row }}">
|
||||
<div class="panel-body">
|
||||
<div class="form-group col-sm-12">
|
||||
{{ entry_comment }}
|
||||
<input type="text" name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][info]" class="form-control" value="{{ operation.attributes.info }}" placeholder="{{ entry_comment }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
{{ text_help_search }}
|
||||
<textarea name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][search]" placeholder="{{ entry_xml }}" id="input-xml-{{ file_row }}-{{ operation_row }}-search" class="form-control php_editor_{{ file_row }}_{{ operation_row }}">{{ operation.search|escape }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
|
||||
<span id="title-operation-{{ file_row }}-{{ operation_row }}">{{ text_help_replace }}</span>
|
||||
<textarea name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][replace]" placeholder="{{ entry_xml }}" id="input-xml-{{ file_row }}-{{ operation_row }}-replace" class="form-control php_editor_{{ file_row }}_{{ operation_row }}">{{ operation.add|escape }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-sm-3">
|
||||
{{ text_search_index }}
|
||||
<input name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][index]" type="number" class="form-control" value="{{ (operation.search.attributes.index is defined ) ? operation.search.attributes.index|number_format : '' }}" placeholder="{{ text_search_index }}">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
{{ text_search_offset }}
|
||||
<input name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][offset]" type="text" class="form-control" value="{{ (operation.add.attributes.offset is defined ) ? operation.add.attributes.offset|number_format : '' }}" placeholder="{{ text_search_offset }}">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
{{ text_search_limit }}
|
||||
<input name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][limit]" type="number" class="form-control" value="{{ (operation.search.attributes.limit is defined ) ? operation.search.attributes.limit|number_format : '' }}" placeholder="{{ text_search_limit }}">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
{{ text_select_error }}
|
||||
<select class="form-control" name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][error]" placeholder="{{ entry_xml }}" id="input-xml-{{ file_row }}-{{ operation_row }}-search" class="form-control php_editor_{{ file_row }}_{{ operation_row }}">
|
||||
|
||||
<option value="log" {% if operation.attributes.error == "log" %}selected{% endif %}>{{ text_select_error_log }}</option>
|
||||
<option value="skip"{% if operation.attributes.error == "skip" %}selected{% endif %}>{{ text_select_error_skip }}</option>
|
||||
<option value="error"{% if operation.attributes.error == "error" %}selected{% endif %}>{{ text_select_error_error }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][regex]" value="1" {{ operation.search.attributes.regex == 'true' ? 'checked' : '' }}>
|
||||
{{ text_access_regex }}
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" name="newxml[files][{{ file_row }}][operations][{{ operation_row }}][trim]" value="1" {{ operation.add.attributes.trim == 'true' ? 'checked' : '' }}>
|
||||
{{ text_access_trim }}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(".php_editor_{{ file_row }}_{{ operation_row }}").each(function() {
|
||||
var editor = CodeMirror.fromTextArea( this, {
|
||||
mode: "text/x-php",
|
||||
dragDrop: false,
|
||||
autoRefresh: true,
|
||||
viewportMargin: Infinity
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(this).on('change', updateTextArea);
|
||||
});
|
||||
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
@@ -0,0 +1,137 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right"><a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="marketplace-extension-info" class="container-fluid">{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-puzzle-piece"></i> {{ name }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row extension-info">
|
||||
<div class="col-sm-8">{% if banner %}
|
||||
<div id="banner" class="text-center thumbnail"><img src="{{ banner }}" title="{{ name }}" alt="{{ name }}" class="img-responsive" /></div>
|
||||
{% endif %}
|
||||
<div class="row thumbnails">{% for image in images %}
|
||||
<div class="col-xs-4 col-sm-2"><a href="{{ image.popup }}" class="thumbnail"><img src="{{ image.thumb }}" alt="{{ image.name }}" title="{{ image.name }}" class="img-responsive" /></a></div>
|
||||
{% endfor %} </div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-description" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-changelog" data-toggle="tab">{{ tab_changelog }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-description" class="tab-pane active">{{ description }}</div>
|
||||
<div id="tab-changelog" class="tab-pane">{{ changelog }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div id="buy" class="well">{% if license == '1' and not purchased %}
|
||||
<a target="_blank" href="{{ extension_url }}?utm_source=ocstore_marketplace" id="button-buy" class="btn btn-success btn-lg btn-block">{{ button_purchase }}</a>
|
||||
{% endif %}
|
||||
<div id="price" class="row">
|
||||
<div class="col-xs-5"><strong>{{ text_price }}</strong></div>
|
||||
<div class="col-xs-7 text-right">{% if license %}
|
||||
{{ price }}
|
||||
{% else %}
|
||||
{{ text_free }}
|
||||
{% endif %}</div>
|
||||
</div>
|
||||
<hr>
|
||||
<ul class="list-check">
|
||||
{% for field in cfields %}
|
||||
<li>{{ field.name }}: {{ field.value|raw }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-xs-5"><strong>{{ text_rating }}</strong></div>
|
||||
<div class="col-xs-7 text-right">{% for i in 1..5 %}
|
||||
{% if rating >= i %}<i class="fa fa-star"></i>{% else %}<i class="fa fa-star-o"></i>{% endif %}
|
||||
{% endfor %} ({{ rating_total }})</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-xs-5"><strong>{{ text_date_modified }}</strong></div>
|
||||
<div class="col-xs-7 text-right">{{ date_modified }}</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-xs-5"><strong>{{ text_date_added }}</strong></div>
|
||||
<div class="col-xs-7 text-right">{{ date_added }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sales" class="well"><i class="opencart-icon-cart-mini"></i> <strong>{{ sales }}</strong> {{ text_sales }}</div>
|
||||
<div id="sales" class="well"><i class="opencart-icon-cart-mini"></i> <strong>{{ downloaded }}</strong> {{ text_downloaded }}</div>
|
||||
<div class="well">
|
||||
<div class="media">
|
||||
<div class="media-left media-middle"><img src="{{ member_image }}" alt="{{ member_username }}" title="{{ member_username }}" class="media-object img-circle"></div>
|
||||
<div class="media-body"> <span><a target="_blank" href="{{ member_url }}">{{ member_username }}</a></span><br>
|
||||
<small>{{ text_member_since }} {{ member_date_added }}</small></div>
|
||||
</div>
|
||||
<br />
|
||||
<a href="{{ filter_member }}" class="btn btn-primary btn-lg btn-block">{{ button_view_all }}</a> <a href="https://opencartforum.com/topic/{{ topicid }}-{{ topicseoname }}" target="_blank" class="btn btn-ghost-dark btn-lg btn-block">{{ button_get_support }}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
function next(url, element, i) {
|
||||
i = i + 1;
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
$('#progress-bar').css('width', (i * 20) + '%');
|
||||
|
||||
if (json['error']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html('<div class="text-danger">' + json['error'] + '</div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#progress-bar').addClass('progress-bar-success');
|
||||
$('#progress-text').html('<span class="text-success">' + json['success'] + '</span>');
|
||||
}
|
||||
|
||||
if (json['text']) {
|
||||
$('#progress-text').html(json['text']);
|
||||
}
|
||||
|
||||
if (json['next']) {
|
||||
next(json['next'], element, i);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$(document).ready(function() {
|
||||
$('.thumbnails').magnificPopup({
|
||||
type:'image',
|
||||
delegate: 'a',
|
||||
gallery: {
|
||||
enabled:true
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,176 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right"></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-puzzle-piece"></i> {{ text_list }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="well">
|
||||
<div class="input-group" id="extension-filter">
|
||||
<input type="text" name="filter_search" value="{{ filter_search }}" placeholder="{{ text_search }}" class="form-control" />
|
||||
<div class="input-group-btn">{% for category in categories %}
|
||||
{% if category.value == filter_category %}
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ text_category }} ({{ category.text }}) <span class="caret"></span></button>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<ul class="dropdown-menu">
|
||||
{% for category in categories %}
|
||||
<li><a href="{{ category.href }}">{{ category.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<input type="hidden" name="filter_category_id" value="{{ filter_category_id }}" class="form-control" />
|
||||
<input type="hidden" name="filter_download_id" value="{{ filter_download_id }}" class="form-control" />
|
||||
<input type="hidden" name="filter_rating" value="{{ filter_rating }}" class="form-control" />
|
||||
<input type="hidden" name="filter_license" value="{{ filter_license }}" class="form-control" />
|
||||
<input type="hidden" name="filter_partner" value="{{ filter_partner }}" class="form-control" />
|
||||
<input type="hidden" name="sort" value="{{ sort }}" class="form-control" />
|
||||
<button type="button" id="button-filter" class="btn btn-primary"><i class="fa fa-filter"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-xs-7">
|
||||
<div class="btn-group">{% for license in licenses %}
|
||||
{% if license.value == filter_license %}<a href="{{ license.href }}" class="btn btn-default active">{{ license.text }}</a>{% else %}<a href="{{ license.href }}" class="btn btn-default">{{ license.text }}</a>{% endif %}
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
<div class="col-sm-3 col-xs-5">
|
||||
<div class="input-group pull-right">
|
||||
<div class="input-group-addon"><i class="fa fa-sort-amount-asc"></i></div>
|
||||
<select onchange="location = this.value;" class="form-control">
|
||||
|
||||
|
||||
|
||||
|
||||
{% for sorts in sorts %}
|
||||
{% if sorts.value == sort %}
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="{{ sorts.href }}" selected="selected">{{ sorts.text }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="{{ sorts.href }}">{{ sorts.text }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="extension-list">{% if promotions %}
|
||||
<h3>Featured</h3>
|
||||
<div class="row">{% for extension in promotions %}
|
||||
{% if extension %}
|
||||
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
|
||||
<section>
|
||||
<div class="extension-preview"><a href="{{ extension.href }}">
|
||||
<div class="extension-description"></div>
|
||||
<img src="{{ extension.image }}" alt="{{ extension.name }}" title="{{ extension.name }}" class="img-responsive" /></a></div>
|
||||
<div class="extension-name">
|
||||
<h4><a href="{{ extension.href }}">{{ extension.name }}</a></h4>
|
||||
{{ extension.price }}</div>
|
||||
<div class="extension-rate">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">{% for i in 1..5 %}
|
||||
{% if extension.rating >= i %}<i class="fa fa-star"></i>{% else %}<i class="fa fa-star-o"></i>{% endif %}
|
||||
{% endfor %}</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="text-right">{{ extension.rating_total }} {{ text_reviews }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}</div>
|
||||
<hr />
|
||||
{% endif %}
|
||||
|
||||
{% if extensions %}
|
||||
<div class="row"> {% for extension in extensions %}
|
||||
|
||||
{% if extension %}
|
||||
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
|
||||
<section>
|
||||
<div class="extension-preview"><a href="{{ extension.href }}">
|
||||
<div class="extension-description"></div>
|
||||
<img src="{{ extension.image }}" alt="{{ extension.name }}" title="{{ extension.name }}" class="img-responsive" /></a></div>
|
||||
<div class="extension-name">
|
||||
<h4><a href="{{ extension.href }}">{{ extension.name }}</a></h4>
|
||||
{{ extension.price }}</div>
|
||||
<div class="extension-rate">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">{% for i in 1..5 %}
|
||||
{% if extension.rating >= i %}<i class="fa fa-star"></i>{% else %}<i class="fa fa-star-o"></i>{% endif %}
|
||||
{% endfor %}</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="text-right">{{ extension.rating_total }} {{ text_reviews }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %} </div>
|
||||
{% else %}
|
||||
<p class="text-center">{{ text_no_results }}</p>
|
||||
{% endif %} </div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">{{ pagination }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-filter').on('click', function(e) {
|
||||
var url = 'index.php?route=marketplace/opencartforum&user_token={{ user_token }}';
|
||||
|
||||
var input = $('#extension-filter :input');
|
||||
|
||||
for (i = 0; i < input.length; i++) {
|
||||
if ($(input[i]).val() != '' && $(input[i]).val() != null) {
|
||||
url += '&' + $(input[i]).attr('name') + '=' + $(input[i]).val()
|
||||
}
|
||||
}
|
||||
|
||||
location = url;
|
||||
});
|
||||
|
||||
$('input[name="filter_search"]').keydown(function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#button-filter').trigger('click');
|
||||
}
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
Reference in New Issue
Block a user