Merged in [9663] from rjsparks@nostrum.com:

Try a different way of wrapping ballot/comment fields and shepherd writeups. Related to #1673.
 - Legacy-Id: 9679
Note: SVN reference [9663] has been migrated to Git commit 3c03290a52e80c2d855d4a7b291ac0747e3d8681
This commit is contained in:
Henrik Levkowetz 2015-06-22 20:37:07 +00:00
parent 9f63a1e322
commit 8391840015
3 changed files with 11 additions and 3 deletions

View file

@ -97,7 +97,7 @@
<div class="panel-heading">
<h5 class="panel-title"><b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev}}{% endif %})</h5>
</div>
<div class="panel-body"><pre class="ballot">{{ p.discuss|wrap_text:80|escape|urlize }}</pre></div>
<div class="panel-body"><pre class="ballot pasted">{{ p.discuss|escape|urlize }}</pre></div>
</div>
{% endif %}
@ -106,7 +106,7 @@
<div class="panel-heading">
<h5 class="panel-title"><b>Comment</b> ({{ p.comment_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev}}{% endif %})</h5>
</div>
<div class="panel-body"><pre class="ballot">{{ p.comment|wrap_text:80|escape|urlize }}</pre></div>
<div class="panel-body"><pre class="ballot pasted">{{ p.comment|escape|urlize }}</pre></div>
</div>
{% endif %}
{% endfor %}

View file

@ -1,6 +1,7 @@
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% block title %}
Shepherd writeup for {{ doc.canonical_name }}-{{ doc.rev }}
@ -10,7 +11,7 @@
{% origin %}
<h1>Shepherd writeup<br><small>{{ doc.canonical_name }}-{{ doc.rev }}</small></h1>
<pre>{{writeup}}</pre>
<pre class="pasted">{{writeup|escape|urlize}}</pre>
{% if can_edit %}
<a class="btn btn-primary" href="{% url "doc_edit_shepherd_writeup" name=doc.name %}">Edit</a>

View file

@ -195,6 +195,13 @@ pre {
white-space: pre;
}
/* Some chunks of text are likely to be pasted into fields from other editing environments
which do various things with line-wrapping. Preserve whitespace to the extent possible. */
.pasted {
white-space: pre-wrap;
word-break: keep-all;
}
/* Make ampersands pretty */
/* This sets ampersand in a different font than the rest of the text. Fancy, but it's
really better to select a pretty font in the first place. Additionally, _which_ 'pretty'