diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-06-12 19:34:38 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-06-12 19:34:38 +0200 |
commit | a195f1b150d2b17cdefd64038528b53035d585f7 (patch) | |
tree | 24631dfe458c691636dd9e4c37b5c104c120ff80 | |
parent | e5c785c29f2af0f9978814f7a34132388c44045d (diff) | |
download | hyperkitty-a195f1b150d2b17cdefd64038528b53035d585f7.tar.gz hyperkitty-a195f1b150d2b17cdefd64038528b53035d585f7.tar.xz hyperkitty-a195f1b150d2b17cdefd64038528b53035d585f7.zip |
Use spaces instead of tabs in the templates
27 files changed, 1100 insertions, 1154 deletions
diff --git a/hyperkitty/templates/404.html b/hyperkitty/templates/404.html index 232ca97..e4ff067 100644 --- a/hyperkitty/templates/404.html +++ b/hyperkitty/templates/404.html @@ -2,39 +2,37 @@ {% load url from future %} {% load i18n %} {% block content %} - <style> - #contentBox - { - padding:10px; - font-family: 'Times New Roman'; - font-size:20px; - color:#444; - margin-left:300px; - margin-top:100px; - } - .hello - { - font-size:100px; - color:#444; - font-family: 'Times New Roman'; - } - a - { - color:#323232; - } - </style> + <style> + #contentBox + { + padding:10px; + font-family: 'Times New Roman'; + font-size:20px; + color:#444; + margin-left:300px; + margin-top:100px; + } + .hello + { + font-size:100px; + color:#444; + font-family: 'Times New Roman'; + } + a + { + color:#323232; + } + </style> - <div style="margin: 60px 40px 0 40px;"> - <div id="contentBox" style="width:50%; "> - <span class="hello"> 404 </span> - <br/><br/> - <span style="font-size:60px; color:#444;font-family: 'Times New Roman';"> Oh! Snap </span> - <br/><br/> - I can't find this page. - <a href ="{% url 'root' %}">Back home</a> - </div> - </div> + <div style="margin: 60px 40px 0 40px;"> + <div id="contentBox" style="width:50%; "> + <span class="hello"> 404 </span> + <br/><br/> + <span style="font-size:60px; color:#444;font-family: 'Times New Roman';"> Oh! Snap </span> + <br/><br/> + I can't find this page. + <a href ="{% url 'root' %}">Back home</a> + </div> + </div> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/500.html b/hyperkitty/templates/500.html index f0cbefe..d1ca064 100644 --- a/hyperkitty/templates/500.html +++ b/hyperkitty/templates/500.html @@ -7,39 +7,37 @@ Error ! - {{ app_name|title }} {% endblock %} {% block content %} - <style> - #contentBox - { - padding:10px; - font-family: 'Times New Roman'; - font-size:20px; - color:#444; - margin-left:300px; - margin-top:100px; - } - .hello - { - font-size:100px; - color:#444; - font-family: 'Times New Roman'; - } - a - { - color:#323232; - } - </style> + <style> + #contentBox + { + padding:10px; + font-family: 'Times New Roman'; + font-size:20px; + color:#444; + margin-left:300px; + margin-top:100px; + } + .hello + { + font-size:100px; + color:#444; + font-family: 'Times New Roman'; + } + a + { + color:#323232; + } + </style> - <div style="margin: 60px 40px 0 40px;"> - <div id="contentBox" style="width:50%; "> - <span class="hello"> 500 </span> - <br/><br/> - <span style="font-size:60px; color:#444;font-family: 'Times New Roman';"> Oh! Snap </span> - <br/><br/> - There's been an error somewhere, sorry. - <a href ="{% url 'root' %}">Back home</a> - </div> - </div> + <div style="margin: 60px 40px 0 40px;"> + <div id="contentBox" style="width:50%; "> + <span class="hello"> 500 </span> + <br/><br/> + <span style="font-size:60px; color:#444;font-family: 'Times New Roman';"> Oh! Snap </span> + <br/><br/> + There's been an error somewhere, sorry. + <a href ="{% url 'root' %}">Back home</a> + </div> + </div> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/ajax/last_views.html b/hyperkitty/templates/ajax/last_views.html index aeea651..a3e1786 100644 --- a/hyperkitty/templates/ajax/last_views.html +++ b/hyperkitty/templates/ajax/last_views.html @@ -2,44 +2,42 @@ {% load i18n %} {% load hk_generic %} - {% if last_views %} - <table class="table table-striped table-bordered table-condensed"> - <thead> - <tr> - <th></th> - <th>Subject</th> - <th>Original author</th> - <th>Start date</th> - <th>Last activity</th> - <th>Replies</th> - </tr> - </thead> - <tbody> - {% for lv in last_views %} - <tr> - <td> - {% if thread.unread %} - <i class="unread icon-eye-close" title="New comments"></i> - {% endif %} - </td> - <td><a href="{% url 'thread' mlist_fqdn=lv.list_address threadid=lv.threadid %}" - >{{ lv.thread.starting_email.subject }}</a></td> - <td>{{ lv.thread.starting_email.sender_name }}</td> - <td>{{ lv.thread.starting_email|get_date|date:"l, j F Y H:i:s" }}</td> - <td>{{ lv.thread|get_date|timesince }}</td> - <td> - {{ lv.thread|length }} - {% if thread.unread %} - / {{ thread.unread }} new - {% endif %} - </td> - </tr> - {% endfor %} - </tbody> - </table> - {% include "paginator.html" with pager=last_views page_key="lvpage" %} - {% else %} - <p>Nothing read yet.</p> - {% endif %} - -{# vim: set noet: #} + {% if last_views %} + <table class="table table-striped table-bordered table-condensed"> + <thead> + <tr> + <th></th> + <th>Subject</th> + <th>Original author</th> + <th>Start date</th> + <th>Last activity</th> + <th>Replies</th> + </tr> + </thead> + <tbody> + {% for lv in last_views %} + <tr> + <td> + {% if thread.unread %} + <i class="unread icon-eye-close" title="New comments"></i> + {% endif %} + </td> + <td><a href="{% url 'thread' mlist_fqdn=lv.list_address threadid=lv.threadid %}" + >{{ lv.thread.starting_email.subject }}</a></td> + <td>{{ lv.thread.starting_email.sender_name }}</td> + <td>{{ lv.thread.starting_email|get_date|date:"l, j F Y H:i:s" }}</td> + <td>{{ lv.thread|get_date|timesince }}</td> + <td> + {{ lv.thread|length }} + {% if thread.unread %} + / {{ thread.unread }} new + {% endif %} + </td> + </tr> + {% endfor %} + </tbody> + </table> + {% include "paginator.html" with pager=last_views page_key="lvpage" %} + {% else %} + <p>Nothing read yet.</p> + {% endif %} diff --git a/hyperkitty/templates/ajax/replies.html b/hyperkitty/templates/ajax/replies.html index 7b6fc70..bf13c9a 100644 --- a/hyperkitty/templates/ajax/replies.html +++ b/hyperkitty/templates/ajax/replies.html @@ -1,13 +1,11 @@ {% load url from future %} {% load hk_generic %} - {% for email in replies %} - <div class="{% cycle 'even' 'odd' %}" - {% if email.level %}style="margin-left:{{ email.level|multiply:"2" }}em;"{% endif %}> - <!-- Start email --> - {% include 'messages/message.html' %} - <!-- End of email --> - </div> - {% endfor %} - -{# vim: set noet: #} + {% for email in replies %} + <div class="{% cycle 'even' 'odd' %}" + {% if email.level %}style="margin-left:{{ email.level|multiply:"2" }}em;"{% endif %}> + <!-- Start email --> + {% include 'messages/message.html' %} + <!-- End of email --> + </div> + {% endfor %} diff --git a/hyperkitty/templates/ajax/temp_message.html b/hyperkitty/templates/ajax/temp_message.html index f518114..5b84b51 100644 --- a/hyperkitty/templates/ajax/temp_message.html +++ b/hyperkitty/templates/ajax/temp_message.html @@ -3,36 +3,34 @@ {% load hk_generic %} <div class="temporary" - {% if email.level %}style="margin-left:{{ email.level|multiply:"2" }}em;"{% endif %}> - <!-- Start email --> - <div class="email"> + {% if email.level %}style="margin-left:{{ email.level|multiply:"2" }}em;"{% endif %}> + <!-- Start email --> + <div class="email"> - <div class="email-header"> - <div class="email-date inline-block pull-right"> - <span class="date">Sent just now, not yet distributed</span> - </div> - <div class="gravatar{% if use_mockups %} pull-left{% endif %}"> - {% gravatar email.sender_email 40 %} - </div> - <div class="email-author inline-block"> - <span class="name">{{email.sender_name|escapeemail}}</span> - {% if use_mockups %} - <br /> - <span class="rank"> - Rank 8 - </span> - {% endif %} - </div> - </div> + <div class="email-header"> + <div class="email-date inline-block pull-right"> + <span class="date">Sent just now, not yet distributed</span> + </div> + <div class="gravatar{% if use_mockups %} pull-left{% endif %}"> + {% gravatar email.sender_email 40 %} + </div> + <div class="email-author inline-block"> + <span class="name">{{email.sender_name|escapeemail}}</span> + {% if use_mockups %} + <br /> + <span class="rank"> + Rank 8 + </span> + {% endif %} + </div> + </div> - <div class="email-body" - >{{ email.content|snip_quoted|wordwrap:90|urlizetrunc:76|escapeemail }}</div> + <div class="email-body" + >{{ email.content|snip_quoted|wordwrap:90|urlizetrunc:76|escapeemail }}</div> - <div class="email-info"> - </div> + <div class="email-info"> + </div> - </div> - <!-- End of email --> + </div> + <!-- End of email --> </div> - -{# vim: set noet: #} diff --git a/hyperkitty/templates/api.html b/hyperkitty/templates/api.html index 537ada2..750c69b 100644 --- a/hyperkitty/templates/api.html +++ b/hyperkitty/templates/api.html @@ -2,82 +2,80 @@ {% load url from future %} {% block content %} - <h2>REST API</h2> - <p> - HyperKitty comes with a small REST API allowing you to programatically retrieve - emails and information. - </p> + <h2>REST API</h2> + <p> + HyperKitty comes with a small REST API allowing you to programatically retrieve + emails and information. + </p> - <div class="odd" style="padding-left: 1em"> - <h3>Formats</h3> - <p> - This REST API can return the information into several formats. - The default format is html to allow human readibility.<br /> - To change the format, just add - <span style="font-style:italic">?format=<FORMAT></span> to the url - </p> - <p>The list of available formats is:</p> - <ul> - <li>json <a>(?format=json)</a></li> - <li>json-p <a>(?format=json-p)</a></li> - <li>txt <a>(?format=txt)</a></li> - <li>xml <a>(?format=xml)</a></li> - <li>html <a>(?format=html)</a></li> - <li>xhtml <a>(?format=xhtml)</a></li> - </ul> - </div> + <div class="odd" style="padding-left: 1em"> + <h3>Formats</h3> + <p> + This REST API can return the information into several formats. + The default format is html to allow human readibility.<br /> + To change the format, just add + <span style="font-style:italic">?format=<FORMAT></span> to the url + </p> + <p>The list of available formats is:</p> + <ul> + <li>json <a>(?format=json)</a></li> + <li>json-p <a>(?format=json-p)</a></li> + <li>txt <a>(?format=txt)</a></li> + <li>xml <a>(?format=xml)</a></li> + <li>html <a>(?format=html)</a></li> + <li>xhtml <a>(?format=xhtml)</a></li> + </ul> + </div> - <div class="even" style="padding-left: 1em"> - <h3>Lists <a>/api/list/</a></h3> - <p> + <div class="even" style="padding-left: 1em"> + <h3>Lists <a>/api/list/</a></h3> + <p> Using the address /api/list/ you will be able to retrieve the information known about all the mailing-lists. - </p> - <p> For example: <a href="{% url 'api_list' %}?format=api"> - {% url 'api_list' %} - </a> - </p> - </div> - <div class="even" style="padding-left: 1em"> - <h3>Emails <a>/api/email/<list name>/<Message-ID></a></h3> - <p> + </p> + <p> For example: <a href="{% url 'api_list' %}?format=api"> + {% url 'api_list' %} + </a> + </p> + </div> + <div class="even" style="padding-left: 1em"> + <h3>Emails <a>/api/email/<list name>/<Message-ID></a></h3> + <p> Using the address /api/email/<list name>/<Message-ID> you will be able to retrieve the information known about a specific email on the specified mailing-list. - </p> - <p> For example: <a href="{% url 'api_email' mlist_fqdn='devel@fp.o' messageid='13129854572893334' %}?format=api"> - {% url 'api_email' mlist_fqdn='devel@fp.o' messageid='13129854572893334' %} - </a> - </p> - </div> - <div class="odd" style="padding-left: 1em"> - <h3>Threads <a>/api/thread/<list name>/<ThreadID></a></h3> - <p> + </p> + <p> For example: <a href="{% url 'api_email' mlist_fqdn='devel@fp.o' messageid='13129854572893334' %}?format=api"> + {% url 'api_email' mlist_fqdn='devel@fp.o' messageid='13129854572893334' %} + </a> + </p> + </div> + <div class="odd" style="padding-left: 1em"> + <h3>Threads <a>/api/thread/<list name>/<ThreadID></a></h3> + <p> Using the address /api/thread/<list name>/<Message-ID> you will be able to retrieve the all the email for a specific thread on the specified mailing-list. - </p> - <p> For example: <a href="{% url 'api_thread' mlist_fqdn='devel@fp.o' threadid='13129854572893334' %}?format=api"> - {% url 'api_thread' mlist_fqdn='devel@fp.o' threadid='13129854572893334' %} - </a> - </p> - </div> - <div class="even" style="padding-left: 1em"> - <h3>Search <a>/api/search/<list name>/<field>/<keyword></a></h3> - <p> + </p> + <p> For example: <a href="{% url 'api_thread' mlist_fqdn='devel@fp.o' threadid='13129854572893334' %}?format=api"> + {% url 'api_thread' mlist_fqdn='devel@fp.o' threadid='13129854572893334' %} + </a> + </p> + </div> + <div class="even" style="padding-left: 1em"> + <h3>Search <a>/api/search/<list name>/<field>/<keyword></a></h3> + <p> Using the address /api/search/<list name>/<field>/<keyword> you will be able to search for all emails of the specified mailing-list containing the provided keyword in the given field. - </p> - <p>The list of available field is:</p> - <ul> - <li>From</li> - <li>Subject</li> - <li>Content</li> - <li>SubjectContent</li> - </ul> - <p> For example: <a href="{% url 'api_search' mlist_fqdn='devel@fp.o' field='From' keyword='pingoured' %}?format=api"> - {% url 'api_search' mlist_fqdn='devel@fp.o' field='From' keyword='pingoured' %} - </a> - </p> - </div> + </p> + <p>The list of available field is:</p> + <ul> + <li>From</li> + <li>Subject</li> + <li>Content</li> + <li>SubjectContent</li> + </ul> + <p> For example: <a href="{% url 'api_search' mlist_fqdn='devel@fp.o' field='From' keyword='pingoured' %}?format=api"> + {% url 'api_search' mlist_fqdn='devel@fp.o' field='From' keyword='pingoured' %} + </a> + </p> + </div> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/base.html b/hyperkitty/templates/base.html index 011e790..4a36641 100644 --- a/hyperkitty/templates/base.html +++ b/hyperkitty/templates/base.html @@ -2,104 +2,102 @@ {% load assets %} <!DOCTYPE HTML> <html> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <meta name="ROBOTS" content="INDEX, FOLLOW" /> - <title>{% block title %}{{ app_name|title }}{% endblock %}</title> - <meta name="author" content="" /> - <meta name="dc.language" content="en" /> - <link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico" /> - <link rel="stylesheet" media="all" href="{{ STATIC_URL }}libs/jquery/ui-lightness/jquery-ui-1.10.0.custom.min.css" /> - {% assets filters="cssrewrite,cssmin", output="gen/hyperkitty.css", "libs/bootstrap/css/bootstrap.min.css", "css/hyperkitty-base.css", "css/hyperkitty-common.css", "css/hyperkitty-index.css", "css/hyperkitty-user.css", "css/hyperkitty-overview.css", "css/hyperkitty-threadslist.css", "css/hyperkitty-message.css" %} - <link rel="stylesheet" media="all" href="{{ ASSET_URL }}" /> - {% endassets %} - {% block additional_stylesheets %} {% endblock %} - </head> - {% load i18n %} - - <body> - <div class="container-fluid"> - <header class="row-fluid"> - <div class="navbar navbar-fixed-top"> - <div class="navbar-inner"> - <div class="container-fluid"> - - <ul class="nav auth"> - {% if user.is_authenticated %} - <li><a class="mm_logout" href="{% url 'user_logout' %}?next={% url 'root' %}">Logout</a></li> - <li><a href="{% url 'user_profile' %}">{{ user.username }}</a></li> - {% else %} - <li><a class="mm_user" href="{% url 'user_login' %}?next={{next|default:request.path|urlencode}}">Login</a></li> - {% if use_internal_auth %} - <li><a href="{% url 'user_registration' %}?next={{next|default:request.path|urlencode}}"> Sign Up </a></li> - {% endif %} - {% endif %} - </ul> - - <div id="search-form" class="nav"> - <form name="search" method="get" action="{% url 'search' %}" class="form-search"> - {% if mlist %}<input type="hidden" name="list" value="{{ mlist.name }}" />{% endif %} - <div class="input-append"> - <input name="query" type="text" class="search-query" - placeholder="Search {% if mlist %}this list{% else %}all lists{% endif %}" - {% if query %}value="{{ query }}"{% endif %} - /> - <button type="submit" class="btn"><i class="icon-search"></i></button> - </div> - </form> - </div> - - - <a class="brand" href="{% url 'root' %}">{{ app_name|title }}</a> - - <ul class="nav"> - - <li {% if all_lists %} class="active"{% endif %}> - <a href="{% url 'root' %}">All lists</a> - </li> - - {% if mlist %} - <li id="list_name" class="active"> - <a href="{% url 'list_overview' mlist_fqdn=mlist.name %}">{{mlist.name}}</a> - </li> - {% endif %} - - - </ul> - </div> - </div> - </div> - </header> - - {% if flash_messages %} - <div class="flashmsgs"> - {% for flash_msg in flash_messages %} - <div class="flashmsg-wrapper"> - <div class="alert alert-{{ flash_msg.type }}"> - {% if flash_msg.type != "success" %} - <button type="button" class="close" data-dismiss="alert">×</button> - {% endif %} - {{ flash_msg.msg }} - </div> - </div> - {% endfor %} - </div> - {% endif %} - - {% block content %} {% endblock %} - - {% block footer %} {% endblock %} - - </div> - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> - <script>window.jQuery || document.write('<script src="{{ STATIC_URL }}libs/jquery/jquery-1.8.3.min.js"><\/script>')</script> - <script src="{{ STATIC_URL }}libs/jquery/jquery-ui-1.10.0.custom.min.js"></script> - {% assets filters="rjsmin", output="gen/hyperkitty.js", "libs/bootstrap/js/bootstrap.min.js", "libs/jquery.expander.js", "libs/d3.v2.min.js", "libs/jquery.hotkeys.js", "js/hyperkitty.js" %} - <script src="{{ ASSET_URL }}"></script> - {% endassets %} - {% block additionaljs %} {% endblock %} - - </body> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta name="ROBOTS" content="INDEX, FOLLOW" /> + <title>{% block title %}{{ app_name|title }}{% endblock %}</title> + <meta name="author" content="" /> + <meta name="dc.language" content="en" /> + <link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico" /> + <link rel="stylesheet" media="all" href="{{ STATIC_URL }}libs/jquery/ui-lightness/jquery-ui-1.10.0.custom.min.css" /> + {% assets filters="cssrewrite,cssmin", output="gen/hyperkitty.css", "libs/bootstrap/css/bootstrap.min.css", "css/hyperkitty-base.css", "css/hyperkitty-common.css", "css/hyperkitty-index.css", "css/hyperkitty-user.css", "css/hyperkitty-overview.css", "css/hyperkitty-threadslist.css", "css/hyperkitty-message.css" %} + <link rel="stylesheet" media="all" href="{{ ASSET_URL }}" /> + {% endassets %} + {% block additional_stylesheets %} {% endblock %} + </head> + {% load i18n %} + + <body> + <div class="container-fluid"> + <header class="row-fluid"> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="container-fluid"> + + <ul class="nav auth"> + {% if user.is_authenticated %} + <li><a class="mm_logout" href="{% url 'user_logout' %}?next={% url 'root' %}">Logout</a></li> + <li><a href="{% url 'user_profile' %}">{{ user.username }}</a></li> + {% else %} + <li><a class="mm_user" href="{% url 'user_login' %}?next={{next|default:request.path|urlencode}}">Login</a></li> + {% if use_internal_auth %} + <li><a href="{% url 'user_registration' %}?next={{next|default:request.path|urlencode}}"> Sign Up </a></li> + {% endif %} + {% endif %} + </ul> + + <div id="search-form" class="nav"> + <form name="search" method="get" action="{% url 'search' %}" class="form-search"> + {% if mlist %}<input type="hidden" name="list" value="{{ mlist.name }}" />{% endif %} + <div class="input-append"> + <input name="query" type="text" class="search-query" + placeholder="Search {% if mlist %}this list{% else %}all lists{% endif %}" + {% if query %}value="{{ query }}"{% endif %} + /> + <button type="submit" class="btn"><i class="icon-search"></i></button> + </div> + </form> + </div> + + + <a class="brand" href="{% url 'root' %}">{{ app_name|title }}</a> + + <ul class="nav"> + + <li {% if all_lists %} class="active"{% endif %}> + <a href="{% url 'root' %}">All lists</a> + </li> + + {% if mlist %} + <li id="list_name" class="active"> + <a href="{% url 'list_overview' mlist_fqdn=mlist.name %}">{{mlist.name}}</a> + </li> + {% endif %} + + + </ul> + </div> + </div> + </div> + </header> + + {% if flash_messages %} + <div class="flashmsgs"> + {% for flash_msg in flash_messages %} + <div class="flashmsg-wrapper"> + <div class="alert alert-{{ flash_msg.type }}"> + {% if flash_msg.type != "success" %} + <button type="button" class="close" data-dismiss="alert">×</button> + {% endif %} + {{ flash_msg.msg }} + </div> + </div> + {% endfor %} + </div> + {% endif %} + + {% block content %} {% endblock %} + + {% block footer %} {% endblock %} + + </div> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> + <script>window.jQuery || document.write('<script src="{{ STATIC_URL }}libs/jquery/jquery-1.8.3.min.js"><\/script>')</script> + <script src="{{ STATIC_URL }}libs/jquery/jquery-ui-1.10.0.custom.min.js"></script> + {% assets filters="rjsmin", output="gen/hyperkitty.js", "libs/bootstrap/js/bootstrap.min.js", "libs/jquery.expander.js", "libs/d3.v2.min.js", "libs/jquery.hotkeys.js", "js/hyperkitty.js" %} + <script src="{{ ASSET_URL }}"></script> + {% endassets %} + {% block additionaljs %} {% endblock %} + + </body> </html> - -{# vim: set noet: #} diff --git a/hyperkitty/templates/index.html b/hyperkitty/templates/index.html index 85d051e..181edb2 100644 --- a/hyperkitty/templates/index.html +++ b/hyperkitty/templates/index.html @@ -16,18 +16,18 @@ <div class="row-fluid"> {% for mlist in all_lists %} <div class="span3"> - <a href="{% url 'list_overview' mlist_fqdn=mlist.name %}" class="mailinglist"> - <p class="list-name"> - {% if mlist.display_name %} - {{ mlist.display_name }} - {% else %} - {{ mlist.name }} - {% endif %} - </p> - <p class="list-address">{{ mlist.name }}</p> - <p class="list-description"></p> - <img alt="Loading..." class="ajaxloader" src="{{ STATIC_URL }}img/ajax-loader.gif" /> - </a> + <a href="{% url 'list_overview' mlist_fqdn=mlist.name %}" class="mailinglist"> + <p class="list-name"> + {% if mlist.display_name %} + {{ mlist.display_name }} + {% else %} + {{ mlist.name }} + {% endif %} + </p> + <p class="list-address">{{ mlist.name }}</p> + <p class="list-description"></p> + <img alt="Loading..." class="ajaxloader" src="{{ STATIC_URL }}img/ajax-loader.gif" /> + </a> </div> {% if forloop.counter|divisibleby:"4" %} </div> @@ -47,12 +47,10 @@ {% block additionaljs %} <script type="text/javascript"> - $(document).ready(function() { - // Load the properties - update_list_properties("{% url 'list_properties' %}"); - }); + $(document).ready(function() { + // Load the properties + update_list_properties("{% url 'list_properties' %}"); + }); </script> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/login.html b/hyperkitty/templates/login.html index 97bac12..248ee18 100644 --- a/hyperkitty/templates/login.html +++ b/hyperkitty/templates/login.html @@ -15,38 +15,38 @@ <h2>Login with your email</h2> <ul class="social-login inline"> - {% for backend in backends %} - <li class="{{ backend }}"> - {% if backend == "browserid" %} - <form method="post" - action="{% url 'socialauth_complete' "browserid" %}?next={{ next }}"> - {% csrf_token %} - <input type="hidden" name="assertion" value="" /> - <a rel="nofollow" id="browserid" href="#" class="disabled" - title="Wait for it..."><img - src="{{ STATIC_URL }}img/login/persona-large-disabled.png" - alt="Login using Persona" /></a> - </form> - {% elif backend == "openid" %} - <a class="socialaccount_provider openid" title="OpenID" href="#"><img - src="{{ STATIC_URL }}img/login/openid.png" alt="OpenID" /></a> - <form method="post" class="form-inline openid" - action="{% url 'socialauth_begin' "openid" %}?next={{ next }}"> - {% csrf_token %} - <div class="input-append"> - <input type="text" class="input-large" name="openid_identifier" - placeholder="OpenID URL" /> - <button type="submit" class="btn">Login with OpenID</button> - </div> - </form> - {% else %} - <a title="{{ backend|title }}" class="socialaccount_provider {{ backend }}" - href="{% url 'socialauth_begin' backend=backend %}?next={{ next }}"><img - src="{{ STATIC_URL }}img/login/{{ backend }}.png" - alt="{{ backend|title }}" /></a> - {% endif %} - </li> - {% endfor %} + {% for backend in backends %} + <li class="{{ backend }}"> + {% if backend == "browserid" %} + <form method="post" + action="{% url 'socialauth_complete' "browserid" %}?next={{ next }}"> + {% csrf_token %} + <input type="hidden" name="assertion" value="" /> + <a rel="nofollow" id="browserid" href="#" class="disabled" + title="Wait for it..."><img + src="{{ STATIC_URL }}img/login/persona-large-disabled.png" + alt="Login using Persona" /></a> + </form> + {% elif backend == "openid" %} + <a class="socialaccount_provider openid" title="OpenID" href="#"><img + src="{{ STATIC_URL }}img/login/openid.png" alt="OpenID" /></a> + <form method="post" class="form-inline openid" + action="{% url 'socialauth_begin' "openid" %}?next={{ next }}"> + {% csrf_token %} + <div class="input-append"> + <input type="text" class="input-large" name="openid_identifier" + placeholder="OpenID URL" /> + <button type="submit" class="btn">Login with OpenID</button> + </div> + </form> + {% else %} + <a title="{{ backend|title }}" class="socialaccount_provider {{ backend }}" + href="{% url 'socialauth_begin' backend=backend %}?next={{ next }}"><img + src="{{ STATIC_URL }}img/login/{{ backend }}.png" + alt="{{ backend|title }}" /></a> + {% endif %} + </li> + {% endfor %} </ul> @@ -55,13 +55,13 @@ <form action="{{ request.path }}?next={{ next|urlencode }}" method="post" class="form-horizontal"> - {% csrf_token %} - {{ form|crispy }} - <div class="control-group"> - <div class="controls"> - <button type="submit" class="btn btn-primary">{% trans "Login" %}</button> - </div> - </div> + {% csrf_token %} + {{ form|crispy }} + <div class="control-group"> + <div class="controls"> + <button type="submit" class="btn btn-primary">{% trans "Login" %}</button> + </div> + </div> </form> {% endif %} @@ -75,40 +75,38 @@ <script src="https://browserid.org/include.js" type="text/javascript"></script> <!-- Setup click handler that receives BrowserID assertion code and sends POST data --> <script type="text/javascript"> - $(function() { - // BrowserID - $('#browserid').click(function(e) { - e.preventDefault(); - var self = $(this); + $(function() { + // BrowserID + $('#browserid').click(function(e) { + e.preventDefault(); + var self = $(this); - navigator.id.get(function(assertion) { - if (assertion) { - self.parent('form').find('input[type=hidden]').attr('value', assertion).end().submit(); - } else { - alert('Some error occurred'); - } - }); - }).each(function() { - var img = $(this).find("img"); - img.attr("src", img.attr("src").replace(/-disabled/, "")); - $(this).removeClass("disabled") - .tooltip("destroy") - .removeAttr("title"); - }); - // OpenID - $('a.openid').click(function(e) { - e.preventDefault(); - $("form.openid").slideToggle("fast") - .filter(":visible") - .find("input[name='openid_identifier']").focus(); - }); - }); + navigator.id.get(function(assertion) { + if (assertion) { + self.parent('form').find('input[type=hidden]').attr('value', assertion).end().submit(); + } else { + alert('Some error occurred'); + } + }); + }).each(function() { + var img = $(this).find("img"); + img.attr("src", img.attr("src").replace(/-disabled/, "")); + $(this).removeClass("disabled") + .tooltip("destroy") + .removeAttr("title"); + }); + // OpenID + $('a.openid').click(function(e) { + e.preventDefault(); + $("form.openid").slideToggle("fast") + .filter(":visible") + .find("input[name='openid_identifier']").focus(); + }); + }); </script> <!-- end browserid stuff --> <script type="text/javascript"> - var username = document.getElementById('id_username'); - if (username) { username.focus(); } + var username = document.getElementById('id_username'); + if (username) { username.focus(); } </script> {% endblock additionaljs %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/message.html b/hyperkitty/templates/message.html index f542752..5f9bc73 100644 --- a/hyperkitty/templates/message.html +++ b/hyperkitty/templates/message.html @@ -15,23 +15,21 @@ {% include 'threads/month_list.html' %} - <div class="span7"> + <div class="span7"> - <div class="message-header"> - <a class="thread-back" - href="{% url 'thread' threadid=message.thread_id mlist_fqdn=mlist.name %}#{{message.message_id_hash}}"> - </a> {# the background image will be a "back to thread" button #} - <h1>{{ message.subject }}</h1> - </div> + <div class="message-header"> + <a class="thread-back" + href="{% url 'thread' threadid=message.thread_id mlist_fqdn=mlist.name %}#{{message.message_id_hash}}"> + </a> {# the background image will be a "back to thread" button #} + <h1>{{ message.subject }}</h1> + </div> - <section id="thread-content"> - {% include 'messages/message.html' with email=message unfolded='True' %} - </section> + <section id="thread-content"> + {% include 'messages/message.html' with email=message unfolded='True' %} + </section> - </div> + </div> </div> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/message_new.html b/hyperkitty/templates/message_new.html index 7f10e77..25e7c03 100644 --- a/hyperkitty/templates/message_new.html +++ b/hyperkitty/templates/message_new.html @@ -16,35 +16,33 @@ Create a new thread - {{ mlist.display_name|default:mlist.name|escapeemail }} - {% include 'threads/month_list.html' %} - <div class="span7"> - - <div class="message-header"> - <h1>Create a new thread</h1> - </div> - - {% if failure %} - <div class="alert alert-error"> - <button type="button" class="close" data-dismiss="alert">×</button> - {{ failure }} - </div> - {% endif %} - - <div class="new-thread-form"> - <form method="post" - action="{% url 'message_new' mlist_fqdn=mlist.name %}"> - {% csrf_token %} - {{ post_form|crispy }} - <p class="buttons"> - <button type="submit" class="submit btn btn-primary">Send</button> - or <a class="cancel" href="{% url 'archives_latest' mlist_fqdn=mlist.name %}">cancel</a> - </p> - </form> - </div> - - </div> + <div class="span7"> + + <div class="message-header"> + <h1>Create a new thread</h1> + </div> + + {% if failure %} + <div class="alert alert-error"> + <button type="button" class="close" data-dismiss="alert">×</button> + {{ failure }} + </div> + {% endif %} + + <div class="new-thread-form"> + <form method="post" + action="{% url 'message_new' mlist_fqdn=mlist.name %}"> + {% csrf_token %} + {{ post_form|crispy }} + <p class="buttons"> + <button type="submit" class="submit btn btn-primary">Send</button> + or <a class="cancel" href="{% url 'archives_latest' mlist_fqdn=mlist.name %}">cancel</a> + </p> + </form> + </div> + + </div> </div> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/messages/like_form.html b/hyperkitty/templates/messages/like_form.html index c499f4f..115373f 100644 --- a/hyperkitty/templates/messages/like_form.html +++ b/hyperkitty/templates/messages/like_form.html @@ -1,21 +1,19 @@ {% load url from future %} - <form method="post" class="likeform" - action="{% url 'message_vote' mlist_fqdn=object.list_name message_id_hash=message_id_hash %}"> - {% csrf_token %} - <span class="likestatus {{ object.likestatus }}">+{{ object.likes }}/-{{ object.dislikes }}</span> - {% if object.myvote == 1 %} - <span class="youlike">You like it - (<a href="#cancelvote" class="vote" data-vote="0">cancel</a>)</span> - {% elif object.myvote == -1 %} - <span class="youdislike">You dislike it - (<a href="#cancelvote" class="vote" data-vote="0">cancel</a>)</span> - {% else %} - <a class="youlike vote{% if not user.is_authenticated %} disabled" title="You must be logged-in to vote.{% endif %}" - href="#like" data-vote="1">Like</a> - <a class="youdislike vote{% if not user.is_authenticated %} disabled" title="You must be logged-in to vote.{% endif %}" - href="#dislike" data-vote="-1">Dislike</a> - {% endif %} - </form> - -{# vim: set noet: #} + <form method="post" class="likeform" + action="{% url 'message_vote' mlist_fqdn=object.list_name message_id_hash=message_id_hash %}"> + {% csrf_token %} + <span class="likestatus {{ object.likestatus }}">+{{ object.likes }}/-{{ object.dislikes }}</span> + {% if object.myvote == 1 %} + <span class="youlike">You like it + (<a href="#cancelvote" class="vote" data-vote="0">cancel</a>)</span> + {% elif object.myvote == -1 %} + <span class="youdislike">You dislike it + (<a href="#cancelvote" class="vote" data-vote="0">cancel</a>)</span> + {% else %} + <a class="youlike vote{% if not user.is_authenticated %} disabled" title="You must be logged-in to vote.{% endif %}" + href="#like" data-vote="1">Like</a> + <a class="youdislike vote{% if not user.is_authenticated %} disabled" title="You must be logged-in to vote.{% endif %}" + href="#dislike" data-vote="-1">Dislike</a> + {% endif %} + </form> diff --git a/hyperkitty/templates/messages/message.html b/hyperkitty/templates/messages/message.html index 0676dd8..2cfcdf8 100644 --- a/hyperkitty/templates/messages/message.html +++ b/hyperkitty/templates/messages/message.html @@ -7,69 +7,67 @@ {% is_message_new email.date as is_new %} <div class="email{% if unfolded %} email-first{% endif %}{% if is_new %} unread{% endif %}"> - <div class="email-header" id="{{email.message_id_hash}}"> - <div class="email-date inline-block pull-right"> - {% ifchanged %} - <span class="date"> - {{email|get_date|date:"l, j F"}} - {% if unfolded %} - {{email|get_date|date:"Y"}} - {% endif %} - </span> - {% endifchanged %} - {% if unfolded %}<br />{% endif %} - <span class="time" title="Sender's time: {% localtime off %}{{email|get_date|date:"l, j F H:i:s e"}}{% endlocaltime %}">{{email|get_date|date:"H:i:s"}}</span> - </div> - {% if is_new %} - <i class="unread icon-eye-close" title="Unread"></i> - {% endif %} - <div class="gravatar{% if use_mockups %} pull-left{% endif %}"> - {% gravatar email.sender_email 40 %} - </div> - <div class="email-author inline-block"> - <span class="name"><a href="{% url 'message_index' mlist_fqdn=mlist.name message_id_hash=email.message_id_hash %}">{{email.sender_name|escapeemail}}</a></span> - {% if use_mockups %} - <br /> - <span class="rank"> - Rank 8 - </span> - {% endif %} - </div> - </div> + <div class="email-header" id="{{email.message_id_hash}}"> + <div class="email-date inline-block pull-right"> + {% ifchanged %} + <span class="date"> + {{email|get_date|date:"l, j F"}} + {% if unfolded %} + {{email|get_date|date:"Y"}} + {% endif %} + </span> + {% endifchanged %} + {% if unfolded %}<br />{% endif %} + <span class="time" title="Sender's time: {% localtime off %}{{email|get_date|date:"l, j F H:i:s e"}}{% endlocaltime %}">{{email|get_date|date:"H:i:s"}}</span> + </div> + {% if is_new %} + <i class="unread icon-eye-close" title="Unread"></i> + {% endif %} + <div class="gravatar{% if use_mockups %} pull-left{% endif %}"> + {% gravatar email.sender_email 40 %} + </div> + <div class="email-author inline-block"> + <span class="name"><a href="{% url 'message_index' mlist_fqdn=mlist.name message_id_hash=email.message_id_hash %}">{{email.sender_name|escapeemail}}</a></span> + {% if use_mockups %} + <br /> + <span class="rank"> + Rank 8 + </span> + {% endif %} + </div> + </div> - <div class="email-body" - >{{ email.content|snip_quoted|wordwrap:90|urlizetrunc:76|escapeemail }}</div> + <div class="email-body" + >{{ email.content|snip_quoted|wordwrap:90|urlizetrunc:76|escapeemail }}</div> - {% if unfolded and email.attachments|count %} - <div class="attachments"> - <p class="attachments">Attachments:</p> - <ul class="attachments-list"> - {% for attachment in email.attachments %} - <li><a href="{% url 'message_attachment' mlist_fqdn=mlist.name message_id_hash=email.message_id_hash counter=attachment.counter filename=attachment.name %}">{{attachment.name}}</a> - ({{attachment.content_type}} — {{attachment.size|filesizeformat}}) - </li> - {% endfor %} - </ul> - </div> - {% endif %} + {% if unfolded and email.attachments|count %} + <div class="attachments"> + <p class="attachments">Attachments:</p> + <ul class="attachments-list"> + {% for attachment in email.attachments %} + <li><a href="{% url 'message_attachment' mlist_fqdn=mlist.name message_id_hash=email.message_id_hash counter=attachment.counter filename=attachment.name %}">{{attachment.name}}</a> + ({{attachment.content_type}} — {{attachment.size|filesizeformat}}) + </li> + {% endfor %} + </ul> + </div> + {% endif %} - <div class="email-info"> - {% include "messages/like_form.html" with message_id_hash=email.message_id_hash object=email %} - {% if not unfolded and email.attachments|count %} - <div class="attachments"> - <a class="attachments" href="#attachments">{{ email.attachments|count }} attachment(s)</a> - <ul class="attachments-list"> - {% for attachment in email.attachments %} - <li><a href="{% url 'message_attachment' mlist_fqdn=mlist.name message_id_hash=email.message_id_hash counter=attachment.counter filename=attachment.name %}">{{attachment.name}}</a> - ({{attachment.content_type}} — {{attachment.size|filesizeformat}}) - </li> - {% endfor %} - </ul> - </div> - {% endif %} - {% include "messages/reply_form.html" with mlist_fqdn=mlist.name message_id_hash=email.message_id_hash %} - </div> + <div class="email-info"> + {% include "messages/like_form.html" with message_id_hash=email.message_id_hash object=email %} + {% if not unfolded and email.attachments|count %} + <div class="attachments"> + <a class="attachments" href="#attachments">{{ email.attachments|count }} attachment(s)</a> + <ul class="attachments-list"> + {% for attachment in email.attachments %} + <li><a href="{% url 'message_attachment' mlist_fqdn=mlist.name message_id_hash=email.message_id_hash counter=attachment.counter filename=attachment.name %}">{{attachment.name}}</a> + ({{attachment.content_type}} — {{attachment.size|filesizeformat}}) + </li> + {% endfor %} + </ul> + </div> + {% endif %} + {% include "messages/reply_form.html" with mlist_fqdn=mlist.name message_id_hash=email.message_id_hash %} + </div> </div> - -{# vim: set noet: #} diff --git a/hyperkitty/templates/messages/reply_form.html b/hyperkitty/templates/messages/reply_form.html index b0a810d..44dcc3a 100644 --- a/hyperkitty/templates/messages/reply_form.html +++ b/hyperkitty/templates/messages/reply_form.html @@ -1,26 +1,24 @@ {% load url from future %} - <a class="reply{% if not user.is_authenticated %} disabled" title="You must be logged-in to reply.{% endif %}" href="#">Reply</a> - <div class="reply-form dropdown"> - <form method="post" - action="{% url 'message_reply' mlist_fqdn=mlist_fqdn message_id_hash=message_id_hash %}"> - {% csrf_token %} - <p class="reply-tools"> - <a class="btn btn-mini quote" href="#">Quote</a> - <label>{{ reply_form.newthread }} Create a new thread</label> - </p> - {{ reply_form.non_field_errors }} - {% for field in reply_form %} - {% if field.html_name != "newthread" %} - <p>{{ field }} {{ field.errors}}</p> - {% endif %} - {% endfor %} - {# { reply_form.as_p } #} - <p class="buttons"> - <button type="submit" class="submit btn btn-primary">Send</button> - or <a class="cancel" href="#">cancel</a> - </p> - </form> - </div> - -{# vim: set noet: #} + <a class="reply{% if not user.is_authenticated %} disabled" title="You must be logged-in to reply.{% endif %}" href="#">Reply</a> + <div class="reply-form dropdown"> + <form method="post" + action="{% url 'message_reply' mlist_fqdn=mlist_fqdn message_id_hash=message_id_hash %}"> + {% csrf_token %} + <p class="reply-tools"> + <a class="btn btn-mini quote" href="#">Quote</a> + <label>{{ reply_form.newthread }} Create a new thread</label> + </p> + {{ reply_form.non_field_errors }} + {% for field in reply_form %} + {% if field.html_name != "newthread" %} + <p>{{ field }} {{ field.errors}}</p> + {% endif %} + {% endfor %} + {# { reply_form.as_p } #} + <p class="buttons"> + <button type="submit" class="submit btn btn-primary">Send</button> + or <a class="cancel" href="#">cancel</a> + </p> + </form> + </div> diff --git a/hyperkitty/templates/messages/summary_message.html b/hyperkitty/templates/messages/summary_message.html index 6e14777..1acf07a 100644 --- a/hyperkitty/templates/messages/summary_message.html +++ b/hyperkitty/templates/messages/summary_message.html @@ -3,35 +3,33 @@ {% load hk_generic %} {% load storm %} - <div class="thread"> - <div> - <span class="thread-title"> - <a name="{{message.message_id_hash}}" - href="{% url 'message_index' message_id_hash=message.message_id_hash mlist_fqdn=message.list_name %}" - >{{ message.subject|strip_subject:mlist }}</a></span> - <span class="thread-date">{{ message|get_date|timesince }}</span> - </div> - <div class="thread-content"> - <div class="gravatar"> - {% if message.sender_email %} - {% gravatar message.sender_email 40 %} - <br /> - {% endif %} - {{ message.sender_name|escapeemail }} - </div> - <div class="thread-email"> - <span class="expander collapsed"> - {{ message.content|urlizetrunc:76|escapeemail }} - </span> - </div> - </div> - <div class="thread-info"> - <div class="tags"> - </div> - {% include "messages/like_form.html" with message_id_hash=message.message_id_hash object=message %} - <a href="{% url 'message_index' message_id_hash=message.message_id_hash mlist_fqdn=message.list_name %}" - class="btn thread-show">Show message</a> - </div> - </div> - -{# vim: set noet: #} + <div class="thread"> + <div> + <span class="thread-title"> + <a name="{{message.message_id_hash}}" + href="{% url 'message_index' message_id_hash=message.message_id_hash mlist_fqdn=message.list_name %}" + >{{ message.subject|strip_subject:mlist }}</a></span> + <span class="thread-date">{{ message|get_date|timesince }}</span> + </div> + <div class="thread-content"> + <div class="gravatar"> + {% if message.sender_email %} + {% gravatar message.sender_email 40 %} + <br /> + {% endif %} + {{ message.sender_name|escapeemail }} + </div> + <div class="thread-email"> + <span class="expander collapsed"> + {{ message.content|urlizetrunc:76|escapeemail }} + </span> + </div> + </div> + <div class="thread-info"> + <div class="tags"> + </div> + {% include "messages/like_form.html" with message_id_hash=message.message_id_hash object=message %} + <a href="{% url 'message_index' message_id_hash=message.message_id_hash mlist_fqdn=message.list_name %}" + class="btn thread-show">Show message</a> + </div> + </div> diff --git a/hyperkitty/templates/paginator.html b/hyperkitty/templates/paginator.html index efbce86..a4f0d3d 100644 --- a/hyperkitty/templates/paginator.html +++ b/hyperkitty/templates/paginator.html @@ -3,37 +3,35 @@ <div class="pagination pagination-centered"> <ul> - {% if pager.has_previous %} - <li> - <a href="?{% add_to_query_string page_key|default:'page' pager.previous_page_number %}"> - {% else %} - <li class="disabled"> - <a href="#"> - {% endif %} - ← {% if notbydate %}Previous{% else %}Newer{% endif %} - </a> - </li> + {% if pager.has_previous %} + <li> + <a href="?{% add_to_query_string page_key|default:'page' pager.previous_page_number %}"> + {% else %} + <li class="disabled"> + <a href="#"> + {% endif %} + ← {% if notbydate %}Previous{% else %}Newer{% endif %} + </a> + </li> - {% for pagenum in pager.page_range %} - <li{% if pagenum == pager.number %} class="active"{% endif %}> - {% if pagenum == "..." %} - <a href="#" class="disabled">...</a> - {% else %} - <a href="?{% add_to_query_string page_key|default:'page' pagenum %}">{{ pagenum }}</a> - {% endif %} - </li> - {% endfor %} + {% for pagenum in pager.page_range %} + <li{% if pagenum == pager.number %} class="active"{% endif %}> + {% if pagenum == "..." %} + <a href="#" class="disabled">...</a> + {% else %} + <a href="?{% add_to_query_string page_key|default:'page' pagenum %}">{{ pagenum }}</a> + {% endif %} + </li> + {% endfor %} - {% if pager.has_next %} - <li> - <a href="?{% add_to_query_string page_key|default:'page' pager.next_page_number %}"> - {% else %} - <li class="disabled"> - <a href="#"> - {% endif %} - {% if notbydate %}Next{% else %}Older{% endif %} →</a> - </li> + {% if pager.has_next %} + <li> + <a href="?{% add_to_query_string page_key|default:'page' pager.next_page_number %}"> + {% else %} + <li class="disabled"> + <a href="#"> + {% endif %} + {% if notbydate %}Next{% else %}Older{% endif %} →</a> + </li> </ul> </div> - -{# vim: set noet: #} diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html index 925b076..5b175d6 100644 --- a/hyperkitty/templates/recent_activities.html +++ b/hyperkitty/templates/recent_activities.html @@ -17,96 +17,96 @@ {% include 'threads/month_list.html' %} - <section id="recent_activities" class="span10"> - - <section id="graph"> - <h2>Activities on the list over the last 30 days</h2> - <div id="fig" /> - </section> - - <p class="thread-new"> - <a href="{% url "message_new" mlist_fqdn=mlist.name %}" - class="thread-new btn{% if not user.is_authenticated %} disabled" title="You must be logged-in to create a thread.{% endif %}" - ><strong>+</strong> Start a new thread</a> - </p> - - <div class="row-fluid"> - - <div class="span6"> - <section id="most-active"> - <h2>Recently active discussions</h2> - {% for thread in most_active_threads %} - {% include "threads/summary_thread.html" with counter=forloop.counter %} - {% endfor %} - </section> - </div> - - <div class="span6"> - <section id="top-discussion"> - <h2>Top discussions the last 30 days</h2> - {% for thread in top_threads %} - {% include "threads/summary_thread.html" with counter=forloop.counter %} - {% endfor %} - </section> - </div> - - </div> - <div class="row-fluid"> - - <div class="span6"> - {% if top_author %} - <section id="discussion-maker"> - <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.email %} - {% gravatar author.email 40 %} - <br /> - {% endif %} - </div> - <div class="inline-block"> - <span class="maker-name">{{author.name}}</span> - <br /> - <span class="score">+{{author.kudos}}</span> kudos - </div> - </div> - <!-- End discussion maker --> - {% endfor %} - - <h2>Tag cloud</h2> - </section> - {% endif %} - </div> - - - <div class="span6"> - {% 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 %} - <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> - {% endif %} - </div> - - </div> - - </section> + <section id="recent_activities" class="span10"> + + <section id="graph"> + <h2>Activities on the list over the last 30 days</h2> + <div id="fig" /> + </section> + + <p class="thread-new"> + <a href="{% url "message_new" mlist_fqdn=mlist.name %}" + class="thread-new btn{% if not user.is_authenticated %} disabled" title="You must be logged-in to create a thread.{% endif %}" + ><strong>+</strong> Start a new thread</a> + </p> + + <div class="row-fluid"> + + <div class="span6"> + <section id="most-active"> + <h2>Recently active discussions</h2> + {% for thread in most_active_threads %} + {% include "threads/summary_thread.html" with counter=forloop.counter %} + {% endfor %} + </section> + </div> + + <div class="span6"> + <section id="top-discussion"> + <h2>Top discussions the last 30 days</h2> + {% for thread in top_threads %} + {% include "threads/summary_thread.html" with counter=forloop.counter %} + {% endfor %} + </section> + </div> + + </div> + <div class="row-fluid"> + + <div class="span6"> + {% if top_author %} + <section id="discussion-maker"> + <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.email %} + {% gravatar author.email 40 %} + <br /> + {% endif %} + </div> + <div class="inline-block"> + <span class="maker-name">{{author.name}}</span> + <br /> + <span class="score">+{{author.kudos}}</span> kudos + </div> + </div> + <!-- End discussion maker --> + {% endfor %} + + <h2>Tag cloud</h2> + </section> + {% endif %} + </div> + + + <div class="span6"> + {% 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 %} + <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> + {% endif %} + </div> + + </div> + + </section> </div> @@ -115,16 +115,14 @@ {% block additionaljs %} <script type="text/javascript" > - $(function() { - activity_graph( - "#fig", - ["{{days|join:'","'}}"], - {{evolution}}, - "{{ archives_baseurl }}" - ) - }); + $(function() { + activity_graph( + "#fig", + ["{{days|join:'","'}}"], + {{evolution}}, + "{{ archives_baseurl }}" + ) + }); </script> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/register.html b/hyperkitty/templates/register.html index 71d4d6a..2be9a95 100644 --- a/hyperkitty/templates/register.html +++ b/hyperkitty/templates/register.html @@ -14,17 +14,15 @@ <h2>Register</h2> <form action="{{ request.path }}?next={{ next|urlencode }}" method="post" class="form-horizontal"> - {% csrf_token %} - {{ form|crispy }} - <div class="control-group"> - <div class="controls"> - <button type="submit" class="btn btn-primary">{% trans "Register" %}</button> - </div> - </div> + {% csrf_token %} + {{ form|crispy }} + <div class="control-group"> + <div class="controls"> + <button type="submit" class="btn btn-primary">{% trans "Register" %}</button> + </div> + </div> </form> </div> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/search_results.html b/hyperkitty/templates/search_results.html index f86280a..45d8e29 100644 --- a/hyperkitty/templates/search_results.html +++ b/hyperkitty/templates/search_results.html @@ -14,62 +14,62 @@ Search results for "{{ query }}"{% if mlist %} - {{ mlist.display_name|default:m {% include 'threads/month_list.html' %} - <div id="thread-list" class="span8"> - - <div class="thread-list-header page-header"> - {% if mlist %} - <h1>{{ mlist.display_name|default:mlist.name|escapeemail }} - <small>Search results for query "{{ query }}"</small> - </h1> - {% else %} - <h1>Search results - <small>for query "{{ query }}"</small> - </h1> - {% endif %} - <ul class="thread-list-info"> - {% if mlist.display_name %} - <li class="list-address"> - {{ mlist.name|escapeemail }} - </li> - {% endif %} - <li class="discussion"> - {{ total }} messages - </li> - </ul> - - <form method="get" action="{% url 'search' %}" class="form-inline"> - <input type="hidden" name="query" value="{{ query|escape }}" /> - <input type="hidden" name="page" value="{{ messages.number }}" /> - {% if mlist %}<input type="hidden" name="list" value="{{ mlist.name }}" />{% endif %} - <p> - Sort mode: - <select name="sort"> - <option value="score" - {% if sort_mode == "score" %}selected{% endif %} - >score</option> - <option value="date-desc" - {% if sort_mode == "date-desc" %}selected{% endif %} - >latest first</option> - <option value="date-asc" - {% if sort_mode == "date-asc" %}selected{% endif %} - >earliest first</option> - </select> - <button type="submit" class="btn btn-small">Update</button> - </p> - </form> - - </div> - - - {% for message in messages %} - {% include "messages/summary_message.html" %} - {% empty %} - <p>Sorry no email could be found for this query.</p> - {% endfor %} - - {% include "paginator.html" with pager=messages notbydate=True %} - - </div> + <div id="thread-list" class="span8"> + + <div class="thread-list-header page-header"> + {% if mlist %} + <h1>{{ mlist.display_name|default:mlist.name|escapeemail }} + <small>Search results for query "{{ query }}"</small> + </h1> + {% else %} + <h1>Search results + <small>for query "{{ query }}"</small> + </h1> + {% endif %} + <ul class="thread-list-info"> + {% if mlist.display_name %} + <li class="list-address"> + {{ mlist.name|escapeemail }} + </li> + {% endif %} + <li class="discussion"> + {{ total }} messages + </li> + </ul> + + <form method="get" action="{% url 'search' %}" class="form-inline"> + <input type="hidden" name="query" value="{{ query|escape }}" /> + <input type="hidden" name="page" value="{{ messages.number }}" /> + {% if mlist %}<input type="hidden" name="list" value="{{ mlist.name }}" />{% endif %} + <p> + Sort mode: + <select name="sort"> + <option value="score" + {% if sort_mode == "score" %}selected{% endif %} + >score</option> + <option value="date-desc" + {% if sort_mode == "date-desc" %}selected{% endif %} + >latest first</option> + <option value="date-asc" + {% if sort_mode == "date-asc" %}selected{% endif %} + >earliest first</option> + </select> + <button type="submit" class="btn btn-small">Update</button> + </p> + </form> + + </div> + + + {% for message in messages %} + {% include "messages/summary_message.html" %} + {% empty %} + <p>Sorry no email could be found for this query.</p> + {% endfor %} + + {% include "paginator.html" with pager=messages notbydate=True %} + + </div> </div> @@ -94,5 +94,3 @@ $(document).ready(function() { }); </script> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/thread.html b/hyperkitty/templates/thread.html index e8b8139..44a0a5b 100644 --- a/hyperkitty/templates/thread.html +++ b/hyperkitty/templates/thread.html @@ -16,57 +16,57 @@ {% include 'threads/month_list.html' %} - <div class="span10"> - - <div class="thread-header"> - {% for thread in neighbors %} - {% if thread %} - <a class="thread-{% ifequal forloop.counter 1 %}older{% else %}newer{% endifequal %}" - href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}" - title="{{ thread.subject|strip_subject:mlist|escape }}">{{ thread.subject|strip_subject:mlist|truncatesmart:"22" }}</a> - {% endif %} - {% endfor %} - <h1>{{ subject }}</h1> - </div> - - <div class="row-fluid"> - - <div class="span9"> - <!-- main section, the email thread --> - <section id="thread-content"> - - <!-- Start first email --> - {% include 'messages/message.html' with email=first_mail unfolded='True' %} - <!-- End first email --> - - <p class="sort-mode"> - {% if sort_mode == "date" %} - <a href="{% url 'thread' threadid=threadid mlist_fqdn=mlist.name %}?sort=thread" - >Show replies by thread</a> - {% else %} - <a href="{% url 'thread' threadid=threadid mlist_fqdn=mlist.name %}?sort=date" - >Show replies by date</a> - {% endif %} - </p> - - <div class="replies"> - {% if is_bot %} - {% include 'ajax/replies.html' %} - {% else %} - <img alt="Loading..." class="ajaxloader" src="{{ STATIC_URL }}img/ajax-loader.gif" /> - {% endif %} - </div> - - </section> - </div> - - <div class="span3"> - {% include 'threads/right_col.html' %} - </div> - - </div> - - </div> + <div class="span10"> + + <div class="thread-header"> + {% for thread in neighbors %} + {% if thread %} + <a class="thread-{% ifequal forloop.counter 1 %}older{% else %}newer{% endifequal %}" + href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}" + title="{{ thread.subject|strip_subject:mlist|escape }}">{{ thread.subject|strip_subject:mlist|truncatesmart:"22" }}</a> + {% endif %} + {% endfor %} + <h1>{{ subject }}</h1> + </div> + + <div class="row-fluid"> + + <div class="span9"> + <!-- main section, the email thread --> + <section id="thread-content"> + + <!-- Start first email --> + {% include 'messages/message.html' with email=first_mail unfolded='True' %} + <!-- End first email --> + + <p class="sort-mode"> + {% if sort_mode == "date" %} + <a href="{% url 'thread' threadid=threadid mlist_fqdn=mlist.name %}?sort=thread" + >Show replies by thread</a> + {% else %} + <a href="{% url 'thread' threadid=threadid mlist_fqdn=mlist.name %}?sort=date" + >Show replies by date</a> + {% endif %} + </p> + + <div class="replies"> + {% if is_bot %} + {% include 'ajax/replies.html' %} + {% else %} + <img alt="Loading..." class="ajaxloader" src="{{ STATIC_URL }}img/ajax-loader.gif" /> + {% endif %} + </div> + + </section> + </div> + + <div class="span3"> + {% include 'threads/right_col.html' %} + </div> + + </div> + + </div> </div> @@ -76,15 +76,13 @@ {% block additionaljs %} <script type="text/javascript"> - $(document).ready(function() { - // Hide quotes by default in the thread view - fold_quotes(); - // Load the replies - update_thread_replies("{% url 'thread_replies' threadid=threadid mlist_fqdn=mlist.name %}?sort={{sort_mode}}&last_view={{last_view|date:'U'}}"); - setup_unreadnavbar("#unreadnavbar"); - }); + $(document).ready(function() { + // Hide quotes by default in the thread view + fold_quotes(); + // Load the replies + update_thread_replies("{% url 'thread_replies' threadid=threadid mlist_fqdn=mlist.name %}?sort={{sort_mode}}&last_view={{last_view|date:'U'}}"); + setup_unreadnavbar("#unreadnavbar"); + }); </script> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/thread_list.html b/hyperkitty/templates/thread_list.html index d31b02f..32bbdfe 100644 --- a/hyperkitty/templates/thread_list.html +++ b/hyperkitty/templates/thread_list.html @@ -14,39 +14,39 @@ {% include 'threads/month_list.html' %} - <div id="thread-list" class="span8"> + <div id="thread-list" class="span8"> - <div class="thread-list-header page-header"> - <a href="{% url "message_new" mlist_fqdn=mlist.name %}" - class="thread-new btn{% if not user.is_authenticated %} disabled" title="You must be logged-in to create a thread.{% endif %}" - ><strong>+</strong> Start a new thread</a> - <h1>{{ mlist.display_name|default:mlist.name|escapeemail }} - <small>{{ list_title }}</small> - </h1> - <ul class="thread-list-info"> - {% if mlist.display_name %} - <li class="list-address"> - {{ mlist.name|escapeemail }} - </li> - {% endif %} - <li class="participant"> - {{ participants }} participants - </li> - <li class="discussion"> - {{ threads.paginator.count }} discussions - </li> - </ul> - </div> + <div class="thread-list-header page-header"> + <a href="{% url "message_new" mlist_fqdn=mlist.name %}" + class="thread-new btn{% if not user.is_authenticated %} disabled" title="You must be logged-in to create a thread.{% endif %}" + ><strong>+</strong> Start a new thread</a> + <h1>{{ mlist.display_name|default:mlist.name|escapeemail }} + <small>{{ list_title }}</small> + </h1> + <ul class="thread-list-info"> + {% if mlist.display_name %} + <li class="list-address"> + {{ mlist.name|escapeemail }} + </li> + {% endif %} + <li class="participant"> + {{ participants }} participants + </li> + <li class="discussion"> + {{ threads.paginator.count }} discussions + </li> + </ul> + </div> - {% for thread in threads %} - {% include "threads/summary_thread_large.html" %} - {% empty %} - <p>Sorry no email threads could be found {{ no_results_text }}.</p> - {% endfor %} + {% for thread in threads %} + {% include "threads/summary_thread_large.html" %} + {% empty %} + <p>Sorry no email threads could be found {{ no_results_text }}.</p> + {% endfor %} - {% include "paginator.html" with pager=threads %} + {% include "paginator.html" with pager=threads %} - </div> + </div> </div> @@ -71,5 +71,3 @@ $(document).ready(function() { }); </script> {% endblock %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/threads/month_list.html b/hyperkitty/templates/threads/month_list.html index 1d8f381..69f6d81 100644 --- a/hyperkitty/templates/threads/month_list.html +++ b/hyperkitty/templates/threads/month_list.html @@ -2,17 +2,15 @@ {% load hk_generic %} <div id="months-list" class="span2"> - {% for year, months in months_list|sort %} - <h3>{{ year }}</h3> - <ul> - {% for ar_month in months %} - <li class="{% if month and year == month.year and ar_month == month.month %}current{% endif %}"> - <a href="{% url 'archives_with_month' year=year mlist_fqdn=mlist.name month=ar_month %}" - >{{ ar_month|monthtodate:year|date:"F" }}</a> - </li> - {% endfor %} - </ul> - {% endfor %} + {% for year, months in months_list|sort %} + <h3>{{ year }}</h3> + <ul> + {% for ar_month in months %} + <li class="{% if month and year == month.year and ar_month == month.month %}current{% endif %}"> + <a href="{% url 'archives_with_month' year=year mlist_fqdn=mlist.name month=ar_month %}" + >{{ ar_month|monthtodate:year|date:"F" }}</a> + </li> + {% endfor %} + </ul> + {% endfor %} </div> - -{# vim: set noet: #} diff --git a/hyperkitty/templates/threads/right_col.html b/hyperkitty/templates/threads/right_col.html index 76ed853..afbef7f 100644 --- a/hyperkitty/templates/threads/right_col.html +++ b/hyperkitty/templates/threads/right_col.html @@ -4,72 +4,70 @@ <!-- right column --> <section id="thread-overview-info"> - <!-- Start dates --> - <div id="thread-date-info" class="row-fluid"> - <div class="days-num"> - {{ days_inactive }} - </div> - <div class="days-text"> - days - <br /> - inactive - </div> - <div class="days-num"> - {{ days_old }} - </div> - <div class="days-text"> - days - <br /> - old - </div> - </div> - <!-- End dates --> - <form id="fav_form" name="favorite" method="post" class="favorite" - action="{% url 'favorite' mlist_fqdn=mlist.name threadid=threadid %}"> - {% csrf_token %} - <input type="hidden" name="action" value="{{ fav_action }}" /> - <p> - <a href="#AddFav" class="notsaved{% if not user.is_authenticated %} disabled" title="You must be logged-in to have favorites.{% endif %}">Add to favorite discussions</a> - <a href="#RmFav" class="saved">Remove from favorite discussions</a> - </p> - </form> - <p class="unread"> - {% if user.is_authenticated %} - <i class="unread icon-eye-close"></i> {{ unread_count }} unread messages - {% endif %} - </p> - <div id="tags"> - {% include 'threads/tags.html' %} - </div> - <div id="add-tag"> - <form id="add-tag-form" name="addtag" method="post" - action="{% url 'add_tag' mlist_fqdn=mlist.name threadid=threadid %}"> - {% csrf_token %} - {{ addtag_form.as_p }} - </form> - </div> - <div id="participants"> - <span id="participants_title">participants</span> ({{participants|length}}) - <ul> - {% for name, email in participants %} - <li> - {% gravatar email 20 %} - {{ name|escapeemail }} - </li> - {% endfor %} - </ul> - </div> + <!-- Start dates --> + <div id="thread-date-info" class="row-fluid"> + <div class="days-num"> + {{ days_inactive }} + </div> + <div class="days-text"> + days + <br /> + inactive + </div> + <div class="days-num"> + {{ days_old }} + </div> + <div class="days-text"> + days + <br /> + old + </div> + </div> + <!-- End dates --> + <form id="fav_form" name="favorite" method="post" class="favorite" + action="{% url 'favorite' mlist_fqdn=mlist.name threadid=threadid %}"> + {% csrf_token %} + <input type="hidden" name="action" value="{{ fav_action }}" /> + <p> + <a href="#AddFav" class="notsaved{% if not user.is_authenticated %} disabled" title="You must be logged-in to have favorites.{% endif %}">Add to favorite discussions</a> + <a href="#RmFav" class="saved">Remove from favorite discussions</a> + </p> + </form> + <p class="unread"> + {% if user.is_authenticated %} + <i class="unread icon-eye-close"></i> {{ unread_count }} unread messages + {% endif %} + </p> + <div id="tags"> + {% include 'threads/tags.html' %} + </div> + <div id="add-tag"> + <form id="add-tag-form" name="addtag" method="post" + action="{% url 'add_tag' mlist_fqdn=mlist.name threadid=threadid %}"> + {% csrf_token %} + {{ addtag_form.as_p }} + </form> + </div> + <div id="participants"> + <span id="participants_title">participants</span> ({{participants|length}}) + <ul> + {% for name, email in participants %} + <li> + {% gravatar email 20 %} + {{ name|escapeemail }} + </li> + {% endfor %} + </ul> + </div> </section> {% if user.is_authenticated %} <div id="unreadnavbar"> - <div> - Unreads: <span class="unreadindex">0</span>/{{unread_count}} - - Go to: <a href="#" class="nextunread" title="hotkey: j">next ↓</a> - - <a href="#" class="prevunread" title="hotkey: k">prev ↑</a> - </div> + <div> + Unreads: <span class="unreadindex">0</span>/{{unread_count}} + + Go to: <a href="#" class="nextunread" title="hotkey: j">next ↓</a> + - <a href="#" class="prevunread" title="hotkey: k">prev ↑</a> + </div> </div> {% endif %} - -{# vim: set noet: #} diff --git a/hyperkitty/templates/threads/summary_thread.html b/hyperkitty/templates/threads/summary_thread.html index c201b36..cb26ffe 100644 --- a/hyperkitty/templates/threads/summary_thread.html +++ b/hyperkitty/templates/threads/summary_thread.html @@ -2,38 +2,36 @@ {% load hk_generic %} {% load storm %} - <div class="thread"> - <span class="thread-id">#{{counter}}</span> - <span class="thread-title"><a name="{{thread.thread_id}}" - href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}" - >{{ thread.subject|strip_subject:mlist }}</a></span> - <div class="thread_stats"> - <ul class="inline-block"> - {% if thread.category_tag %} - <li class="type type_{{thread.category_tag}}"> - <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category_tag %}" - >{{thread.category}}</a> - </li> - {% endif %} - {% if thread.category %} - <li class="type type_{{thread.category|lower}}"> - <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category|lower %}" - >{{thread.category}}</a> - </li> - {% endif %} - {% if use_mockups %} - <li class="likestatus neutral"> - +0/-0 - </li> - {% endif %} - <li class="participant"> - {{ thread.participants|length }} - </li> - <li class="discussion"> - {{ thread.length }} - </li> - </ul> - </div> - </div> - -{# vim: set noet: #} + <div class="thread"> + <span class="thread-id">#{{counter}}</span> + <span class="thread-title"><a name="{{thread.thread_id}}" + href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}" + >{{ thread.subject|strip_subject:mlist }}</a></span> + <div class="thread_stats"> + <ul class="inline-block"> + {% if thread.category_tag %} + <li class="type type_{{thread.category_tag}}"> + <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category_tag %}" + >{{thread.category}}</a> + </li> + {% endif %} + {% if thread.category %} + <li class="type type_{{thread.category|lower}}"> + <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category|lower %}" + >{{thread.category}}</a> + </li> + {% endif %} + {% if use_mockups %} + <li class="likestatus neutral"> + +0/-0 + </li> + {% endif %} + <li class="participant"> + {{ thread.participants|length }} + </li> + <li class="discussion"> + {{ thread.length }} + </li> + </ul> + </div> + </div> diff --git a/hyperkitty/templates/threads/summary_thread_large.html b/hyperkitty/templates/threads/summary_thread_large.html index 70dcd7f..66bff39 100644 --- a/hyperkitty/templates/threads/summary_thread_large.html +++ b/hyperkitty/templates/threads/summary_thread_large.html @@ -3,62 +3,60 @@ {% load hk_generic %} {% load storm %} - <div class="thread{% if thread.unread %} unread{% endif %}"> - <div class="{% if thread.favorite %}saved{% else %}notsaved{% endif %}"> - <span class="thread-title"> - {% if thread.unread %} - <i class="unread icon-eye-close" title="Unread"></i> - {% endif %} - <a name="{{thread.thread_id}}" - href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}" - >{{ thread.starting_email.subject|strip_subject:mlist }}</a></span> - <span class="thread-date">{{ thread|get_date|timesince }}</span> - </div> - <div class="thread-content"> - {% if thread.category_tag %} - <div class="inline-block type type_{{thread.category_tag}}"> - <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category_tag %}" - >{{thread.category}}</a> - </div> - {% endif %} - {% if thread.category %} - <div class="inline-block type type_{{thread.category|lower}}"> - <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category|lower %}" - >{{thread.category}}</a> - </div> - {% endif %} - <div class="gravatar"> - {% if thread.starting_email.sender_email %} - {% gravatar thread.starting_email.sender_email 40 %} - <br /> - {% endif %} - {{ thread.starting_email.sender_name|escapeemail }} - </div> - <div class="thread-email"> - <span class="expander collapsed"> - {{ thread.starting_email.content|urlizetrunc:76|escapeemail }} - </span> - </div> - </div> - <div class="thread-info"> - <div class="tags"> - {% if thread.tags|length %} - Tags: - <ul class="tags inline"> - {% for tag in thread.tags %} - <li> - <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=tag.tag %}">{{tag.tag}}</a> - </li> - {% endfor %} - </ul> - {% endif %} - </div> - <span class="participant">{{ thread.participants|length }} participants</span> - <span class="discussion">{{ thread|length }} comments</span> - {% include "messages/like_form.html" with message_id_hash=thread.starting_email.message_id_hash object=thread %} - <a href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}" - class="btn thread-show">Show discussion</a> - </div> - </div> - -{# vim: set noet: #} + <div class="thread{% if thread.unread %} unread{% endif %}"> + <div class="{% if thread.favorite %}saved{% else %}notsaved{% endif %}"> + <span class="thread-title"> + {% if thread.unread %} + <i class="unread icon-eye-close" title="Unread"></i> + {% endif %} + <a name="{{thread.thread_id}}" + href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}" + >{{ thread.starting_email.subject|strip_subject:mlist }}</a></span> + <span class="thread-date">{{ thread|get_date|timesince }}</span> + </div> + <div class="thread-content"> + {% if thread.category_tag %} + <div class="inline-block type type_{{thread.category_tag}}"> + <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category_tag %}" + >{{thread.category}}</a> + </div> + {% endif %} + {% if thread.category %} + <div class="inline-block type type_{{thread.category|lower}}"> + <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category|lower %}" + >{{thread.category}}</a> + </div> + {% endif %} + <div class="gravatar"> + {% if thread.starting_email.sender_email %} + {% gravatar thread.starting_email.sender_email 40 %} + <br /> + {% endif %} + {{ thread.starting_email.sender_name|escapeemail }} + </div> + <div class="thread-email"> + <span class="expander collapsed"> + {{ thread.starting_email.content|urlizetrunc:76|escapeemail }} + </span> + </div> + </div> + <div class="thread-info"> + <div class="tags"> + {% if thread.tags|length %} + Tags: + <ul class="tags inline"> + {% for tag in thread.tags %} + <li> + <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=tag.tag %}">{{tag.tag}}</a> + </li> + {% endfor %} + </ul> + {% endif %} + </div> + <span class="participant">{{ thread.participants|length }} participants</span> + <span class="discussion">{{ thread|length }} comments</span> + {% include "messages/like_form.html" with message_id_hash=thread.starting_email.message_id_hash object=thread %} + <a href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}" + class="btn thread-show">Show discussion</a> + </div> + </div> diff --git a/hyperkitty/templates/threads/tags.html b/hyperkitty/templates/threads/tags.html index bafcc60..236e4c4 100644 --- a/hyperkitty/templates/threads/tags.html +++ b/hyperkitty/templates/threads/tags.html @@ -1,15 +1,13 @@ {% load url from future %} - <span id="tag-title">tags </span>({{tags|length}}) - {% if tags|length %} - <ul class="inline"> - {% for tag in tags %} - <li> - <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=tag.tag %}" >{{ tag.tag }}</a> - {% if not forloop.last %} <span>|</span> {% endif %} - </li> - {% endfor %} - </ul> - {% endif %} - -{# vim: set noet: #} + <span id="tag-title">tags </span>({{tags|length}}) + {% if tags|length %} + <ul class="inline"> + {% for tag in tags %} + <li> + <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=tag.tag %}" >{{ tag.tag }}</a> + {% if not forloop.last %} <span>|</span> {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} diff --git a/hyperkitty/templates/user_profile.html b/hyperkitty/templates/user_profile.html index 69c2ad7..a057fe2 100644 --- a/hyperkitty/templates/user_profile.html +++ b/hyperkitty/templates/user_profile.html @@ -13,105 +13,105 @@ <div id="user-profile"> - <h1>User profile <small>for {{ user }}</small></h1> - - <form method="post" action="{% url 'user_profile' %}"> - {% csrf_token %} - <table class="table table-bordered table-striped user-data"> - <tbody> - <tr> - <th>{% trans 'User name:' %}</th> - <td>{{ user.username}}</td> - </tr> - {{ form.as_table }} - <tr> - <th>{% trans 'Email:' %}</th> - <td>{{ user.email }}</td> - </tr> - {% if use_mockups %} - <tr> - <th>{% trans 'Karma:' %}</th> - <td>{{ user_profile.karma }}</td> - </tr> - {% endif %} - <tr> - <th>{% trans 'Date joined:' %}</th> - <td>{{ user.date_joined }}</td> - </tr> - </tbody> - </table> - <p class="buttons"> - <button type="submit" class="submit btn btn-primary">Update</button> - or <a href="#" class="cancel" onclick="document.forms[0].reset(); return false;">cancel</a> - </p> - </form> - - <div class="gravatar"> - <a href="http://gravatar.com/">{% gravatar user.email 150 %}</a> - <p><a href="http://gravatar.com/">Edit on gravatar.com</a></p> - </div> - - <div class="clearfix"></div> - - <h3>Favorites</h3> - {% if favorites %} - <ul> - {% for fav in favorites %} - <li> - <a href="{% url 'thread' mlist_fqdn=fav.list_address threadid=fav.threadid %}" - >{{ fav.thread.starting_email.subject }}</a> by {{ fav.thread.starting_email.sender_name }} - ({{ fav.thread|get_date|date:"l, j F Y H:i:s" }}) - </li> - {% endfor %} - </ul> - {% else %} - <p>No favorite yet.</p> - {% endif %} - - - <h3>Threads you have read</h3> - <img alt="Loading..." class="ajaxloader" src="{{ STATIC_URL }}img/ajax-loader.gif" /> - <div class="views"></div> - - - <h3>Votes</h3> - <h4>Up Votes</h4> - {% if votes_up %} - <ul> - {% for vote in votes_up %} - <li> - {% if vote.message.content|trimString|length > 0 %} - <a href="{% url 'message_index' mlist_fqdn=vote.list_address message_id_hash=vote.messageid %}" - >{{ vote.message.subject }}</a> by {{ vote.message.sender_name }} - ({{ vote.message|get_date|date:"l, j F Y H:i:s" }}) - {% else %} - <a href="{% url 'message_index' mlist_fqdn=vote.list_address message_id_hash=vote.messageid %}">Message is empty</a> - {% endif %} - </li> - {% endfor %} - </ul> - {% else %} - <p>No up vote yet.</p> - {% endif %} - - <h4>Down Votes</h4> - {% if votes_down %} - <ul> - {% for vote in votes_down %} - <li> - {% if vote.message.content|trimString|length > 0 %} - <a href="{% url 'message_index' mlist_fqdn=vote.list_address message_id_hash=vote.messageid %}" - >{{ vote.message.subject }}</a> by {{ vote.message.sender_name }} - ({{ vote.message|get_date|date:"l, j F Y H:i:s" }}) - {% else %} - <a href="{% url 'message_index' mlist_fqdn=vote.list_address message_id_hash=vote.messageid %}">Message is empty</a> - {% endif %} - </li> - {% endfor %} - </ul> - {% else %} - <p>No down vote yet.</p> - {% endif %} + <h1>User profile <small>for {{ user }}</small></h1> + + <form method="post" action="{% url 'user_profile' %}"> + {% csrf_token %} + <table class="table table-bordered table-striped user-data"> + <tbody> + <tr> + <th>{% trans 'User name:' %}</th> + <td>{{ user.username}}</td> + </tr> + {{ form.as_table }} + <tr> + <th>{% trans 'Email:' %}</th> + <td>{{ user.email }}</td> + </tr> + {% if use_mockups %} + <tr> + <th>{% trans 'Karma:' %}</th> + <td>{{ user_profile.karma }}</td> + </tr> + {% endif %} + <tr> + <th>{% trans 'Date joined:' %}</th> + <td>{{ user.date_joined }}</td> + </tr> + </tbody> + </table> + <p class="buttons"> + <button type="submit" class="submit btn btn-primary">Update</button> + or <a href="#" class="cancel" onclick="document.forms[0].reset(); return false;">cancel</a> + </p> + </form> + + <div class="gravatar"> + <a href="http://gravatar.com/">{% gravatar user.email 150 %}</a> + <p><a href="http://gravatar.com/">Edit on gravatar.com</a></p> + </div> + + <div class="clearfix"></div> + + <h3>Favorites</h3> + {% if favorites %} + <ul> + {% for fav in favorites %} + <li> + <a href="{% url 'thread' mlist_fqdn=fav.list_address threadid=fav.threadid %}" + >{{ fav.thread.starting_email.subject }}</a> by {{ fav.thread.starting_email.sender_name }} + ({{ fav.thread|get_date|date:"l, j F Y H:i:s" }}) + </li> + {% endfor %} + </ul> + {% else %} + <p>No favorite yet.</p> + {% endif %} + + + <h3>Threads you have read</h3> + <img alt="Loading..." class="ajaxloader" src="{{ STATIC_URL }}img/ajax-loader.gif" /> + <div class="views"></div> + + + <h3>Votes</h3> + <h4>Up Votes</h4> + {% if votes_up %} + <ul> + {% for vote in votes_up %} + <li> + {% if vote.message.content|trimString|length > 0 %} + <a href="{% url 'message_index' mlist_fqdn=vote.list_address message_id_hash=vote.messageid %}" + >{{ vote.message.subject }}</a> by {{ vote.message.sender_name }} + ({{ vote.message|get_date|date:"l, j F Y H:i:s" }}) + {% else %} + <a href="{% url 'message_index' mlist_fqdn=vote.list_address message_id_hash=vote.messageid %}">Message is empty</a> + {% endif %} + </li> + {% endfor %} + </ul> + {% else %} + <p>No up vote yet.</p> + {% endif %} + + <h4>Down Votes</h4> + {% if votes_down %} + <ul> + {% for vote in votes_down %} + <li> + {% if vote.message.content|trimString|length > 0 %} + <a href="{% url 'message_index' mlist_fqdn=vote.list_address message_id_hash=vote.messageid %}" + >{{ vote.message.subject }}</a> by {{ vote.message.sender_name }} + ({{ vote.message|get_date|date:"l, j F Y H:i:s" }}) + {% else %} + <a href="{% url 'message_index' mlist_fqdn=vote.list_address message_id_hash=vote.messageid %}">Message is empty</a> + {% endif %} + </li> + {% endfor %} + </ul> + {% else %} + <p>No down vote yet.</p> + {% endif %} </div> @@ -120,12 +120,10 @@ {% block additionaljs %} <script type="text/javascript"> - $(document).ready(function() { - // Load the last views - update_last_views("{% url 'user_last_views' %}"); - }); + $(document).ready(function() { + // Load the last views + update_last_views("{% url 'user_last_views' %}"); + }); </script> {% endblock %} - -{# vim: set noet: #} |