Commit c1818eec authored by Fatih Acet's avatar Fatih Acet

Inject group options.

parent cae84aa2
...@@ -41,9 +41,19 @@ ...@@ -41,9 +41,19 @@
gl.projectOptions["#{@project.path}"] = { gl.projectOptions["#{@project.path}"] = {
issuesPath: "#{namespace_project_issues_path(@project.namespace, @project)}", issuesPath: "#{namespace_project_issues_path(@project.namespace, @project)}",
mrPath: "#{namespace_project_merge_requests_path(@project.namespace, @project)}", mrPath: "#{namespace_project_merge_requests_path(@project.namespace, @project)}",
projectName: "#{@project.name}" name: "#{@project.name}"
}; };
- if @group
:javascript
gl.groupOptions = gl.groupOptions || {};
gl.groupOptions["#{@group.path}"] = {
name: "#{@group.name}",
issuesPath: "#{issues_group_path(@group.path)}",
mrPath: "#{merge_requests_group_path(@group.path)}"
};
:javascript :javascript
gl.dashboardOptions = { gl.dashboardOptions = {
issuesPath: "#{issues_dashboard_url}", issuesPath: "#{issues_dashboard_url}",
......
!!! 5 !!! 5
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head" = render "layouts/head"
%body{class: "#{user_application_theme}", 'data-page' => body_data_page, 'data-project' => "#{@project.path if @project}"} %body{class: "#{user_application_theme}", data: {page: body_data_page, project: "#{@project.path if @project}", group: "#{@group.path if @group}"}}
= Gon::Base.render_data = Gon::Base.render_data
-# Ideally this would be inside the head, but turbolinks only evaluates page-specific JS in the body. -# Ideally this would be inside the head, but turbolinks only evaluates page-specific JS in the body.
......
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