Commit a0aa6453 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'add-links-to-ci' into 'master'

Add links from GitLab to CI

* link from dashboard to CI dashboard
* link from project to CI project

Its a fast solution for 8.0. Might be improved in later versions
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !1313
parents f4920b76 f9dc3a2f
...@@ -119,6 +119,7 @@ class Project < ActiveRecord::Base ...@@ -119,6 +119,7 @@ class Project < ActiveRecord::Base
has_many :starrers, through: :users_star_projects, source: :user has_many :starrers, through: :users_star_projects, source: :user
has_one :import_data, dependent: :destroy, class_name: "ProjectImportData" has_one :import_data, dependent: :destroy, class_name: "ProjectImportData"
has_one :gitlab_ci_project, dependent: :destroy, class_name: "Ci::Project", foreign_key: :gitlab_id
delegate :name, to: :owner, allow_nil: true, prefix: true delegate :name, to: :owner, allow_nil: true, prefix: true
delegate :members, to: :team, prefix: true delegate :members, to: :team, prefix: true
......
...@@ -46,3 +46,8 @@ ...@@ -46,3 +46,8 @@
= icon('user fw') = icon('user fw')
%span %span
Profile Settings Profile Settings
= nav_link(controller: :ci) do
= link_to ci_root_path, title: 'Continuous Integration', data: {placement: 'right'} do
= icon('building fw')
%span
CI
...@@ -28,4 +28,8 @@ ...@@ -28,4 +28,8 @@
= render 'projects/buttons/dropdown' = render 'projects/buttons/dropdown'
- if @project.gitlab_ci?
= link_to ci_project_path(@project.gitlab_ci_project), class: 'btn btn-default' do
CI
= render "shared/clone_panel" = render "shared/clone_panel"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment