diff --git a/app/assets/javascripts/stat_graph/application.js.coffee b/app/assets/javascripts/graphs/application.js.coffee similarity index 100% rename from app/assets/javascripts/stat_graph/application.js.coffee rename to app/assets/javascripts/graphs/application.js.coffee diff --git a/app/assets/javascripts/stat_graph/stat_graph.js.coffee b/app/assets/javascripts/graphs/stat_graph.js.coffee similarity index 100% rename from app/assets/javascripts/stat_graph/stat_graph.js.coffee rename to app/assets/javascripts/graphs/stat_graph.js.coffee diff --git a/app/assets/javascripts/stat_graph/stat_graph_contributors.js.coffee b/app/assets/javascripts/graphs/stat_graph_contributors.js.coffee similarity index 100% rename from app/assets/javascripts/stat_graph/stat_graph_contributors.js.coffee rename to app/assets/javascripts/graphs/stat_graph_contributors.js.coffee diff --git a/app/assets/javascripts/stat_graph/stat_graph_contributors_graph.js.coffee b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee similarity index 100% rename from app/assets/javascripts/stat_graph/stat_graph_contributors_graph.js.coffee rename to app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee diff --git a/app/assets/javascripts/stat_graph/stat_graph_contributors_util.js.coffee b/app/assets/javascripts/graphs/stat_graph_contributors_util.js.coffee similarity index 100% rename from app/assets/javascripts/stat_graph/stat_graph_contributors_util.js.coffee rename to app/assets/javascripts/graphs/stat_graph_contributors_util.js.coffee diff --git a/app/assets/javascripts/users/application.js.coffee b/app/assets/javascripts/users/application.js.coffee new file mode 100644 index 00000000000..647ffbf5f45 --- /dev/null +++ b/app/assets/javascripts/users/application.js.coffee @@ -0,0 +1,8 @@ +# This is a manifest file that'll be compiled into including all the files listed below. +# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +# be included in the compiled file accessible from http://example.com/assets/application.js +# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +# the compiled file. +# +#= require d3 +#= require_tree . diff --git a/app/assets/javascripts/calendar.js.coffee b/app/assets/javascripts/users/calendar.js.coffee similarity index 100% rename from app/assets/javascripts/calendar.js.coffee rename to app/assets/javascripts/users/calendar.js.coffee diff --git a/app/views/projects/graphs/_head.html.haml b/app/views/projects/graphs/_head.html.haml index 49b101a26a1..8becaea246f 100644 --- a/app/views/projects/graphs/_head.html.haml +++ b/app/views/projects/graphs/_head.html.haml @@ -1,4 +1,4 @@ -- page_specific_javascripts asset_path("stat_graph/application.js") +- page_specific_javascripts asset_path("graphs/application.js") %ul.nav-links = nav_link(action: :show) do = link_to 'Contributors', namespace_project_graph_path diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 0c513308308..8268380dafc 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,5 +1,6 @@ - page_title @user.name - page_description @user.bio +- page_specific_javascripts asset_path("users/application.js") - header_title @user.name, user_path(@user) - @no_container = true diff --git a/config/application.rb b/config/application.rb index c37542e8851..49d4d3ba555 100644 --- a/config/application.rb +++ b/config/application.rb @@ -81,7 +81,8 @@ module Gitlab config.assets.precompile << "print.css" config.assets.precompile << "notify.css" config.assets.precompile << "mailers/*.css" - config.assets.precompile << "stat_graph/application.js" + config.assets.precompile << "graphs/application.js" + config.assets.precompile << "users/application.js" # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0'