\n"
"
Your has a new ticket
\n"
"
\n"
-"
Title: {ticket.title}\n"
-"
\n"
-"
User: {user}\n"
-"
\n"
-"
Assignees: {ticket.assignees_display}\n"
-"
\n"
-"
City: {ticket.city}\n"
-"
\n"
-"
IP: {ticket.ip}\n"
+" {body}\n"
"
\n"
"
click here to review \n"
"
\n"
@@ -4725,28 +4690,20 @@ msgid ""
msgstr ""
"\n"
"
\n"
-"
您有一个新工单
\n"
+"
你有一个新工单
\n"
"
\n"
-"
标题: {ticket.title}\n"
+" {body}\n"
"
\n"
-"
用户: {user}\n"
-"
\n"
-"
待处理人: {ticket.assignees_display}\n"
-"
\n"
-"
城市: {ticket.city}\n"
-"
\n"
-"
IP: {ticket.ip}\n"
-"
\n"
-"
点我查看 \n"
+"
点击我查看 \n"
"
\n"
"
\n"
" "
-#: tickets/utils.py:48
+#: tickets/utils.py:40
msgid "Ticket has been reply"
msgstr "工单已被回复"
-#: tickets/utils.py:49
+#: tickets/utils.py:41
#, python-brace-format
msgid ""
"\n"
@@ -4777,13 +4734,13 @@ msgstr ""
"
\n"
" "
-#: tickets/views.py:17
-msgid "Login confirm ticket list"
-msgstr "登录复核工单列表"
+#: tickets/views.py:18
+msgid "Ticket list"
+msgstr "工单列表"
-#: tickets/views.py:31
-msgid "Login confirm ticket detail"
-msgstr "登录复核工单详情"
+#: tickets/views.py:33
+msgid "Ticket detail"
+msgstr "工单详情"
#: users/api/user.py:173
msgid "Could not reset self otp, use profile reset instead"
@@ -6455,6 +6412,80 @@ msgstr "密码匣子"
msgid "vault create"
msgstr "创建"
+#~ msgid "Assigned ticket"
+#~ msgstr "处理人"
+
+#~ msgid "My ticket"
+#~ msgstr "我的工单"
+
+#~ msgid "User login confirm: {}"
+#~ msgstr "用户登录复核: {}"
+
+#~ msgid ""
+#~ "User: {}\n"
+#~ "IP: {}\n"
+#~ "City: {}\n"
+#~ "Date: {}\n"
+#~ msgstr ""
+#~ "用户: {}\n"
+#~ "IP: {}\n"
+#~ "城市: {}\n"
+#~ "日期: {}\n"
+
+#~ msgid "this order"
+#~ msgstr "这个工单"
+
+#~ msgid "Approve selected"
+#~ msgstr "同意所选"
+
+#~ msgid "Reject selected"
+#~ msgstr "拒绝所选"
+
+#~ msgid ""
+#~ "\n"
+#~ "
- {% block action %}
- {% endblock %}
- {% block status %}
-
{% trans 'Close' %}
- {% endblock %}
- {% block comment %}
+ {% if object.type == object.TYPE_LOGIN_CONFIRM %}
+
{% trans 'Approve' %}
+
{% trans 'Reject' %}
+ {% endif %}
+
{% trans 'Close' %}
- {% endblock %}
@@ -127,6 +124,7 @@ var ticketId = "{{ object.id }}";
var status = "{{ object.status }}";
var commentUrl = "{% url 'api-tickets:ticket-comment-list' ticket_id=object.id %}";
+var ticketDetailUrl = "{% url 'api-tickets:ticket-detail' pk=object.id %}";
function createComment(successCallback) {
var commentText = $("#comment").val();
@@ -158,5 +156,26 @@ $(document).ready(function () {
.on('click', '.btn-comment', function () {
createComment();
})
+.on('click', '.btn-action', function () {
+ createComment(function () {});
+ var action = $(this).data('action');
+ var data = {
+ url: ticketDetailUrl,
+ body: JSON.stringify({action: action}),
+ method: "PATCH",
+ success: reloadPage
+ };
+ requestApi(data);
+})
+.on('click', '.btn-status', function () {
+ var status = $(this).data('uid');
+ var data = {
+ url: ticketDetailUrl,
+ body: JSON.stringify({status: status}),
+ method: "PATCH",
+ success: reloadPage
+ };
+ requestApi(data);
+})
{% endblock %}
diff --git a/apps/tickets/templates/tickets/ticket_list.html b/apps/tickets/templates/tickets/ticket_list.html
new file mode 100644
index 000000000..ba515997b
--- /dev/null
+++ b/apps/tickets/templates/tickets/ticket_list.html
@@ -0,0 +1,115 @@
+{% extends 'base.html' %}
+{% load i18n static %}
+
+{% block content %}
+