diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-28 17:33:18 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-03 11:14:32 +0100 |
commit | d57e809cbd56aea8a49c6595663fc4b7250c5a34 (patch) | |
tree | 495d73da8f7edad0852a856774ef907ca6bfac60 /app/views/projects/services | |
parent | 85fa334eb6fd2069287a660e6ffa2295ea3a787f (diff) | |
download | gitlab-ce-d57e809cbd56aea8a49c6595663fc4b7250c5a34.tar.gz |
Set supported events per project service.
Diffstat (limited to 'app/views/projects/services')
-rw-r--r-- | app/views/projects/services/_form.html.haml | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 0519c8150e9..55ac85c32b9 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -29,35 +29,40 @@ .form-group = f.label :url, "Trigger", class: 'control-label' - .col-sm-10 - %div - = f.check_box :push_events, class: 'pull-left' - .prepend-left-20 - = f.label :push_events, class: 'list-label' do - %strong Push events - %p.light - This url will be triggered by a push to the repository - %div - = f.check_box :tag_push_events, class: 'pull-left' - .prepend-left-20 - = f.label :tag_push_events, class: 'list-label' do - %strong Tag push events - %p.light - This url will be triggered when a new tag is pushed to the repository - %div - = f.check_box :issues_events, class: 'pull-left' - .prepend-left-20 - = f.label :issues_events, class: 'list-label' do - %strong Issues events - %p.light - This url will be triggered when an issue is created - %div - = f.check_box :merge_requests_events, class: 'pull-left' - .prepend-left-20 - = f.label :merge_requests_events, class: 'list-label' do - %strong Merge Request events - %p.light - This url will be triggered when a merge request is created + - if @service.supported_events.length > 1 + .col-sm-10 + - if @service.supported_events.include?("push") + %div + = f.check_box :push_events, class: 'pull-left' + .prepend-left-20 + = f.label :push_events, class: 'list-label' do + %strong Push events + %p.light + This url will be triggered by a push to the repository + - if @service.supported_events.include?("tag_push") + %div + = f.check_box :tag_push_events, class: 'pull-left' + .prepend-left-20 + = f.label :tag_push_events, class: 'list-label' do + %strong Tag push events + %p.light + This url will be triggered when a new tag is pushed to the repository + - if @service.supported_events.include?("issue") + %div + = f.check_box :issues_events, class: 'pull-left' + .prepend-left-20 + = f.label :issues_events, class: 'list-label' do + %strong Issues events + %p.light + This url will be triggered when an issue is created + - if @service.supported_events.include?("merge_request") + %div + = f.check_box :merge_requests_events, class: 'pull-left' + .prepend-left-20 + = f.label :merge_requests_events, class: 'list-label' do + %strong Merge Request events + %p.light + This url will be triggered when a merge request is created - @service.fields.each do |field| - name = field[:name] |