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