Commit c8ef1ef0 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'fix-explore-page-star-button' into 'master'

Fix `star` action in the `explore` subpages

See merge request gitlab-org/gitlab-ce!24693
parents 49c12f9b bd7ba9c5
import ProjectsList from '~/projects_list'; 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
});
...@@ -15,7 +15,7 @@ class Explore::ProjectsController < Explore::ApplicationController ...@@ -15,7 +15,7 @@ class Explore::ProjectsController < Explore::ApplicationController
format.html format.html
format.json do format.json do
render json: { 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
end end
...@@ -30,7 +30,7 @@ class Explore::ProjectsController < Explore::ApplicationController ...@@ -30,7 +30,7 @@ class Explore::ProjectsController < Explore::ApplicationController
format.html format.html
format.json do format.json do
render json: { 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
end end
...@@ -44,7 +44,7 @@ class Explore::ProjectsController < Explore::ApplicationController ...@@ -44,7 +44,7 @@ class Explore::ProjectsController < Explore::ApplicationController
format.html format.html
format.json do format.json do
render json: { 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
end end
......
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