From e324f9e52b2f78cdcc0dcb0046c8effe820ccf67 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Mon, 10 Dec 2012 12:25:38 +0100 Subject: Factor the like/dislike form in a separate file --- hyperkitty/static/css/style.css | 6 ++++++ hyperkitty/templates/messages/like_form.html | 16 ++++++++++++++++ hyperkitty/templates/messages/message.html | 18 +++--------------- hyperkitty/templates/month_view.html | 14 +------------- hyperkitty/templates/search.html | 10 +--------- 5 files changed, 27 insertions(+), 37 deletions(-) create mode 100644 hyperkitty/templates/messages/like_form.html (limited to 'hyperkitty') diff --git a/hyperkitty/static/css/style.css b/hyperkitty/static/css/style.css index f68125e..0be1cd9 100644 --- a/hyperkitty/static/css/style.css +++ b/hyperkitty/static/css/style.css @@ -97,6 +97,12 @@ ul.nav.auth { } /* Like / dislike */ + +form.likeform { + display: inline; + margin: 0; + padding: 0; +} .likestatus { padding-left: 20px; margin-right: 3em; diff --git a/hyperkitty/templates/messages/like_form.html b/hyperkitty/templates/messages/like_form.html new file mode 100644 index 0000000..ba78ede --- /dev/null +++ b/hyperkitty/templates/messages/like_form.html @@ -0,0 +1,16 @@ +
+ + {% csrf_token %} +
  • + +{{ object.likes }}/-{{ object.dislikes }} +
  • +
  • + Like +
  • +
  • + Dislike +
  • +
    + +{# vim: set noet: #} diff --git a/hyperkitty/templates/messages/message.html b/hyperkitty/templates/messages/message.html index 307e596..eaac211 100644 --- a/hyperkitty/templates/messages/message.html +++ b/hyperkitty/templates/messages/message.html @@ -44,20 +44,8 @@ {% endif %} {# vim: set noet: #} diff --git a/hyperkitty/templates/month_view.html b/hyperkitty/templates/month_view.html index 802c1e6..41c8275 100644 --- a/hyperkitty/templates/month_view.html +++ b/hyperkitty/templates/month_view.html @@ -80,19 +80,7 @@ Show discussion diff --git a/hyperkitty/templates/search.html b/hyperkitty/templates/search.html index 3db0b1c..844bc60 100644 --- a/hyperkitty/templates/search.html +++ b/hyperkitty/templates/search.html @@ -59,15 +59,7 @@ -- cgit