diff options
Diffstat (limited to 'app/views')
160 files changed, 757 insertions, 757 deletions
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 886943be6de..2e67abfc16d 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -5,11 +5,11 @@ Resque Workers .data.padded = link_to admin_resque_path do - %h1{:class => @workers.present? ? "cgreen" : "cred"} + %h1{class: @workers.present? ? "cgreen" : "cred"} = @workers.count %hr %p - %strong{:class => @pending_jobs > 0 ? "cred" : "cgreen"} + %strong{class: @pending_jobs > 0 ? "cred" : "cgreen"} #{@pending_jobs} post receive jobs waiting .span4 @@ -19,7 +19,7 @@ = link_to admin_projects_path do %h1= Project.count %hr - = link_to 'New Project', new_admin_project_path, :class => "btn small" + = link_to 'New Project', new_admin_project_path, class: "btn small" .span4 .ui-box %h5 Users @@ -27,7 +27,7 @@ = link_to admin_users_path do %h1= User.count %hr - = link_to 'New User', new_admin_user_path, :class => "btn small" + = link_to 'New User', new_admin_user_path, class: "btn small" .row diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml index 030e6136b1f..d34acffe9e6 100644 --- a/app/views/admin/hooks/index.html.haml +++ b/app/views/admin/hooks/index.html.haml @@ -3,9 +3,9 @@ Post receive hooks for binding events. %br Read more about system hooks - %strong #{link_to "here", help_system_hooks_path, :class => "vlink"} + %strong #{link_to "here", help_system_hooks_path, class: "vlink"} -= form_for @hook, :as => :hook, :url => admin_hooks_path do |f| += form_for @hook, as: :hook, url: admin_hooks_path do |f| -if @hook.errors.any? .alert-message.block-message.error - @hook.errors.full_messages.each do |msg| @@ -13,9 +13,9 @@ .clearfix = f.label :url, "URL:" .input - = f.text_field :url, :class => "text_field xxlarge" + = f.text_field :url, class: "text_field xxlarge" - = f.submit "Add System Hook", :class => "btn primary" + = f.submit "Add System Hook", class: "btn primary" %hr -if @hooks.any? @@ -33,7 +33,7 @@ %td = link_to admin_hook_path(hook) do %strong= hook.url - = link_to 'Test Hook', admin_hook_test_path(hook), :class => "btn small right" + = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn small right" %td POST %td - = link_to 'Remove', admin_hook_path(hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small right" + = link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "danger btn small right" diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml index 4217defb82b..7cebddf2890 100644 --- a/app/views/admin/projects/_form.html.haml +++ b/app/views/admin/projects/_form.html.haml @@ -9,8 +9,8 @@ = f.label :name do Project name is .input - = f.text_field :name, :placeholder => "Example Project", :class => "xxlarge" - = f.submit project.new_record? ? 'Create project' : 'Save Project', :class => "btn primary" + = f.text_field :name, placeholder: "Example Project", class: "xxlarge" + = f.submit project.new_record? ? 'Create project' : 'Save Project', class: "btn primary" %hr .alert.alert-info @@ -21,7 +21,7 @@ .input .input-prepend %span.add-on= Gitlab.config.ssh_path - = f.text_field :path, :placeholder => "example_project", :disabled => !!project.id + = f.text_field :path, placeholder: "example_project", disabled: !!project.id %span.add-on= ".git" .clearfix = f.label :code do @@ -29,7 +29,7 @@ .input .input-prepend %span.add-on= web_app_url - = f.text_field :code, :placeholder => "example" + = f.text_field :code, placeholder: "example" - unless project.new_record? .clearfix @@ -39,7 +39,7 @@ - if project.repo_exists? .clearfix = f.label :default_branch, "Default Branch" - .input= f.select(:default_branch, project.heads.map(&:name), {}, :style => "width:210px;") + .input= f.select(:default_branch, project.heads.map(&:name), {}, style: "width:210px;") - unless project.new_record? .alert.alert-info @@ -63,7 +63,7 @@ - unless project.new_record? .actions - = f.submit 'Save Project', :class => "btn primary" + = f.submit 'Save Project', class: "btn primary" diff --git a/app/views/admin/projects/edit.html.haml b/app/views/admin/projects/edit.html.haml index 826615f3455..b5255671154 100644 --- a/app/views/admin/projects/edit.html.haml +++ b/app/views/admin/projects/edit.html.haml @@ -1,3 +1,3 @@ %h3.page_title #{@admin_project.name} → Edit project %hr -= render 'form', :project => @admin_project += render 'form', project: @admin_project diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 7218eebb62a..4512bb7e493 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -1,10 +1,10 @@ %h3 Projects - = link_to 'New Project', new_admin_project_path, :class => "btn small right" + = link_to 'New Project', new_admin_project_path, class: "btn small right" %br -= form_tag admin_projects_path, :method => :get do - = text_field_tag :name, params[:name], :class => "xlarge" - = submit_tag "Search", :class => "btn submit primary" += form_tag admin_projects_path, method: :get do + = text_field_tag :name, params[:name], class: "xlarge" + = submit_tag "Search", class: "btn submit primary" %table.admin-table %thead @@ -21,8 +21,8 @@ %td= link_to project.name, [:admin, project] %td= project.path %td= project.users_projects.count - %td= check_box_tag :post_receive_file, 1, project.has_post_receive_file?, :disabled => true + %td= check_box_tag :post_receive_file, 1, project.has_post_receive_file?, disabled: true %td= last_commit(project) - %td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small" - %td.bgred= link_to 'Destroy', [:admin, project], :confirm => "REMOVE #{project.name}? Are you sure?", :method => :delete, :class => "btn small danger" -= paginate @admin_projects, :theme => "admin" + %td= link_to 'Edit', edit_admin_project_path(project), id: "edit_#{dom_id(project)}", class: "btn small" + %td.bgred= link_to 'Destroy', [:admin, project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn small danger" += paginate @admin_projects, theme: "admin" diff --git a/app/views/admin/projects/new.html.haml b/app/views/admin/projects/new.html.haml index eadb1f88daa..ac6526bfa4b 100644 --- a/app/views/admin/projects/new.html.haml +++ b/app/views/admin/projects/new.html.haml @@ -1,3 +1,3 @@ %h3.page_title New project %hr -= render 'form', :project => @admin_project += render 'form', project: @admin_project diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 4898d32ea43..5ed56477905 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -1,6 +1,6 @@ %h3 = @admin_project.name - = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "btn right small" + = link_to 'Edit', edit_admin_project_path(@admin_project), class: "btn right small" %br %table.zebra-striped.table-bordered @@ -33,7 +33,7 @@ %b Post Receive File: %td - = check_box_tag :post_receive_file, 1, @admin_project.has_post_receive_file?, :disabled => true + = check_box_tag :post_receive_file, 1, @admin_project.has_post_receive_file?, disabled: true %br %h3 Team @@ -52,14 +52,14 @@ %tr %td = link_to tm.user_name, admin_user_path(tm.user) - %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "medium project-access-select", :disabled => :disabled - %td= link_to 'Edit Access', edit_admin_team_member_path(tm), :class => "btn small" - %td= link_to 'Remove from team', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete, :class => "btn danger small" + %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), class: "medium project-access-select", disabled: :disabled + %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small" + %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn danger small" %br %h3 Add new team member %br -= form_tag team_update_admin_project_path(@admin_project), :class => "bulk_import", :method => :put do += form_tag team_update_admin_project_path(@admin_project), class: "bulk_import", method: :put do %table.zebra-striped.table-bordered %thead %tr @@ -67,14 +67,14 @@ %th Project Access: %tr - %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), :multiple => true - %td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select" + %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true + %td= select_tag :project_access, options_for_select(Project.access_options), class: "project-access-select" %tr - %td= submit_tag 'Add', :class => "btn primary" + %td= submit_tag 'Add', class: "btn primary" %td Read more about project permissions - %strong= link_to "here", help_permissions_path, :class => "vlink" + %strong= link_to "here", help_permissions_path, class: "vlink" :css form select { diff --git a/app/views/admin/resque/show.html.haml b/app/views/admin/resque/show.html.haml index 267129530bd..0375d94bc9d 100644 --- a/app/views/admin/resque/show.html.haml +++ b/app/views/admin/resque/show.html.haml @@ -1,2 +1,2 @@ %h3 Resque -%iframe{:src => "/info/resque", :width => 1168, :height => 600, :style => "border: none"}
\ No newline at end of file +%iframe{src: "/info/resque", width: 1168, height: 600, style: "border: none"}
\ No newline at end of file diff --git a/app/views/admin/team_members/_form.html.haml b/app/views/admin/team_members/_form.html.haml index 034757620ec..6a128de94b2 100644 --- a/app/views/admin/team_members/_form.html.haml +++ b/app/views/admin/team_members/_form.html.haml @@ -1,4 +1,4 @@ -= form_for @admin_team_member, :as => :team_member, :url => admin_team_member_path(@admin_team_member) do |f| += form_for @admin_team_member, as: :team_member, url: admin_team_member_path(@admin_team_member) do |f| -if @admin_team_member.errors.any? .alert-message.block-message.error %ul @@ -8,12 +8,12 @@ .clearfix %label Project Access: .input - = f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, :class => "project-access-select" + = f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, class: "project-access-select" %br .actions - = f.submit 'Save', :class => "btn primary" - = link_to 'Cancel', :back, :class => "btn" + = f.submit 'Save', class: "btn primary" + = link_to 'Cancel', :back, class: "btn" :css form select { diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index c1955b321d5..5e68a23f494 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -22,17 +22,17 @@ -if f.object.new_record? .clearfix - = f.label :admin, :class => "checkbox" do + = f.label :admin, class: "checkbox" do = f.check_box :force_random_password, {}, true, nil %span Generate random password %div.password-fields .clearfix = f.label :password - .input= f.password_field :password, :disabled => f.object.force_random_password + .input= f.password_field :password, disabled: f.object.force_random_password .clearfix = f.label :password_confirmation - .input= f.password_field :password_confirmation, :disabled => f.object.force_random_password + .input= f.password_field :password_confirmation, disabled: f.object.force_random_password %hr .clearfix = f.label :skype @@ -46,27 +46,27 @@ .span6 .clearfix = f.label :projects_limit - .input= f.text_field :projects_limit, :class => "small_input" + .input= f.text_field :projects_limit, class: "small_input" .alert .clearfix %p Make the user a GitLab administrator. - = f.label :admin, :class => "checkbox" do + = f.label :admin, class: "checkbox" do = f.check_box :admin %span Administrator - unless @admin_user.new_record? .alert.alert-error - if @admin_user.blocked %span - = link_to 'Unblock', unblock_admin_user_path(@admin_user), :method => :put, :class => "btn small" + = link_to 'Unblock', unblock_admin_user_path(@admin_user), method: :put, class: "btn small" This user is blocked and is not able to login to GitLab - else %span - = link_to 'Block', block_admin_user_path(@admin_user), :confirm => 'USER WILL BE BLOCKED! Are you sure?', :method => :put, :class => "btn small danger" + = link_to 'Block', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger" Blocked users will be removed from all projects & will not be able to login to GitLab. .actions - = f.submit 'Save', :class => "btn primary" + = f.submit 'Save', class: "btn primary" - if @admin_user.new_record? - = link_to 'Cancel', admin_users_path, :class => "btn" + = link_to 'Cancel', admin_users_path, class: "btn" - else - = link_to 'Cancel', admin_user_path(@admin_user), :class => "btn" + = link_to 'Cancel', admin_user_path(@admin_user), class: "btn" diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 5d5320db0e3..5edca312cc5 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -1,22 +1,22 @@ %h3 Users - = link_to 'New User', new_admin_user_path, :class => "btn small right" + = link_to 'New User', new_admin_user_path, class: "btn small right" %br -= form_tag admin_users_path, :method => :get do - = text_field_tag :name, params[:name], :class => "xlarge" - = submit_tag "Search", :class => "btn submit primary" += form_tag admin_users_path, method: :get do + = text_field_tag :name, params[:name], class: "xlarge" + = submit_tag "Search", class: "btn submit primary" %ul.nav.nav-pills - %li{:class => "#{'active' unless params[:filter]}"} + %li{class: "#{'active' unless params[:filter]}"} = link_to "Active", admin_users_path - %li{:class => "#{'active' if params[:filter] == "admins"}"} - = link_to admin_users_path(:filter => "admins") do + %li{class: "#{'active' if params[:filter] == "admins"}"} + = link_to admin_users_path(filter: "admins") do Admins - %li{:class => "#{'active' if params[:filter] == "blocked"}"} - = link_to admin_users_path(:filter => "blocked") do + %li{class: "#{'active' if params[:filter] == "blocked"}"} + = link_to admin_users_path(filter: "blocked") do Blocked - %li{:class => "#{'active' if params[:filter] == "wop"}"} - = link_to admin_users_path(:filter => "wop") do + %li{class: "#{'active' if params[:filter] == "wop"}"} + = link_to admin_users_path(filter: "wop") do Without projects %table.admin-table @@ -31,16 +31,16 @@ - @admin_users.each do |user| %tr - %td= check_box_tag "admin", 1, user.admin, :disabled => :disabled + %td= check_box_tag "admin", 1, user.admin, disabled: :disabled %td= link_to user.name, [:admin, user] %td= user.email %td= user.users_projects.count - %td= link_to 'Edit', edit_admin_user_path(user), :id => "edit_#{dom_id(user)}", :class => "btn small" + %td= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn small" %td - if user.blocked - = link_to 'Unblock', unblock_admin_user_path(user), :method => :put, :class => "btn small success" + = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn small success" - else - = link_to 'Block', block_admin_user_path(user), :confirm => 'USER WILL BE BLOCKED! Are you sure?', :method => :put, :class => "btn small danger" - %td.bgred= link_to 'Destroy', [:admin, user], :confirm => "USER #{user.name} WILL BE REMOVED! Are you sure?", :method => :delete, :class => "btn small danger" + = link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger" + %td.bgred= link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn small danger" -= paginate @admin_users, :theme => "admin" += paginate @admin_users, theme: "admin" diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 7510b1446dc..4cca8ed7a4e 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -4,7 +4,7 @@ %small Blocked - if @admin_user.admin %small Administrator - = link_to 'Edit', edit_admin_user_path(@admin_user), :class => "btn small right" + = link_to 'Edit', edit_admin_user_path(@admin_user), class: "btn small right" %br @@ -19,12 +19,12 @@ %td %b Admin: - %td= check_box_tag "admin", 1, @admin_user.admin, :disabled => :disabled + %td= check_box_tag "admin", 1, @admin_user.admin, disabled: :disabled %tr %td %b Blocked: - %td= check_box_tag "blocked", 1, @admin_user.blocked, :disabled => :disabled + %td= check_box_tag "blocked", 1, @admin_user.blocked, disabled: :disabled %tr %td %b @@ -56,7 +56,7 @@ %br %h3 Add User to Projects %br -= form_tag team_update_admin_user_path(@admin_user), :class => "bulk_import", :method => :put do += form_tag team_update_admin_user_path(@admin_user), class: "bulk_import", method: :put do %table.table-bordered %thead %tr @@ -64,14 +64,14 @@ %th Project Access: %tr - %td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name), :multiple => true - %td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select" + %td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name), multiple: true + %td= select_tag :project_access, options_for_select(Project.access_options), class: "project-access-select" %tr - %td= submit_tag 'Add', :class => "btn primary" + %td= submit_tag 'Add', class: "btn primary" %td Read more about project permissions - %strong= link_to "here", help_permissions_path, :class => "vlink" + %strong= link_to "here", help_permissions_path, class: "vlink" %br - if @admin_user.projects.present? @@ -90,9 +90,9 @@ - project = tm.project %tr %td= link_to project.name, admin_project_path(project) - %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "medium project-access-select", :disabled => :disabled - %td= link_to 'Edit Access', edit_admin_team_member_path(tm), :class => "btn small" - %td= link_to 'Remove from team', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger" + %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), class: "medium project-access-select", disabled: :disabled + %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small" + %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn small danger" :css form select { 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" diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml index e1d7781927a..9fea5acb7cd 100644 --- a/app/views/dashboard/index.html.haml +++ b/app/views/dashboard/index.html.haml @@ -6,7 +6,7 @@ %span You wont be able to pull/push project code unless you %strong - = link_to new_key_path, :class => "vlink" do + = link_to new_key_path, class: "vlink" do add new key to your profile - if @events.any? @@ -15,7 +15,7 @@ %h4.nothing_here_message Projects activity will be displayed here .loading.hide .side - = render "events/event_last_push", :event => @last_push + = render "events/event_last_push", event: @last_push .projects_box %h5 Projects @@ -23,23 +23,23 @@ (#{@projects.total_count}) - if current_user.can_create_project? %span.right - = link_to new_project_path, :class => "btn very_small info" do + = link_to new_project_path, class: "btn very_small info" do %i.icon-plus New Project - @projects.each do |project| - = link_to project_path(project), :class => dom_class(project) do + = link_to project_path(project), class: dom_class(project) do %h4 %span.ico.project - = truncate(project.name, :length => 25) + = truncate(project.name, length: 25) %span.right → - .bottom= paginate @projects, :theme => "gitlab" + .bottom= paginate @projects, theme: "gitlab" %hr %div %span.rss-icon - = link_to dashboard_path(:atom, { :private_token => current_user.private_token }) do - = image_tag "rss_ui.png", :title => "feed" + = link_to dashboard_path(:atom, { private_token: current_user.private_token }) do + = image_tag "rss_ui.png", title: "feed" %strong News Feed - else @@ -51,7 +51,7 @@ = current_user.projects_limit projects. Click on button below to add a new one .link_holder - = link_to new_project_path, :class => "btn primary" do + = link_to new_project_path, class: "btn primary" do New Project » - else If you will be added to project - it will be displayed here diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index 5b20bffe783..cc488d57e9e 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -12,8 +12,8 @@ %h5= @project.name %ul.unstyled.issues_table - group[1].each do |issue| - = render(:partial => 'issues/show', :locals => {:issue => issue}) + = render(partial: 'issues/show', locals: {issue: issue}) %hr - = paginate @issues, :theme => "gitlab" + = paginate @issues, theme: "gitlab" - else %h3.nothing_here_message Nothing to show here diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index 11176102dcc..23a7e7222d7 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -10,9 +10,9 @@ - @project = group[0] %h5= @project.name - group[1].each do |merge_request| - = render(:partial => 'merge_requests/merge_request', :locals => {:merge_request => merge_request}) + = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request}) %hr - = paginate @merge_requests, :theme => "gitlab" + = paginate @merge_requests, theme: "gitlab" - else %h3.nothing_here_message Nothing to show here diff --git a/app/views/deploy_keys/_form.html.haml b/app/views/deploy_keys/_form.html.haml index 2aa57cdc59b..461f1f5d84a 100644 --- a/app/views/deploy_keys/_form.html.haml +++ b/app/views/deploy_keys/_form.html.haml @@ -1,5 +1,5 @@ %div - = form_for [@project, @key], :url => project_deploy_keys_path do |f| + = form_for [@project, @key], url: project_deploy_keys_path do |f| -if @key.errors.any? .alert-message.block-message.error %ul @@ -11,8 +11,8 @@ .input= f.text_field :title .clearfix = f.label :key - .input= f.text_area :key, :class => "xlarge" + .input= f.text_area :key, class: "xlarge" .actions - = f.submit 'Save', :class => "primary btn" - = link_to "Cancel", project_deploy_keys_path(@project), :class => "btn" + = f.submit 'Save', class: "primary btn" + = link_to "Cancel", project_deploy_keys_path(@project), class: "btn" diff --git a/app/views/deploy_keys/_show.html.haml b/app/views/deploy_keys/_show.html.haml index ff17b3cd66c..a5314ae92ad 100644 --- a/app/views/deploy_keys/_show.html.haml +++ b/app/views/deploy_keys/_show.html.haml @@ -1,6 +1,6 @@ %tr %td - %a{:href => project_deploy_key_path(key.project, key)} + %a{href: project_deploy_key_path(key.project, key)} %strong= key.title %td %span.update-author @@ -8,5 +8,5 @@ = time_ago_in_words(key.created_at) ago %td - = link_to 'Remove', project_deploy_key_path(key.project, key), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn delete-key small right" + = link_to 'Remove', project_deploy_key_path(key.project, key), confirm: 'Are you sure?', method: :delete, class: "danger btn delete-key small right" diff --git a/app/views/deploy_keys/index.html.haml b/app/views/deploy_keys/index.html.haml index 19899de3cf6..0ee9d03b0f5 100644 --- a/app/views/deploy_keys/index.html.haml +++ b/app/views/deploy_keys/index.html.haml @@ -2,10 +2,10 @@ - if can? current_user, :admin_project, @project .alert-message.block-message Deploy keys allow read-only access to repository. - = link_to new_project_deploy_key_path(@project), :class => "btn small", :title => "New Deploy Key" do + = link_to new_project_deploy_key_path(@project), class: "btn small", title: "New Deploy Key" do Add Deploy Key - if @keys.any? %table - @keys.each do |key| - = render(:partial => 'show', :locals => {:key => key}) + = render(partial: 'show', locals: {key: key}) diff --git a/app/views/deploy_keys/show.html.haml b/app/views/deploy_keys/show.html.haml index 16c441bea73..b1e0dc5ce27 100644 --- a/app/views/deploy_keys/show.html.haml +++ b/app/views/deploy_keys/show.html.haml @@ -3,5 +3,5 @@ %hr %pre= @key.key .actions - = link_to 'Remove', project_deploy_key_path(@key.project, @key), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn delete-key" + = link_to 'Remove', project_deploy_key_path(@key.project, @key), confirm: 'Are you sure?', method: :delete, class: "danger btn delete-key" .clear diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index dfd715ac13b..31d355673ab 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -1,12 +1,12 @@ -= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "login-box" }) do |f| - = image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" += form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "login-box" }) do |f| + = image_tag "login-logo.png", width: "304", height: "66", class: "login-logo", alt: "Login Logo" %h3 Change your password = devise_error_messages! = f.hidden_field :reset_password_token %div - = f.password_field :password, :class => "text top", :placeholder => "New password" + = f.password_field :password, class: "text top", placeholder: "New password" %div - = f.password_field :password_confirmation, :class => "text bottom", :placeholder => "Confirm new password" + = f.password_field :password_confirmation, class: "text bottom", placeholder: "Confirm new password" %div - = f.submit "Change my password", :class => "btn primary" - .right= render :partial => "devise/shared/links" + = f.submit "Change my password", class: "btn primary" + .right= render partial: "devise/shared/links" diff --git a/app/views/errors/access_denied.html.haml b/app/views/errors/access_denied.html.haml index 718663dbee1..644ee03ec9f 100644 --- a/app/views/errors/access_denied.html.haml +++ b/app/views/errors/access_denied.html.haml @@ -2,4 +2,4 @@ %h3 Access Denied %hr %p Youre not allowed to access this page - %p Read more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"} + %p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"} 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 diff --git a/app/views/help/api.html.haml b/app/views/help/api.html.haml index e184df549de..344f8ade755 100644 --- a/app/views/help/api.html.haml +++ b/app/views/help/api.html.haml @@ -6,13 +6,13 @@ %ol %li - %a{:href => "#README"} README + %a{href: "#README"} README %li - %a{:href => "#projects"} Projects + %a{href: "#projects"} Projects %li - %a{:href => "#users"} Users + %a{href: "#users"} Users %li - %a{:href => "#issues"} Issues + %a{href: "#issues"} Issues .file_holder#README .file_title diff --git a/app/views/hooks/index.html.haml b/app/views/hooks/index.html.haml index 15699fc4390..4e15dc50ee8 100644 --- a/app/views/hooks/index.html.haml +++ b/app/views/hooks/index.html.haml @@ -6,9 +6,9 @@ Post receive hooks for binding events when someone push to repository. %br Read more about web hooks - %strong #{link_to "here", help_web_hooks_path, :class => "vlink"} + %strong #{link_to "here", help_web_hooks_path, class: "vlink"} -= form_for [@project, @hook], :as => :hook, :url => project_hooks_path(@project) do |f| += form_for [@project, @hook], as: :hook, url: project_hooks_path(@project) do |f| -if @hook.errors.any? .alert-message.block-message.error - @hook.errors.full_messages.each do |msg| @@ -16,9 +16,9 @@ .clearfix = f.label :url, "URL:" .input - = f.text_field :url, :class => "text_field xxlarge" + = f.text_field :url, class: "text_field xxlarge" - = f.submit "Add Web Hook", :class => "btn primary" + = f.submit "Add Web Hook", class: "btn primary" %hr -if @hooks.any? @@ -36,7 +36,7 @@ %td = link_to project_hook_path(@project, hook) do %strong= hook.url - = link_to 'Test Hook', test_project_hook_path(@project, hook), :class => "btn small right" + = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn small right" %td POST %td - = link_to 'Remove', project_hook_path(@project, hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small right" + = link_to 'Remove', project_hook_path(@project, hook), confirm: 'Are you sure?', method: :delete, class: "danger btn small right" diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml index 4f6f8396661..6139f3d4cbc 100644 --- a/app/views/issues/_form.html.haml +++ b/app/views/issues/_form.html.haml @@ -1,6 +1,6 @@ %div.issue-form-holder %h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}" - = form_for [@project, @issue], :remote => request.xhr? do |f| + = form_for [@project, @issue], remote: request.xhr? do |f| -if @issue.errors.any? .alert-message.block-message.error %ul @@ -12,18 +12,18 @@ = f.label :title do %strong= "Subject *" .input - = f.text_field :title, :maxlength => 255, :class => "xxlarge" + = f.text_field :title, maxlength: 255, class: "xxlarge" .issue_middle_block .issue_assignee = f.label :assignee_id do %i.icon-user Assign to - .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select a user" }) + .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select a user" }) .issue_milestone = f.label :milestone_id do %i.icon-time Milestone - .input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { :include_blank => "Select milestone" }) + .input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }) .issue_description .clearfix @@ -31,26 +31,26 @@ %i.icon-tag Labels .input - = f.text_field :label_list, :maxlength => 2000, :class => "xxlarge" + = f.text_field :label_list, maxlength: 2000, class: "xxlarge" %p.hint Separate with comma. .clearfix = f.label :description, "Details" .input - = f.text_area :description, :maxlength => 2000, :class => "xxlarge", :rows => 14 + = f.text_area :description, maxlength: 2000, class: "xxlarge", rows: 14 %p.hint Markdown is enabled. .actions - if @issue.new_record? - = f.submit 'Submit new issue', :class => "primary btn" + = f.submit 'Submit new issue', class: "primary btn" -else - = f.submit 'Save changes', :class => "primary btn" + = f.submit 'Save changes', class: "primary btn" - if request.xhr? - = link_to "Cancel", "#back", :onclick => "backToIssues();", :class => "btn" + = link_to "Cancel", "#back", onclick: "backToIssues();", class: "btn" - else - if @issue.new_record? - = link_to "Cancel", project_issues_path(@project), :class => "btn" + = link_to "Cancel", project_issues_path(@project), class: "btn" - else - = link_to "Cancel", project_issue_path(@project, @issue), :class => "btn" + = link_to "Cancel", project_issue_path(@project, @issue), class: "btn" diff --git a/app/views/issues/_head.html.haml b/app/views/issues/_head.html.haml index 701b0625852..1f6e7d7f81f 100644 --- a/app/views/issues/_head.html.haml +++ b/app/views/issues/_head.html.haml @@ -1,11 +1,11 @@ %ul.nav.nav-tabs - %li{:class => "#{'active' if current_page?(project_issues_path(@project))}"} - = link_to project_issues_path(@project), :class => "tab" do + %li{class: "#{'active' if current_page?(project_issues_path(@project))}"} + = link_to project_issues_path(@project), class: "tab" do Browse Issues - %li{:class => "#{'active' if current_page?(project_milestones_path(@project))}"} - = link_to project_milestones_path(@project), :class => "tab" do + %li{class: "#{'active' if current_page?(project_milestones_path(@project))}"} + = link_to project_milestones_path(@project), class: "tab" do Milestones %li.right %span.rss-icon - = link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do - = image_tag "rss_ui.png", :title => "feed" + = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do + = image_tag "rss_ui.png", title: "feed" diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml index fc515ec3b49..f82ae8bde58 100644 --- a/app/views/issues/_issues.html.haml +++ b/app/views/issues/_issues.html.haml @@ -1,10 +1,10 @@ - @issues.each do |issue| - = render(:partial => 'issues/show', :locals => {:issue => issue}) + = render(partial: 'issues/show', locals: {issue: issue}) - if @issues.present? %li.bottom .row - .span7= paginate @issues, :remote => true, :theme => "gitlab" + .span7= paginate @issues, remote: true, theme: "gitlab" .span3.right %span.cgray.right %span.issue_counter #{@issues.total_count} diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml index ed27bddd034..8500cd40a6e 100644 --- a/app/views/issues/_show.html.haml +++ b/app/views/issues/_show.html.haml @@ -1,7 +1,7 @@ -%li.wll{ :id => dom_id(issue), :class => issue_css_classes(issue), :url => project_issue_path(issue.project, issue) } +%li.wll{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) } - if controller.controller_name == 'issues' .issue_check - = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, :class => "selected_issue", :disabled => !can?(current_user, :modify_issue, issue) + = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue) .right - issue.labels.each do |label| %span.label.label-issue.grouped @@ -13,19 +13,19 @@ = issue.notes.count - if can? current_user, :modify_issue, issue - if issue.closed - = link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small grouped reopen_issue", :remote => true + = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {closed: false }, status_only: true), method: :put, class: "btn small grouped reopen_issue", remote: true - else - = link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small grouped close_issue", :remote => true - = link_to edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true do + = link_to 'Resolve', project_issue_path(issue.project, issue, issue: {closed: true }, status_only: true), method: :put, class: "success btn small grouped close_issue", remote: true + = link_to edit_project_issue_path(issue.project, issue), class: "btn small edit-issue-link", remote: true do %i.icon-edit Edit - if issue.assignee - = image_tag gravatar_icon(issue.assignee_email), :class => "avatar" + = image_tag gravatar_icon(issue.assignee_email), class: "avatar" - else - = image_tag "no_avatar.png", :class => "avatar" + = image_tag "no_avatar.png", class: "avatar" - %p= link_to_gfm truncate(issue.title, :length => 100), project_issue_path(issue.project, issue), :class => "row_title" + %p= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title" %span.update-author %small.cdark= "##{issue.id}" diff --git a/app/views/issues/create.js.haml b/app/views/issues/create.js.haml index abf3f6b858b..d90cbf0d30c 100644 --- a/app/views/issues/create.js.haml +++ b/app/views/issues/create.js.haml @@ -1,7 +1,7 @@ - if @issue.valid? :plain switchFromNewIssue(); - $("#issues-table").prepend("#{escape_javascript(render(:partial => 'show', :locals => {:issue => @issue}))}"); + $("#issues-table").prepend("#{escape_javascript(render(partial: 'show', locals: {issue: @issue}))}"); $.ajax({type: "GET", url: location.href, dataType: "script"}); - else :plain diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml index 27eff501578..f3c743f75c3 100644 --- a/app/views/issues/index.html.haml +++ b/app/views/issues/index.html.haml @@ -6,51 +6,51 @@ .right .span5 - if can? current_user, :write_issue, @project - = link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do + = link_to new_project_issue_path(@project), class: "right btn small", title: "New Issue", remote: true do New Issue - = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :id => "issue_search_form", :class => :right do - = hidden_field_tag :project_id, @project.id, { :id => 'project_id' } + = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: :right do + = hidden_field_tag :project_id, @project.id, { id: 'project_id' } = hidden_field_tag :status, params[:f] - = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search span3 right neib' } + = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search span3 right neib' } .clearfix %div#issues-table-holder.ui-box .title - = check_box_tag "check_all_issues", nil, false, :class => "check_all_issues left" + = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left" .issues_bulk_update.hide - = form_tag bulk_update_project_issues_path(@project), :method => :post do + = form_tag bulk_update_project_issues_path(@project), method: :post do %span.update_issues_text Update selected issues with .left - = select_tag('update[status]', options_for_select(['open', 'closed']), :prompt => "Status") - = select_tag('update[assignee_id]', options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), :prompt => "Assignee") - = select_tag('update[milestone_id]', options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Milestone") + = select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status") + = select_tag('update[assignee_id]', options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee") + = select_tag('update[milestone_id]', options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone") = hidden_field_tag 'update[issues_ids]', [] = hidden_field_tag :f, params[:f] - = button_tag "Save", :class => "btn update_selected_issues" + = button_tag "Save", class: "btn update_selected_issues" .issues_filters .left %ul.nav.nav-pills.left - %li{:class => ("active" if (params[:f] == issues_filter[:open] || !params[:f]))} - = link_to project_issues_path(@project, :f => issues_filter[:open], :milestone_id => params[:milestone_id]) do + %li{class: ("active" if (params[:f] == issues_filter[:open] || !params[:f]))} + = link_to project_issues_path(@project, f: issues_filter[:open], milestone_id: params[:milestone_id]) do Open - %li{:class => ("active" if params[:f] == issues_filter[:closed])} - = link_to project_issues_path(@project, :f => issues_filter[:closed], :milestone_id => params[:milestone_id]) do + %li{class: ("active" if params[:f] == issues_filter[:closed])} + = link_to project_issues_path(@project, f: issues_filter[:closed], milestone_id: params[:milestone_id]) do Closed - %li{:class => ("active" if params[:f] == issues_filter[:to_me])} - = link_to project_issues_path(@project, :f => issues_filter[:to_me], :milestone_id => params[:milestone_id]) do + %li{class: ("active" if params[:f] == issues_filter[:to_me])} + = link_to project_issues_path(@project, f: issues_filter[:to_me], milestone_id: params[:milestone_id]) do To Me - %li{:class => ("active" if params[:f] == issues_filter[:all])} - = link_to project_issues_path(@project, :f => issues_filter[:all], :milestone_id => params[:milestone_id]) do + %li{class: ("active" if params[:f] == issues_filter[:all])} + = link_to project_issues_path(@project, f: issues_filter[:all], milestone_id: params[:milestone_id]) do All .right - = form_tag project_issues_path(@project), :method => :get, :class => :right do - = select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), :prompt => "Labels") - = select_tag(:assignee_id, options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), :prompt => "Assignee") - = select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Milestone") + = form_tag project_issues_path(@project), method: :get, class: :right do + = select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels") + = select_tag(:assignee_id, options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee") + = select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone") = hidden_field_tag :f, params[:f] .clearfix diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index c653377a68d..dce8cf6a59d 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -8,11 +8,11 @@ %span.right - if can?(current_user, :admin_project, @project) || @issue.author == current_user - if @issue.closed - = link_to 'Reopen', project_issue_path(@project, @issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small" + = link_to 'Reopen', project_issue_path(@project, @issue, issue: {closed: false }, status_only: true), method: :put, class: "btn small" - else - = link_to 'Close', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "btn small", :title => "Close Issue" + = link_to 'Close', project_issue_path(@project, @issue, issue: {closed: true }, status_only: true), method: :put, class: "btn small", title: "Close Issue" - if can?(current_user, :admin_project, @project) || @issue.author == current_user - = link_to edit_project_issue_path(@project, @issue), :class => "btn small" do + = link_to edit_project_issue_path(@project, @issue), class: "btn small" do %i.icon-edit Edit @@ -35,18 +35,18 @@ .middle_box_content %cite.cgray Created by - = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" + = image_tag gravatar_icon(@issue.author_email), width: 16, class: "lil_av" %strong.author= link_to_issue_author(@issue) - if @issue.assignee %cite.cgray and currently assigned to - = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" + = image_tag gravatar_icon(@issue.assignee_email), width: 16, class: "lil_av" %strong.author= link_to_issue_assignee(@issue) - if @issue.milestone - milestone = @issue.milestone %cite.cgray and attached to milestone - %strong= link_to_gfm truncate(milestone.title, :length => 20), project_milestone_path(milestone.project, milestone) + %strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone) .right - @issue.labels.each do |label| @@ -61,4 +61,4 @@ = markdown @issue.description -.issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue" +.issue_notes#notes= render "notes/notes", tid: @issue.id, tt: "issue" diff --git a/app/views/kaminari/admin/_first_page.html.haml b/app/views/kaminari/admin/_first_page.html.haml index fee8112f6af..41c9c0b3af6 100644 --- a/app/views/kaminari/admin/_first_page.html.haml +++ b/app/views/kaminari/admin/_first_page.html.haml @@ -6,4 +6,4 @@ -# per_page: number of items to fetch per page -# remote: data-remote %span.first - = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote + = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, remote: remote diff --git a/app/views/kaminari/admin/_last_page.html.haml b/app/views/kaminari/admin/_last_page.html.haml index 6e41d232b51..b03a206224c 100644 --- a/app/views/kaminari/admin/_last_page.html.haml +++ b/app/views/kaminari/admin/_last_page.html.haml @@ -6,4 +6,4 @@ -# per_page: number of items to fetch per page -# remote: data-remote %span.last - = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} + = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {remote: remote} diff --git a/app/views/kaminari/admin/_next_page.html.haml b/app/views/kaminari/admin/_next_page.html.haml index 76f40e72373..00c5f0b6f4e 100644 --- a/app/views/kaminari/admin/_next_page.html.haml +++ b/app/views/kaminari/admin/_next_page.html.haml @@ -6,4 +6,4 @@ -# per_page: number of items to fetch per page -# remote: data-remote %li.next - = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote + = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, rel: 'next', remote: remote diff --git a/app/views/kaminari/admin/_page.html.haml b/app/views/kaminari/admin/_page.html.haml index 5966812934f..a52d883b9a8 100644 --- a/app/views/kaminari/admin/_page.html.haml +++ b/app/views/kaminari/admin/_page.html.haml @@ -6,5 +6,5 @@ -# num_pages: total number of pages -# per_page: number of items to fetch per page -# remote: data-remote -%li{:class => "page#{' active' if page.current?}"} - = link_to page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} +%li{class: "page#{' active' if page.current?}"} + = link_to page, url, {remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil} diff --git a/app/views/kaminari/admin/_prev_page.html.haml b/app/views/kaminari/admin/_prev_page.html.haml index cef885ee0af..f673abdb3ae 100644 --- a/app/views/kaminari/admin/_prev_page.html.haml +++ b/app/views/kaminari/admin/_prev_page.html.haml @@ -5,5 +5,5 @@ -# num_pages: total number of pages -# per_page: number of items to fetch per page -# remote: data-remote -%li{:class => "prev" } - = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote +%li{class: "prev" } + = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, rel: 'prev', remote: remote diff --git a/app/views/kaminari/gitlab/_first_page.html.haml b/app/views/kaminari/gitlab/_first_page.html.haml index fee8112f6af..41c9c0b3af6 100644 --- a/app/views/kaminari/gitlab/_first_page.html.haml +++ b/app/views/kaminari/gitlab/_first_page.html.haml @@ -6,4 +6,4 @@ -# per_page: number of items to fetch per page -# remote: data-remote %span.first - = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote + = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, remote: remote diff --git a/app/views/kaminari/gitlab/_last_page.html.haml b/app/views/kaminari/gitlab/_last_page.html.haml index 6e41d232b51..b03a206224c 100644 --- a/app/views/kaminari/gitlab/_last_page.html.haml +++ b/app/views/kaminari/gitlab/_last_page.html.haml @@ -6,4 +6,4 @@ -# per_page: number of items to fetch per page -# remote: data-remote %span.last - = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} + = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {remote: remote} diff --git a/app/views/kaminari/gitlab/_next_page.html.haml b/app/views/kaminari/gitlab/_next_page.html.haml index e87ab4e0534..296cceb080b 100644 --- a/app/views/kaminari/gitlab/_next_page.html.haml +++ b/app/views/kaminari/gitlab/_next_page.html.haml @@ -6,4 +6,4 @@ -# per_page: number of items to fetch per page -# remote: data-remote %span.next - = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote + = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, rel: 'next', remote: remote diff --git a/app/views/kaminari/gitlab/_page.html.haml b/app/views/kaminari/gitlab/_page.html.haml index 528bba8f116..19456dcc058 100644 --- a/app/views/kaminari/gitlab/_page.html.haml +++ b/app/views/kaminari/gitlab/_page.html.haml @@ -6,5 +6,5 @@ -# num_pages: total number of pages -# per_page: number of items to fetch per page -# remote: data-remote -%span{:class => "page#{' current' if page.current?}"} - = link_to_unless page.current?, page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} +%span{class: "page#{' current' if page.current?}"} + = link_to_unless page.current?, page, url, {remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil} diff --git a/app/views/kaminari/gitlab/_prev_page.html.haml b/app/views/kaminari/gitlab/_prev_page.html.haml index 13f0d8adec5..5c2061690ac 100644 --- a/app/views/kaminari/gitlab/_prev_page.html.haml +++ b/app/views/kaminari/gitlab/_prev_page.html.haml @@ -6,4 +6,4 @@ -# per_page: number of items to fetch per page -# remote: data-remote %span.prev - = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote + = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, rel: 'prev', remote: remote diff --git a/app/views/keys/_form.html.haml b/app/views/keys/_form.html.haml index c25e8d073b8..ee2eafddf3b 100644 --- a/app/views/keys/_form.html.haml +++ b/app/views/keys/_form.html.haml @@ -11,8 +11,8 @@ .input= f.text_field :title .clearfix = f.label :key - .input= f.text_area :key, :class => [:xxlarge, :thin_area] + .input= f.text_area :key, class: [:xxlarge, :thin_area] .actions - = f.submit 'Save', :class => "primary btn" - = link_to "Cancel", keys_path, :class => "btn" + = f.submit 'Save', class: "primary btn" + = link_to "Cancel", keys_path, class: "btn" diff --git a/app/views/keys/_show.html.haml b/app/views/keys/_show.html.haml index 7035e609f2c..a0af8eea44c 100644 --- a/app/views/keys/_show.html.haml +++ b/app/views/keys/_show.html.haml @@ -9,5 +9,5 @@ = time_ago_in_words(key.created_at) ago %td - = link_to 'Remove', key, :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger delete-key right" + = link_to 'Remove', key, confirm: 'Are you sure?', method: :delete, class: "btn small danger delete-key right" diff --git a/app/views/keys/create.js.haml b/app/views/keys/create.js.haml index b0d7f528be1..1dccf6fdb91 100644 --- a/app/views/keys/create.js.haml +++ b/app/views/keys/create.js.haml @@ -1,7 +1,7 @@ - if @key.valid? :plain $("#new_key_dialog").dialog("close"); - $("#keys-table .data").append("#{escape_javascript(render(:partial => 'show', :locals => {:key => @key}))}"); + $("#keys-table .data").append("#{escape_javascript(render(partial: 'show', locals: {key: @key}))}"); $("#no_ssh_key_defined").hide(); - else :plain diff --git a/app/views/keys/index.html.haml b/app/views/keys/index.html.haml index 35cda178242..04e9e4cbc33 100644 --- a/app/views/keys/index.html.haml +++ b/app/views/keys/index.html.haml @@ -1,6 +1,6 @@ %h3.page_title SSH Keys - = link_to "Add new", new_key_path, :class => "btn small right" + = link_to "Add new", new_key_path, class: "btn small right" %hr %p.slead @@ -14,9 +14,9 @@ %th Added %th - @keys.each do |key| - = render(:partial => 'show', :locals => {:key => key}) + = render(partial: 'show', locals: {key: key}) - if @keys.blank? %tr - %td{:colspan => 3} + %td{colspan: 3} %h3.nothing_here_message There are no SSH keys with access to your account. diff --git a/app/views/keys/show.html.haml b/app/views/keys/show.html.haml index 79f51257fd9..ffd52b96e5a 100644 --- a/app/views/keys/show.html.haml +++ b/app/views/keys/show.html.haml @@ -11,4 +11,4 @@ %pre= @key.key .actions - = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger delete-key" + = link_to 'Remove', @key, confirm: 'Are you sure?', method: :delete, class: "btn danger delete-key" diff --git a/app/views/layouts/_app_menu.html.haml b/app/views/layouts/_app_menu.html.haml index 6575ee99168..025314891f8 100644 --- a/app/views/layouts/_app_menu.html.haml +++ b/app/views/layouts/_app_menu.html.haml @@ -1,19 +1,19 @@ %ul.main_menu - %li.home{:class => tab_class(:root)} - = link_to "Home", root_path, :title => "Home" + %li.home{class: tab_class(:root)} + = link_to "Home", root_path, title: "Home" - %li{:class => tab_class(:dash_issues)} + %li{class: tab_class(:dash_issues)} = link_to dashboard_issues_path do Issues %span.count= current_user.assigned_issues.opened.count - %li{:class => tab_class(:dash_mr)} + %li{class: tab_class(:dash_mr)} = link_to dashboard_merge_requests_path do Merge Requests %span.count= current_user.cared_merge_requests.count - %li{:class => tab_class(:search)} + %li{class: tab_class(:search)} = link_to "Search", search_path - %li{:class => tab_class(:help)} + %li{class: tab_class(:help)} = link_to "Help", help_path diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml index 2e40f0a6281..86564ad7110 100644 --- a/app/views/layouts/_flash.html.haml +++ b/app/views/layouts/_flash.html.haml @@ -1,6 +1,6 @@ - if alert || notice - text = alert || notice - %div{:style => "display:none", :id => "flash_container"} + %div{style: "display:none", id: "flash_container"} %center %h4= text :javascript diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index e609557b17a..3a2586a3d38 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -1,5 +1,5 @@ %head - %meta{:charset => "utf-8"} + %meta{charset: "utf-8"} %title GitLab = " > #{@project.name}" if @project && !@project.new_record? @@ -9,10 +9,10 @@ -# Atom feed - if controller_name == 'projects' && action_name == 'index' - = auto_discovery_link_tag :atom, projects_url(:atom, :private_token => current_user.private_token), :title => "Dashboard feed" + = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed" - if @project && !@project.new_record? - if current_page?(tree_project_ref_path(@project, @project.root_ref)) || current_page?(project_commits_path(@project)) - = auto_discovery_link_tag(:atom, project_commits_url(@project, :atom, :ref => @ref, :private_token => current_user.private_token), :title => "Recent commits to #{@project.name}:#{@ref}") + = auto_discovery_link_tag(:atom, project_commits_url(@project, :atom, ref: @ref, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") - if request.path == project_issues_path(@project) - = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, :private_token => current_user.private_token), :title => "#{@project.name} issues") + = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues") = csrf_meta_tags diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 9e019021c89..d6247d36b0d 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -3,30 +3,30 @@ .container .top_panel_content %div.app_logo - = link_to root_path, :class => "home", :title => "Home" do + = link_to root_path, class: "home", title: "Home" do %h1 GITLAB %span.separator %h1.project_name= title .search - = form_tag search_path, :method => :get do |f| - = text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" + = form_tag search_path, method: :get do |f| + = text_field_tag "search", nil, placeholder: "Search", class: "search-input" .fbtn - if current_user.is_admin? - = link_to admin_root_path, :class => "btn small", :title => "Admin area" do + = link_to admin_root_path, class: "btn small", title: "Admin area" do %i.icon-cog Admin - if current_user.can_create_project? - = link_to new_project_path, :class => "btn small", :title => "Create New Project" do + = link_to new_project_path, class: "btn small", title: "Create New Project" do %i.icon-plus Project .account-box - = link_to profile_path, :class => "pic" do + = link_to profile_path, class: "pic" do = image_tag gravatar_icon(current_user.email) .account-links - = link_to profile_path, :class => "username" do + = link_to profile_path, class: "username" do My profile - = link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete + = link_to 'Logout', destroy_user_session_path, class: "logout", method: :delete :javascript $(function(){ diff --git a/app/views/layouts/_project_menu.html.haml b/app/views/layouts/_project_menu.html.haml index 3f58fc5a664..04eaec5accc 100644 --- a/app/views/layouts/_project_menu.html.haml +++ b/app/views/layouts/_project_menu.html.haml @@ -1,37 +1,37 @@ %ul.main_menu - %li.home{:class => project_tab_class} - = link_to @project.code, project_path(@project), :title => "Project" + %li.home{class: project_tab_class} + = link_to @project.code, project_path(@project), title: "Project" - if @project.repo_exists? - if can? current_user, :download_code, @project - %li{:class => tree_tab_class} + %li{class: tree_tab_class} = link_to tree_project_ref_path(@project, @project.root_ref) do Files - %li{:class => commit_tab_class} + %li{class: commit_tab_class} = link_to "Commits", project_commits_path(@project) - %li{:class => tab_class(:network)} + %li{class: tab_class(:network)} = link_to "Network", graph_project_path(@project) - if @project.issues_enabled - %li{:class => tab_class(:issues)} + %li{class: tab_class(:issues)} = link_to project_issues_filter_path(@project) do Issues %span.count.issue_counter= @project.issues.opened.count - if @project.repo_exists? - if @project.merge_requests_enabled - %li{:class => tab_class(:merge_requests)} + %li{class: tab_class(:merge_requests)} = link_to project_merge_requests_path(@project) do Merge Requests %span.count.merge_counter= @project.merge_requests.opened.count - if @project.wall_enabled - %li{:class => tab_class(:wall)} + %li{class: tab_class(:wall)} = link_to wall_project_path(@project) do Wall - if @project.wiki_enabled - %li{:class => tab_class(:wiki)} + %li{class: tab_class(:wiki)} = link_to project_wiki_path(@project, :index) do Wiki diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index 69304edef3a..fa4ec6c938e 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -1,22 +1,22 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} admin"} + %body{class: "#{app_theme} admin"} = render "layouts/flash" - = render "layouts/head_panel", :title => "Admin area" + = render "layouts/head_panel", title: "Admin area" .container %ul.main_menu - %li.home{:class => tab_class(:admin_root)} + %li.home{class: tab_class(:admin_root)} = link_to "Stats", admin_root_path - %li{:class => tab_class(:admin_projects)} + %li{class: tab_class(:admin_projects)} = link_to "Projects", admin_projects_path - %li{:class => tab_class(:admin_users)} + %li{class: tab_class(:admin_users)} = link_to "Users", admin_users_path - %li{:class => tab_class(:admin_logs)} + %li{class: tab_class(:admin_logs)} = link_to "Logs", admin_logs_path - %li{:class => tab_class(:admin_emails)} + %li{class: tab_class(:admin_emails)} = link_to "Hooks", admin_hooks_path - %li{:class => tab_class(:admin_resque)} + %li{class: tab_class(:admin_resque)} = link_to "Resque", admin_resque_path .content= yield diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 0d5d829e00d..dda10d5d137 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,10 +1,10 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} application"} + %body{class: "#{app_theme} application"} = render "layouts/flash" - = render "layouts/head_panel", :title => "Dashboard" + = render "layouts/head_panel", title: "Dashboard" .container - = render :partial => "layouts/app_menu" + = render partial: "layouts/app_menu" .content = yield diff --git a/app/views/layouts/devise_layout.html.haml b/app/views/layouts/devise_layout.html.haml index c293734b368..70c4f007ba1 100644 --- a/app/views/layouts/devise_layout.html.haml +++ b/app/views/layouts/devise_layout.html.haml @@ -1,6 +1,6 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" %body.ui_basic.login-page - = render :partial => "layouts/flash" + = render partial: "layouts/flash" .container= yield diff --git a/app/views/layouts/error.html.haml b/app/views/layouts/error.html.haml index 943dbe778c4..a512c4a58aa 100644 --- a/app/views/layouts/error.html.haml +++ b/app/views/layouts/error.html.haml @@ -1,9 +1,9 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} application"} + %body{class: "#{app_theme} application"} = render "layouts/flash" - = render "layouts/head_panel", :title => "" + = render "layouts/head_panel", title: "" .container .content %br diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index bebcf82dab8..a1938df43a1 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -1,6 +1,6 @@ -%html{:lang => "en"} +%html{lang: "en"} %head - %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"} + %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"} %title gitlabhq :css @@ -11,28 +11,28 @@ .content a {color: #0eb6ce; text-decoration: none;} .footer p {font-size: 11px; color:#7d7a7a; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;} .footer a {color: #0eb6ce; text-decoration: none;} - %body{:bgcolor => "#EAEAEA", :style => "margin: 0; padding: 0; background: #EAEAEA"} - %table{:align => "center", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "padding: 35px 0; background: #EAEAEA;", :width => "100%"} + %body{bgcolor: "#EAEAEA", style: "margin: 0; padding: 0; background: #EAEAEA"} + %table{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 35px 0; background: #EAEAEA;", width: "100%"} %tr - %td{:align => "center", :style => "margin: 0; padding: 0; background: #EAEAEA;"} - %table.header{:align => "center", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "font-family: Helvetica, Arial, sans-serif; background:#333", :width => "600"} + %td{align: "center", style: "margin: 0; padding: 0; background: #EAEAEA;"} + %table.header{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background:#333", width: "600"} %tr - %td{:style => "font-size: 0px;", :width => "20"} + %td{style: "font-size: 0px;", width: "20"} \ - %td{:align => "left", :style => "padding: 18px 0 10px;", :width => "580"} - %h1{:style => "color: #BBBBBB; font: normal 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;"} + %td{align: "left", style: "padding: 18px 0 10px;", width: "580"} + %h1{style: "color: #BBBBBB; font: normal 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;"} gitlab - if @project | #{@project.name} - %table{:align => "center", :bgcolor => "#fff", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "font-family: Helvetica, Arial, sans-serif; background: #fff;", :width => "600"} + %table{align: "center", bgcolor: "#fff", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background: #fff;", width: "600"} %tr= yield %tr - %td{:align => "left", :colspan => "2", :height => "3", :style => "padding: font-size: 0; line-height: 0; height: 3px;", :width => "600"} - %table.footer{:align => "center", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "font-family: Helvetica, Arial, sans-serif; line-height: 10px;", :width => "600"} + %td{align: "left", colspan: "2", height: "3", style: "padding: font-size: 0; line-height: 0; height: 3px;", width: "600"} + %table.footer{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; line-height: 10px;", width: "600"} %tr - %td{:align => "center", :style => "padding: 5px 0 10px; font-size: 11px; color:#7d7a7a; margin: 0; line-height: 1.2;font-family: Helvetica, Arial, sans-serif;", :valign => "top"} + %td{align: "center", style: "padding: 5px 0 10px; font-size: 11px; color:#7d7a7a; margin: 0; line-height: 1.2;font-family: Helvetica, Arial, sans-serif;", valign: "top"} %br - %p{:style => "font-size: 11px; color:#7d7a7a; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;"} + %p{style: "font-size: 11px; color:#7d7a7a; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;"} You're receiving this notification because you are a member of the - if @project #{@project.name} diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index 957a68bf482..b624415dfe1 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -1,26 +1,26 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} profile"} + %body{class: "#{app_theme} profile"} = render "layouts/flash" - = render "layouts/head_panel", :title => "Profile" + = render "layouts/head_panel", title: "Profile" .container %ul.main_menu - %li.home{:class => tab_class(:profile)} + %li.home{class: tab_class(:profile)} = link_to "Profile", profile_path - %li{:class => tab_class(:password)} + %li{class: tab_class(:password)} = link_to "Password", profile_password_path - %li{:class => tab_class(:ssh_keys)} + %li{class: tab_class(:ssh_keys)} = link_to keys_path do SSH Keys %span.count= current_user.keys.count - %li{:class => tab_class(:token)} + %li{class: tab_class(:token)} = link_to "Token", profile_token_path - %li{:class => tab_class(:design)} + %li{class: tab_class(:design)} = link_to "Design", profile_design_path diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index d9843c65fce..56a947d2a9d 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -1,11 +1,11 @@ !!! 5 -%html{ :lang => "en"} +%html{ lang: "en"} = render "layouts/head" - %body{:class => "#{app_theme} project"} + %body{class: "#{app_theme} project"} = render "layouts/flash" - = render "layouts/head_panel", :title => @project.name + = render "layouts/head_panel", title: @project.name .container - = render :partial => "layouts/project_menu" + = render partial: "layouts/project_menu" .content = yield diff --git a/app/views/merge_requests/_form.html.haml b/app/views/merge_requests/_form.html.haml index 4f20a06fd25..b6c12397d6c 100644 --- a/app/views/merge_requests/_form.html.haml +++ b/app/views/merge_requests/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project, @merge_request], :html => { :class => "new_merge_request form-horizontal" } do |f| += form_for [@project, @merge_request], html: { class: "new_merge_request form-horizontal" } do |f| -if @merge_request.errors.any? .alert-message.block-message.error %ul @@ -14,9 +14,9 @@ %h5 From (Head Branch) .body .padded - = f.label :source_branch, "From", :class => "control-label" + = f.label :source_branch, "From", class: "control-label" .controls - = f.select(:source_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px") + = f.select(:source_branch, @project.heads.map(&:name), { include_blank: "Select branch" }, style: "width:250px") .bottom_commit .mr_source_commit @@ -25,9 +25,9 @@ %h5 To (Base Branch) .body .padded - = f.label :target_branch, "To", :class => "control-label" + = f.label :target_branch, "To", class: "control-label" .controls - = f.select(:target_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px") + = f.select(:target_branch, @project.heads.map(&:name), { include_blank: "Select branch" }, style: "width:250px") .bottom_commit .mr_target_commit @@ -38,22 +38,22 @@ .top_box_content = f.label :title do %strong= "Title *" - .input= f.text_field :title, :class => "input-xxlarge pad", :maxlength => 255, :rows => 5 + .input= f.text_field :title, class: "input-xxlarge pad", maxlength: 255, rows: 5 .middle_box_content = f.label :assignee_id do %i.icon-user Assign to - .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }, :style => "width:250px") + .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, style: "width:250px") .control-group .form-actions - = f.submit 'Save', :class => "btn-primary btn" + = f.submit 'Save', class: "btn-primary btn" - if @merge_request.new_record? - = link_to project_merge_requests_path(@project), :class => "btn" do + = link_to project_merge_requests_path(@project), class: "btn" do Cancel - else - = link_to project_merge_request_path(@project, @merge_request), :class => "btn" do + = link_to project_merge_request_path(@project, @merge_request), class: "btn" do Cancel diff --git a/app/views/merge_requests/_head.html.haml b/app/views/merge_requests/_head.html.haml index c578c794060..35a86e6511c 100644 --- a/app/views/merge_requests/_head.html.haml +++ b/app/views/merge_requests/_head.html.haml @@ -1,5 +1,5 @@ .top-tabs - = link_to project_merge_requests_path(@project), :class => "tab #{'active' if current_page?(project_merge_requests_path(@project)) }" do + = link_to project_merge_requests_path(@project), class: "tab #{'active' if current_page?(project_merge_requests_path(@project)) }" do %span Merge Requests diff --git a/app/views/merge_requests/_merge_request.html.haml b/app/views/merge_requests/_merge_request.html.haml index 59af97a3cd8..7499609066a 100644 --- a/app/views/merge_requests/_merge_request.html.haml +++ b/app/views/merge_requests/_merge_request.html.haml @@ -1,4 +1,4 @@ -%li.wll{ :class => mr_css_classes(merge_request) } +%li.wll{ class: mr_css_classes(merge_request) } .right .left - if merge_request.merged? @@ -14,9 +14,9 @@ = merge_request.source_branch → = merge_request.target_branch - = image_tag gravatar_icon(merge_request.author_email), :class => "avatar" + = image_tag gravatar_icon(merge_request.author_email), class: "avatar" - %p= link_to_gfm truncate(merge_request.title, :length => 80), project_merge_request_path(merge_request.project, merge_request), :class => "row_title" + %p= link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.project, merge_request), class: "row_title" %span.update-author %small.cdark= "##{merge_request.id}" diff --git a/app/views/merge_requests/_show.html.haml b/app/views/merge_requests/_show.html.haml index c0b3dd9f5aa..072bf259f46 100644 --- a/app/views/merge_requests/_show.html.haml +++ b/app/views/merge_requests/_show.html.haml @@ -7,16 +7,16 @@ - if @commits.present? %ul.nav.nav-tabs.mr_nav_tabs %li - = link_to "#notes", "data-url" => project_merge_request_path(@project, @merge_request), :class => "merge-notes-tab tab" do + = link_to "#notes", "data-url" => project_merge_request_path(@project, @merge_request), class: "merge-notes-tab tab" do %i.icon-comment Comments %li - = link_to "#diffs", "data-url" => diffs_project_merge_request_path(@project, @merge_request), :class => "merge-diffs-tab tab" do + = link_to "#diffs", "data-url" => diffs_project_merge_request_path(@project, @merge_request), class: "merge-diffs-tab tab" do %i.icon-list-alt Diff -.merge_request_notes#notes{ :class => (controller.action_name == 'show') ? "" : "hide" } - = render("notes/notes", :tid => @merge_request.id, :tt => "merge_request") +.merge_request_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } + = render("notes/notes", tid: @merge_request.id, tt: "merge_request") .merge-request-diffs = render "merge_requests/show/diffs" if @diffs .status diff --git a/app/views/merge_requests/branch_from.js.haml b/app/views/merge_requests/branch_from.js.haml index 3e278015b49..156b4f0dc73 100644 --- a/app/views/merge_requests/branch_from.js.haml +++ b/app/views/merge_requests/branch_from.js.haml @@ -1,2 +1,2 @@ :plain - $(".mr_source_commit").html("#{escape_javascript(render 'commits/commit', :commit => @commit)}"); + $(".mr_source_commit").html("#{escape_javascript(render 'commits/commit', commit: @commit)}"); diff --git a/app/views/merge_requests/branch_to.js.haml b/app/views/merge_requests/branch_to.js.haml index 1ab1f6c43a9..8a201d42088 100644 --- a/app/views/merge_requests/branch_to.js.haml +++ b/app/views/merge_requests/branch_to.js.haml @@ -1,3 +1,3 @@ :plain - $(".mr_target_commit").html("#{escape_javascript(render 'commits/commit', :commit => @commit)}"); + $(".mr_target_commit").html("#{escape_javascript(render 'commits/commit', commit: @commit)}"); diff --git a/app/views/merge_requests/commits.js.haml b/app/views/merge_requests/commits.js.haml index 2055aa9b4bd..76322bdb210 100644 --- a/app/views/merge_requests/commits.js.haml +++ b/app/views/merge_requests/commits.js.haml @@ -1,4 +1,4 @@ :plain - $(".merge-request-commits").html("#{escape_javascript(render(:partial => "commits"))}"); + $(".merge-request-commits").html("#{escape_javascript(render(partial: "commits"))}"); diff --git a/app/views/merge_requests/diffs.js.haml b/app/views/merge_requests/diffs.js.haml index 4be5ec132e3..b147e5be71c 100644 --- a/app/views/merge_requests/diffs.js.haml +++ b/app/views/merge_requests/diffs.js.haml @@ -1,4 +1,4 @@ :plain - $(".merge-request-diffs").html("#{escape_javascript(render(:partial => "merge_requests/show/diffs"))}"); + $(".merge-request-diffs").html("#{escape_javascript(render(partial: "merge_requests/show/diffs"))}"); diff --git a/app/views/merge_requests/index.html.haml b/app/views/merge_requests/index.html.haml index 5210b95e3e4..4ad6e5c18ce 100644 --- a/app/views/merge_requests/index.html.haml +++ b/app/views/merge_requests/index.html.haml @@ -1,7 +1,7 @@ %h3.page_title Merge Requests - if can? current_user, :write_issue, @project - = link_to new_project_merge_request_path(@project), :class => "right btn small", :title => "New Merge Request" do + = link_to new_project_merge_request_path(@project), class: "right btn small", title: "New Merge Request" do New Merge Request %br @@ -10,17 +10,17 @@ .ui-box .title %ul.nav.nav-pills - %li{:class => ("active" if (params[:f] == "0" || !params[:f]))} - = link_to project_merge_requests_path(@project, :f => 0) do + %li{class: ("active" if (params[:f] == "0" || !params[:f]))} + = link_to project_merge_requests_path(@project, f: 0) do Open - %li{:class => ("active" if params[:f] == "2")} - = link_to project_merge_requests_path(@project, :f => 2) do + %li{class: ("active" if params[:f] == "2")} + = link_to project_merge_requests_path(@project, f: 2) do Closed - %li{:class => ("active" if params[:f] == "3")} - = link_to project_merge_requests_path(@project, :f => 3) do + %li{class: ("active" if params[:f] == "3")} + = link_to project_merge_requests_path(@project, f: 3) do To Me - %li{:class => ("active" if params[:f] == "1")} - = link_to project_merge_requests_path(@project, :f => 1) do + %li{class: ("active" if params[:f] == "1")} + = link_to project_merge_requests_path(@project, f: 1) do All %ul.unstyled @@ -31,7 +31,7 @@ - if @merge_requests.present? %li.bottom .row - .span7= paginate @merge_requests, :theme => "gitlab" + .span7= paginate @merge_requests, theme: "gitlab" .span4.right %span.cgray.right #{@merge_requests.total_count} merge requests for this filter diff --git a/app/views/merge_requests/show.js.haml b/app/views/merge_requests/show.js.haml index 2922b3bc6f0..7a27b166849 100644 --- a/app/views/merge_requests/show.js.haml +++ b/app/views/merge_requests/show.js.haml @@ -1,2 +1,2 @@ :plain - $(".merge-request-notes").html("#{escape_javascript(render("notes/notes", :tid => @merge_request.id, :tt => "merge_request"))}"); + $(".merge-request-notes").html("#{escape_javascript(render("notes/notes", tid: @merge_request.id, tt: "merge_request"))}"); diff --git a/app/views/merge_requests/show/_commits.html.haml b/app/views/merge_requests/show/_commits.html.haml index d10e8fd597a..d25e707c64e 100644 --- a/app/views/merge_requests/show/_commits.html.haml +++ b/app/views/merge_requests/show/_commits.html.haml @@ -7,19 +7,19 @@ - if @commits.count > 8 %ul.first_mr_commits.unstyled - @commits.first(8).each do |commit| - = render "commits/commit", :commit => commit + = render "commits/commit", commit: commit %li.bottom 8 of #{@commits.count} commits displayed. %strong %a.mr_show_all_commits Click here to show all %ul.all_mr_commits.hide.unstyled - @commits.each do |commit| - = render "commits/commit", :commit => commit + = render "commits/commit", commit: commit - else %ul.unstyled - @commits.each do |commit| - = render "commits/commit", :commit => commit + = render "commits/commit", commit: commit - else %h5 diff --git a/app/views/merge_requests/show/_diffs.html.haml b/app/views/merge_requests/show/_diffs.html.haml index 80776f19132..7685090311a 100644 --- a/app/views/merge_requests/show/_diffs.html.haml +++ b/app/views/merge_requests/show/_diffs.html.haml @@ -1,8 +1,8 @@ - if @merge_request.valid_diffs? - = render "commits/diffs", :diffs => @diffs + = render "commits/diffs", diffs: @diffs - elsif @merge_request.broken_diffs? %h4.nothing_here_message Can't load diff. - You can #{link_to "download MR patch", raw_project_merge_request_path(@project, @merge_request), :class => "vlink"} instead. + You can #{link_to "download MR patch", raw_project_merge_request_path(@project, @merge_request), class: "vlink"} instead. - else %h4.nothing_here_message Nothing to merge diff --git a/app/views/merge_requests/show/_how_to_merge.html.haml b/app/views/merge_requests/show/_how_to_merge.html.haml index 2512d254fe0..c21f2727a47 100644 --- a/app/views/merge_requests/show/_how_to_merge.html.haml +++ b/app/views/merge_requests/show/_how_to_merge.html.haml @@ -1,6 +1,6 @@ %div#modal_merge_info.modal.hide .modal-header - %a.close{:href => "#"} × + %a.close{href: "#"} × %h3 How To Merge .modal-body %pre diff --git a/app/views/merge_requests/show/_mr_accept.html.haml b/app/views/merge_requests/show/_mr_accept.html.haml index c158ef88bba..a6c2afb117c 100644 --- a/app/views/merge_requests/show/_mr_accept.html.haml +++ b/app/views/merge_requests/show/_mr_accept.html.haml @@ -4,29 +4,29 @@ - if @merge_request.open? && @commits.any? && can?(current_user, :accept_mr, @project) - .automerge_widget.can_be_merged{:style => "display:none"} + .automerge_widget.can_be_merged{style: "display:none"} .alert.alert-success %span - = form_for [:automerge, @project, @merge_request], :remote => true, :method => :get do |f| + = form_for [:automerge, @project, @merge_request], remote: true, method: :get do |f| %p You can accept this request automatically. If you still want to do it manually - - %strong= link_to "click here", "#", :class => "how_to_merge_link vlink", :title => "How To Merge" + %strong= link_to "click here", "#", class: "how_to_merge_link vlink", title: "How To Merge" for instructions .accept_group - = f.submit "Accept Merge Request", :class => "btn small success accept_merge_request" + = f.submit "Accept Merge Request", class: "btn small success accept_merge_request" - unless @project.root_ref? @merge_request.source_branch .remove_branch_holder - = label_tag :should_remove_source_branch, :class => "checkbox" do + = label_tag :should_remove_source_branch, class: "checkbox" do = check_box_tag :should_remove_source_branch Remove source-branch .clearfix - .automerge_widget.cannot_be_merged{:style => "display:none"} + .automerge_widget.cannot_be_merged{style: "display:none"} .alert.alert-info %span - = link_to "Show how to merge", "#", :class => "how_to_merge_link btn small padded", :title => "How To Merge" + = link_to "Show how to merge", "#", class: "how_to_merge_link btn small padded", title: "How To Merge" %strong This request cant be merged with GitLab. You should do it manually @@ -36,7 +36,7 @@ %i.icon-refresh Checking for ability to automatically merge… - .automerge_widget.already_cannot_be_merged{:style => "display:none"} + .automerge_widget.already_cannot_be_merged{style: "display:none"} .alert.alert-info %strong This merge request already can not be merged. Try to reload page. diff --git a/app/views/merge_requests/show/_mr_box.html.haml b/app/views/merge_requests/show/_mr_box.html.haml index bb8bf1ceba6..81ab83f3436 100644 --- a/app/views/merge_requests/show/_mr_box.html.haml +++ b/app/views/merge_requests/show/_mr_box.html.haml @@ -10,12 +10,12 @@ .middle_box_content %div %cite.cgray Created at #{@merge_request.created_at.stamp("Aug 21, 2011")} by - = image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av" + = image_tag gravatar_icon(@merge_request.author_email), width: 16, class: "lil_av" %strong.author= link_to_merge_request_author(@merge_request) - if @merge_request.assignee %cite.cgray and currently assigned to - = image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av" + = image_tag gravatar_icon(@merge_request.assignee_email), width: 16, class: "lil_av" %strong.author= link_to_merge_request_assignee(@merge_request) diff --git a/app/views/merge_requests/show/_mr_title.html.haml b/app/views/merge_requests/show/_mr_title.html.haml index 3f6060b0645..31fa0779fd2 100644 --- a/app/views/merge_requests/show/_mr_title.html.haml +++ b/app/views/merge_requests/show/_mr_title.html.haml @@ -13,13 +13,13 @@ = "MERGED" - if can?(current_user, :modify_merge_request, @merge_request) - if @merge_request.open? - = link_to raw_project_merge_request_path(@project, @merge_request), :class => "btn grouped" do + = link_to raw_project_merge_request_path(@project, @merge_request), class: "btn grouped" do %i.icon-download-alt Get Patch - = link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "btn grouped danger", :title => "Close merge request" + = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {closed: true }, status_only: true), method: :put, class: "btn grouped danger", title: "Close merge request" - = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn grouped" do + = link_to edit_project_merge_request_path(@project, @merge_request), class: "btn grouped" do %i.icon-edit Edit diff --git a/app/views/milestones/_form.html.haml b/app/views/milestones/_form.html.haml index 69567eff417..daae58fe1e0 100644 --- a/app/views/milestones/_form.html.haml +++ b/app/views/milestones/_form.html.haml @@ -5,7 +5,7 @@ %hr -= form_for [@project, @milestone], :html => {:class => "new_milestone form-horizontal"} do |f| += form_for [@project, @milestone], html: {class: "new_milestone form-horizontal"} do |f| -if @milestone.errors.any? .alert-message.block-message.error %ul @@ -14,35 +14,35 @@ .row .span6 .control-group - = f.label :title, "Title", :class => "control-label" + = f.label :title, "Title", class: "control-label" .controls - = f.text_field :title, :maxlength => 255, :class => "input-xlarge" + = f.text_field :title, maxlength: 255, class: "input-xlarge" %p.help-block Required .control-group - = f.label :description, "Description", :class => "control-label" + = f.label :description, "Description", class: "control-label" .controls - = f.text_area :description, :maxlength => 2000, :class => "input-xlarge", :rows => 10 + = f.text_area :description, maxlength: 2000, class: "input-xlarge", rows: 10 %p.help-block Markdown is enabled. .span6 .control-group - = f.label :due_date, "Due Date", :class => "control-label" + = f.label :due_date, "Due Date", class: "control-label" .input= f.hidden_field :due_date .controls .datepicker .form-actions - if @milestone.new_record? - = f.submit 'Create milestone', :class => "primary btn" + = f.submit 'Create milestone', class: "primary btn" -else - = f.submit 'Save changes', :class => "primary btn" + = f.submit 'Save changes', class: "primary btn" - if request.xhr? - = link_to "Cancel", "#back", :onclick => "backToIssues();", :class => "btn" + = link_to "Cancel", "#back", onclick: "backToIssues();", class: "btn" - else - if @milestone.new_record? - = link_to "Cancel", project_milestones_path(@project), :class => "btn" + = link_to "Cancel", project_milestones_path(@project), class: "btn" - else - = link_to "Cancel", project_milestone_path(@project, @milestone), :class => "btn" + = link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn" :javascript $(function() { diff --git a/app/views/milestones/_milestone.html.haml b/app/views/milestones/_milestone.html.haml index 06cf6304d40..205b864f80f 100644 --- a/app/views/milestones/_milestone.html.haml +++ b/app/views/milestones/_milestone.html.haml @@ -1,18 +1,18 @@ -%li{:class => "milestone", :id => dom_id(milestone) } +%li{class: "milestone", id: dom_id(milestone) } .right - if milestone.issues.any? %span.btn.small.disabled.grouped= pluralize milestone.issues.count, 'issues' - if milestone.issues.count > 0 - = link_to 'Browse Issues', project_issues_path(milestone.project, :milestone_id => milestone.id), :class => "btn small grouped" + = link_to 'Browse Issues', project_issues_path(milestone.project, milestone_id: milestone.id), class: "btn small grouped" - if can? current_user, :admin_milestone, milestone.project - = link_to 'Edit', edit_project_milestone_path(milestone.project, milestone), :class => "btn small edit-milestone-link grouped" + = link_to 'Edit', edit_project_milestone_path(milestone.project, milestone), class: "btn small edit-milestone-link grouped" %h4 - = link_to_gfm truncate(milestone.title, :length => 100), project_milestone_path(milestone.project, milestone), :class => "row_title" + = link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone), class: "row_title" %small = milestone.expires_at %br .progress.progress-success.span3 - .bar{:style => "width: #{milestone.percent_complete}%;"} + .bar{style: "width: #{milestone.percent_complete}%;"} diff --git a/app/views/milestones/index.html.haml b/app/views/milestones/index.html.haml index ed85166fbb2..ecb008dc144 100644 --- a/app/views/milestones/index.html.haml +++ b/app/views/milestones/index.html.haml @@ -3,23 +3,23 @@ %h3.page_title Milestones - if can? current_user, :admin_milestone, @project - = link_to "New Milestone", new_project_milestone_path(@project), :class => "right btn small", :title => "New Milestone" + = link_to "New Milestone", new_project_milestone_path(@project), class: "right btn small", title: "New Milestone" %br %div.ui-box .title %ul.nav.nav-pills - %li{:class => ("active" if (params[:f] == "0" || !params[:f]))} - = link_to project_milestones_path(@project, :f => 0) do + %li{class: ("active" if (params[:f] == "0" || !params[:f]))} + = link_to project_milestones_path(@project, f: 0) do Active - %li{:class => ("active" if params[:f] == "1")} - = link_to project_milestones_path(@project, :f => 1) do + %li{class: ("active" if params[:f] == "1")} + = link_to project_milestones_path(@project, f: 1) do All %ul.unstyled = render @milestones - if @milestones.present? - %li.bottom= paginate @milestones, :remote => true, :theme => "gitlab" + %li.bottom= paginate @milestones, remote: true, theme: "gitlab" - else %li %h3.nothing_here_message Nothing to show here diff --git a/app/views/milestones/show.html.haml b/app/views/milestones/show.html.haml index 1a731810983..b7da7b668ea 100644 --- a/app/views/milestones/show.html.haml +++ b/app/views/milestones/show.html.haml @@ -4,9 +4,9 @@ = @milestone.expires_at %span.right - = link_to 'Browse Issues', project_issues_path(@milestone.project, :milestone_id => @milestone.id), :class => "btn edit-milestone-link small grouped" + = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link small grouped" - if can?(current_user, :admin_milestone, @project) - = link_to edit_project_milestone_path(@project, @milestone), :class => "btn small grouped" do + = link_to edit_project_milestone_path(@project, @milestone), class: "btn small grouped" do %i.icon-edit Edit @@ -32,7 +32,7 @@ – #{@milestone.issues.closed.count} closed .progress.progress-success - .bar{:style => "width: #{@milestone.percent_complete}%;"} + .bar{style: "width: #{@milestone.percent_complete}%;"} - if @milestone.description.present? @@ -51,9 +51,9 @@ = link_to [@project, issue] do %span.badge.badge-info ##{issue.id} – - = link_to_gfm truncate(issue.title, :length => 60), [@project, issue] + = link_to_gfm truncate(issue.title, length: 60), [@project, issue] %br - = paginate @issues, :theme => "gitlab" + = paginate @issues, theme: "gitlab" .span6 %table.admin-table @@ -62,6 +62,6 @@ - @users.each do |user| %tr %td - = image_tag gravatar_icon(user.email, 24), :width => "24" + = image_tag gravatar_icon(user.email, 24), width: "24" = user.name diff --git a/app/views/notes/_create_common.js.haml b/app/views/notes/_create_common.js.haml index 583812bf502..847ff383b7c 100644 --- a/app/views/notes/_create_common.js.haml +++ b/app/views/notes/_create_common.js.haml @@ -2,7 +2,7 @@ :plain $("#new_note .errors").remove(); $('#new_note textarea').val(""); - NoteList.prepend(#{note.id}, "#{escape_javascript(render :partial => "notes/show", :locals => {:note => note})}"); + NoteList.prepend(#{note.id}, "#{escape_javascript(render partial: "notes/show", locals: {note: note})}"); - else :plain $("#new_note").replaceWith("#{escape_javascript(render('form'))}"); diff --git a/app/views/notes/_create_line.js.haml b/app/views/notes/_create_line.js.haml index 9cf085cd613..13809bec1b9 100644 --- a/app/views/notes/_create_line.js.haml +++ b/app/views/notes/_create_line.js.haml @@ -4,5 +4,5 @@ $('#new_note textarea').val(""); $("a.line_note_reply_link[line_code='#{note.line_code}']").closest("tr").remove(); var trEl = $(".#{note.line_code}").parent(); - trEl.after("#{escape_javascript(render :partial => "notes/per_line_show", :locals => {:note => note})}"); - trEl.after("#{escape_javascript(render :partial => "notes/reply_button", :locals => {:line_code => note.line_code})}"); + trEl.after("#{escape_javascript(render partial: "notes/per_line_show", locals: {note: note})}"); + trEl.after("#{escape_javascript(render partial: "notes/reply_button", locals: {line_code: note.line_code})}"); diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml index f5571aede5e..dac026bd23d 100644 --- a/app/views/notes/_form.html.haml +++ b/app/views/notes/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project, @note], :remote => "true", :multipart => true do |f| += form_for [@project, @note], remote: "true", multipart: true do |f| %h3.page_title Leave a comment -if @note.errors.any? .alert-message.block-message.error @@ -7,16 +7,16 @@ = f.hidden_field :noteable_id = f.hidden_field :noteable_type - = f.text_area :note, :size => 255 + = f.text_area :note, size: 255 #preview-note.well.hide %p.hint - = link_to "Gitlab Markdown", help_markdown_path, :target => '_blank' + = link_to "Gitlab Markdown", help_markdown_path, target: '_blank' is enabled. - = link_to 'Preview', preview_project_notes_path(@project), :id => 'preview-link' + = link_to 'Preview', preview_project_notes_path(@project), id: 'preview-link' .row.note_advanced_opts.hide .span2 - = f.submit 'Add Comment', :class => "btn primary submit_note", :id => "submit_note" + = f.submit 'Add Comment', class: "btn primary submit_note", id: "submit_note" .span4.notify_opts %h6.left Notify via email: = label_tag :notify do @@ -33,6 +33,6 @@ .input.input_file %a.file_upload.btn.small Upload File - = f.file_field :attachment, :class => "input-file" + = f.file_field :attachment, class: "input-file" %span.hint Any file less than 10 MB diff --git a/app/views/notes/_load.js.haml b/app/views/notes/_load.js.haml index 1f3559670d1..c16a699a1b7 100644 --- a/app/views/notes/_load.js.haml +++ b/app/views/notes/_load.js.haml @@ -1,15 +1,15 @@ - unless @notes.blank? - if params[:last_id] :plain - NoteList.replace("#{escape_javascript(render(:partial => 'notes/notes_list'))}"); + NoteList.replace("#{escape_javascript(render(partial: 'notes/notes_list'))}"); - elsif params[:first_id] :plain - NoteList.append(#{@notes.last.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}"); + NoteList.append(#{@notes.last.id}, "#{escape_javascript(render(partial: 'notes/notes_list'))}"); - else :plain - NoteList.setContent(#{@notes.last.id}, #{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}"); + NoteList.setContent(#{@notes.last.id}, #{@notes.first.id}, "#{escape_javascript(render(partial: 'notes/notes_list'))}"); - else - if params[:first_id] diff --git a/app/views/notes/_notes_list.html.haml b/app/views/notes/_notes_list.html.haml index 1e4a6bb2b2f..5673988d87d 100644 --- a/app/views/notes/_notes_list.html.haml +++ b/app/views/notes/_notes_list.html.haml @@ -1,4 +1,4 @@ - @notes.each do |note| - next unless note.author - = render :partial => "notes/show", :locals => {:note => note} + = render partial: "notes/show", locals: {note: note} diff --git a/app/views/notes/_per_line_form.html.haml b/app/views/notes/_per_line_form.html.haml index a5a70053480..afb0b30dca3 100644 --- a/app/views/notes/_per_line_form.html.haml +++ b/app/views/notes/_per_line_form.html.haml @@ -1,7 +1,7 @@ -%table{:style => "display:none;"} +%table{style: "display:none;"} %tr.per_line_form - %td{:colspan => 3 } - = form_for [@project, @note], :remote => "true", :multipart => true do |f| + %td{colspan: 3 } + = form_for [@project, @note], remote: "true", multipart: true do |f| %h3.page_title Leave a note %div.span10 -if @note.errors.any? @@ -12,11 +12,11 @@ = f.hidden_field :noteable_id = f.hidden_field :noteable_type = f.hidden_field :line_code - = f.text_area :note, :size => 255 + = f.text_area :note, size: 255 .note_actions .buttons - = f.submit 'Add note', :class => "btn primary submit_note", :id => "submit_note" - = link_to "Cancel", "#", :class => "btn hide-button" + = f.submit 'Add note', class: "btn primary submit_note", id: "submit_note" + = link_to "Cancel", "#", class: "btn hide-button" .options %h6.left Notify via email: .labels diff --git a/app/views/notes/_per_line_show.html.haml b/app/views/notes/_per_line_show.html.haml index e239c618b11..cf1769c0517 100644 --- a/app/views/notes/_per_line_show.html.haml +++ b/app/views/notes/_per_line_show.html.haml @@ -1,5 +1,5 @@ %tr.line_notes_row - %td{:colspan => 3} + %td{colspan: 3} %ul - = render :partial => "notes/show", :locals => {:note => note} + = render partial: "notes/show", locals: {note: note} diff --git a/app/views/notes/_reply_button.html.haml b/app/views/notes/_reply_button.html.haml index db6b35b7ada..c981fb9fc72 100644 --- a/app/views/notes/_reply_button.html.haml +++ b/app/views/notes/_reply_button.html.haml @@ -1,4 +1,4 @@ %tr.line_notes_row.reply - %td{:colspan => 3} + %td{colspan: 3} %i.icon-comment - = link_to "Reply", "#", :class => "line_note_reply_link", "line_code" => line_code, :title => "Add note for this line" + = link_to "Reply", "#", class: "line_note_reply_link", "line_code" => line_code, title: "Add note for this line" diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_show.html.haml index 62aca154bf1..bdb00546114 100644 --- a/app/views/notes/_show.html.haml +++ b/app/views/notes/_show.html.haml @@ -1,5 +1,5 @@ -%li{:id => dom_id(note), :class => "note"} - = image_tag gravatar_icon(note.author.email), :class => "avatar" +%li{id: dom_id(note), class: "note"} + = image_tag gravatar_icon(note.author.email), class: "avatar" %div.note-author %strong= note.author_name = link_to "##{dom_id(note)}", name: dom_id(note) do @@ -7,7 +7,7 @@ = time_ago_in_words(note.updated_at) ago - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) - = link_to [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note btn very_small" do + = link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do %i.icon-trash Remove @@ -17,5 +17,5 @@ - if note.attachment.url .right %div.file - = link_to note.attachment_identifier, note.attachment.url, :target => "_blank" + = link_to note.attachment_identifier, note.attachment.url, target: "_blank" .clear diff --git a/app/views/notes/create.js.haml b/app/views/notes/create.js.haml index e87dbcf63c1..8f631f38f79 100644 --- a/app/views/notes/create.js.haml +++ b/app/views/notes/create.js.haml @@ -1,7 +1,7 @@ - if @note.line_code - = render "create_line", :note => @note + = render "create_line", note: @note - else - = render "create_common", :note => @note + = render "create_common", note: @note -# Enable submit button :plain diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml index 08eea5538fb..654d6cd12be 100644 --- a/app/views/notify/new_issue_email.html.haml +++ b/app/views/notify/new_issue_email.html.haml @@ -1,15 +1,15 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} New Issue was created and assigned to you. - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "Issue ##{@issue.id}" - = link_to_gfm truncate(@issue.title, :length => 45), project_issue_url(@issue.project, @issue), :title => @issue.title + = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title %br diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml index 4bacff5060c..151aac451fb 100644 --- a/app/views/notify/new_merge_request_email.html.haml +++ b/app/views/notify/new_merge_request_email.html.haml @@ -1,18 +1,18 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "New Merge Request !#{@merge_request.id}" - = link_to_gfm truncate(@merge_request.title, :length => 16), project_merge_request_url(@merge_request.project, @merge_request) - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + = link_to_gfm truncate(@merge_request.title, length: 16), project_merge_request_url(@merge_request.project, @merge_request) + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} Asignee: #{@merge_request.author_name} → #{@merge_request.assignee_name} %td diff --git a/app/views/notify/new_user_email.html.haml b/app/views/notify/new_user_email.html.haml index b0f198a50fd..d96afc92fe2 100644 --- a/app/views/notify/new_user_email.html.haml +++ b/app/views/notify/new_user_email.html.haml @@ -1,23 +1,23 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} Hi #{@user['name']}! - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} Administrator created account for you. Now you are a member of company gitlab application. - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 16px;font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 16px;font-family: Helvetica, Arial, sans-serif; "} login.......................................... %code= @user['email'] - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 16px;font-family: Helvetica, Arial, sans-serif; "} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 16px;font-family: Helvetica, Arial, sans-serif; "} password.................................. %code= @password - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} = link_to "Click here to login", root_url - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} diff --git a/app/views/notify/note_commit_email.html.haml b/app/views/notify/note_commit_email.html.haml index 6994f1a6340..e87f9c120e4 100644 --- a/app/views/notify/note_commit_email.html.haml +++ b/app/views/notify/note_commit_email.html.haml @@ -1,23 +1,23 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "New comment for Commit #{@commit.short_id}" - = link_to_gfm truncate(@commit.title, :length => 16), project_commit_url(@note.project, :id => @commit.id, :anchor => "note_#{@note.id}") - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + = link_to_gfm truncate(@commit.title, length: 16), project_commit_url(@note.project, id: @commit.id, anchor: "note_#{@note.id}") + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} - %a{:href => "#", :style => "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} left next message: %br - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :width => "558"} + %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"} %tr - %td{:valign => "top"} - %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } + %td{valign: "top"} + %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" } = markdown(@note.note) - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} diff --git a/app/views/notify/note_issue_email.html.haml b/app/views/notify/note_issue_email.html.haml index 34d9b800c1e..832f5df4463 100644 --- a/app/views/notify/note_issue_email.html.haml +++ b/app/views/notify/note_issue_email.html.haml @@ -1,23 +1,23 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "New comment for Issue ##{@issue.id}" - = link_to_gfm truncate(@issue.title, :length => 35), project_issue_url(@issue.project, @issue, :anchor => "note_#{@note.id}") - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + = link_to_gfm truncate(@issue.title, length: 35), project_issue_url(@issue.project, @issue, anchor: "note_#{@note.id}") + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} - %a{:href => "#", :style => "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} left next message: %br - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :width => "558"} + %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"} %tr - %td{:valign => "top"} - %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } + %td{valign: "top"} + %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" } = markdown(@note.note) - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml index 20e7679d4dc..764cd094b76 100644 --- a/app/views/notify/note_merge_request_email.html.haml +++ b/app/views/notify/note_merge_request_email.html.haml @@ -1,23 +1,23 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "New comment for Merge Request !#{@merge_request.id}" - = link_to_gfm truncate(@merge_request.title, :length => 16), project_merge_request_url(@merge_request.project, @merge_request, :anchor => "note_#{@note.id}") - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + = link_to_gfm truncate(@merge_request.title, length: 16), project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}") + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} - %a{:href => "#", :style => "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} left next message: %br - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :width => "558"} + %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"} %tr - %td{:valign => "top"} - %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } + %td{valign: "top"} + %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" } = markdown(@note.note) - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} diff --git a/app/views/notify/note_wall_email.html.haml b/app/views/notify/note_wall_email.html.haml index f62e1f917cd..0661c5801b8 100644 --- a/app/views/notify/note_wall_email.html.haml +++ b/app/views/notify/note_wall_email.html.haml @@ -1,22 +1,22 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} New message on - = link_to "Project Wall", wall_project_url(@note.project, :anchor => "note_#{@note.id}") - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + = link_to "Project Wall", wall_project_url(@note.project, anchor: "note_#{@note.id}") + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} - %a{:href => "#", :style => "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} left next message: %br - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :width => "558"} + %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"} %tr - %td{:valign => "top"} - %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } + %td{valign: "top"} + %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" } = markdown(@note.note) - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} diff --git a/app/views/notify/note_wiki_email.html.haml b/app/views/notify/note_wiki_email.html.haml index 591319515f6..d3840cdac06 100644 --- a/app/views/notify/note_wiki_email.html.haml +++ b/app/views/notify/note_wiki_email.html.haml @@ -1,23 +1,23 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} New comment for Wiki page - = link_to_gfm @wiki.title, project_issue_url(@wiki.project, @wiki, :anchor => "note_#{@note.id}") - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + = link_to_gfm @wiki.title, project_issue_url(@wiki.project, @wiki, anchor: "note_#{@note.id}") + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} - %a{:href => "#", :style => "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} commented on Wiki page: %br - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :width => "558"} + %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"} %tr - %td{:valign => "top"} - %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } + %td{valign: "top"} + %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" } = markdown(@note.note) - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} diff --git a/app/views/notify/reassigned_issue_email.html.haml b/app/views/notify/reassigned_issue_email.html.haml index 26ddc13336a..c7896af3a54 100644 --- a/app/views/notify/reassigned_issue_email.html.haml +++ b/app/views/notify/reassigned_issue_email.html.haml @@ -1,16 +1,16 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "Reassigned Issue ##{@issue.id}" - = link_to_gfm truncate(@issue.title, :length => 16), project_issue_url(@issue.project, @issue) - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + = link_to_gfm truncate(@issue.title, length: 16), project_issue_url(@issue.project, @issue) + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} Assignee changed from #{@previous_assignee.name} to #{@issue.assignee_name} %td diff --git a/app/views/notify/reassigned_merge_request_email.html.haml b/app/views/notify/reassigned_merge_request_email.html.haml index e9f657c131f..e49b783635c 100644 --- a/app/views/notify/reassigned_merge_request_email.html.haml +++ b/app/views/notify/reassigned_merge_request_email.html.haml @@ -1,16 +1,16 @@ -%td.content{:align => "left", :style => "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", :valign => "top", :width => "600"} - %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", :width => "600"} +%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} + %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:align => "left", :style => "padding: 20px 0 0;"} - %h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{align: "left", style: "padding: 20px 0 0;"} + %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "Reassigned Merge Request !#{@merge_request.id}" - = link_to_gfm truncate(@merge_request.title, :length => 16), project_merge_request_url(@merge_request.project, @merge_request) - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} + = link_to_gfm truncate(@merge_request.title, length: 16), project_merge_request_url(@merge_request.project, @merge_request) + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} %tr - %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} - %td{:style => "padding: 15px 0 15px;", :valign => "top"} - %p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} + %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{style: "padding: 15px 0 15px;", valign: "top"} + %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} Assignee changed from #{@previous_assignee.name} to #{@merge_request.assignee_name} %td diff --git a/app/views/profile/design.html.haml b/app/views/profile/design.html.haml index ff6ae7f5778..a3455ced94b 100644 --- a/app/views/profile/design.html.haml +++ b/app/views/profile/design.html.haml @@ -1,4 +1,4 @@ -= form_for @user, :url => profile_update_path, :remote => true, :method => :put do |f| += form_for @user, url: profile_update_path, remote: true, method: :put do |f| %div %h3 Application theme %hr @@ -18,16 +18,16 @@ %h3 Code review %hr .row - %label.span3{:for => "user_dark_scheme_false"} + %label.span3{for: "user_dark_scheme_false"} .thumbnail - = image_tag "white.png", :width => 260, :class => "styled_image" + = image_tag "white.png", width: 260, class: "styled_image" .caption %h5 = f.radio_button :dark_scheme, false White code preview - %label.span3{:for => "user_dark_scheme_true"} + %label.span3{for: "user_dark_scheme_true"} .thumbnail - = image_tag "dark.png", :width => 260, :class => "styled_image" + = image_tag "dark.png", width: 260, class: "styled_image" .caption %h5 = f.radio_button :dark_scheme, true diff --git a/app/views/profile/password.html.haml b/app/views/profile/password.html.haml index 1662f4d9c58..257dacb1ad3 100644 --- a/app/views/profile/password.html.haml +++ b/app/views/profile/password.html.haml @@ -1,6 +1,6 @@ %h3.page_title Password %hr -= form_for @user, :url => profile_password_path, :method => :put do |f| += form_for @user, url: profile_password_path, method: :put do |f| .data %p.slead After successful password update you will be redirected to login page where you should login with new password -if @user.errors.any? @@ -16,4 +16,4 @@ = f.label :password_confirmation .input= f.password_field :password_confirmation .actions - = f.submit 'Save', :class => "btn primary" + = f.submit 'Save', class: "btn primary" diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml index b26890131bb..95cce2bb6b6 100644 --- a/app/views/profile/show.html.haml +++ b/app/views/profile/show.html.haml @@ -1,5 +1,5 @@ .profile_avatar_holder - = image_tag gravatar_icon(@user.email, 90), :class => "styled_image" + = image_tag gravatar_icon(@user.email, 90), class: "styled_image" %h3.page_title = @user.name %br @@ -9,7 +9,7 @@ %hr -= form_for @user, :url => profile_update_path, :method => :put, :html => { :class => "edit_user form-horizontal" } do |f| += form_for @user, url: profile_update_path, method: :put, html: { class: "edit_user form-horizontal" } do |f| -if @user.errors.any? %div.alert-message.block-message.error %ul @@ -18,30 +18,30 @@ .row .span7 .control-group - = f.label :name, :class => "control-label" + = f.label :name, class: "control-label" .controls - = f.text_field :name, :class => "input-xlarge" + = f.text_field :name, class: "input-xlarge" %span.help-block Enter your name, so people you know can recognize you. .control-group - = f.label :email, :class => "control-label" + = f.label :email, class: "control-label" .controls - = f.text_field :email, :class => "input-xlarge" + = f.text_field :email, class: "input-xlarge" %span.help-block We also use email for avatar detection. %hr .control-group - = f.label :skype, :class => "control-label" - .controls= f.text_field :skype, :class => "input-xlarge" + = f.label :skype, class: "control-label" + .controls= f.text_field :skype, class: "input-xlarge" .control-group - = f.label :linkedin, :class => "control-label" - .controls= f.text_field :linkedin, :class => "input-xlarge" + = f.label :linkedin, class: "control-label" + .controls= f.text_field :linkedin, class: "input-xlarge" .control-group - = f.label :twitter, :class => "control-label" - .controls= f.text_field :twitter, :class => "input-xlarge" + = f.label :twitter, class: "control-label" + .controls= f.text_field :twitter, class: "input-xlarge" .control-group - = f.label :bio, :class => "control-label" + = f.label :bio, class: "control-label" .controls - = f.text_area :bio, :rows => 6, :class => "input-xlarge", :maxlength => 250 + = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250 %span.help-block Tell us about yourself in fewer than 250 characters. .span5.right @@ -56,14 +56,14 @@ of %span= current_user.projects_limit .progress - .bar{:style => "width: #{current_user.projects_limit_percent}%;"} + .bar{style: "width: #{current_user.projects_limit_percent}%;"} %h4 SSH public keys: %small.right %span= link_to current_user.keys.count, keys_path - = link_to "Add Public Key", new_key_path, :class => "btn small right" + = link_to "Add Public Key", new_key_path, class: "btn small right" .form-actions - = f.submit 'Save', :class => "btn-primary btn" + = f.submit 'Save', class: "btn-primary btn" diff --git a/app/views/profile/token.html.haml b/app/views/profile/token.html.haml index 3a0ec90bbef..6c870c364de 100644 --- a/app/views/profile/token.html.haml +++ b/app/views/profile/token.html.haml @@ -3,7 +3,7 @@ %span.cred.right keep it in secret! %hr -= form_for @user, :url => profile_reset_private_token_path, :method => :put do |f| += form_for @user, url: profile_reset_private_token_path, method: :put do |f| .data %p.slead Private token used to access application resources without authentication. @@ -11,13 +11,13 @@ It can be used for atom feed or API %p.cgray - if current_user.private_token - = text_field_tag "token", current_user.private_token, :class => "xxlarge large_text" + = text_field_tag "token", current_user.private_token, class: "xxlarge large_text" - else You don`t have one yet. Click generate to fix it. .actions - if current_user.private_token - = f.submit 'Reset', :confirm => "Are you sure?", :class => "btn" + = f.submit 'Reset', confirm: "Are you sure?", class: "btn" - else - = f.submit 'Generate', :class => "btn primary" + = f.submit 'Generate', class: "btn primary" diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml index 6bc48df9183..ce66b2cf930 100644 --- a/app/views/projects/_form.html.haml +++ b/app/views/projects/_form.html.haml @@ -1,4 +1,4 @@ -= form_for(@project, :remote => true) do |f| += form_for(@project, remote: true) do |f| - if @project.errors.any? .alert-message.block-message.error %ul @@ -8,7 +8,7 @@ = f.label :name do Project name is .input - = f.text_field :name, :placeholder => "Example Project", :class => "xxlarge" + = f.text_field :name, placeholder: "Example Project", class: "xxlarge" %h5.page_title .alert.alert-info @@ -19,19 +19,19 @@ .input .input-prepend %strong - = text_field_tag :ppath, @project.path_to_repo, :class => "xlarge", :disabled => true + = text_field_tag :ppath, @project.path_to_repo, class: "xlarge", disabled: true .clearfix = f.label :code do URL .input .input-prepend %span.add-on= web_app_url - = f.text_field :code, :placeholder => "example" + = f.text_field :code, placeholder: "example" - unless @project.new_record? || @project.heads.empty? .clearfix = f.label :default_branch, "Default Branch" - .input= f.select(:default_branch, @project.heads.map(&:name), {}, :style => "width:210px;") + .input= f.select(:default_branch, @project.heads.map(&:name), {}, style: "width:210px;") - unless @project.new_record? .alert.alert-info @@ -56,8 +56,8 @@ %br .actions - = f.submit 'Save', :class => "btn primary" - = link_to 'Cancel', @project, :class => "btn" + = f.submit 'Save', class: "btn primary" + = link_to 'Cancel', @project, class: "btn" - unless @project.new_record? .right - = link_to 'Remove', @project, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger" + = link_to 'Remove', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger" diff --git a/app/views/projects/_new_form.html.haml b/app/views/projects/_new_form.html.haml index 9f3bfa86b91..5104df83a2c 100644 --- a/app/views/projects/_new_form.html.haml +++ b/app/views/projects/_new_form.html.haml @@ -1,4 +1,4 @@ -= form_for(@project, :remote => true) do |f| += form_for(@project, remote: true) do |f| - if @project.errors.any? .alert-message.block-message.error %span= @project.errors.full_messages.first @@ -6,8 +6,8 @@ = f.label :name do Project name is .input - = f.text_field :name, :placeholder => "Example Project", :class => "xxlarge" - = f.submit 'Create project', :class => "btn primary" + = f.text_field :name, placeholder: "Example Project", class: "xxlarge" + = f.submit 'Create project', class: "btn primary" %hr .alert.alert-info @@ -18,7 +18,7 @@ .input .input-prepend %span.add-on= Gitlab.config.ssh_path - = f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record? + = f.text_field :path, placeholder: "example_project", disabled: !@project.new_record? %span.add-on= ".git" .clearfix = f.label :code do @@ -26,4 +26,4 @@ .input .input-prepend %span.add-on= web_app_url - = f.text_field :code, :placeholder => "example" + = f.text_field :code, placeholder: "example" diff --git a/app/views/projects/_project_head.html.haml b/app/views/projects/_project_head.html.haml index f3ac3c27ccf..ba64ee7f996 100644 --- a/app/views/projects/_project_head.html.haml +++ b/app/views/projects/_project_head.html.haml @@ -1,29 +1,29 @@ %ul.nav.nav-tabs - %li{ :class => "#{'active' if current_page?(project_path(@project)) }" } - = link_to project_path(@project), :class => "activities-tab tab" do + %li{ class: "#{'active' if current_page?(project_path(@project)) }" } + = link_to project_path(@project), class: "activities-tab tab" do %i.icon-home Show - %li{ :class => " #{'active' if (controller.controller_name == "team_members") || current_page?(team_project_path(@project)) }" } - = link_to team_project_path(@project), :class => "team-tab tab" do + %li{ class: " #{'active' if (controller.controller_name == "team_members") || current_page?(team_project_path(@project)) }" } + = link_to team_project_path(@project), class: "team-tab tab" do %i.icon-user Team - %li{ :class => "#{'active' if current_page?(files_project_path(@project)) }" } - = link_to files_project_path(@project), :class => "files-tab tab " do + %li{ class: "#{'active' if current_page?(files_project_path(@project)) }" } + = link_to files_project_path(@project), class: "files-tab tab " do Attachments - %li{ :class => " #{'active' if (controller.controller_name == "snippets") }" } - = link_to project_snippets_path(@project), :class => "snippets-tab tab" do + %li{ class: " #{'active' if (controller.controller_name == "snippets") }" } + = link_to project_snippets_path(@project), class: "snippets-tab tab" do Snippets - if can? current_user, :admin_project, @project - %li.right{:class => "#{'active' if controller.controller_name == "deploy_keys"}"} + %li.right{class: "#{'active' if controller.controller_name == "deploy_keys"}"} = link_to project_deploy_keys_path(@project) do %span Deploy Keys - %li.right{:class => "#{'active' if controller.controller_name == "hooks" }"} + %li.right{class: "#{'active' if controller.controller_name == "hooks" }"} = link_to project_hooks_path(@project) do %span Hooks - %li.right{ :class => "#{'active' if current_page?(edit_project_path(@project)) }" } - = link_to edit_project_path(@project), :class => "stat-tab tab " do + %li.right{ class: "#{'active' if current_page?(edit_project_path(@project)) }" } + = link_to edit_project_path(@project), class: "stat-tab tab " do %i.icon-edit Edit diff --git a/app/views/projects/_refs.html.haml b/app/views/projects/_refs.html.haml index af15fbdfb3d..804b852340e 100644 --- a/app/views/projects/_refs.html.haml +++ b/app/views/projects/_refs.html.haml @@ -1,5 +1,5 @@ -= form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form" do - = select_tag "ref", grouped_options_refs, :onchange => "this.form.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.submit();", class: "project-refs-select" = hidden_field_tag :destination, destination :javascript diff --git a/app/views/projects/_show.html.haml b/app/views/projects/_show.html.haml index c6755fa730a..e8a5b00dd0e 100644 --- a/app/views/projects/_show.html.haml +++ b/app/views/projects/_show.html.haml @@ -2,9 +2,9 @@ = @project.name %br %div - %a.btn.info{:href => tree_project_ref_path(@project, @project.root_ref)} Browse code + %a.btn.info{href: tree_project_ref_path(@project, @project.root_ref)} Browse code - %a.btn{:href => project_commits_path(@project)} Commits + %a.btn{href: project_commits_path(@project)} Commits %strong.right = link_to project_path(@project) do Switch to project → @@ -13,7 +13,7 @@ .input .input-prepend %span.add-on git clone - = text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url" + = text_field_tag :project_clone, @project.url_to_repo, class: "xlarge one_click_select git_clone_url" = simple_format @project.description - unless @events.blank? diff --git a/app/views/projects/_team.html.haml b/app/views/projects/_team.html.haml index 5839346052a..175aea27ed4 100644 --- a/app/views/projects/_team.html.haml +++ b/app/views/projects/_team.html.haml @@ -5,7 +5,7 @@ %th Permissions %tbody - @project.users_projects.each do |up| - = render(:partial => 'team_members/show', :locals => {:member => up}) + = render(partial: 'team_members/show', locals: {member: up}) :javascript diff --git a/app/views/projects/create.js.haml b/app/views/projects/create.js.haml index eeefc1729c8..2f6264a15af 100644 --- a/app/views/projects/create.js.haml +++ b/app/views/projects/create.js.haml @@ -1,6 +1,6 @@ - if @project.saved? :plain - location.href = "#{project_path(@project, :notice => 'Project was successfully created.')}"; + location.href = "#{project_path(@project, notice: 'Project was successfully created.')}"; - else - if @project.git_error? location.href = "#{errors_githost_path}"; diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index eef113e002b..b8d0dad973c 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -16,7 +16,7 @@ - setup_str = ["git config --global user.name \"#{current_user.name}\"", "git config --global user.email \"#{current_user.email}\""].join("\n") = preserve do - = raw bash_lexer.highlight(setup_str, :lexer => 'bash', :options => {:encoding => 'utf-8'}) + = raw bash_lexer.highlight(setup_str, lexer: 'bash', options: {encoding: 'utf-8'}) %br %br @@ -44,4 +44,4 @@ - if can? current_user, :admin_project, @project .alert-message.block-message.error.prepend-top-20 - = link_to 'Remove project', @project, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger" + = link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger" diff --git a/app/views/projects/files.html.haml b/app/views/projects/files.html.haml index 52424ae4353..68d51df0b56 100644 --- a/app/views/projects/files.html.haml +++ b/app/views/projects/files.html.haml @@ -4,8 +4,8 @@ - @notes.each do |note| %tr %td - %a{:href => note.attachment.url} - = image_tag gravatar_icon(note.author_email), :class => "left", :width => 16 + %a{href: note.attachment.url} + = image_tag gravatar_icon(note.author_email), class: "left", width: 16 = note.attachment_identifier %td diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 7c5b11e4be0..ebd2c8e4495 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -7,23 +7,23 @@ .input-prepend.project_clone_holder %span.add-on git clone - = link_to "SSH", "#", :class => "btn small active", :"data-clone" => @project.ssh_url_to_repo - = link_to "HTTP", "#", :class => "btn small", :"data-clone" => @project.http_url_to_repo - = text_field_tag :project_clone, @project.url_to_repo, :class => "one_click_select span5" + = link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo + = link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo + = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5" .span4.right .right - if can? current_user, :download_code, @project - = link_to archive_project_repository_path(@project), :class => "btn small grouped" do + = link_to archive_project_repository_path(@project), class: "btn small grouped" do %i.icon-download-alt Download - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) - = link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small grouped" do + = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do Merge Request - if @project.issues_enabled && can?(current_user, :write_issue, @project) - = link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small grouped" do + = link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do Issue -= render "events/event_last_push", :event => @last_push += render "events/event_last_push", event: @last_push .content_list= render @events :javascript diff --git a/app/views/projects/team.html.haml b/app/views/projects/team.html.haml index 90be041479d..e8a825c741e 100644 --- a/app/views/projects/team.html.haml +++ b/app/views/projects/team.html.haml @@ -5,11 +5,11 @@ - if can? current_user, :admin_team_member, @project %p.slead - = link_to new_project_team_member_path(@project), :class => "btn small right", :title => "New Team Member" do + = link_to new_project_team_member_path(@project), class: "btn small right", title: "New Team Member" do New Team Member Read more about project permissions - %strong= link_to "here", help_permissions_path, :class => "vlink" + %strong= link_to "here", help_permissions_path, class: "vlink" -= render :partial => "team", :locals => {:project => @project} += render partial: "team", locals: {project: @project} diff --git a/app/views/projects/tree.js.haml b/app/views/projects/tree.js.haml index eb08adb1ddd..ba5d53c16a2 100644 --- a/app/views/projects/tree.js.haml +++ b/app/views/projects/tree.js.haml @@ -1,5 +1,5 @@ :plain $("#tree-holder table").hide("slide", { direction: "left" }, 150, function(){ - $("#tree-holder").html("#{escape_javascript(render(:partial => "tree", :locals => {:repo => @repo, :commit => @commit, :tree => @tree}))}"); + $("#tree-holder").html("#{escape_javascript(render(partial: "tree", locals: {repo: @repo, commit: @commit, tree: @tree}))}"); $("#tree-holder table").show("slide", { direction: "right" }, 150); }); diff --git a/app/views/projects/update.js.haml b/app/views/projects/update.js.haml index ee0d36996b5..a961dc39791 100644 --- a/app/views/projects/update.js.haml +++ b/app/views/projects/update.js.haml @@ -1,6 +1,6 @@ - if @project.valid? :plain - location.href = "#{edit_project_path(@project, :notice => 'Project was successfully updated.')}"; + location.href = "#{edit_project_path(@project, notice: 'Project was successfully updated.')}"; - else :plain $('.project_edit_holder').show(); diff --git a/app/views/projects/wall.html.haml b/app/views/projects/wall.html.haml index bd538e8f971..97765d7ac88 100644 --- a/app/views/projects/wall.html.haml +++ b/app/views/projects/wall.html.haml @@ -1,2 +1,2 @@ %div.wall_page - = render "notes/notes", :tid => nil, :tt => "wall" + = render "notes/notes", tid: nil, tt: "wall" diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml index 586d4f6341f..2b93b0a83db 100644 --- a/app/views/protected_branches/index.html.haml +++ b/app/views/protected_branches/index.html.haml @@ -1,12 +1,12 @@ = render "repositories/branches_head" .alert - %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, :class => "vlink"}. + %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}. %p This ability allows: %ul %li keep stable branches secured %li forced code review before merge to protected branches - %p Read more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"} + %p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"} - if can? current_user, :admin_project, @project = form_for [@project, @protected_branch] do |f| @@ -19,9 +19,9 @@ .entry.clearfix = f.label :name, "Branch" .span3 - = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , { :include_blank => "-- Select branch" }, { :class => "span3" }) + = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , { include_blank: "-- Select branch" }, { class: "span3" }) - = f.submit 'Protect', :class => "primary btn" + = f.submit 'Protect', class: "primary btn" - unless @branches.empty? %table.admin-table @@ -34,18 +34,18 @@ - @branches.each do |branch| %tr %td - = link_to project_commits_path(@project, :ref => branch.name) do + = link_to project_commits_path(@project, ref: branch.name) do %strong= branch.name - if branch.name == @project.root_ref %span.label default %td = link_to project_commit_path(@project, branch.commit.id) do - = truncate branch.commit.id.to_s, :length => 10 + = truncate branch.commit.id.to_s, length: 10 = time_ago_in_words(branch.commit.committed_date) ago %td - if can? current_user, :admin_project, @project - = link_to 'Unprotect', [@project, branch], :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small" + = link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "danger btn small" :javascript $('select#protected_branch_name').chosen(); diff --git a/app/views/refs/_head.html.haml b/app/views/refs/_head.html.haml index 16a0cddfa24..8825493a0ec 100644 --- a/app/views/refs/_head.html.haml +++ b/app/views/refs/_head.html.haml @@ -1,10 +1,10 @@ %ul.nav.nav-tabs %li - = form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form", :remote => true 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", remote: true do + = select_tag "ref", grouped_options_refs, onchange: "$(this.form).trigger('submit');", class: "project-refs-select" = hidden_field_tag :destination, "tree" = hidden_field_tag :path, params[:path] - %li{:class => "#{'active' if (controller.controller_name == "refs") }"} + %li{class: "#{'active' if (controller.controller_name == "refs") }"} = link_to tree_project_ref_path(@project, @ref) do Source diff --git a/app/views/refs/_submodule_item.html.haml b/app/views/refs/_submodule_item.html.haml index 6db49310a08..6b9f5877028 100644 --- a/app/views/refs/_submodule_item.html.haml +++ b/app/views/refs/_submodule_item.html.haml @@ -1,13 +1,13 @@ - url = content.url(@ref) rescue nil - name = content.basename - return unless url -%tr{ :class => "tree-item", :url => url } +%tr{ class: "tree-item", url: url } %td.tree-item-file-name = image_tag "submodule.png" - %strong= truncate(name, :length => 40) + %strong= truncate(name, length: 40) %td %code= content.id[0..10] %td - = link_to truncate(url, :length => 40), url + = link_to truncate(url, length: 40), url diff --git a/app/views/refs/_tree.html.haml b/app/views/refs/_tree.html.haml index ba0bd69116b..6f8175da7a0 100644 --- a/app/views/refs/_tree.html.haml +++ b/app/views/refs/_tree.html.haml @@ -1,7 +1,7 @@ %ul.breadcrumb %li %span.arrow - = link_to tree_project_ref_path(@project, @ref, :path => nil), :remote => true do + = link_to tree_project_ref_path(@project, @ref, path: nil), remote: true do = @project.name - tree.breadcrumbs(6) do |link| \/ @@ -10,32 +10,32 @@ %div.tree_progress #tree-content-holder - if tree.is_blob? - = render :partial => "refs/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree } + = render partial: "refs/tree_file", locals: { name: tree.name, content: tree.data, file: tree } - else - contents = tree.contents - %table#tree-slider.bordered-table.table{:class => "table_#{@hex_path}" } + %table#tree-slider.bordered-table.table{class: "table_#{@hex_path}" } %thead %th Name %th Last Update %th Last commit - = link_to "History", tree.history_path, :class => "right" + = link_to "History", tree.history_path, class: "right" - if tree.up_dir? - %tr{ :class => "tree-item", :url => tree.up_dir_path } + %tr{ class: "tree-item", url: tree.up_dir_path } %td.tree-item-file-name = image_tag "file_empty.png" - = link_to "..", tree.up_dir_path, :remote => :true + = link_to "..", tree.up_dir_path, remote: :true %td %td - index = 0 - contents.select{ |i| i.is_a?(Grit::Tree)}.each do |content| - = render :partial => "refs/tree_item", :locals => { :content => content, :index => (index += 1) } + = render partial: "refs/tree_item", locals: { content: content, index: (index += 1) } - contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content| - = render :partial => "refs/tree_item", :locals => { :content => content, :index => (index += 1) } + = render partial: "refs/tree_item", locals: { content: content, index: (index += 1) } - contents.select{ |i| i.is_a?(Grit::Submodule)}.each do |content| - = render :partial => "refs/submodule_item", :locals => { :content => content, :index => (index += 1) } + = render partial: "refs/submodule_item", locals: { content: content, index: (index += 1) } - if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }.first .file_holder#README diff --git a/app/views/refs/_tree_commit.html.haml b/app/views/refs/_tree_commit.html.haml index 2c8cd932ada..a5681aa2f61 100644 --- a/app/views/refs/_tree_commit.html.haml +++ b/app/views/refs/_tree_commit.html.haml @@ -1,3 +1,3 @@ - if tm %strong= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) -= link_to_gfm truncate(content_commit.title, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link" += link_to_gfm truncate(content_commit.title, length: tm ? 30 : 50), project_commit_path(@project, content_commit.id), class: "tree-commit-link" diff --git a/app/views/refs/_tree_file.html.haml b/app/views/refs/_tree_file.html.haml index d45a03df8aa..b5ed61bb45a 100644 --- a/app/views/refs/_tree_file.html.haml +++ b/app/views/refs/_tree_file.html.haml @@ -5,9 +5,9 @@ = name %small #{file.mode} %span.options - = link_to "raw", blob_project_ref_path(@project, @ref, :path => params[:path]), :class => "btn very_small", :target => "_blank" - = link_to "history", project_commits_path(@project, :path => params[:path], :ref => @ref), :class => "btn very_small" - = link_to "blame", blame_file_project_ref_path(@project, @ref, :path => params[:path]), :class => "btn very_small" + = link_to "raw", blob_project_ref_path(@project, @ref, path: params[:path]), class: "btn very_small", target: "_blank" + = link_to "history", project_commits_path(@project, path: params[:path], ref: @ref), class: "btn very_small" + = link_to "blame", blame_file_project_ref_path(@project, @ref, path: params[:path]), class: "btn very_small" - if file.text? - if name =~ /\.(md|markdown)$/i .file_content.wiki @@ -16,7 +16,7 @@ - else .file_content.code - unless file.empty? - %div{:class => current_user.dark_scheme ? "black" : "white"} + %div{class: current_user.dark_scheme ? "black" : "white"} = preserve do = raw file.colorize(options: { linenos: 'True'}) - else @@ -24,14 +24,14 @@ - elsif file.image? .file_content.image_file - %img{ :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"} + %img{ src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"} - else .file_content.blob_file %center - = link_to blob_project_ref_path(@project, @ref, :path => params[:path]) do + = link_to blob_project_ref_path(@project, @ref, path: params[:path]) do %div.padded %br - = image_tag "download.png", :width => 64 + = image_tag "download.png", width: 64 %h3 Download (#{file.mb_size}) diff --git a/app/views/refs/_tree_item.html.haml b/app/views/refs/_tree_item.html.haml index 4ce16b22ddd..2e6bbf6221b 100644 --- a/app/views/refs/_tree_item.html.haml +++ b/app/views/refs/_tree_item.html.haml @@ -1,11 +1,11 @@ - file = tree_full_path(content) -%tr{ :class => "tree-item #{tree_hex_class(content)}", :url => tree_file_project_ref_path(@project, @ref, file) } +%tr{ class: "tree-item #{tree_hex_class(content)}", url: tree_file_project_ref_path(@project, @ref, file) } %td.tree-item-file-name = tree_icon(content) - = link_to truncate(content.name, :length => 40), tree_file_project_ref_path(@project, @ref || @commit.id, file), :remote => :true + = link_to truncate(content.name, length: 40), tree_file_project_ref_path(@project, @ref || @commit.id, file), remote: :true %td.tree_time_ago.cgray - if index == 1 %span.log_loading Loading commit data.. - = image_tag "ajax_loader_tree.gif", :width => 14 + = image_tag "ajax_loader_tree.gif", width: 14 %td.tree_commit diff --git a/app/views/refs/blame.html.haml b/app/views/refs/blame.html.haml index 6d036c94c64..34478d4b491 100644 --- a/app/views/refs/blame.html.haml +++ b/app/views/refs/blame.html.haml @@ -4,7 +4,7 @@ %ul.breadcrumb %li %span.arrow - = link_to tree_project_ref_path(@project, @ref, :path => nil) do + = link_to tree_project_ref_path(@project, @ref, path: nil) do = @project.name - @tree.breadcrumbs(6) do |link| \/ @@ -18,9 +18,9 @@ = @tree.name %small blame %span.options - = link_to "raw", blob_project_ref_path(@project, @ref, :path => params[:path]), :class => "btn very_small", :target => "_blank" - = link_to "history", project_commits_path(@project, :path => params[:path], :ref => @ref), :class => "btn very_small" - = link_to "source", tree_file_project_ref_path(@project, @ref, :path => params[:path]), :class => "btn very_small" + = link_to "raw", blob_project_ref_path(@project, @ref, path: params[:path]), class: "btn very_small", target: "_blank" + = link_to "history", project_commits_path(@project, path: params[:path], ref: @ref), class: "btn very_small" + = link_to "source", tree_file_project_ref_path(@project, @ref, path: params[:path]), class: "btn very_small" .file_content.blame %table - @blame.each do |commit, lines| @@ -32,8 +32,8 @@ = commit.author_name %td.blame_commit - %code= link_to commit.short_id, project_commit_path(@project, :id => commit.id) - = link_to_gfm truncate(commit.title, :length => 30), project_commit_path(@project, :id => commit.id), :class => "row_title" rescue "--broken encoding" + %code= link_to commit.short_id, project_commit_path(@project, id: commit.id) + = link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, id: commit.id), class: "row_title" rescue "--broken encoding" %td.lines = preserve do %pre diff --git a/app/views/refs/logs_tree.js.haml b/app/views/refs/logs_tree.js.haml index 402f5aa72bc..61ccbaee1fe 100644 --- a/app/views/refs/logs_tree.js.haml +++ b/app/views/refs/logs_tree.js.haml @@ -6,4 +6,4 @@ :plain var row = $("table.table_#{@hex_path} tr.file_#{hexdigest(file_name)}"); row.find("td.tree_time_ago").html('#{escape_javascript(time_ago_in_words(content_commit.committed_date))} ago'); - row.find("td.tree_commit").html('#{escape_javascript(render("tree_commit", :tm => tm, :content_commit => content_commit))}'); + row.find("td.tree_commit").html('#{escape_javascript(render("tree_commit", tm: tm, content_commit: content_commit))}'); diff --git a/app/views/refs/tree.html.haml b/app/views/refs/tree.html.haml index b48f7f91782..181be6426d4 100644 --- a/app/views/refs/tree.html.haml +++ b/app/views/refs/tree.html.haml @@ -1,5 +1,5 @@ = render "head" -#tree-holder= render :partial => "tree", :locals => {:repo => @repo, :commit => @commit, :tree => @tree} +#tree-holder= render partial: "tree", locals: {repo: @repo, commit: @commit, tree: @tree} :javascript $(function() { diff --git a/app/views/refs/tree.js.haml b/app/views/refs/tree.js.haml index 9cf55057a6a..2eccf8c19a6 100644 --- a/app/views/refs/tree.js.haml +++ b/app/views/refs/tree.js.haml @@ -1,6 +1,6 @@ :plain // Load Files list - $("#tree-holder").html("#{escape_javascript(render(:partial => "tree", :locals => {:repo => @repo, :commit => @commit, :tree => @tree}))}"); + $("#tree-holder").html("#{escape_javascript(render(partial: "tree", locals: {repo: @repo, commit: @commit, tree: @tree}))}"); $("#tree-content-holder").show("slide", { direction: "right" }, 150); $('.project-refs-form #path').val("#{params[:path]}"); diff --git a/app/views/repositories/_branch.html.haml b/app/views/repositories/_branch.html.haml index b67c4026a4b..cf8558ec33e 100644 --- a/app/views/repositories/_branch.html.haml +++ b/app/views/repositories/_branch.html.haml @@ -2,20 +2,20 @@ - commit = CommitDecorator.decorate(commit) %tr %td - = link_to project_commits_path(@project, :ref => branch.name) do - %strong= truncate(branch.name, :length => 60) + = link_to project_commits_path(@project, ref: branch.name) do + %strong= truncate(branch.name, length: 60) - if branch.name == @project.root_ref %span.label default %td - = link_to project_commit_path(@project, :id => commit.id) do + = link_to project_commit_path(@project, id: commit.id) do %code= commit.short_id - = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 - = gfm truncate(commit.title, :length => 40) + = image_tag gravatar_icon(commit.author_email), class: "", width: 16 + = gfm truncate(commit.title, length: 40) %span.update-author.right = time_ago_in_words(commit.committed_date) ago %td - if can? current_user, :download_code, @project - = link_to "Download", archive_project_repository_path(@project, :ref => branch.name), :class => "visible_link download_repo_link" + = link_to "Download", archive_project_repository_path(@project, ref: branch.name), class: "visible_link download_repo_link" diff --git a/app/views/repositories/_branches_head.html.haml b/app/views/repositories/_branches_head.html.haml index 0c94f298270..6afff627b94 100644 --- a/app/views/repositories/_branches_head.html.haml +++ b/app/views/repositories/_branches_head.html.haml @@ -1,11 +1,11 @@ = render "commits/head" %ul.nav.nav-pills - %li{:class => ("active" if current_page?(project_repository_path(@project)))} + %li{class: ("active" if current_page?(project_repository_path(@project)))} = link_to project_repository_path(@project) do Recent - %li{:class => ("active" if current_page?(project_protected_branches_path(@project)))} + %li{class: ("active" if current_page?(project_protected_branches_path(@project)))} = link_to project_protected_branches_path(@project) do Protected - %li{:class => ("active" if current_page?(branches_project_repository_path(@project)))} + %li{class: ("active" if current_page?(branches_project_repository_path(@project)))} = link_to branches_project_repository_path(@project) do All diff --git a/app/views/repositories/_feed.html.haml b/app/views/repositories/_feed.html.haml index a9b9fd0069e..ac4eb483945 100644 --- a/app/views/repositories/_feed.html.haml +++ b/app/views/repositories/_feed.html.haml @@ -2,7 +2,7 @@ - commit = CommitDecorator.new(commit) %tr %td - = link_to project_commits_path(@project, :ref => commit.head.name) do + = link_to project_commits_path(@project, ref: commit.head.name) do %strong = commit.head.name - if commit.head.name == @project.root_ref @@ -12,8 +12,8 @@ %div = link_to project_commits_path(@project, commit.id) do %code= commit.short_id - = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 - = gfm truncate(commit.title, :length => 40) + = image_tag gravatar_icon(commit.author_email), class: "", width: 16 + = gfm truncate(commit.title, length: 40) %td %span.right.cgray = time_ago_in_words(commit.committed_date) diff --git a/app/views/repositories/branches.html.haml b/app/views/repositories/branches.html.haml index f4cf9193e34..45004bdff43 100644 --- a/app/views/repositories/branches.html.haml +++ b/app/views/repositories/branches.html.haml @@ -9,4 +9,4 @@ %tbody - @branches.each do |branch| - = render "repositories/branch", :branch => branch + = render "repositories/branch", branch: branch diff --git a/app/views/repositories/show.html.haml b/app/views/repositories/show.html.haml index add3324e060..a09cdd6212b 100644 --- a/app/views/repositories/show.html.haml +++ b/app/views/repositories/show.html.haml @@ -7,5 +7,5 @@ %th Last commit %th - @activities.each do |update| - = render "repositories/branch", :branch => update.head + = render "repositories/branch", branch: update.head diff --git a/app/views/repositories/tags.html.haml b/app/views/repositories/tags.html.haml index 8db6c5383cb..7fc2c3bfd2f 100644 --- a/app/views/repositories/tags.html.haml +++ b/app/views/repositories/tags.html.haml @@ -12,12 +12,12 @@ - commit = CommitDecorator.decorate(commit) %tr %td - %strong= link_to tag.name, project_commits_path(@project, :ref => tag.name), :class => "" + %strong= link_to tag.name, project_commits_path(@project, ref: tag.name), class: "" %td = link_to project_commit_path(@project, commit.id) do %code= commit.short_id - = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 - = gfm truncate(commit.title, :length => 40) + = image_tag gravatar_icon(commit.author_email), class: "", width: 16 + = gfm truncate(commit.title, length: 40) %td %span.update-author.right = time_ago_in_words(commit.committed_date) @@ -25,7 +25,7 @@ %td - if can? current_user, :download_code, @project - = link_to "Download", archive_project_repository_path(@project, :ref => tag.name), :class => "visible_link download_repo_link" + = link_to "Download", archive_project_repository_path(@project, ref: tag.name), class: "visible_link download_repo_link" - else %h3 No tags diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index b93a03af2f1..ed9da1f0753 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -1,10 +1,10 @@ -= form_tag search_path, :method => :get do |f| += form_tag search_path, method: :get do |f| .padded = label_tag :search do %strong Looking for .input - = text_field_tag :search, params[:search], :placeholder => "issue 143", :class => "input-xxlarge", :id => "dashboard_search" - = submit_tag 'Search', :class => "btn btn-primary" + = text_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge", id: "dashboard_search" + = submit_tag 'Search', class: "btn btn-primary" - if params[:search].present? %br %h3 @@ -41,7 +41,7 @@ = link_to [merge_request.project, merge_request] do %span.badge.badge-info ##{merge_request.id} – - %strong.term= truncate merge_request.title, :length => 50 + %strong.term= truncate merge_request.title, length: 50 %strong.right %span.label= merge_request.project.name - if @merge_requests.blank? @@ -59,7 +59,7 @@ = link_to [issue.project, issue] do %span.badge.badge-info ##{issue.id} – - %strong.term= truncate issue.title, :length => 40 + %strong.term= truncate issue.title, length: 40 %strong.right %span.label= issue.project.name - if @issues.blank? diff --git a/app/views/snippets/_form.html.haml b/app/views/snippets/_form.html.haml index c9128f642fc..b8d8c09849d 100644 --- a/app/views/snippets/_form.html.haml +++ b/app/views/snippets/_form.html.haml @@ -10,22 +10,22 @@ .clearfix = f.label :title - .input= f.text_field :title, :placeholder => "Example Snippet" + .input= f.text_field :title, placeholder: "Example Snippet" .clearfix = f.label :file_name - .input= f.text_field :file_name, :placeholder => "example.rb" + .input= f.text_field :file_name, placeholder: "example.rb" .clearfix = f.label "Lifetime" - .input= f.select :expires_at, lifetime_select_options, {}, :style => "width:200px;" + .input= f.select :expires_at, lifetime_select_options, {}, style: "width:200px;" .clearfix = f.label :content, "Code" - .input= f.text_area :content, :class => "span8" + .input= f.text_area :content, class: "span8" .actions - = f.submit 'Save', :class => "primary btn" - = link_to "Cancel", project_snippets_path(@project), :class => " btn" + = f.submit 'Save', class: "primary btn" + = link_to "Cancel", project_snippets_path(@project), class: " btn" - unless @snippet.new_record? - .right= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "btn right danger delete-snippet", :id => "destroy_snippet_#{@snippet.id}" + .right= link_to 'Destroy', [@project, @snippet], confirm: 'Are you sure?', method: :delete, class: "btn right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}" diff --git a/app/views/snippets/_snippet.html.haml b/app/views/snippets/_snippet.html.haml index 0385d753207..a2d3a65e6cb 100644 --- a/app/views/snippets/_snippet.html.haml +++ b/app/views/snippets/_snippet.html.haml @@ -1,7 +1,7 @@ %tr %td - %a{:href => project_snippet_path(snippet.project, snippet)} - %strong= truncate(snippet.title, :length => 60) + %a{href: project_snippet_path(snippet.project, snippet)} + %strong= truncate(snippet.title, length: 60) %td = snippet.file_name %td diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml index a6b07716ccb..2d07921e879 100644 --- a/app/views/snippets/index.html.haml +++ b/app/views/snippets/index.html.haml @@ -2,7 +2,7 @@ - if can? current_user, :write_snippet, @project .alert-message.block-message - = link_to new_project_snippet_path(@project), :class => "btn small add_new right", :title => "New Snippet" do + = link_to new_project_snippet_path(@project), class: "btn small add_new right", title: "New Snippet" do Add new snippet Share code pastes with others if it cant be in a git repository %br @@ -17,5 +17,5 @@ = render @snippets.fresh - if @snippets.fresh.empty? %tr - %td{:colspan => 3} + %td{colspan: 3} %h3.nothing_here_message Nothing here. diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index b266e4d2156..0800b81d330 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -4,7 +4,7 @@ = @snippet.title %small= @snippet.file_name - if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user - = link_to "Edit", edit_project_snippet_path(@project, @snippet), :class => "btn small right" + = link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn small right" %br .file_holder @@ -12,9 +12,9 @@ %i.icon-file %strong= @snippet.file_name %span.options - = link_to "raw", raw_project_snippet_path(@project, @snippet), :class => "btn very_small", :target => "_blank" + = link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn very_small", target: "_blank" .file_content.code - %div{:class => current_user.dark_scheme ? "black" : ""} + %div{class: current_user.dark_scheme ? "black" : ""} = raw @snippet.colorize(options: { linenos: 'True'}) -= render "notes/notes", :tid => @snippet.id, :tt => "snippet" += render "notes/notes", tid: @snippet.id, tt: "snippet" diff --git a/app/views/team_members/_form.html.haml b/app/views/team_members/_form.html.haml index 1d882e295d9..208794b9ee2 100644 --- a/app/views/team_members/_form.html.haml +++ b/app/views/team_members/_form.html.haml @@ -1,6 +1,6 @@ %h3= "New Team member" %hr -= form_for @team_member, :as => :team_member, :url => project_team_members_path(@project, @team_member) do |f| += form_for @team_member, as: :team_member, url: project_team_members_path(@project, @team_member) do |f| -if @team_member.errors.any? .alert-message.block-message.error %ul @@ -9,17 +9,17 @@ .clearfix = f.label :user_id, "Name" - .input= f.select(:user_id, User.not_in_project(@project).all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }, { :style => "width:300px" }) + .input= f.select(:user_id, User.not_in_project(@project).all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, { style: "width:300px" }) .clearfix = f.label :project_access, "Project Access" - .input= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select" + .input= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select" .actions - = f.submit 'Save', :class => "btn primary" - = link_to "Cancel", team_project_path(@project), :class => "btn" + = f.submit 'Save', class: "btn primary" + = link_to "Cancel", team_project_path(@project), class: "btn" :css form select { diff --git a/app/views/team_members/_show.html.haml b/app/views/team_members/_show.html.haml index 9f023c416ae..f47554c1dad 100644 --- a/app/views/team_members/_show.html.haml +++ b/app/views/team_members/_show.html.haml @@ -1,6 +1,6 @@ - user = member.user - allow_admin = can? current_user, :admin_project, @project -%tr{:id => dom_id(member), :class => "team_member_row user_#{user.id}"} +%tr{id: dom_id(member), class: "team_member_row user_#{user.id}"} %td .right - if @project.owner == user @@ -8,13 +8,13 @@ - if user.blocked %span.label Blocked - = link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do - = image_tag gravatar_icon(user.email, 40), :class => "avatar" - = link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do - %strong= truncate(user.name, :lenght => 40) + = link_to project_team_member_path(@project, member), title: user.name, class: "dark" do + = image_tag gravatar_icon(user.email, 40), class: "avatar" + = link_to project_team_member_path(@project, member), title: user.name, class: "dark" do + %strong= truncate(user.name, lenght: 40) %br %div.cgray= user.email %td - = form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f| - = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, :class => "medium project-access-select", :disabled => !allow_admin + = form_for(member, as: :team_member, url: project_team_member_path(@project, member)) do |f| + = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select", disabled: !allow_admin diff --git a/app/views/team_members/show.html.haml b/app/views/team_members/show.html.haml index bcdb5c6f90e..d7e09bced63 100644 --- a/app/views/team_members/show.html.haml +++ b/app/views/team_members/show.html.haml @@ -3,9 +3,9 @@ .team_member_show - if can? current_user, :admin_project, @project - = link_to 'Remove from team', project_team_member_path(:project_id => @project, :id => @team_member.id), :confirm => 'Are you sure?', :method => :delete, :class => "right btn btn-danger" + = link_to 'Remove from team', project_team_member_path(project_id: @project, id: @team_member.id), confirm: 'Are you sure?', method: :delete, class: "right btn btn-danger" .profile_avatar_holder - = image_tag gravatar_icon(user.email, 60), :class => "borders" + = image_tag gravatar_icon(user.email, 60), class: "borders" %h3 = user.name %small @@ -14,7 +14,7 @@ %hr .back_link %br - = link_to team_project_path(@project), :class => "" do + = link_to team_project_path(@project), class: "" do ← To team list %br .row @@ -46,10 +46,10 @@ %tr %td Project Access: - %small (#{link_to "read more", help_permissions_path, :class => "vlink"}) + %small (#{link_to "read more", help_permissions_path, class: "vlink"}) %td - = form_for(@team_member, :as => :team_member, :url => project_team_member_path(@project, @team_member)) do |f| - = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select", :disabled => !allow_admin + = form_for(@team_member, as: :team_member, url: project_team_member_path(@project, @team_member)) do |f| + = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select", disabled: !allow_admin %hr = render user.recent_events.limit(5) :javascript diff --git a/app/views/wikis/_form.html.haml b/app/views/wikis/_form.html.haml index 20b5b112819..6b6411be55b 100644 --- a/app/views/wikis/_form.html.haml +++ b/app/views/wikis/_form.html.haml @@ -9,7 +9,7 @@ .main_box .top_box_content = f.label :title - .input= f.text_field :title, :class => 'span8' + .input= f.text_field :title, class: 'span8' = f.hidden_field :slug .middle_box_content .input @@ -20,7 +20,7 @@ .bottom_box_content = f.label :content - .input= f.text_area :content, :class => 'span8' + .input= f.text_area :content, class: 'span8' .actions - = f.submit 'Save', :class => "primary btn" - = link_to "Cancel", project_wiki_path(@project, :index), :class => "btn" + = f.submit 'Save', class: "primary btn" + = link_to "Cancel", project_wiki_path(@project, :index), class: "btn" diff --git a/app/views/wikis/history.html.haml b/app/views/wikis/history.html.haml index f82c681fcde..e31c5dc2426 100644 --- a/app/views/wikis/history.html.haml +++ b/app/views/wikis/history.html.haml @@ -13,7 +13,7 @@ %tr %td= i + 1 %td - = link_to wiki_page.created_at.to_s(:short), project_wiki_path(@project, wiki_page, :old_page_id => wiki_page.id) + = link_to wiki_page.created_at.to_s(:short), project_wiki_path(@project, wiki_page, old_page_id: wiki_page.id) (#{time_ago_in_words(wiki_page.created_at)} ago) %td= wiki_page.user.name diff --git a/app/views/wikis/pages.html.haml b/app/views/wikis/pages.html.haml index c84621193d5..2bfd0deb149 100644 --- a/app/views/wikis/pages.html.haml +++ b/app/views/wikis/pages.html.haml @@ -10,7 +10,7 @@ - @wikis.each_with_index do |wiki_page, i| %tr %td - = link_to wiki_page.title, project_wiki_path(@project, wiki_page, :old_page_id => wiki_page.id) + = link_to wiki_page.title, project_wiki_path(@project, wiki_page, old_page_id: wiki_page.id) (#{time_ago_in_words(wiki_page.created_at)} ago) %td= wiki_page.slug diff --git a/app/views/wikis/show.html.haml b/app/views/wikis/show.html.haml index 579aeb41796..fc2352271d5 100644 --- a/app/views/wikis/show.html.haml +++ b/app/views/wikis/show.html.haml @@ -1,12 +1,12 @@ %h3.page_title = @wiki.title %span.right - = link_to pages_project_wikis_path(@project), :class => "btn small grouped" do + = link_to pages_project_wikis_path(@project), class: "btn small grouped" do Pages - if can? current_user, :write_wiki, @project - = link_to history_project_wiki_path(@project, @wiki), :class => "btn small grouped" do + = link_to history_project_wiki_path(@project, @wiki), class: "btn small grouped" do History - = link_to edit_project_wiki_path(@project, @wiki), :class => "btn small grouped" do + = link_to edit_project_wiki_path(@project, @wiki), class: "btn small grouped" do %i.icon-edit Edit %br @@ -17,8 +17,8 @@ %p.time Last edited by #{@wiki.user.name}, #{time_ago_in_words @wiki.created_at} ago - if can? current_user, :admin_wiki, @project - = link_to project_wiki_path(@project, @wiki), :confirm => "Are you sure you want to delete this page?", :method => :delete do + = link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete do Delete this page %hr -.wiki_notes#notes= render "notes/notes", :tid => @wiki.id, :tt => "wiki" +.wiki_notes#notes= render "notes/notes", tid: @wiki.id, tt: "wiki" |