123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- {% autoescape false %}
- {% macro comment_template(item) %}
- <div class="media {{ item.iid }}">
- <div class="media-left">
- <a href="{{ item.user_info.profile_url }}">
- <img class="media-object thumbnail avatar"
- src="{{ item.user_info.avatar }}"
- alt="{{ item.user_info.complete_name }}">
- </a>
- </div>
- <div class="media-body">
- <div class="float-right">
- {{ item.actions }}
- </div>
- <h4 class="media-heading"
- id="comment-{{ item.iid }}-title">{{ item.title }}</h4>
- <ul class="info-post list-inline">
- <li class="date">
- <i class="fa fa-clock-o"></i> {{ item.comment_date }}
- </li>
- <li class="autor">
- <i class="fa fa-user"></i>
- <a href="{{ item.user_info.profile_url }}">
- {{ item.user_info.complete_name }}
- </a>
- </li>
- <li class="score">
- <i class="fa fa-star"
- aria-hidden="true"></i> {{ item.score_ranking }}
- </li>
- </ul>
- <div id="comment-{{ item.iid }}-content">
- {{ item.content }}
- </div>
- {% if item.files %}
- <aside class="well well-sm files">
- <i class="fa fa-paperclip" aria-hidden="true"></i>
- <a href="download.php?file={{ item.files.path }}">{{ item.files.filename }}</a>
- <p>{{ item.files.comment }}</p>
- </aside>
- {% endif %}
- <div class="ranking">
- {{ item.form_ranking }}
- </div>
- {% import _self as nested %}
- {% for item2 in item.comments %}
- {{ nested.comment_template(item2) }}
- {% endfor %}
- </div>
- </div>
- {% endmacro %}
- {% import _self as nested %}
- <div class="row">
- <div class="col-md-8">
- <div class="blog" id="post-{{ post.id_post }}">
- <div class="card" id="blog-header">
- <div class="panel-heading">
- <div id="post-action" class="text-right">
- <div class="btn-group btn-group-sm" role="group" aria-label="{{ 'Actions'|get_lang }}">
- {{ post.actions }}
- </div>
- </div>
- </div>
- <div class="card-body">
- <article>
- <div class="article-header">
- <div class="title">
- <h1 title="{{ post.title }}">{{ post.title }}</h1>
- </div>
- <ul class="info-post list-inline">
- <li class="date">
- <i class="fa fa-clock-o" aria-hidden="true"></i> {{ post.post_date }}
- </li>
- <li class="comments">
- <i class="fa fa-comment-o"
- aria-hidden="true"></i> {{ 'XComments'|get_lang|format(post.n_comments) }}
- </li>
- <li class="autor">
- <i class="fa fa-user" aria-hidden="true"></i>
- <a href="{{ _p.web }}main/social/profile.php?u={{ post.id_author }}">{{ post.author }}</a>
- </li>
- <li class="score">
- <i class="fa fa-star" aria-hidden="true"></i> {{ post.score_ranking }}
- </li>
- </ul>
- </div>
- <div class="content-post">
- {{ post.content }}
- </div>
- {% if post.files %}
- <aside class="well well-sm files">
- <i class="fa fa-paperclip" aria-hidden="true"></i>
- <a href="download.php?file={{ post.files.path }}">{{ post.files.filename }}</a>
- </aside>
- {% endif %}
- {{ post.frm_rating ?: '' }}
- </article>
- <div class="comments-post">
- <h3 class="title">{{ 'XComments'|get_lang|format(post.n_comments) }}</h3>
- <div id="list-comments" class="media-list">
- {% for item in post.comments %}
- {{ nested.comment_template(item) }}
- {% endfor %}
- </div>
- </div>
- <div class="form-post">
- {{ post.form_html }}
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="sidebar-blog">
- <div id="calendar-blog" class="card">
- <div class="card-body">
- <h5 class="card-title">{{ 'Calendar'|get_lang }}</h5>
- {{ calendar }}
- </div>
- </div>
- <div id="search-blog" class="card">
- <div class="card-body">
- <h5 class="card-title">{{ 'Search'|get_lang }}</h5>
- <form action="blog.php" method="get" enctype="multipart/form-data">
- <div class="form-group">
- <input type="hidden" name="blog_id" value="{{ id_blog }}"/>
- <input type="hidden" name="action" value="view_search_result"/>
- <input type="text" class="form-control" size="20" name="q" value="{{ search }}"/>
- </div>
- <button class="btn btn-primary btn-block" type="submit">
- <em class="fa fa-search"></em> {{ 'Search'|get_lang }}
- </button>
- </form>
- </div>
- </div>
- <div id="task-blog" class="card">
- <div class="card-body">
- <h5 class="card-title">{{ 'MyTasks'|get_lang }}</h5>
- {{ task }}
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(function () {
- $('.btn-reply-to').on('click', function (e) {
- e.preventDefault();
- var id = $(this).data('id') || 0;
- if (!id) {
- return;
- }
- var $frm = $('form#add_post'),
- title = $('#comment-' + id + '-title'),
- content = $('#comment-' + id + '-content');
- $frm.find('[name="comment_parent_id"]').val(id);
- $frm.find('[name="title"]').val('Re: ' + title.text().trim());
- CKEDITOR.instances.comment.setData('<blockquote>' + content.text().trim() + '</blockquote><br>');
- });
- });
- </script>
- {% endautoescape %}
|