Commit 61117fa89fcf7f4d505a790b97521e6ba32a747a
1 parent
7bc2bd56
Exists in
master
and in
3 other branches
Post form modal adjusts
Showing
2 changed files
with
6 additions
and
6 deletions
Show diff stats
mural/templates/mural/_view.html
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | <i class="fa {{ post.action|action_icon }}"></i> |
13 | 13 | {{ post.get_action_display }} |
14 | 14 | </span> |
15 | - {% if request.user == post.user %} | |
15 | + {% if request.user == post.user or request.user.is_staff %} | |
16 | 16 | <span class="btn-group pull-right"> |
17 | 17 | <button class="btn btn-sm btn_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
18 | 18 | <i class="fa fa-ellipsis-v" aria-hidden="true"></i> | ... | ... |
mural/templates/mural/list.html
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | </div> |
50 | 50 | </div> |
51 | 51 | |
52 | - <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"></div> | |
52 | + <div class="modal fade" id="post-modal-form" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"></div> | |
53 | 53 | |
54 | 54 | <script type="text/javascript"> |
55 | 55 | $(function () { |
... | ... | @@ -59,11 +59,11 @@ |
59 | 59 | $.ajax({ |
60 | 60 | url: url, |
61 | 61 | success: function (data) { |
62 | - $('.modal').html(data); | |
62 | + $('#post-modal-form').html(data); | |
63 | 63 | |
64 | 64 | setPostFormSubmit(); |
65 | 65 | |
66 | - $('.modal').modal('show'); | |
66 | + $('#post-modal-form').modal('show'); | |
67 | 67 | } |
68 | 68 | }) |
69 | 69 | }); |
... | ... | @@ -86,12 +86,12 @@ |
86 | 86 | |
87 | 87 | $('.no-subjects').attr('style', 'display:none'); |
88 | 88 | |
89 | - $('.modal').modal('hide'); | |
89 | + $('#post-modal-form').modal('hide'); | |
90 | 90 | |
91 | 91 | alertify.success(data.message); |
92 | 92 | }, |
93 | 93 | error: function(data) { |
94 | - $(".modal").html(data.responseText); | |
94 | + $("#post-modal-form").html(data.responseText); | |
95 | 95 | setPostFormSubmit(); |
96 | 96 | }, |
97 | 97 | cache: false, | ... | ... |