summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-04-02 16:10:45 +0300
committerValery Sizov <vsv2711@gmail.com>2015-04-02 16:10:45 +0300
commit01d90a3a035109c258334b89d9f7a354e04a8ac5 (patch)
treebff9d9d55a5b7114509772e543d49fb9694448b1
parent185bc3c3a4207333b084d4294c345c10b193dacc (diff)
downloadgitlab-ci-hook_for_empty_projects.tar.gz
Hide Test hook button for empty projectshook_for_empty_projects
-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