summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-07 10:03:10 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-07 10:03:10 +0000
commitc32728da750c9755b858a00b1322d45544aa8c7a (patch)
tree834af1dae54ff0ced53ba161c02a75561160260f
parent77f566092ef53b9d79cd74ec0256166303b1bc96 (diff)
parent01d90a3a035109c258334b89d9f7a354e04a8ac5 (diff)
downloadgitlab-ci-c32728da750c9755b858a00b1322d45544aa8c7a.tar.gz
Merge branch 'hook_for_empty_projects' into 'master'
Hide "Test hook" button for empty projects Fixes #132 See merge request !53
-rw-r--r--app/views/web_hooks/index.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/web_hooks/index.html.haml b/app/views/web_hooks/index.html.haml
index 8b94450..de68cee 100644
--- a/app/views/web_hooks/index.html.haml
+++ b/app/views/web_hooks/index.html.haml
@@ -28,7 +28,8 @@
%span.monospace= hook.url
%td
.pull-right
- = link_to 'Test Hook', test_project_web_hook_path(@project, hook), class: "btn btn-small btn-grouped"
+ - if @project.commits.any?
+ = link_to 'Test Hook', test_project_web_hook_path(@project, hook), class: "btn btn-small btn-grouped"
= link_to 'Remove', project_web_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small btn-grouped"
%h4 Web Hook data example