Skip to content

Commit

Permalink
Lengthen summary text to 140 characters in proposition. When viewing …
Browse files Browse the repository at this point in the history
…a poll, display summary text along with Item name for each proposition. If Proposition has a body, include a Read More link in order to view it.
  • Loading branch information
mikhuang committed May 15, 2013
1 parent 72e08d0 commit a3c224d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deme_django/modules/poll/models.py
Expand Up @@ -114,7 +114,7 @@ class Meta:
verbose_name_plural = _('propositions')

#fields:
summary_text = models.CharField(_('summary text'), blank=True, max_length=40)
summary_text = models.CharField(_('summary text'), blank=True, max_length=140)


class PropositionResponse(models.Model):
Expand Down
10 changes: 8 additions & 2 deletions deme_django/modules/poll/templates/poll/agreedisagreepoll.html
Expand Up @@ -96,7 +96,10 @@
{% for proposition in propositions %}
<div class="proposition list-group-item">
<h4>{% firstof proposition.name forloop.counter %}</h4>
<p>{{proposition.body|safe}}</p>
<p>{{proposition.summary_text|safe}}</p>
{% if proposition.body %}
<button onclick="$(this).next().removeClass('hide');$(this).remove()" class="btn btn-small">Read more</button><div class="hide"><p>{{proposition.body|safe}}</p></div>
{% endif %}

<!-- admin -->
{% ifagentcan 'modify_membership' item %}
Expand Down Expand Up @@ -156,7 +159,10 @@ <h3 class="panel-heading">Poll Results</h3>
{% with dict.proposition as proposition %}
<div class="proposition proposition-result">
<h4>{% firstof proposition.name forloop.counter %}</h4>
<p>{{proposition.body|safe}}</p>
<p>{{proposition.summary_text|safe}}</p>
{% if proposition.body %}
<button onclick="$(this).next().removeClass('hide');$(this).remove()" class="btn btn-small">Read more</button><div class="hide"><p>{{proposition.body|safe}}</p></div>
{% endif %}
<div class="proposition_graph">
<div class="position">
<div class="title">
Expand Down

0 comments on commit a3c224d

Please sign in to comment.