2015-08-25 21:42:46 -04:00
|
|
|
module Ci
|
|
|
|
module GitlabHelper
|
|
|
|
def no_turbolink
|
|
|
|
{ :"data-no-turbolink" => "data-no-turbolink" }
|
|
|
|
end
|
|
|
|
|
|
|
|
def yaml_web_editor_link(project)
|
|
|
|
commits = project.commits
|
|
|
|
|
2015-10-02 07:46:38 -04:00
|
|
|
if commits.any? && commits.last.ci_yaml_file
|
2015-09-29 10:07:44 -04:00
|
|
|
"#{project.gitlab_url}/edit/master/.gitlab-ci.yml"
|
2015-08-25 21:42:46 -04:00
|
|
|
else
|
2015-09-29 10:07:44 -04:00
|
|
|
"#{project.gitlab_url}/new/master"
|
2015-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|