]> source.dussan.org Git - gitblit.git/commitdiff
Disable vote & watch links if repository is not accepting ticket updates
authorJames Moger <james.moger@gitblit.com>
Sat, 8 Mar 2014 17:24:36 +0000 (12:24 -0500)
committerJames Moger <james.moger@gitblit.com>
Sat, 8 Mar 2014 17:24:36 +0000 (12:24 -0500)
src/main/java/com/gitblit/wicket/pages/TicketPage.java

index d3ddc89f0acb0f896bbc1fd77bf9e3e162cc1bf8..434882f49277e38a169a7a12675f2c8e56fa5723 100644 (file)
@@ -520,7 +520,7 @@ public class TicketPage extends TicketBasePage {
                        WicketUtils.setCssClass(votersCount, "badge badge-info");\r
                }\r
                add(votersCount);\r
-               if (user.isAuthenticated) {\r
+               if (user.isAuthenticated && app().tickets().isAcceptingTicketUpdates(repository)) {\r
                        Model<String> model;\r
                        if (ticket.isVoter(user.username)) {\r
                                model = Model.of(getString("gb.removeVote"));\r
@@ -560,7 +560,7 @@ public class TicketPage extends TicketBasePage {
                        WicketUtils.setCssClass(watchersCount, "badge badge-info");\r
                }\r
                add(watchersCount);\r
-               if (user.isAuthenticated) {\r
+               if (user.isAuthenticated && app().tickets().isAcceptingTicketUpdates(repository)) {\r
                        Model<String> model;\r
                        if (ticket.isWatching(user.username)) {\r
                                model = Model.of(getString("gb.stopWatching"));\r