Improve/format code for blog post - refs BT#12324

remotes/angel/1.11.x
Angel Fernando Quiroz Campos 8 years ago
parent e73b38d508
commit 543db6f663
  1. 80
      main/template/default/blog/post.tpl

@ -39,41 +39,49 @@
<div class="col-md-9">
<div class="blog" id="post-{{ post.id_post }}">
<div class="panel panel-default">
<div class="panel-body">
<div id="blog-header">
<div id="post-action" class="pull-right">
<div class="btn-group btn-group-sm" role="group" aria-label="...">
<div class="panel panel-default" 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="panel-body">
<article>
<header>
<div class="title">
<h1 title="{{ post.title }}">{{ post.title }}</h1>
</div>
<div class="info-post">
<span class="date"><i class="fa fa-clock-o"></i> {{ post.post_date }}</span>
<span class='comments'><i
class="fa fa-comment-o"></i> {{ post.n_comments }} {{ 'Comments' | get_lang }} </span>
<span class="autor"><i class="fa fa-user"></i>
<a href="{{ _p.web }}main/social/profile.php?u={{ post.id_author }}">
{{ post.author }}
</a>
</span>
</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>
</ul>
</header>
<div class="content-post">
{{ post.content }}
</div>
{% if post.files %}
<div 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>
</div>
<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 %}
</article>
<div class="comments-post">
<h3 class="title">{{ post.n_comments }} {{ 'Comments' | get_lang }} </h3>
<div id="list-comments">
<ul id="list-comments" class="media-list">
{% for item in post.comments %}
<div class="media">
<li class="media">
<div class="media-left">
<a href="{{ _p.web }}main/social/profile.php?u={{ item.id_author }}">
<img class="media-object thumbnail avatar"
@ -86,40 +94,44 @@
{{ item.actions }}
</div>
<h4 class="media-heading">{{ item.title }}</h4>
<div class="info-post">
<span class="date"><i class="fa fa-clock-o"></i> {{ item.comment_date }}</span>
<span class="autor"><i class="fa fa-user"></i>
<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="{{ _p.web }}main/social/profile.php?u={{ item.id_author }}">
{{ item.name_author }}
</a>
</span>
<span class="score"><i class="fa fa-star"
aria-hidden="true"></i> {{ item.score_ranking }}</span>
</div>
</li>
<li class="score">
<i class="fa fa-comment" aria-hidden="true"></i> {{ item.score_ranking }}
</li>
</ul>
<div class="comment-content">
{{ item.content }}
</div>
{% if item.files %}
<div class="well well-sm 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>
</div>
</aside>
{% endif %}
<div class="ranking">
{{ item.form_ranking }}
</div>
</div>
</div>
</li>
{% endfor %}
</div>
</ul>
</div>
<div class="form-post">
{{ post.form_html }}
</div>
</div>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save