diff options
author | Karlo Soriano <dev+karlo@aelogica.com> | 2013-05-09 13:00:56 +0800 |
---|---|---|
committer | karlo57 <karlo.karlo.karlo@gmail.com> | 2013-06-05 16:51:48 +0800 |
commit | 71d67e6557acb1ce3beeec2c2c6deb35015bd8bb (patch) | |
tree | c8e23f80ee62359d8db8574056ea69ac70eb4406 /app/views | |
parent | b9d989dc056a2a2b9316ff9aa06b57c736426871 (diff) | |
download | gitlab-ce-71d67e6557acb1ce3beeec2c2c6deb35015bd8bb.tar.gz |
Contributors graphs feature for GitLab
Created tests and refactored some code along the way
Added stat graph util spec, refactored code
finsihed up tests and refactors
finsihed up tests and refactors
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/nav/_project.html.haml | 2 | ||||
-rw-r--r-- | app/views/stat_graph/show.html.haml | 29 |
2 files changed, 31 insertions, 0 deletions
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index ec3da964037..399bcf5de2e 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -11,6 +11,8 @@ = link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref) = nav_link(controller: %w(graph)) do = link_to "Network", project_graph_path(@project, @ref || @repository.root_ref) + = nav_link(controller: %w(stat_graph)) do + = link_to "Graphs", project_stat_graph_path(@project, @ref || @repository.root_ref) - if @project.issues_enabled = nav_link(controller: %w(issues milestones labels)) do diff --git a/app/views/stat_graph/show.html.haml b/app/views/stat_graph/show.html.haml new file mode 100644 index 00000000000..b7b27387c01 --- /dev/null +++ b/app/views/stat_graph/show.html.haml @@ -0,0 +1,29 @@ +.header.clearfix + .right + %select + %option{:value => "commits"} Commits + %option{:value => "additions"} Additions + %option{:value => "deletions"} Deletions + %h3#date_header + %input#brush_change{:type => "hidden"} + +.graphs + #contributors-master + #contributors.clearfix + %ol.contributors-list.clearfix + +:javascript + controller = new ContributorsStatGraph + controller.init(#{@log}) + + $("select").change( function () { + var field = $(this).val() + controller.set_current_field(field) + controller.redraw_master() + controller.redraw_authors() + }) + + $("#brush_change").change( function () { + controller.change_date_header() + controller.redraw_authors() + })
\ No newline at end of file |