summaryrefslogtreecommitdiff
path: root/app/views/admin
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/dashboard/index.html.haml8
-rw-r--r--app/views/admin/hooks/index.html.haml12
-rw-r--r--app/views/admin/projects/_form.html.haml12
-rw-r--r--app/views/admin/projects/edit.html.haml2
-rw-r--r--app/views/admin/projects/index.html.haml16
-rw-r--r--app/views/admin/projects/new.html.haml2
-rw-r--r--app/views/admin/projects/show.html.haml20
-rw-r--r--app/views/admin/resque/show.html.haml2
-rw-r--r--app/views/admin/team_members/_form.html.haml8
-rw-r--r--app/views/admin/users/_form.html.haml20
-rw-r--r--app/views/admin/users/index.html.haml34
-rw-r--r--app/views/admin/users/show.html.haml22
12 files changed, 79 insertions, 79 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 {