Skip to content

Commit

Permalink
Displaying per promise in home with some style and also markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Álvarez committed Jun 5, 2014
1 parent bd9c2e2 commit 7d0b626
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 2 deletions.
3 changes: 2 additions & 1 deletion project_site/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
'promises_web',
'deldichoalhecho_theme',
'popit',
'annoying'
'annoying',
'markdown_deux'
)

MIDDLEWARE_CLASSES = (
Expand Down
4 changes: 4 additions & 0 deletions promises_web/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,8 @@ div.verification-document.accomplished {

.summary span.promise-description:after {
content: "...";
}

.b-color {
background-color: #0F2356;
}
1 change: 1 addition & 0 deletions promises_web/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@
});
});
</script>

{% endblock content %}
19 changes: 19 additions & 0 deletions promises_web/templates/promise_detail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% load i18n %}
{% load markdown_deux_tags %}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">{{promise.name}}</h4>
</div>
<div class="modal-body">
{{promise.description}}
</div>
{% trans "Milestones" %}
<ul>
{% for milestone in promise.milestones.all %}
<li>{{ milestone.date }} - {{ milestone.description|markdown }}</li>
{% endfor %}
</ul>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
9 changes: 9 additions & 0 deletions promises_web/templates/verification_documents.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{% load deldichoalhecho %}
{% load i18n %}
<p>{{promise.fulfillment.notes}}</p>
<div id="modal-{{promise.id}}" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content b-color">
...
</div>
</div>
</div>
<a data-toggle="modal" data-target="#modal-{{promise.id}}" href="{% url 'promise' pk=promise.pk %}">{% trans "Read more" %}</a>

{% if promise.verification_documents.all %}
<p>{% trans "Verification documents:" %}</p>

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ ipython
-e git://github.com/alex/django-taggit.git#egg=django-taggit
-e git://github.com/comoga/django-constance.git#egg=django-constance
django-picklefield
django-annoying
django-annoying
django-markdown-deux

0 comments on commit 7d0b626

Please sign in to comment.