BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
ff01ca9c
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
10 deletions
+8
-10
javascript_helper.rb
app/helpers/javascript_helper.rb
+2
-4
_head.html.haml
app/views/projects/graphs/_head.html.haml
+2
-2
show.html.haml
app/views/projects/network/show.html.haml
+2
-2
show.html.haml
app/views/users/show.html.haml
+2
-2
No files found.
app/helpers/javascript_helper.rb
View file @
ff01ca9c
module
JavascriptHelper
def
page_specific_javascripts
(
js
=
nil
)
@page_specific_javascripts
=
js
unless
js
.
nil?
@page_specific_javascripts
def
page_specific_javascript_tag
(
js
)
javascript_include_tag
asset_path
(
js
),
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
end
end
app/views/projects/graphs/_head.html.haml
View file @
ff01ca9c
...
...
@@ -2,8 +2,8 @@
%ul
{
class:
(
container_class
)
}
-
content_for
:page_specific_javascripts
do
=
javascript_include_tag
'lib/chart.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
javascript_include_tag
'graphs/application.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'lib/chart.js'
)
=
page_specific_javascript_tag
(
'graphs/application.js'
)
=
nav_link
(
action: :show
)
do
=
link_to
'Contributors'
,
namespace_project_graph_path
=
nav_link
(
action: :commits
)
do
...
...
app/views/projects/network/show.html.haml
View file @
ff01ca9c
-
page_title
"Network"
,
@ref
-
content_for
:page_specific_javascripts
do
=
javascript_include_tag
'lib/raphael.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
javascript_include_tag
'network/application.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'lib/raphael.js'
)
=
page_specific_javascript_tag
(
'network/application.js'
)
=
render
"projects/commits/head"
=
render
"head"
%div
{
class:
(
container_class
)
}
...
...
app/views/users/show.html.haml
View file @
ff01ca9c
-
page_title
@user
.
name
-
page_description
@user
.
bio
-
content_for
:page_specific_javascripts
do
=
javascript_include_tag
'lib/d3.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
javascript_include_tag
'users/application.js'
,
{
integrity:
true
,
"data-turbolinks-track"
=>
true
}
=
page_specific_javascript_tag
(
'lib/d3.js'
)
=
page_specific_javascript_tag
(
'users/application.js'
)
-
header_title
@user
.
name
,
user_path
(
@user
)
-
@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