diff options
Diffstat (limited to 'askbot/templates')
-rw-r--r-- | askbot/templates/email/notify_admins_about_new_tags.html | 26 | ||||
-rw-r--r-- | askbot/templates/email/reply_by_email_error.html | 7 | ||||
-rw-r--r-- | askbot/templates/group_messaging/home.html | 1 | ||||
-rw-r--r-- | askbot/templates/group_messaging/macros.html | 16 | ||||
-rw-r--r-- | askbot/templates/group_messaging/senders_list.html | 10 | ||||
-rw-r--r-- | askbot/templates/group_messaging/thread_details.html | 7 | ||||
-rw-r--r-- | askbot/templates/group_messaging/threads_list.html | 21 | ||||
-rw-r--r-- | askbot/templates/user_inbox/base.html | 6 | ||||
-rw-r--r-- | askbot/templates/user_inbox/messages.html | 40 |
9 files changed, 88 insertions, 46 deletions
diff --git a/askbot/templates/email/notify_admins_about_new_tags.html b/askbot/templates/email/notify_admins_about_new_tags.html index dd37bb34..9aaaffc2 100644 --- a/askbot/templates/email/notify_admins_about_new_tags.html +++ b/askbot/templates/email/notify_admins_about_new_tags.html @@ -1,18 +1,8 @@ -{% extends "email/base_mail.html"%} -{%block headline%} - {%trans %}Hello{%endtrans%} -{% endblock %} - -{%block content %} - <p>{% trans %}Please have a look at these new tags {{tags|join(', ')}}, - created by {{user.username}}.{% endtrans %}</p> - <p>{% trans %}If you decide not to use the tags, please reply to this email - to the user {% endtrans %}<p> - <p>{%trans%}Otherwise, please <a href="{{ thread_url }}">visit the question</a> - and apply the tags{%endtrans%}</p> - <p>{%trans%}Thank you.{%endtrans%}</p> -{% endblock %} - -{%block footer %} -{% include "email/footer.html" %} -{% endblock %} +<p>Hello,</p> +<p>Please have a look at these new tags {{tags|join(', ')}}, +created by {{user.username}}.</p> +<p>If you decide not to use the tags, please reply to this email +to the user<p> +<p>Otherwise, please <a href="{{ thread_url }}">visit the question</a> +and apply the tags</p> +<p>Thank you.</p> diff --git a/askbot/templates/email/reply_by_email_error.html b/askbot/templates/email/reply_by_email_error.html index 618e061a..53648184 100644 --- a/askbot/templates/email/reply_by_email_error.html +++ b/askbot/templates/email/reply_by_email_error.html @@ -1,11 +1,4 @@ -{% extends "email/base_mail.html"%} -{%block headline%}{% trans %}Oops, there was an error.{% endblock %} -{%block content %} {% trans %} <p>The system was unable to process your message successfully, the reason being:<p> {% endtrans %} {{error}} -{% endblock %} -{%block footer %} -{% include "email/footer.html" %} -{% endblock %} diff --git a/askbot/templates/group_messaging/home.html b/askbot/templates/group_messaging/home.html index b6733624..258ee6e8 100644 --- a/askbot/templates/group_messaging/home.html +++ b/askbot/templates/group_messaging/home.html @@ -1,5 +1,6 @@ <div class="group-messaging" data-create-thread-url="{% url create_thread %}" + data-get-threads-url="{% url get_threads %}" > <div class="first-col"> <button class="submit compose">{% trans %}compose{% endtrans %}</button> diff --git a/askbot/templates/group_messaging/macros.html b/askbot/templates/group_messaging/macros.html new file mode 100644 index 00000000..312fe1e2 --- /dev/null +++ b/askbot/templates/group_messaging/macros.html @@ -0,0 +1,16 @@ +{%- macro message(post, visitor) -%} +<div class="message"> + <p class="header"> + {% if post.sender == visitor %} + {% trans date=post.sent_at %}You wrote on {{ date }}:{% endtrans %} + {% else %} + {% trans user=post.sender.username, + date=post.sent_at + %}{{ user }} wrote on {{ date }}:{% endtrans %} + {% endif %} + </p> + <div class="content"> + {{ post.html|safe }} + </div> +</div> +{%- endmacro -%} diff --git a/askbot/templates/group_messaging/senders_list.html b/askbot/templates/group_messaging/senders_list.html index 43f8ea28..a2e4766f 100644 --- a/askbot/templates/group_messaging/senders_list.html +++ b/askbot/templates/group_messaging/senders_list.html @@ -1,9 +1,9 @@ {% if senders %} <ul class="senders-list"> -{% for sender in senders %} - <li>{% trans %}Senders:{% endtrans %}</li> - <li><a data-sender-id="-1">{% trans %}all{% endtrans %}</a></li> - <li><a data-sender-id="{{ sender.id }}">{{ sender.username|escape }}</a></li> -{% endfor %} + <li>{% trans %}Messages by sender:{% endtrans %}</li> + <li><a class="selected" data-sender-id="-1">{% trans %}all users{% endtrans %}</a></li> + {% for sender in senders %} + <li><a data-sender-id="{{ sender.id }}">{{ sender.username|escape }}</a></li> + {% endfor %} </ul> {% endif %} diff --git a/askbot/templates/group_messaging/thread_details.html b/askbot/templates/group_messaging/thread_details.html new file mode 100644 index 00000000..969479d8 --- /dev/null +++ b/askbot/templates/group_messaging/thread_details.html @@ -0,0 +1,7 @@ +{% from "group_messaging/macros.html" import message %} +<ul class="thread" data-thread-id="{{ root_message.id }}"> + <li>{{ message(root_message, request.user) }}</li> + {% for response in responses %} + <li>{{ message(response, request.user) }}</li> + {% endfor %} +</ul> diff --git a/askbot/templates/group_messaging/threads_list.html b/askbot/templates/group_messaging/threads_list.html index 164867a1..8469198c 100644 --- a/askbot/templates/group_messaging/threads_list.html +++ b/askbot/templates/group_messaging/threads_list.html @@ -1,13 +1,18 @@ -<ul class="threads-list"> +<table class="threads-list"> {% if threads %} {% for thread in threads %} - <li> - <a data-thread-id="{{ thread.id }}"> - {{ thread.headline|escape }} - </a> - </li> + {% set thread_data = threads_data[thread.id] %} + <tr class="thread-heading {{ thread_data['status'] }}" + data-thread-id="{{ thread.id }}" + > + <td class="senders">{{ thread_data['senders_info']|escape }}</td> + <td class="subject">{{ thread.headline|escape }}</td> + <td class="timestamp">{{ thread.last_active_at|timesince }}</td> + </tr> {% endfor %} {% else %} - <li class="empty">{% trans %}there are no messages yet...{% endtrans %}</li> + <tr> + <td class="empty" colspan="3">{% trans %}there are no messages yet...{% endtrans %}<td> + </tr> {% endif %} -</ul> +</table> diff --git a/askbot/templates/user_inbox/base.html b/askbot/templates/user_inbox/base.html index 2f8b805e..890cb0f7 100644 --- a/askbot/templates/user_inbox/base.html +++ b/askbot/templates/user_inbox/base.html @@ -13,10 +13,10 @@ <div id="re_sections"> {% trans %}Sections:{% endtrans %} {% set sep = joiner('|') %} - {#{ sep() }} - {<a href="{{request.user.get_absolute_url()}}?sort=inbox§ion=messages" + {{ sep() }} + <a href="{{request.user.get_absolute_url()}}?sort=inbox§ion=messages" {% if inbox_section == 'messages' %}class="on"{% endif %} - >{% trans %}messages{% endtrans %}</a>#} + >{% trans %}messages{% endtrans %}</a> {% if re_count > 0 %}{{ sep() }} <a href="{{request.user.get_absolute_url()}}?sort=inbox§ion=forum" {% if inbox_section == 'forum' %}class="on"{% endif %} diff --git a/askbot/templates/user_inbox/messages.html b/askbot/templates/user_inbox/messages.html index 8bb64c4a..d42e5fb4 100644 --- a/askbot/templates/user_inbox/messages.html +++ b/askbot/templates/user_inbox/messages.html @@ -6,20 +6,49 @@ .group-messaging { padding-top: 25px; } - .group-messaging ul { + ul.senders-list { padding: 0px; + margin-left: 1em; + margin-top: 0.5em; } - .group-messaging li { + .senders-list li { + height: 1.5em; + vertical-align: center; list-style-type: none; list-style-position: outside; } - li.empty { + .senders-list .selected { + font-weight: bold; + } + table.threads-list { + width: 100%; + } + .threads-list tr { + height: 2em; + } + .threads-list td { + vertical-align: center; + } + .threads-list tr.new { + font-weight: bold; + color: #777; + } + .threads-list tr:hover { + background-color: #eff5f6; + } + td.empty { line-height: 30px; vertical-align: middle; background: #eee; padding-left: 320px; margin: 0px; } + td.senders { + padding-left: 10px; + } + td.timestamp { + width: 180px; + } button.compose { width: 150px; } @@ -31,10 +60,11 @@ width: 150px; } .second-col { - width: 810px; + width: 790px; + margin-left: 20px; } .message-composer { - padding: 0 0 10px 25px; + padding-bottom: 10px; margin-top: -25px; } .message-composer input.recipients, |