Show More
@@ -54,49 +54,53 b'' | |||||
54 | $.contextMenu({ |
|
54 | $.contextMenu({ | |
55 | selector: '#{{ post.id }} .moderation-menu', |
|
55 | selector: '#{{ post.id }} .moderation-menu', | |
56 | trigger: 'left', |
|
56 | trigger: 'left', | |
57 |
|
|
57 | build: function($trigger, e) { | |
58 |
|
|
58 | return { | |
59 |
|
|
59 | items: { | |
60 |
|
|
60 | edit: { | |
61 |
|
|
61 | name: '{% trans "Edit" %}', | |
62 |
|
|
62 | callback: function(key, opt) { | |
63 | visible: {% if perms.boards.change_post %}true{% else %}false{% endif %} |
|
63 | window.location = '{% url 'admin:boards_post_change' post.id %}'; | |
64 | }, |
|
64 | }, | |
65 | deletePost: { |
|
65 | visible: {% if perms.boards.change_post %}true{% else %}false{% endif %} | |
66 |
|
|
66 | }, | |
67 |
|
|
67 | deletePost: { | |
68 |
|
|
68 | name: '{% trans "Delete post" %}', | |
69 |
|
|
69 | callback: function(key, opt) { | |
70 | visible: {% if not is_opening and perms.boards.delete_post %}true{% else %}false{% endif %} |
|
70 | window.location = '{% url 'admin:boards_post_delete' post.id %}'; | |
71 | }, |
|
71 | }, | |
72 | editThread: { |
|
72 | visible: {% if not is_opening and perms.boards.delete_post %}true{% else %}false{% endif %} | |
73 |
|
|
73 | }, | |
74 |
|
|
74 | editThread: { | |
75 |
|
|
75 | name: '{% trans "Edit thread" %}', | |
76 |
|
|
76 | callback: function(key, opt) { | |
77 | visible: {% if is_opening and perms.boards.change_thread %}true{% else %}false{% endif %} |
|
77 | window.location = '{% url 'admin:boards_thread_change' thread.id %}'; | |
78 | }, |
|
78 | }, | |
79 | deleteThread: { |
|
79 | visible: {% if is_opening and perms.boards.change_thread %}true{% else %}false{% endif %} | |
80 |
|
|
80 | }, | |
81 |
|
|
81 | deleteThread: { | |
82 |
|
|
82 | name: '{% trans "Delete thread" %}', | |
83 |
|
|
83 | callback: function(key, opt) { | |
84 | visible: {% if is_opening and perms.boards.delete_thread %}true{% else %}false{% endif %} |
|
84 | window.location = '{% url 'admin:boards_thread_delete' thread.id %}'; | |
85 | }, |
|
85 | }, | |
86 | findByIp: { |
|
86 | visible: {% if is_opening and perms.boards.delete_thread %}true{% else %}false{% endif %} | |
87 |
|
|
87 | }, | |
88 |
|
|
88 | findByIp: { | |
89 |
|
|
89 | name: 'IP = {{ post.poster_ip }}', | |
90 |
|
|
90 | callback: function(key, opt) { | |
91 | visible: {% if post.has_ip %}true{% else %}false{% endif %} |
|
91 | window.location = '{% url "feed" %}?ip={{ post.poster_ip }}'; | |
92 | }, |
|
92 | }, | |
93 | raw: { |
|
93 | visible: {% if post.has_ip %}true{% else %}false{% endif %} | |
94 |
|
|
94 | }, | |
95 |
|
|
95 | raw: { | |
96 | window.location = '{% url 'post_sync_data' post.id %}'; |
|
96 | name: 'RAW', | |
97 |
|
|
97 | callback: function(key, opt) { | |
98 | visible: {% if post.global_id_id %}true{% else %}false{% endif %} |
|
98 | window.location = '{% url 'post_sync_data' post.id %}'; | |
99 | } |
|
99 | }, | |
|
100 | visible: {% if post.global_id_id %}true{% else %}false{% endif %} | |||
|
101 | } | |||
|
102 | } | |||
|
103 | }; | |||
100 | } |
|
104 | } | |
101 | }); |
|
105 | }); | |
102 | </script> |
|
106 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now