summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-29 10:37:31 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-29 10:37:31 +0200
commit2a0d4e7200d3e985552d887b9c9e14db073c70ab (patch)
treef02c53ad90cff5e731d527399942544e8b8a84f3 /app/views
parente1b7fcedfb24353c857a160cd0c981f02fb2542a (diff)
downloadgitlab-ce-2a0d4e7200d3e985552d887b9c9e14db073c70ab.tar.gz
Move CI triggers page to project settings areamove-triggers-page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/ci/_nav_project.html.haml5
-rw-r--r--app/views/layouts/nav/_project_settings.html.haml5
-rw-r--r--app/views/projects/triggers/_trigger.html.haml (renamed from app/views/ci/triggers/_trigger.html.haml)2
-rw-r--r--app/views/projects/triggers/index.html.haml (renamed from app/views/ci/triggers/index.html.haml)10
4 files changed, 11 insertions, 11 deletions
diff --git a/app/views/layouts/ci/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml
index 4b0dc4fc2f5..2d3cc3cf983 100644
--- a/app/views/layouts/ci/_nav_project.html.haml
+++ b/app/views/layouts/ci/_nav_project.html.haml
@@ -16,11 +16,6 @@
= icon('link fw')
%span
Web Hooks
- = nav_link path: 'triggers#index' do
- = link_to ci_project_triggers_path(@project) do
- = icon('retweet fw')
- %span
- Triggers
= nav_link path: ['services#index', 'services#edit'] do
= link_to ci_project_services_path(@project) do
= icon('share fw')
diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml
index c8975fb8492..28efb035d09 100644
--- a/app/views/layouts/nav/_project_settings.html.haml
+++ b/app/views/layouts/nav/_project_settings.html.haml
@@ -45,3 +45,8 @@
= icon('code fw')
%span
Variables
+ = nav_link path: 'triggers#index' do
+ = link_to namespace_project_triggers_path(@project.namespace, @project) do
+ = icon('retweet fw')
+ %span
+ Triggers
diff --git a/app/views/ci/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml
index addfbfcb0d4..48b3b5c9920 100644
--- a/app/views/ci/triggers/_trigger.html.haml
+++ b/app/views/projects/triggers/_trigger.html.haml
@@ -11,4 +11,4 @@
%td
.pull-right
- = link_to 'Revoke', ci_project_trigger_path(@project, trigger), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-danger btn-sm btn-grouped"
+ = link_to 'Revoke', namespace_project_trigger_path(@project.namespace, @project, trigger), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-danger btn-sm btn-grouped"
diff --git a/app/views/ci/triggers/index.html.haml b/app/views/projects/triggers/index.html.haml
index 44374a1a4d5..17dcb78e256 100644
--- a/app/views/ci/triggers/index.html.haml
+++ b/app/views/projects/triggers/index.html.haml
@@ -12,11 +12,11 @@
%th Token
%th Last used
%th
- = render @triggers
+ = render partial: 'trigger', collection: @triggers, as: :trigger
- else
%h4 No triggers
-= form_for [:ci, @project, @trigger], html: { class: 'form-horizontal' } do |f|
+= form_for @trigger, url: url_for(controller: 'projects/triggers', action: 'create'), html: { class: 'form-horizontal' } do |f|
.clearfix
= f.submit "Add Trigger", class: 'btn btn-success pull-right'
@@ -34,7 +34,7 @@
:plain
curl -X POST \
-F token=TOKEN \
- #{ci_build_trigger_url(@project.id, 'REF_NAME')}
+ #{ci_build_trigger_url(@ci_project.id, 'REF_NAME')}
%h3
Use .gitlab-ci.yml
@@ -49,7 +49,7 @@
trigger:
type: deploy
script:
- - "curl -X POST -F token=TOKEN #{ci_build_trigger_url(@project.id, 'REF_NAME')}"
+ - "curl -X POST -F token=TOKEN #{ci_build_trigger_url(@ci_project.id, 'REF_NAME')}"
%h3
Pass build variables
@@ -64,4 +64,4 @@
curl -X POST \
-F token=TOKEN \
-F "variables[RUN_NIGHTLY_BUILD]=true" \
- #{ci_build_trigger_url(@project.id, 'REF_NAME')}
+ #{ci_build_trigger_url(@ci_project.id, 'REF_NAME')}