Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Stubler <brunsa2@gmail.com>2015-11-12 01:29:29 +0300
committerJeff Stubler <brunsa2@gmail.com>2015-11-12 01:29:29 +0300
commite0c64fac68b4b3acc48300956146b85e03b426ce (patch)
tree3b7e3387a152d867984be589bfb3539a08ea279a /app/views/projects/branches
parent860e24cc7b01280fad7d6351e8dcf891b45f5dd3 (diff)
Refactor for style issues
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r--app/views/projects/branches/_branch.html.haml11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml
index 9ddb10a1c74..a4202d1120d 100644
--- a/app/views/projects/branches/_branch.html.haml
+++ b/app/views/projects/branches/_branch.html.haml
@@ -1,7 +1,8 @@
- commit = @repository.commit(branch.target)
- bar_graph_width_factor = @max_commits > 0 ? 100.0/@max_commits : 0
-- number_commits_behind = @repository.diverging_commit_counts(branch)[:behind]
-- number_commits_ahead = @repository.diverging_commit_counts(branch)[:ahead]
+- diverging_commit_counts = @repository.diverging_commit_counts(branch)
+- number_commits_behind = diverging_commit_counts[:behind]
+- number_commits_ahead = diverging_commit_counts[:ahead]
%li(class="js-branch-#{branch.name}")
%div
= link_to namespace_project_tree_path(@project.namespace, @project, branch.name) do
@@ -33,13 +34,13 @@
= icon("trash-o")
- if branch.name != @repository.root_ref
- .divergence-graph{ :title => "#{number_commits_ahead} commits ahead, #{number_commits_behind} commits behind #{@repository.root_ref}" }
+ .divergence-graph{ title: "#{number_commits_ahead} commits ahead, #{number_commits_behind} commits behind #{@repository.root_ref}" }
.graph-side
- .bar.bar-behind{ :style => "width: #{number_commits_behind * bar_graph_width_factor}%" }
+ .bar.bar-behind{ style: "width: #{number_commits_behind * bar_graph_width_factor}%" }
%span.count.count-behind= number_commits_behind
.graph-separator
.graph-side
- .bar.bar-ahead{ :style => "width: #{number_commits_ahead * bar_graph_width_factor}%" }
+ .bar.bar-ahead{ style: "width: #{number_commits_ahead * bar_graph_width_factor}%" }
%span.count.count-ahead= number_commits_ahead