Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ff01ca9c
Commit
ff01ca9c
authored
Jun 23, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trying to make this work with sprockets in production.
parent
f82278c4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
10 deletions
+8
-10
app/helpers/javascript_helper.rb
app/helpers/javascript_helper.rb
+2
-4
app/views/projects/graphs/_head.html.haml
app/views/projects/graphs/_head.html.haml
+2
-2
app/views/projects/network/show.html.haml
app/views/projects/network/show.html.haml
+2
-2
app/views/users/show.html.haml
app/views/users/show.html.haml
+2
-2
No files found.
app/helpers/javascript_helper.rb
View file @
ff01ca9c
module
JavascriptHelper
module
JavascriptHelper
def
page_specific_javascripts
(
js
=
nil
)
def
page_specific_javascript_tag
(
js
)
@page_specific_javascripts
=
js
unless
js
.
nil?
javascript_include_tag
asset_path
(
js
),
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
@page_specific_javascripts
end
end
end
end
app/views/projects/graphs/_head.html.haml
View file @
ff01ca9c
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
%ul
{
class:
(
container_class
)
}
%ul
{
class:
(
container_class
)
}
-
content_for
:page_specific_javascripts
do
-
content_for
:page_specific_javascripts
do
=
javascript_include_tag
'lib/chart.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'lib/chart.js'
)
=
javascript_include_tag
'graphs/application.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'graphs/application.js'
)
=
nav_link
(
action: :show
)
do
=
nav_link
(
action: :show
)
do
=
link_to
'Contributors'
,
namespace_project_graph_path
=
link_to
'Contributors'
,
namespace_project_graph_path
=
nav_link
(
action: :commits
)
do
=
nav_link
(
action: :commits
)
do
...
...
app/views/projects/network/show.html.haml
View file @
ff01ca9c
-
page_title
"Network"
,
@ref
-
page_title
"Network"
,
@ref
-
content_for
:page_specific_javascripts
do
-
content_for
:page_specific_javascripts
do
=
javascript_include_tag
'lib/raphael.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'lib/raphael.js'
)
=
javascript_include_tag
'network/application.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'network/application.js'
)
=
render
"projects/commits/head"
=
render
"projects/commits/head"
=
render
"head"
=
render
"head"
%div
{
class:
(
container_class
)
}
%div
{
class:
(
container_class
)
}
...
...
app/views/users/show.html.haml
View file @
ff01ca9c
-
page_title
@user
.
name
-
page_title
@user
.
name
-
page_description
@user
.
bio
-
page_description
@user
.
bio
-
content_for
:page_specific_javascripts
do
-
content_for
:page_specific_javascripts
do
=
javascript_include_tag
'lib/d3.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'lib/d3.js'
)
=
javascript_include_tag
'users/application.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'users/application.js'
)
-
header_title
@user
.
name
,
user_path
(
@user
)
-
header_title
@user
.
name
,
user_path
(
@user
)
-
@no_container
=
true
-
@no_container
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment