diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-09-04 10:35:45 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-09-04 10:35:45 +0200 |
commit | f409640d25c33247d06a3f00c006426e593cb751 (patch) | |
tree | 8f09e524f18a963140dd73ce9e9ad6d6db9d9eaf /hyperkitty | |
parent | 0942d798f6ab24214466a484a21c8085e0ff7807 (diff) | |
download | hyperkitty-f409640d25c33247d06a3f00c006426e593cb751.tar.gz hyperkitty-f409640d25c33247d06a3f00c006426e593cb751.tar.xz hyperkitty-f409640d25c33247d06a3f00c006426e593cb751.zip |
Disable mockups
Diffstat (limited to 'hyperkitty')
-rw-r--r-- | hyperkitty/templates/messages/message.html | 6 | ||||
-rw-r--r-- | hyperkitty/templates/recent_activities.html | 9 | ||||
-rw-r--r-- | hyperkitty/views/accounts.py | 1 | ||||
-rw-r--r-- | hyperkitty/views/list.py | 17 | ||||
-rw-r--r-- | hyperkitty/views/message.py | 2 | ||||
-rw-r--r-- | hyperkitty/views/pages.py | 3 | ||||
-rw-r--r-- | hyperkitty/views/thread.py | 2 |
7 files changed, 30 insertions, 10 deletions
diff --git a/hyperkitty/templates/messages/message.html b/hyperkitty/templates/messages/message.html index 533d9ed..1e8a53d 100644 --- a/hyperkitty/templates/messages/message.html +++ b/hyperkitty/templates/messages/message.html @@ -4,8 +4,10 @@ {% gravatar_img_for_email email.email 40 %} <div class="email_author inline-block"> <span class="name"> <a href="{% url message_index mlist_fqdn=list_address, hashid=email.message_id_hash %}">{{email.sender_name}}</a> </span> + {% if settings.USE_MOCKUPS %} <br /> <span class="rank">Rank 8</span> + {% endif %} </div> <div class="email_date inline-block right"> <span class="date">{{email.date}}</span> @@ -20,6 +22,8 @@ {{email.content}} </div> + +{% if settings.USE_MOCKUPS %} <ul class="email_info inline" messageid="{{email.message_id_hash}}"> <li class="neutral"> +{{email.likes}}/-{{email.dislikes}} @@ -31,4 +35,4 @@ <a href="#dislike"> Dislike</a> </li> </ul> - +{% endif %} diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html index 22f7304..9195834 100644 --- a/hyperkitty/templates/recent_activities.html +++ b/hyperkitty/templates/recent_activities.html @@ -97,9 +97,11 @@ <a href="/tag/{{list_address}}/{{email.category|lower}}"> {{email.category}} </a> </li> {% endif %} + {% if settings.USE_MOCKUPS %} <li class="neutral"> 0 </li> + {% endif %} <li class="participant"> {{email.participants|length}} </li> @@ -132,9 +134,11 @@ <a href="/tag/{{list_address}}/{{email.category|lower}}"> {{email.category}} </a> </li> {% endif %} + {% if settings.USE_MOCKUPS %} <li class="neutral"> 0 </li> + {% endif %} <li class="participant"> {{email.participants|length}} </li> @@ -148,6 +152,7 @@ {% endfor %} </section> + {% if top_author %} <section id="discussion_marker"> <h2>Prominent discussion maker</h2> {% for author in top_author %} @@ -173,7 +178,9 @@ <h2>Tag cloud</h2> </section> + {% endif %} + {% if threads_per_category %} <section id="discussion_by_topic"> <h2>Discussion by topic the last 30 days</h2> {% for category, thread in threads_per_category.items %} @@ -189,6 +196,8 @@ </div> {% endfor %} </section> + {% endif %} + </section> <section id="archives"> {% for key, value in archives_length|sort %} diff --git a/hyperkitty/views/accounts.py b/hyperkitty/views/accounts.py index b81583f..2c68315 100644 --- a/hyperkitty/views/accounts.py +++ b/hyperkitty/views/accounts.py @@ -48,6 +48,7 @@ def user_logout(request): def user_login(request, template='login.html'): + user = None parse_r = urlparse(request.META.get('HTTP_REFERER', 'index')) previous = '%s%s' % (parse_r.path, parse_r.query) diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py index e4a69bd..21a983e 100644 --- a/hyperkitty/views/list.py +++ b/hyperkitty/views/list.py @@ -18,7 +18,7 @@ from django.contrib.auth.decorators import (login_required, user_passes_test) from hyperkitty.models import Rating, Tag -from hyperkitty.lib.mockup import * +#from hyperkitty.lib.mockup import * from hyperkitty.lib import ThreadSafeStorePool from forms import * from hyperkitty.utils import log @@ -211,9 +211,12 @@ def list(request, mlist_fqdn=None): # top authors are the ones that have the most kudos. How do we determine # that? Most likes for their post? - authors = generate_top_author() - authors = sorted(authors, key=lambda author: author.kudos) - authors.reverse() + if settings.USE_MOCKUPS: + authors = generate_top_author() + authors = sorted(authors, key=lambda author: author.kudos) + authors.reverse() + else: + authors = [] # Get the list activity per day days = dates.keys() @@ -226,7 +229,11 @@ def list(request, mlist_fqdn=None): evolution.append(0) # threads per category is the top thread titles in each category - threads_per_category = generate_thread_per_category() + if settings.USE_MOCKUPS: + threads_per_category = generate_thread_per_category() + else: + threads_per_category = {} + c = RequestContext(request, { 'list_name' : list_name, 'list_address': mlist_fqdn, diff --git a/hyperkitty/views/message.py b/hyperkitty/views/message.py index 89e1489..089de81 100644 --- a/hyperkitty/views/message.py +++ b/hyperkitty/views/message.py @@ -12,7 +12,7 @@ from django.contrib.auth.decorators import (login_required, from hyperkitty.models import Rating from hyperkitty.lib import ThreadSafeStorePool -from hyperkitty.lib.mockup import * +#from hyperkitty.lib.mockup import * from forms import * from hyperkitty.utils import log diff --git a/hyperkitty/views/pages.py b/hyperkitty/views/pages.py index e8a5bd1..29945b4 100644 --- a/hyperkitty/views/pages.py +++ b/hyperkitty/views/pages.py @@ -18,7 +18,7 @@ from django.contrib.auth.decorators import (login_required, permission_required, user_passes_test) from hyperkitty.models import Rating -from hyperkitty.lib.mockup import * +#from hyperkitty.lib.mockup import * from hyperkitty.lib import ThreadSafeStorePool from forms import * from hyperkitty.utils import log @@ -32,7 +32,6 @@ def index(request): store = ThreadSafeStorePool().get() list_data = store.get_list_names() - print list_data log("warn", repr(list_data)) c = RequestContext(request, { diff --git a/hyperkitty/views/thread.py b/hyperkitty/views/thread.py index 7d78885..8da41b7 100644 --- a/hyperkitty/views/thread.py +++ b/hyperkitty/views/thread.py @@ -9,7 +9,7 @@ from django.contrib.auth.decorators import (login_required, user_passes_test) from hyperkitty.models import Rating, Tag -from hyperkitty.lib.mockup import * +#from hyperkitty.lib.mockup import * from forms import * from hyperkitty.utils import log |