diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-08-11 02:07:50 +0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-08-11 02:25:15 +0400 |
commit | 775418918782d5284000ed0bfea364458c748567 (patch) | |
tree | c31e3633a3bcbed17b000f0165cf35edad41f7ca /app/views/events | |
parent | 1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff) |
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'app/views/events')
-rw-r--r-- | app/views/events/_commit.html.haml | 6 | ||||
-rw-r--r-- | app/views/events/_event.html.haml | 6 | ||||
-rw-r--r-- | app/views/events/_event_issue.html.haml | 4 | ||||
-rw-r--r-- | app/views/events/_event_last_push.html.haml | 8 | ||||
-rw-r--r-- | app/views/events/_event_merge_request.html.haml | 4 | ||||
-rw-r--r-- | app/views/events/_event_push.html.haml | 10 |
6 files changed, 19 insertions, 19 deletions
diff --git a/app/views/events/_commit.html.haml b/app/views/events/_commit.html.haml index ca0f29e2d6b..15f3bb5a97d 100644 --- a/app/views/events/_commit.html.haml +++ b/app/views/events/_commit.html.haml @@ -1,9 +1,9 @@ - commit = CommitDecorator.decorate(commit) %li.wll.commit %p - = link_to commit.short_id(8), project_commit_path(project, :id => commit.id), :class => "commit_short_id" + = link_to commit.short_id(8), project_commit_path(project, id: commit.id), class: "commit_short_id" %strong.cdark= commit.author_name – - = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16 - = gfm truncate(commit.title, :length => 50), project_commit_path(project, :id => commit.id) rescue "--broken encoding" + = image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16 + = gfm truncate(commit.title, length: 50), project_commit_path(project, id: commit.id) rescue "--broken encoding" diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index b3db83c26dd..d49f0382dea 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -1,13 +1,13 @@ - if event.allowed? - if event.issue? .event_feed - = render "events/event_issue", :event => event + = render "events/event_issue", event: event - elsif event.merge_request? .event_feed - = render "events/event_merge_request", :event => event + = render "events/event_merge_request", event: event - elsif event.push? .event_feed - = render "events/event_push", :event => event + = render "events/event_push", event: event diff --git a/app/views/events/_event_issue.html.haml b/app/views/events/_event_issue.html.haml index 4293be8204e..4d357b7f912 100644 --- a/app/views/events/_event_issue.html.haml +++ b/app/views/events/_event_issue.html.haml @@ -1,6 +1,6 @@ -= image_tag gravatar_icon(event.author_email), :class => "avatar" += image_tag gravatar_icon(event.author_email), class: "avatar" %strong #{event.author_name} -%span.event_label{:class => event.action_name}= event.action_name +%span.event_label{class: event.action_name}= event.action_name issue = link_to project_issue_path(event.project, event.issue) do %strong= truncate event.issue_title diff --git a/app/views/events/_event_last_push.html.haml b/app/views/events/_event_last_push.html.haml index 212ef817e60..4ef927495ae 100644 --- a/app/views/events/_event_last_push.html.haml +++ b/app/views/events/_event_last_push.html.haml @@ -1,13 +1,13 @@ - if show_last_push_widget?(event) .event_lp %div - = image_tag gravatar_icon(event.author_email), :class => "avatar" + = image_tag gravatar_icon(event.author_email), class: "avatar" %span Your pushed to = event.ref_type - = link_to project_commits_path(event.project, :ref => event.ref_name) do - %strong= truncate(event.ref_name, :length => 28) + = link_to project_commits_path(event.project, ref: event.ref_name) do + %strong= truncate(event.ref_name, length: 28) at %strong= link_to event.project.name, event.project - = link_to new_mr_path_from_push_event(event), :title => "New Merge Request", :class => "btn very_small primary" do + = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn very_small primary" do Create Merge Request diff --git a/app/views/events/_event_merge_request.html.haml b/app/views/events/_event_merge_request.html.haml index 774921a7f2a..ceb39371a3a 100644 --- a/app/views/events/_event_merge_request.html.haml +++ b/app/views/events/_event_merge_request.html.haml @@ -1,8 +1,8 @@ - if event.action_name == "merged" .event_icon= image_tag "event_mr_merged.png" -= image_tag gravatar_icon(event.author_email), :class => "avatar" += image_tag gravatar_icon(event.author_email), class: "avatar" %strong #{event.author_name} -%span.event_label{:class => event.action_name}= event.action_name +%span.event_label{class: event.action_name}= event.action_name merge request = link_to project_merge_request_path(event.project, event.merge_request) do %strong= truncate event.merge_request_title diff --git a/app/views/events/_event_push.html.haml b/app/views/events/_event_push.html.haml index 59d8962bb16..0adcaf9d10e 100644 --- a/app/views/events/_event_push.html.haml +++ b/app/views/events/_event_push.html.haml @@ -1,10 +1,10 @@ %div .event_icon= image_tag "event_push.png" - = image_tag gravatar_icon(event.author_email), :class => "avatar" + = image_tag gravatar_icon(event.author_email), class: "avatar" %strong #{event.author_name} %span.event_label.pushed= event.push_action_name = event.ref_type - = link_to project_commits_path(event.project, :ref => event.ref_name) do + = link_to project_commits_path(event.project, ref: event.ref_name) do %strong= event.ref_name at %strong= link_to event.project.name, event.project @@ -14,17 +14,17 @@ - if event.push_with_commits? - if event.commits_count > 1 - = link_to compare_project_commits_path(event.project, :from => event.parent_commit.id, :to => event.last_commit.id) do + = link_to compare_project_commits_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do %strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]} - project = event.project %ul.unstyled.event_commits - if event.commits_count > 3 - event.commits[0...2].each do |commit| - = render "events/commit", :commit => commit, :project => project + = render "events/commit", commit: commit, project: project %li %br \... and #{event.commits_count - 2} more commits - else - event.commits.each do |commit| - = render "events/commit", :commit => commit, :project => project + = render "events/commit", commit: commit, project: project |