Add host to comment URI

This commit is contained in:
HLFH 2017-12-15 20:11:51 +00:00
parent d2b573a4d5
commit 98c97b8e09
2 changed files with 4 additions and 3 deletions

View File

@ -178,7 +178,7 @@ function send_edit(com_id, hash) {
{% if order_by == "tid" %} {% if order_by == "tid" %}
{% if thread_id != comment.tid %} {% if thread_id != comment.tid %}
{% set thread_id = comment.tid %} {% set thread_id = comment.tid %}
<h2 class="thread-title">{{comment.title}} (<a href="{{comment.uri}}">{{comment.uri}}</a>)</h2> <h2 class="thread-title">{{comment.title}} (<a href="{{host}}{{comment.uri}}">{{host}}{{comment.uri}}</a>)</h2>
{% endif %} {% endif %}
{% endif %} {% endif %}
<div class='isso-comment' id='isso-{{comment.id}}'> <div class='isso-comment' id='isso-{{comment.id}}'>
@ -190,7 +190,7 @@ function send_edit(com_id, hash) {
<div class='text-wrapper'> <div class='text-wrapper'>
<div class='isso-comment-header' role='meta'> <div class='isso-comment-header' role='meta'>
{% if order_by != "tid" %} {% if order_by != "tid" %}
<div>Thread: {{comment.title}} (<a href="{{comment.uri}}">{{comment.uri}}</a>)</div><br /> <div>Thread: {{comment.title}} (<a href="{{host}}{{comment.uri}}">{{host}}{{comment.uri}}</a>)</div><br />
{% endif %} {% endif %}
{% if comment.author %} {% if comment.author %}
<span class='author' id="isso-author-{{comment.id}}">{{comment.author}}</span> <span class='author' id="isso-author-{{comment.id}}">{{comment.author}}</span>

View File

@ -872,8 +872,9 @@ class API(object):
comments_enriched.append(comment) comments_enriched.append(comment)
comment_mode_count = self.comments.count_modes() comment_mode_count = self.comments.count_modes()
max_page = int(sum(comment_mode_count.values()) / 100) max_page = int(sum(comment_mode_count.values()) / 100)
host = self.isso.conf.get("general", "host")
return render_template('admin.html', comments=comments_enriched, return render_template('admin.html', comments=comments_enriched,
page=int(page), mode=int(mode), page=int(page), mode=int(mode),
conf=self.conf, max_page=max_page, conf=self.conf, max_page=max_page,
counts=comment_mode_count, counts=comment_mode_count,
order_by=order_by, asc=asc) order_by=order_by, asc=asc, host=host)