diff options
| author | Pierre-Yves Chibon <pingou@pingoured.fr> | 2012-03-18 09:14:05 +0100 |
|---|---|---|
| committer | Pierre-Yves Chibon <pingou@pingoured.fr> | 2012-03-18 09:14:05 +0100 |
| commit | 089f72b237ea4cd8711e6ded643f43687fd39490 (patch) | |
| tree | cd83e5fa054b3da270fb59ade14aba9842f792f8 /templates | |
| parent | 91ee2716b2e6a01b1565c5585f0279b77cbb8644 (diff) | |
| download | hyperkitty-089f72b237ea4cd8711e6ded643f43687fd39490.tar.gz hyperkitty-089f72b237ea4cd8711e6ded643f43687fd39490.tar.xz hyperkitty-089f72b237ea4cd8711e6ded643f43687fd39490.zip | |
Start implementing the archiver with mongo in the background
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base2.html | 6 | ||||
| -rw-r--r-- | templates/index2.html | 9 | ||||
| -rw-r--r-- | templates/month_view2.html | 110 | ||||
| -rw-r--r-- | templates/recent_activities.html | 193 |
4 files changed, 187 insertions, 131 deletions
diff --git a/templates/base2.html b/templates/base2.html index 8490bc6..c477a99 100644 --- a/templates/base2.html +++ b/templates/base2.html @@ -21,7 +21,11 @@ {% block header %} <div id="headline"> <ul class="inline-block"> - <li id="list_name"><a href="/">{{list_name}}</a></li> + {% if list_address %} + <li id="list_name"><a href="/2/list/{{list_address}}">{{list_name}}</a></li> + {% else %} + <li id="list_name"><a href="/2/list/">{{list_name}}</a></li> + {% endif %} <li id="page_date">{{month}}</li> </ul> {% if month_participants and month_discussions %} diff --git a/templates/index2.html b/templates/index2.html index 440e66f..ac2e3c7 100644 --- a/templates/index2.html +++ b/templates/index2.html @@ -3,11 +3,14 @@ {% block title %}{{ app_name }}{% endblock %} {% block content %} + <p> + These are the list available on this server: + </p> <ul> {% for mlist in lists %} - <li>{{mlist.real_name}} ({{mlist.list_name}}) -- - <a href="/2/recent/{{mlist.fqdn_listname}}">Recent</a> -- - <a href="/2/archives/{{mlist.fqdn_listname}}">Archives current month</a> + <li>{{mlist}} ({{mlist}}) -- + <a href="/2/list/{{mlist}}">Recent</a> -- + <a href="/2/archives/{{mlist}}">Archives current month</a> </li> {% endfor %} </ul> diff --git a/templates/month_view2.html b/templates/month_view2.html index b006d35..b763a4d 100644 --- a/templates/month_view2.html +++ b/templates/month_view2.html @@ -1,4 +1,5 @@ {% extends "base2.html" %} +{% load poll_extras %} {% block title %}{{ app_name }}{% endblock %} @@ -17,59 +18,78 @@ {% block content %} - {% for email in threads %} - <!-- New thread --> - <div class="thread"> - <div class="notsaved"> - <span class="thread_title">{{email.title}}</span> - <span class="thread_date"> {{email.age}} ago</span> - </div> - <div class="thread_content"> - {% if email.category_tag %} - <div class="inline-block type type_{{email.category_tag}}"> - <a href="/2/tag/{{list_address}}/{{email.category_tag}}"> {{email.category}} </a> - </div> - {% else %} - <div class="inline-block type type_{{email.category}}"> - <a href="/2/tag/{{list_address}}/{{email.category}}"> {{email.category}} </a> + <div id="recent_activities"> + {% for email in threads %} + <!-- New thread --> + <div class="thread"> + <div class="notsaved"> + <span class="thread_title">{{email.Subject}}</span> + <span class="thread_date"> {{email.Date}}</span> </div> - {% endif %} - <div class="inline-block gravatar"> - {% if email.avatar %} - <img src="{{email.avatar}}" alt="avatar" /> <br /> + <div class="thread_content"> + {% if email.category_tag %} + <div class="inline-block type type_{{email.category_tag}}"> + <a href="/2/tag/{{list_address}}/{{email.category_tag}}"> {{email.category}} </a> + </div> + {% else %} + <div class="inline-block type type_{{email.category}}"> + <a href="/2/tag/{{list_address}}/{{email.category}}"> {{email.category}} </a> + </div> {% endif %} - {{email.author}} + <div class="inline-block gravatar"> + {% if email.avatar %} + <img src="{{email.avatar}}" alt="avatar" /> <br /> + {% endif %} + {{email.From}} + </div> + <div class="inline-block thread_email"> + <span class="expander"> + {{email.Content}} + </span> + </div> </div> - <div class="inline-block thread_email"> - <span class="expander"> - {{email.body}} - </span> + <div class="thread_info"> + <ul class="tags inline"> + <li>Tags:</li> + {% for tag in email.tags %} + <li> <a href="/2/tag/{{list_address}}/{{tag}}">{{tag}}</a></li> + {% endfor %} + </ul> + <ul class="inline-block"> + <li class="participant"> {{email.participants}} participants</li> + <li class="discussion"> {{email.answers}} comments</li> + </ul> + <ul class="inline-block"> + <li class="like"> +{{email.liked}}</li> + <li class="youlike"> <a href="#like"> Like</a></li> + <li class="youdislike"> <a href="#dislike"> Dislike</a></li> + {% if email.answers %} + <li class="showdiscussion"> <a href="#show"> Show discussion</a></li> + {% else %} + <li class="showdiscussion invisible"> <a href="#show"> Show discussion</a></li> + {% endif %} + </ul> </div> </div> - <div class="thread_info"> - <ul class="tags inline"> - <li>Tags:</li> - {% for tag in email.tags %} - <li> <a href="/2/tag/{{list_address}}/{{tag}}">{{tag}}</a></li> + <!-- End of thread --> + {% endfor %} + </div> + <div id="archives"> + {% for key, value in archives_length|sort %} + <h3>{{ key }}</h3> + <div> + <ul> + {% for ar_month in value %} + <li> + <a href="/2/archives/{{list_address}}/{{key}}/{{ar_month}}"> + {{ ar_month|tomonth }} + </a> + </li> {% endfor %} </ul> - <ul class="inline-block"> - <li class="participant"> {{email.participants|length}} participants</li> - <li class="discussion"> {{email.answers|length}} comments</li> - </ul> - <ul class="inline-block"> - <li class="like"> +{{email.liked}}</li> - <li class="youlike"> <a href="#like"> Like</a></li> - <li class="youdislike"> <a href="#dislike"> Dislike</a></li> - {% if email.answers %} - <li class="showdiscussion"> <a href="#show"> Show discussion</a></li> - {% else %} - <li class="showdiscussion invisible"> <a href="#show"> Show discussion</a></li> - {% endif %} - </ul> </div> + {% endfor %} </div> - <!-- End of thread --> - {% endfor %} + {% endblock %} diff --git a/templates/recent_activities.html b/templates/recent_activities.html index 84dd366..52a3968 100644 --- a/templates/recent_activities.html +++ b/templates/recent_activities.html @@ -1,99 +1,128 @@ -{% extends "base.html" %} +{% extends "base2.html" %} +{% load poll_extras %} {% block title %} {{ app_name }} {% endblock %} {% block additional_headers %} <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/stats.css" /> +<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/jquery-ui-1.8.18.custom.css" /> +<script src="{{ STATIC_URL }}jquery-1.7.1.min.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script> + +<script> +$(function() { + $( "#accordion" ).accordion(); +}); +</script> {% endblock %} {% block content %} - <section id="most_active"> - <h2>Recently active discussions</h2> - {% for email in top_threads %} - <!-- Start thread --> - <div class="thread"> - <span class="thread_id">#{{forloop.counter}}</span> - <span class="thread_title">{{email.title}}</span> - <div class="thread_stats"> - <ul class="inline-block"> - {% if email.category_tag %} - <li class="type type_{{email.category_tag}}"> - <a href="/tag/{{email.category_tag}}"> {{email.category}} </a> - </li> - {% else %} - <li class="type type_{{email.category}}"> - <a href="/tag/{{email.category}}"> {{email.category}} </a> - </li> - {% endif %} - <li class="neutral"> 0 </li> - <li class="participant"> {{email.participants|join:", "}} </li> - <li class="discussion"> {{email.answers|length}} </li> - </ul> - </div> - </div> - <!-- End thread --> - {% endfor %} - </section> + <section id="recent_activities"> + <section id="most_active"> + <h2>Recently active discussions</h2> + {% for email in most_active_threads %} + <!-- Start thread --> + <div class="thread"> + <span class="thread_id">#{{forloop.counter}}</span> + <span class="thread_title">{{email.Subject}}</span> + <div class="thread_stats"> + <ul class="inline-block"> + {% if email.category_tag %} + <li class="type type_{{email.category_tag}}"> + <a href="/tag/{{email.category_tag}}"> {{email.category}} </a> + </li> + {% else %} + <li class="type type_{{email.category}}"> + <a href="/tag/{{email.category}}"> {{email.category}} </a> + </li> + {% endif %} + <li class="neutral"> 0 </li> + <li class="participant"> {{email.participants}} </li> + <li class="discussion"> {{email.answers}} </li> + </ul> + </div> + </div> + <!-- End thread --> + {% endfor %} + </section> - <section id="top_discussion"> - <h2>Top discussions the last 30 days</h2> - {% for email in most_active_threads %} - <!-- Start thread --> - <div class="thread"> - <span class="thread_id">#{{forloop.counter}}</span> - <span class="thread_title">{{email.title}}</span> - <div class="thread_stats"> - <ul class="inline-block"> - {% if email.category_tag %} - <li class="type type_{{email.category_tag}}"> - <a href="/tag/{{email.category_tag}}"> {{email.category}} </a> - </li> - {% else %} - <li class="type type_{{email.category}}"> - <a href="/tag/{{email.category_tag}}"> {{email.category}} </a> - </li> - {% endif %} - <li class="neutral"> 0 </li> - <li class="participant"> {{email.participants|join:", "}} </li> - <li class="discussion"> {{email.answers|length}} </li> - </ul> - </div> - </div> - <!-- End thread --> - {% endfor %} - </section> - <section id="discussion_marker"> - <h2>Prominent discussion maker</h2> - {% for author in top_author %} - <!-- Start discussion maker --> - <div class="maker"> - <div class="inline-block maker_id"> #{{forloop.counter}} </div> - <div class="inline-block gravatar"> - {% if author.avatar %} - <img src="{{author.avatar}}" alt="avatar" /> - {% endif %} - </div> - <div class="inline-block"> - <span class="marker_name">{{author.name}}</span> <br /> - <span class="score">+{{author.kudos}}</span> kudos - </div> - </div> - <!-- End discussion maker --> - {% endfor %} + <section id="top_discussion"> + <h2>Top discussions the last 30 days</h2> + {% for email in top_threads %} + <!-- Start thread --> + <div class="thread"> + <span class="thread_id">#{{forloop.counter}}</span> + <span class="thread_title">{{email.Subject}}</span> + <div class="thread_stats"> + <ul class="inline-block"> + {% if email.category_tag %} + <li class="type type_{{email.category_tag}}"> + <a href="/tag/{{email.category_tag}}"> {{email.category}} </a> + </li> + {% else %} + <li class="type type_{{email.category}}"> + <a href="/tag/{{email.category_tag}}"> {{email.category}} </a> + </li> + {% endif %} + <li class="neutral"> 0 </li> + <li class="participant"> {{email.participants}} </li> + <li class="discussion"> {{email.answers}} </li> + </ul> + </div> + </div> + <!-- End thread --> + {% endfor %} + </section> - <h2>Tag cloud</h2> + <section id="discussion_marker"> + <h2>Prominent discussion maker</h2> + {% for author in top_author %} + <!-- Start discussion maker --> + <div class="maker"> + <div class="inline-block maker_id"> #{{forloop.counter}} </div> + <div class="inline-block gravatar"> + {% if author.avatar %} + <img src="{{author.avatar}}" alt="avatar" /> + {% endif %} + </div> + <div class="inline-block"> + <span class="marker_name">{{author.name}}</span> <br /> + <span class="score">+{{author.kudos}}</span> kudos + </div> + </div> + <!-- End discussion maker --> + {% endfor %} + + <h2>Tag cloud</h2> + </section> + + <section id="discussion_by_topic"> + <h2>Discussion by topic the last 30 days</h2> + {% for category, thread in threads_per_category.items %} + <div> + <h2 class="category type_{{category}}"> {{category}} </h2> + <ul class="category_entry"> + {% for email in thread %} + <li>{{email.title}}</li> + {% endfor %} + </ul> + </div> + {% endfor %} + </section> </section> - - <section id="discussion_by_topic"> - <h2>Discussion by topic the last 30 days</h2> - {% for category, thread in threads_per_category.items %} + <section id="archives"> + {% for key, value in archives_length|sort %} + <h3>{{ key }}</h3> <div> - <h2 class="category type_{{category}}"> {{category}} </h2> - <ul class="category_entry"> - {% for email in thread %} - <li>{{email.title}}</li> + <ul> + {% for ar_month in value %} + <li> + <a href="/2/archives/{{list_address}}/{{key}}/{{ar_month}}"> + {{ ar_month|tomonth }} + </a> + </li> {% endfor %} </ul> </div> |
