-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use instance variables in partials
My objection is noted in PR #6472
- Loading branch information
1 parent
0e3b6cd
commit 51030dd
Showing
9 changed files
with
55 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_branches.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
- if @branches.any? | ||
- if branches.any? | ||
People | ||
= link_to('#pulse-collaboration') do | ||
branched | ||
#{pluralize(@branches.count, 'package')}. | ||
#{pluralize(branches.count, 'package')}. | ||
- else | ||
No one branched packages from this project. |
4 changes: 2 additions & 2 deletions
4
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_builds.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_changes.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
- if @project_changes.any? | ||
- if project_changes.any? | ||
And the project setup has been changed | ||
#{pluralize(@project_changes.count, 'time')}. | ||
#{pluralize(project_changes.count, 'time')}. | ||
- else | ||
And no one touched the project setup. |
6 changes: 3 additions & 3 deletions
6
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_comments.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
- if @comments.any? | ||
- if comments.any? | ||
And | ||
- people = @comments.group(:user_name).count | ||
- people = comments.group(:user_name).count | ||
= pluralize(people.count, 'person') | ||
added | ||
= link_to('#pulse-collaboration') do | ||
= pluralize(@comments.count, 'comment') | ||
= pluralize(comments.count, 'comment') | ||
in here. | ||
- else | ||
And no one commented in here. |
8 changes: 4 additions & 4 deletions
8
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_commits.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_entry.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
= log_entry.event_type.camelcase.prepend('Event::').constantize.description | ||
- if log_entry.package_name | ||
(#{link_to(log_entry.package_name, package_show_path(@project.name, log_entry.package_name))}) | ||
(#{link_to(log_entry.package_name, package_show_path(project.name, log_entry.package_name))}) | ||
- if log_entry.user_name | ||
by #{link_to(log_entry.user_name, user_show_path(log_entry.user_name))} | ||
= fuzzy_time(log_entry.datetime) |
10 changes: 5 additions & 5 deletions
10
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_new.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
There was | ||
- if @new_packages.any? | ||
- if new_packages.any? | ||
%b.text-success | ||
= @new_packages.count | ||
= 'package'.pluralize(@new_packages.count) | ||
= new_packages.count | ||
= 'package'.pluralize(new_packages.count) | ||
created | ||
- else | ||
no package created | ||
- if @deleted_packages.any? | ||
- if deleted_packages.any? | ||
and | ||
%b.text-danger | ||
= @deleted_packages.count | ||
= deleted_packages.count | ||
deleted. | ||
- else | ||
\. |
13 changes: 12 additions & 1 deletion
13
src/api/app/views/webui2/webui/projects/pulse/update_pulse.js.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
$('#range-header').html("<%= escape_javascript(pulse_period(@range)) %>"); | ||
$('#range-text').html("<%= @range.titleize %>"); | ||
$('#pulse').html("<%= escape_javascript render partial: 'pulse_list' %>"); | ||
$('#pulse').html("<%= escape_javascript render partial: 'pulse_list', locals: { requests_by_percentage: @requests_by_percentage, | ||
requests_by_state: @requests_by_state, | ||
project: @project, | ||
commits: @commits, | ||
new_packages: @new_packages, | ||
deleted_packages: @deleted_packages, | ||
updates: @updates, | ||
project_changes: @project_changes, | ||
builds: @builds, | ||
branches: @branches, | ||
comments: @comments, | ||
requests: @requests } %>"); |