summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-01-28 10:45:49 +0000
committerPhil Hughes <me@iamphill.com>2019-01-28 10:45:49 +0000
commitc8ef1ef07609d0fd744151fe3518e739c5a4b4b7 (patch)
tree47f107c0ac336df967e2ac8ccc518d4a706bc9a0
parent49c12f9b0fec9a0153f866a0f6f27ed5eb336bf0 (diff)
parentbd7ba9c59bc1acd1f7cbfa99a7d636dd1611e0d4 (diff)
downloadgitlab-ce-c8ef1ef07609d0fd744151fe3518e739c5a4b4b7.tar.gz
Merge branch 'fix-explore-page-star-button' into 'master'
Fix `star` action in the `explore` subpages See merge request gitlab-org/gitlab-ce!24693
-rw-r--r--app/assets/javascripts/pages/explore/projects/index.js6
-rw-r--r--app/controllers/explore/projects_controller.rb6
2 files changed, 8 insertions, 4 deletions
diff --git a/app/assets/javascripts/pages/explore/projects/index.js b/app/assets/javascripts/pages/explore/projects/index.js
index 0c585e162cb..8f98be79640 100644
--- a/app/assets/javascripts/pages/explore/projects/index.js
+++ b/app/assets/javascripts/pages/explore/projects/index.js
@@ -1,3 +1,7 @@
import ProjectsList from '~/projects_list';
+import Star from '../../../star';
-document.addEventListener('DOMContentLoaded', () => new ProjectsList());
+document.addEventListener('DOMContentLoaded', () => {
+ new ProjectsList(); // eslint-disable-line no-new
+ new Star('.project-row'); // eslint-disable-line no-new
+});
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb
index 9f074690cbc..f3d76c5a478 100644
--- a/app/controllers/explore/projects_controller.rb
+++ b/app/controllers/explore/projects_controller.rb
@@ -15,7 +15,7 @@ class Explore::ProjectsController < Explore::ApplicationController
format.html
format.json do
render json: {
- html: view_to_html_string("dashboard/projects/_projects", locals: { projects: @projects })
+ html: view_to_html_string("explore/projects/_projects", locals: { projects: @projects })
}
end
end
@@ -30,7 +30,7 @@ class Explore::ProjectsController < Explore::ApplicationController
format.html
format.json do
render json: {
- html: view_to_html_string("dashboard/projects/_projects", locals: { projects: @projects })
+ html: view_to_html_string("explore/projects/_projects", locals: { projects: @projects })
}
end
end
@@ -44,7 +44,7 @@ class Explore::ProjectsController < Explore::ApplicationController
format.html
format.json do
render json: {
- html: view_to_html_string("dashboard/projects/_projects", locals: { projects: @projects })
+ html: view_to_html_string("explore/projects/_projects", locals: { projects: @projects })
}
end
end