summaryrefslogtreecommitdiff
path: root/app/views/commits
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/commits')
-rw-r--r--app/views/commits/_commit.html.haml8
-rw-r--r--app/views/commits/_commit_box.html.haml6
-rw-r--r--app/views/commits/_diff_head.html.haml8
-rw-r--r--app/views/commits/_diffs.html.haml16
-rw-r--r--app/views/commits/_head.html.haml16
-rw-r--r--app/views/commits/_text_file.html.haml14
-rw-r--r--app/views/commits/compare.html.haml10
-rw-r--r--app/views/commits/index.html.haml6
-rw-r--r--app/views/commits/index.js.haml2
-rw-r--r--app/views/commits/show.html.haml4
10 files changed, 45 insertions, 45 deletions
diff --git a/app/views/commits/_commit.html.haml b/app/views/commits/_commit.html.haml
index b4f8f91f563..686a4337b3a 100644
--- a/app/views/commits/_commit.html.haml
+++ b/app/views/commits/_commit.html.haml
@@ -1,13 +1,13 @@
%li.commit
.browse_code_link_holder
%p
- %strong= link_to "Browse Code »", tree_project_ref_path(@project, commit.id), :class => "right"
+ %strong= link_to "Browse Code »", tree_project_ref_path(@project, commit.id), class: "right"
%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.cgray= commit.author_name
–
- = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16
- = link_to_gfm truncate(commit.title, :length => 50), project_commit_path(@project, :id => commit.id), :class => "row_title"
+ = image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16
+ = link_to_gfm truncate(commit.title, length: 50), project_commit_path(@project, id: commit.id), class: "row_title"
%span.committed_ago
= time_ago_in_words(commit.committed_date)
diff --git a/app/views/commits/_commit_box.html.haml b/app/views/commits/_commit_box.html.haml
index 5edaaf9b274..52f03ba73c3 100644
--- a/app/views/commits/_commit_box.html.haml
+++ b/app/views/commits/_commit_box.html.haml
@@ -5,10 +5,10 @@
%span.btn.disabled.grouped
%i.icon-comment
= @notes_count
- = link_to patch_project_commit_path(@project, @commit.id), :class => "btn small grouped" do
+ = link_to patch_project_commit_path(@project, @commit.id), class: "btn small grouped" do
%i.icon-download-alt
Get Patch
- = link_to tree_project_ref_path(@project, @commit.id), :class => "browse-button primary grouped" do
+ = link_to tree_project_ref_path(@project, @commit.id), class: "browse-button primary grouped" do
%strong Browse Code »
%h3.commit-title.page_title
= gfm @commit.title
@@ -18,7 +18,7 @@
.commit-info
.row
.span4
- = image_tag gravatar_icon(@commit.author_email, 40), :class => "avatar"
+ = image_tag gravatar_icon(@commit.author_email, 40), class: "avatar"
.author
%strong= @commit.author_name
authored
diff --git a/app/views/commits/_diff_head.html.haml b/app/views/commits/_diff_head.html.haml
index 11d6ca169d0..710e8857649 100644
--- a/app/views/commits/_diff_head.html.haml
+++ b/app/views/commits/_diff_head.html.haml
@@ -3,24 +3,24 @@
%li
- if diff.deleted_file
%span.removed_file
- %a{:href => "##{diff.old_path}"}
+ %a{href: "##{diff.old_path}"}
= diff.old_path
= image_tag "diff_file_delete.png"
- elsif diff.renamed_file
%span.moved_file
- %a{:href => "##{diff.new_path}"}
+ %a{href: "##{diff.new_path}"}
= diff.old_path
= "->"
= diff.new_path
= image_tag "diff_file_notice.png"
- elsif diff.new_file
%span.new_file
- %a{:href => "##{diff.new_path}"}
+ %a{href: "##{diff.new_path}"}
= diff.new_path
= image_tag "diff_file_add.png"
- else
%span.edit_file
- %a{:href => "##{diff.new_path}"}
+ %a{href: "##{diff.new_path}"}
= diff.new_path
= image_tag "diff_file_info.png"
diff --git a/app/views/commits/_diffs.html.haml b/app/views/commits/_diffs.html.haml
index d51561d90f8..b590d64c06e 100644
--- a/app/views/commits/_diffs.html.haml
+++ b/app/views/commits/_diffs.html.haml
@@ -5,12 +5,12 @@
%p To prevent performance issue we rejected diff information.
%p
But if you still want to see diff
- = link_to "click this link", project_commit_path(@project, @commit.id, :force_show_diff => true), :class => "dark"
+ = link_to "click this link", project_commit_path(@project, @commit.id, force_show_diff: true), class: "dark"
%p.cgray
Showing #{pluralize(diffs.count, "changed file")}
.file_stats
- = render "commits/diff_head", :diffs => diffs
+ = render "commits/diff_head", diffs: diffs
- unless @suppress_diff
- diffs.each_with_index do |diff, i|
@@ -22,26 +22,26 @@
.diff_file_header
- if diff.deleted_file
%i.icon-file
- %span{:id => "#{diff.old_path}"}= diff.old_path
+ %span{id: "#{diff.old_path}"}= diff.old_path
- else
= link_to tree_file_project_ref_path(@project, @commit.id, diff.new_path) do
%i.icon-file
- %span{:id => "#{diff.new_path}"}= diff.new_path
+ %span{id: "#{diff.new_path}"}= diff.new_path
%br/
.diff_file_content
-# Skipp all non non-supported blobs
- next unless file.respond_to?('text?')
- if file.text?
- = render "commits/text_file", :diff => diff, :index => i
+ = render "commits/text_file", diff: diff, index: i
- elsif file.image?
- if diff.renamed_file || diff.new_file || diff.deleted_file
.diff_file_content_image
- %img{:class => image_diff_class(diff), :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
+ %img{class: image_diff_class(diff), src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- else
- old_file = (@commit.prev_commit.tree / diff.old_path)
.diff_file_content_image.img_compared
- %img{:class => "diff_image_removed", :src => "data:#{file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
- %img{:class => "diff_image_added", :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
+ %img{class: "diff_image_removed", src: "data:#{file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
+ %img{class: "diff_image_added", src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- else
%p.nothing_here_message No preview for this file type
diff --git a/app/views/commits/_head.html.haml b/app/views/commits/_head.html.haml
index 453ca4eac12..a211329f349 100644
--- a/app/views/commits/_head.html.haml
+++ b/app/views/commits/_head.html.haml
@@ -1,21 +1,21 @@
%ul.nav.nav-tabs
%li
- = form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form" do
- = select_tag "ref", grouped_options_refs, :onchange => "$(this.form).trigger('submit');", :class => "project-refs-select"
+ = form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do
+ = select_tag "ref", grouped_options_refs, onchange: "$(this.form).trigger('submit');", class: "project-refs-select"
= hidden_field_tag :destination, "commits"
- %li{:class => "#{'active' if current_page?(project_commits_path(@project)) }"}
+ %li{class: "#{'active' if current_page?(project_commits_path(@project)) }"}
= link_to project_commits_path(@project) do
Commits
- %li{:class => "#{'active' if current_page?(compare_project_commits_path(@project)) }"}
+ %li{class: "#{'active' if current_page?(compare_project_commits_path(@project)) }"}
= link_to compare_project_commits_path(@project) do
Compare
- %li{:class => "#{branches_tab_class}"}
+ %li{class: "#{branches_tab_class}"}
= link_to project_repository_path(@project) do
Branches
%span.badge= @project.repo.branch_count
- %li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"}
+ %li{class: "#{'active' if current_page?(tags_project_repository_path(@project)) }"}
= link_to tags_project_repository_path(@project) do
Tags
%span.badge= @project.repo.tag_count
@@ -24,8 +24,8 @@
- if current_page?(project_commits_path(@project)) && current_user.private_token
%li.right
%span.rss-icon
- = link_to project_commits_path(@project, :atom, { :private_token => current_user.private_token, :ref => @ref }), :title => "Feed" do
- = image_tag "rss_ui.png", :title => "feed"
+ = link_to project_commits_path(@project, :atom, { private_token: current_user.private_token, ref: @ref }), title: "Feed" do
+ = image_tag "rss_ui.png", title: "feed"
:javascript
$(function(){
diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml
index cab066410b4..0f6210f2b5a 100644
--- a/app/views/commits/_text_file.html.haml
+++ b/app/views/commits/_text_file.html.haml
@@ -2,7 +2,7 @@
- if too_big
%a.supp_diff_link Diff suppressed. Click to show
-%table{:class => "#{'hide' if too_big}"}
+%table{class: "#{'hide' if too_big}"}
- each_diff_line(diff.diff.lines.to_a, index) do |line, type, line_code, line_new, line_old|
%tr.line_holder
- if type == "match"
@@ -11,16 +11,16 @@
%td.line_content.matched= line
- else
%td.old_line
- = link_to raw(type == "new" ? " " : line_old), "##{line_code}", :id => line_code
+ = link_to raw(type == "new" ? " " : line_old), "##{line_code}", id: line_code
- if @comments_allowed
- = link_to "", "#", :class => "line_note_link", "line_code" => line_code, :title => "Add note for this line"
- %td.new_line= link_to raw(type == "old" ? " " : line_new) , "##{line_code}", :id => line_code
- %td.line_content{:class => "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line}  "
+ = link_to "", "#", class: "line_note_link", "line_code" => line_code, title: "Add note for this line"
+ %td.new_line= link_to raw(type == "old" ? " " : line_new) , "##{line_code}", id: line_code
+ %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line}  "
- if @comments_allowed
- comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at).reverse
- unless comments.empty?
- comments.each_with_index do |note, i|
- = render "notes/reply_button", :line_code => line_code if i.zero?
- = render "notes/per_line_show", :note => note
+ = render "notes/reply_button", line_code: line_code if i.zero?
+ = render "notes/per_line_show", note: note
- @line_notes.reject!{ |n| n == note }
diff --git a/app/views/commits/compare.html.haml b/app/views/commits/compare.html.haml
index 04d8af5459d..be915cd1038 100644
--- a/app/views/commits/compare.html.haml
+++ b/app/views/commits/compare.html.haml
@@ -14,13 +14,13 @@
%br
- = form_tag compare_project_commits_path(@project), :method => :get do
+ = form_tag compare_project_commits_path(@project), method: :get do
.clearfix
- = text_field_tag :from, params[:from], :placeholder => "master", :class => "xlarge"
+ = text_field_tag :from, params[:from], placeholder: "master", class: "xlarge"
= "..."
- = text_field_tag :to, params[:to], :placeholder => "aa8b4ef", :class => "xlarge"
+ = text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
.actions
- = submit_tag "Compare", :class => "btn btn-primary"
+ = submit_tag "Compare", class: "btn btn-primary"
- unless @commits.empty?
@@ -30,7 +30,7 @@
- unless @diffs.empty?
%h4 Diff
- = render "commits/diffs", :diffs => @diffs
+ = render "commits/diffs", diffs: @diffs
:javascript
$(function() {
diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml
index 385b4357e4e..11ffdb6afc3 100644
--- a/app/views/commits/index.html.haml
+++ b/app/views/commits/index.html.haml
@@ -9,12 +9,12 @@
%span.divider
\/
%li
- %a{:href => "#"}= params[:path].split("/").join(" / ")
+ %a{href: "#"}= params[:path].split("/").join(" / ")
-%div{:id => dom_id(@project)}
+%div{id: dom_id(@project)}
#commits_list= render "commits"
.clear
-.loading{ :style => "display:none;"}
+.loading{ style: "display:none;"}
- if @commits.count == @limit
:javascript
diff --git a/app/views/commits/index.js.haml b/app/views/commits/index.js.haml
index 39b7108c505..797bc14cc1b 100644
--- a/app/views/commits/index.js.haml
+++ b/app/views/commits/index.js.haml
@@ -1,3 +1,3 @@
:plain
- CommitsList.append(#{@commits.count}, "#{escape_javascript(render(:partial => 'commits/commits'))}");
+ CommitsList.append(#{@commits.count}, "#{escape_javascript(render(partial: 'commits/commits'))}");
diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml
index 7119bd04b9e..9a483aa2a9a 100644
--- a/app/views/commits/show.html.haml
+++ b/app/views/commits/show.html.haml
@@ -1,6 +1,6 @@
= render "commits/commit_box"
-= render "commits/diffs", :diffs => @commit.diffs
-= render "notes/notes", :tid => @commit.id, :tt => "commit"
+= render "commits/diffs", diffs: @commit.diffs
+= render "notes/notes", tid: @commit.id, tt: "commit"
= render "notes/per_line_form"