diff options
author | Phil Hughes <me@iamphill.com> | 2019-01-28 10:45:49 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-01-28 10:45:49 +0000 |
commit | c8ef1ef07609d0fd744151fe3518e739c5a4b4b7 (patch) | |
tree | 47f107c0ac336df967e2ac8ccc518d4a706bc9a0 | |
parent | 49c12f9b0fec9a0153f866a0f6f27ed5eb336bf0 (diff) | |
parent | bd7ba9c59bc1acd1f7cbfa99a7d636dd1611e0d4 (diff) | |
download | gitlab-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.js | 6 | ||||
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 6 |
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 |