Skip to content

Commit

Permalink
Merged in [9663] from rjsparks@nostrum.com:
Browse files Browse the repository at this point in the history
    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 3c03290
  • Loading branch information
levkowetz committed Jun 22, 2015
1 parent 9f63a1e commit 8391840
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ietf/templates/doc/document_ballot_content.html
Expand Up @@ -97,7 +97,7 @@ <h4 class="anchor-target" id="{{ p.ad.plain_name|slugify }}">
<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 %}

Expand All @@ -106,7 +106,7 @@ <h5 class="panel-title"><b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d"
<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 %}
Expand Down
3 changes: 2 additions & 1 deletion ietf/templates/doc/shepherd_writeup.html
@@ -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 }}
Expand All @@ -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>
Expand Down
7 changes: 7 additions & 0 deletions static/css/ietf.css
Expand Up @@ -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'
Expand Down

0 comments on commit 8391840

Please sign in to comment.