blob: 39682a29db47406f98c46e7fa4ea7bf6646d2910 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
{% extends "user_profile/user.html" %}
{% import "macros.html" as macros %}
{% block forestyle %}
<link href="{{'/bootstrap/css/bootstrap.min.css'|media}}" rel="stylesheet" type="text/css" />
{% endblock %}
<!-- user_responses.html -->
{#
This template accepts a list of response list
they are a generalized form of any response and
The following properties of response object are used:
timestamp - when it happened
user - user who gave response (database object)
response_type - type of response
response_url - link to the question
response_title - title of the question
response_snippet - abbreviated content of the response
inbox_section - forum|flags
#}
{% block profilesection %}
{% trans %}inbox{% endtrans %}
{% endblock %}
{% block usercontent %}
<div style="padding-top:5px;font-size:13px;">
{% set re_count = request.user.new_response_count +
request.user.seen_response_count
%}
{% if moderation_items %}
{% set flag_count = moderation_items['new_count'] +
moderation_items['seen_count']
%}
{% else %}
{% set flag_count = 0 %}
{% endif %}
{% if re_count > 0 and flag_count > 0 %}
<div id="re_sections">
{% trans %}Sections:{% endtrans %}
<a href="{{request.user.get_absolute_url()}}?sort=inbox§ion=forum"
{% if inbox_section == 'forum' %}class="on"{% endif %}
>
{% trans %}forum responses ({{re_count}}){% endtrans -%}
</a> |
<a href="{{request.user.get_absolute_url()}}?sort=inbox§ion=flags"
{% if inbox_section == 'flags' %}class="on"{% endif %}
>
{% trans %}flagged items ({{flag_count}}){% endtrans %}
</a>
</div>
{% endif %}
<div id="re_tools">
<strong>{% trans %}select:{% endtrans %}</strong>
<a id="sel_all">{% trans %}all{% endtrans %}</a> |
<a id="sel_seen">{% trans %}seen{% endtrans %}</a> |
<a id="sel_new">{% trans %}new{% endtrans %}</a> |
<a id="sel_none">{% trans %}none{% endtrans %}</a><br />
<div class="btn-group">
{% if inbox_section == 'forum' %}
<a class="btn" id="re_mark_seen">{% trans %}mark as seen{% endtrans %}</a>
<a class="btn" id="re_mark_new">{% trans %}mark as new{% endtrans %}</a>
<a class="btn" id="re_dismiss">{% trans %}dismiss{% endtrans %}</a>
{% else %}
<a class="btn" id="re_remove_flag">{% trans %}remove flags/approve{% endtrans %}</a>
<a
class="btn"
id="re_delete_post"
data-toggle="modal"
href="#rejectEditModal"
>{% trans %}delete post{% endtrans %}</a>
{% endif %}
</div>
</div>
<div class="modal" style="display:none" id="rejectEditModal">
<div class="modal-header">
<a class="close" data-dismiss="modal">x</a>
<h3 class="modal-header">Reject the post?</h3>
</div>
<div class="modal-body">
<p>This is the body</p>
</div>
<div class="modal-footer">
<a href="#" class="btn">Close</a>
<a href="#" class="btn btn-primary">Save changes</a>
</div>
</div>
<div id="responses">
{% for response in responses %}
<div class="response-parent">
<p class="headline">
<strong>"{{ response.response_title.strip()|escape}}"</strong>
</p>
{{ macros.inbox_post_snippet(response, inbox_section) }}
{% for nested_response in response.nested_responses %}
{{ macros.inbox_post_snippet(nested_response, inbox_section) }}
{%endfor%}
</div>
{% endfor %}
</div>
</div>
{% endblock %}
{% block userjs %}
<script type="text/javascript">
var askbot = askbot || {};
askbot['urls'] = askbot['urls'] || {};
askbot['urls']['manageInbox'] = '{% url manage_inbox %}';
</script>
<script type="text/javascript" src="{{'/bootstrap/js/bootstrap.js'|media}}" />
<!-- end user_responses.html -->
{% endblock %}
|