first commit

This commit is contained in:
sujan
2024-08-06 18:06:00 +05:45
commit a2fa49071a
2745 changed files with 391199 additions and 0 deletions

View File

@ -0,0 +1,37 @@
{{ header }}
<div id="cms-blog" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">
{{ column_left }}
<div id="content" class="col">
{{ content_top }}
<h2>{{ heading_title }}</h2>
{% if thumb %}
<img src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" class="img-thumbnail"/>
{% endif %}
<div>{{ description }}</div>
<hr/>
<div id="comment">{{ comment }}</div>
{{ content_bottom }}
</div>
{{ column_right }}
</div>
</div>
<script type="text/javascript"><!--
$('#comment').on('click', '.pagination a', function(e) {
e.preventDefault();
$('#comment').load(this.href);
});
//--></script>
{{ footer }}

View File

@ -0,0 +1,62 @@
{{ header }}
<div id="product-category" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
<div id="content" class="col">
{{ content_top }}
{% if topics %}
<h3>{{ text_refine }}</h3>
<div class="input-group dropdown mb-3">
<input type="text" name="filter_search" value="{{ filter_search }}" placeholder="{{ text_search }}" id="input-search" class="form-control"/>
<select name="topic_id" id="input-topic" class="form-select">
{% for topic in topics %}
<option value="{{ topic.topic_id }}"{% if topic.topic_id == topic_id %} selected{% endif %}>{{ topic.name }}</option>
{% endfor %}
</select> <a href="{{ continue }}" class="btn btn-primary">{{ button_search }}</a>
</div>
{% endif %}
{% if articles %}
{% for article in articles %}
<div class="mb-3">
<h2><a href="{{ article.href }}">{{ article.name }}</a></h2>
{% if article.image %}
<div class="article-image"><a href="{{ article.href }}"><img src="{{ article.image }}" title="{{ article.name }}" alt="{{ article.name }}" class="img-responsive"/></a></div>
{% endif %}
<ul class="list-inline">
<li class="list-inline-item">By <a href="{{ article.filter_author }}">{{ article.author }}</a></li>
<li class="list-inline-item">{{ article.date_added }}</li>
<li class="list-inline-item">{{ article.comment_total }} Comments</li>
</ul>
<div class="mb-3">{{ article.description }}</div>
<a href="{{ article.href }}" class="btn btn-primary">{{ button_continue }}</a>
</div>
{% endfor %}
<div class="row">
<div class="col-sm-6 text-start">{{ pagination }}</div>
<div class="col-sm-6 text-end">{{ results }}</div>
</div>
{% else %}
<p>{{ text_no_results }}</p>
{% endif %}
{{ content_bottom }}
</div>
{{ column_right }}
</div>
</div>
{{ footer }}

View File

@ -0,0 +1,82 @@
<form id="form-comment">
<div id="comment">{{ list }}</div>
<h2>{{ text_write }}</h2>
{% if review_guest %}
<div class="mb-3 required">
<label for="input-author" class="form-label">{{ entry_author }}</label>
<input type="text" name="author" value="{{ author }}" id="input-author" class="form-control"/>
<div id="error-author" class="invalid-feedback"></div>
</div>
<div class="mb-3 required">
<label for="input-comment" class="form-label">{{ entry_comment }}</label>
<textarea name="text" rows="5" id="input-comment" class="form-control"></textarea>
<div id="error-comment" class="invalid-feedback"></div>
</div>
{{ captcha }}
<div class="row">
<div class="col">
<a href="{{ back }}" class="btn btn-light">{{ button_back }}</a>
</div>
<div class="col text-end">
<button type="submit" id="button-comment" class="btn btn-primary">{{ button_continue }}</button>
</div>
</div>
{% else %}
{{ text_login }}
{% endif %}
</form>
<script type="text/javascript"><!--
$('#comment').on('click', '.pagination a', function(e) {
e.preventDefault();
$('#comment').load(this.href);
});
// Forms
$('#form-comment').on('submit', function(e) {
e.preventDefault();
var element = this;
$.ajax({
url: 'index.php?route=cms/comment.addComment&language={{ language }}&comment_token={{ comment_token }}&article_id={{ article_id }}',
type: 'post',
data: $('#form-comment').serialize(),
dataType: 'json',
cache: false,
contentType: 'application/x-www-form-urlencoded',
processData: false,
beforeSend: function() {
$('#button-comment').button('loading');
},
complete: function() {
$('#button-comment').button('reset');
},
success: function(json) {
$('.alert-dismissible').remove();
$('#form-comment').find('.is-invalid').removeClass('is-invalid');
$('#form-comment').find('.invalid-feedback').removeClass('d-block');
if (json['error']) {
if (json['error']['warning']) {
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error']['warning'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
}
for (key in json['error']) {
$('#input-' + key.replaceAll('_', '-')).addClass('is-invalid').find('.form-control, .form-select, .form-check-input, .form-check-label').addClass('is-invalid');
$('#error-' + key.replaceAll('_', '-')).html(json['error'][key]).addClass('d-block');
}
}
if (json['success']) {
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
$('#input-comment').val('');
}
},
error: function(xhr, ajaxOptions, thrownError) {
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
//--></script>

View File

@ -0,0 +1,69 @@
{% if comments %}
{% for comment in comments %}
<div id="comment{{ comment.blog_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">
{% if comment.remove %}
<div class="pull-right"><a href="{{ comment.remove }}" class="btn btn-link btn-xs comment-remove">Remove</a></div>
{% endif %}
<p class="media-heading">{{ comment.member }} <span>{{ comment.date_added }}</span></p>
<p>{{ comment.comment }}</p>
<div class="reply">
<div class="reply-box">
<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">{% if reply.remove %}
<div class="pull-right"><a href="{{ reply.remove }}" class="btn btn-link btn-xs reply-remove">Remove</a></div>
{% endif %}
<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">see more replies...</a></div>
{% endif %}
{% endif %} <a href="{{ comment.refresh }}" class="reply-refresh hide">refresh</a>
</div>
</div>
{% if logged %}
<p class="text-right">
<button type="button" data-toggle="tooltip" data-title="Reply" class="btn btn-link btn-sm">Reply</button>
{% else %}
<button type="button" class="btn btn-link btn-xs" disabled="disabled">Reply</button>
{% endif %}
</p>
<div class="reply-input-box" style="display: none;">
<div class="media">
<div class="media-left"><img src="{{ comment_image }}" alt="{{ comment_username }}" title="{{ comment_username }}" class="media-object"/></div>
<div class="media-body">
<div class="form-group">
<label for="input-comment{{ comment.blog_comment_id }}">Leave your comment</label>
<textarea name="comment" placeholder="Write your comment here..." id="input-comment{{ comment.blog_comment_id }}" class="form-control"></textarea>
</div>
<div class="text-right"><a href="{{ comment.add }}" class="btn btn-primary btn-sm">Comment</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
<br/>
<div class="text-center">{{ pagination }}</div>
{% else %}
<div class="text-center">{{ text_no_results }}</div>
{% endif %}