Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-08-19 23:38:44 +0300
committerStan Hu <stanhu@gmail.com>2016-08-19 23:38:44 +0300
commit310eef45213b56f17686045cc12ac9297585a1d8 (patch)
treedde202349dea1a43ee91be8ed39f97f106622210 /app/views/projects
parentb06f9211b0c3a90200c030e84ae425778bac6412 (diff)
parenta927a9bf6baa99be94181c3ab980947621ae2fe0 (diff)
Merge branch 'gokmengoksel/gitlab-ce-koding' into 'master'
Koding Integration ## What does this MR do? Will provide Koding integration with GitLab services. Forked from !4914. ## Are there points in the code the reviewer needs to double check? I've introduced new layouts which might not be necessary, first time contributor. ## Why was this MR needed? We're planning to ship Koding with GitLab. ## What are the relevant issue numbers? #12759 #14698 ## Screenshots (if relevant) ### Screencasts http://recordit.co/BDMbhwgxPD http://recordit.co/By0qiz1ClC ### Enable Koding in Application Settings ![image](/uploads/73a69421105c03aa2b0b47e2617d3fbc/image.png) ### Koding Dashboard ![image](/uploads/6c7dda34792280c0e4791e36af4eba11/image.png) ### Set up Koding Stack 1 - ![image](/uploads/d5c2b93f8e61b5cbffdb06f0267d485f/image.png) 2 - ![image](/uploads/44d9a9b574b8ac0c5eb553fb9653d5da/image.png) ### Run on Koding on Project Page ![image](/uploads/7d2b46221009074ffff75d66d5a1a555/image.png) ### Run in IDE on Merge Requests ![image](/uploads/65eed90c34c34b5fe7ad29ef9c717640/image.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5909
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/buttons/_koding.html.haml7
-rw-r--r--app/views/projects/merge_requests/_show.html.haml3
-rw-r--r--app/views/projects/show.html.haml4
3 files changed, 13 insertions, 1 deletions
diff --git a/app/views/projects/buttons/_koding.html.haml b/app/views/projects/buttons/_koding.html.haml
new file mode 100644
index 00000000000..fdc80d44253
--- /dev/null
+++ b/app/views/projects/buttons/_koding.html.haml
@@ -0,0 +1,7 @@
+- if koding_enabled? && current_user && can_push_branch?(@project, @project.default_branch)
+ - if @repository.koding_yml
+ = link_to koding_project_url(@project), class: 'btn', target: '_blank' do
+ Run in IDE (Koding)
+ - else
+ = link_to add_koding_stack_path(@project), class: 'btn' do
+ Set Up Koding
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index f8025fc1dbe..9d8b4cc56be 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -16,6 +16,9 @@
- if @merge_request.open?
.pull-right
- if @merge_request.source_branch_exists?
+ - if koding_enabled? && @repository.koding_yml
+ = link_to koding_project_url(@merge_request.source_project, @merge_request.source_branch, @merge_request.commits.first.short_id), class: "btn inline btn-grouped btn-sm", target: '_blank' do
+ Run in IDE (Koding)
= link_to "#modal_merge_info", class: "btn inline btn-grouped btn-sm", "data-toggle" => "modal" do
Check out branch
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index a666d07e9eb..340e159c874 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -64,10 +64,12 @@
%li.missing
= link_to add_special_file_path(@project, file_name: '.gitlab-ci.yml') do
Set Up CI
+
%li.project-repo-buttons-right
.project-repo-buttons.project-right-buttons
- if current_user
= render 'shared/members/access_request_buttons', source: @project
+ = render "projects/buttons/koding"
.btn-group.project-repo-btn-group
= render "projects/buttons/download"
@@ -86,4 +88,4 @@
Archived project! Repository is read-only
%div{class: "project-show-#{default_project_view}"}
- = render default_project_view \ No newline at end of file
+ = render default_project_view