fixed blog search template
This commit is contained in:
@@ -25,12 +25,12 @@
|
||||
|
||||
{% if entry.source_link != '' %}
|
||||
<ul>
|
||||
<li><b>Source</b> : <a href="{{ entry.source_link }}">{{ entry.source_title }}</a> - {{ entry.source_site }}</li>
|
||||
<li><b>{{ scr_label }}</b> : <a href="{{ entry.source_link }}">{{ entry.source_title }}</a> - {{ entry.source_site }}</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if entry.related %}
|
||||
<ul>
|
||||
<li><b>Contenu corrélé</b> : <a href="{{ request.route_url('blog', id=related.id, slug=related.title) }}">{{ related.title }}</a> - {{ related.author }}</li>
|
||||
<li><b>{{ rel_label }}</b> : <a href="{{ request.route_url('blog', id=related.id, slug=related.title) }}">{{ related.title }}</a> - {{ related.author }}</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
</form>
|
||||
|
||||
<div class="row">
|
||||
{% for entry in items %}
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -27,18 +26,19 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ request.route_url('blog', id=entry.id, slug='slug') }}">
|
||||
{{ entry.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ entry.tag }}</td>
|
||||
<td>{{ entry.edit_date }}</td>
|
||||
</tr>
|
||||
{% for entry in items %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ request.route_url('blog', id=entry.id, slug='slug') }}">
|
||||
{{ entry.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ entry.tag }}</td>
|
||||
<td>{{ entry.edit_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@@ -18,6 +18,13 @@ def blog(request):
|
||||
request.session.flash(u"Page non trouvée : %s" % blog_id, 'warning')
|
||||
return HTTPFound(location=request.route_url('home'))
|
||||
|
||||
if entry.language == 'vn':
|
||||
scr_label = 'Nguồn'
|
||||
rel_label = 'Nội dung liên quan'
|
||||
else:
|
||||
scr_label = 'Source'
|
||||
rel_label = 'Contenu corrélé'
|
||||
|
||||
# insèrer le path de static/img
|
||||
body = entry.body.replace('static/', "%s/static/" % request.application_url)
|
||||
# convertir de markdown en HTML
|
||||
@@ -30,6 +37,8 @@ def blog(request):
|
||||
'page_title': entry.title,
|
||||
'entry': entry,
|
||||
'related': related,
|
||||
'scr_label': scr_label,
|
||||
'rel_label': rel_label,
|
||||
'body_html': body_html,
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ pyramid.default_locale_name = en
|
||||
|
||||
sqlalchemy.url = sqlite:///%(here)s/cao_sunyata.sqlite
|
||||
# images location
|
||||
images_dir = /pyramid/cao_sunyata/cao_sunyata/static/img/
|
||||
images_dir = /home/debian/pyramid/cao_sunyata/cao_sunyata/static/img/
|
||||
|
||||
# reCaptcha keys
|
||||
site_key = 6LeDvVUgAAAAAOqD_-h93kd5aW8CmpeVvKYu-m0p
|
||||
|
||||
Reference in New Issue
Block a user