Bug 1169253 - Distinguish titles and comments

This commit is contained in:
Anthony Ricaud 2015-06-02 15:55:58 +02:00
Родитель 029f6014cd
Коммит fb72efd08f
3 изменённых файлов: 21 добавлений и 6 удалений

Просмотреть файл

@ -229,7 +229,6 @@
add_thread_header(comment);
comment.content = comment.title;
return comment;
});
}
@ -334,7 +333,6 @@
display_sign_in_if_needed(question);
question.content = question.title;
answers.push(question);
answers.reverse();

Просмотреть файл

@ -3,9 +3,20 @@ var lineno = null;
var colno = null;
var output = "";
try {
output += "<div class=\"Comment-content\">";
output += runtime.suppressValue(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "comment")),"content", env.autoesc), env.autoesc);
output += "</div>\n\n<div class=\"Comment-meta hbox\">\n ";
output += "<div class=\"Comment-content\">\n ";
if(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "comment")),"title", env.autoesc)) {
output += "\n ";
output += runtime.suppressValue(env.getFilter("escape").call(context, runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "comment")),"title", env.autoesc)), env.autoesc);
output += "\n ";
;
}
else {
output += "\n ";
output += runtime.suppressValue(env.getFilter("safe").call(context, runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "comment")),"content", env.autoesc)), env.autoesc);
output += "\n ";
;
}
output += "\n</div>\n\n<div class=\"Comment-meta hbox\">\n ";
if(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "comment")),"updated", env.autoesc)) {
output += "\n <span class=\"fit ellipsis\">";
output += runtime.suppressValue(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "comment")),"created", env.autoesc), env.autoesc);

Просмотреть файл

@ -1,4 +1,10 @@
<div class="Comment-content">{{ comment.content }}</div>
<div class="Comment-content">
{% if comment.title %}
{{ comment.title | escape }}
{% else %}
{{ comment.content | safe }}
{% endif %}
</div>
<div class="Comment-meta hbox">
{% if comment.updated %}