diff options
author | Daniel Gerhardt <code@dgerhardt.net> | 2015-07-02 20:12:24 +0200 |
---|---|---|
committer | Daniel Gerhardt <code@dgerhardt.net> | 2015-07-06 16:44:30 +0200 |
commit | 2963e7fd1c64af8482eaa82579ccdef5af1ef55a (patch) | |
tree | 1740104359c002c38526bd4bf4702073ea02cec8 /app/views | |
parent | 570fd9f590e06c378de82897fce31e1dbc020c0d (diff) | |
download | gitlab-ce-2963e7fd1c64af8482eaa82579ccdef5af1ef55a.tar.gz |
Add ref switching support for graphs
It is now possible to view contributor and commit statistics for
refs beyond the default branch.
Additionally, conditions in RefsController#switch have been refactored
in order that a `case` block is used now.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/graphs/commits.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/graphs/show.html.haml | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/app/views/projects/graphs/commits.html.haml b/app/views/projects/graphs/commits.html.haml index 254a76e108b..141acbdcf72 100644 --- a/app/views/projects/graphs/commits.html.haml +++ b/app/views/projects/graphs/commits.html.haml @@ -1,9 +1,11 @@ - page_title "Commit statistics" +.tree-ref-holder + = render 'shared/ref_switcher', destination: 'graphs_commits' = render 'head' %p.lead Commit statistics for - %strong #{@repository.root_ref} + %strong #{@ref} #{@commits_graph.start_date.strftime('%b %d')} - #{@commits_graph.end_date.strftime('%b %d')} .row diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index 3a8dc89f84c..ecdd0eaf52f 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -1,5 +1,8 @@ - page_title "Contributor statistics" +.tree-ref-holder + = render 'shared/ref_switcher', destination: 'graphs' = render 'head' + .loading-graph .center %h3.page-title @@ -11,7 +14,7 @@ .header.clearfix %h3#date_header.page-title %p.light - Commits to #{@project.default_branch}, excluding merge commits. Limited by 6,000 commits + Commits to #{@ref}, excluding merge commits. Limited by 6,000 commits %input#brush_change{:type => "hidden"} .graphs #contributors-master @@ -35,4 +38,3 @@ $(".stat-graph").fadeIn(); $(".loading-graph").hide(); dataType: "json" - |