Commit 033aa1a8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

refactor buttons pt1

parent 9fdbdc66
......@@ -7,11 +7,7 @@
color: #333;
}
&.btn-white {
background: #FFF;
}
&.primary {
&.btn-primary {
background: #2a79A3;
@include linear-gradient(#47A7b7, #2585b5);
border-color: #2A79A3;
......@@ -58,21 +54,17 @@
}
}
&.save-btn {
&.btn-create {
@extend .wide;
@extend .primary;
}
&.cancel-btn {
float: right;
@extend .success;
}
&.wide {
padding-left: 30px;
padding-right: 30px;
&.btn-save {
@extend .wide;
@extend .btn-primary;
}
&.danger {
&.btn-remove {
@extend .btn-danger;
border-color: #BD362F;
......@@ -82,8 +74,13 @@
}
}
&.danger {
@extend .btn-danger;
&.btn-cancel {
float: right;
}
&.wide {
padding-left: 20px;
padding-right: 20px;
}
&.small {
......
......@@ -214,9 +214,11 @@ ul.notes {
* Note Form
*/
.comment-btn,
.comment-btn {
@extend .create-btn;
}
.reply-btn {
@extend .save-btn;
@extend .primary;
}
.file .content tr.line_holder:hover > td { background: $hover !important; }
.file .content tr.line_holder:hover > td .line_note_link {
......
......@@ -24,5 +24,5 @@
%li It will change the git path to repositories under this group.
.form-actions
= f.submit 'Rename group', class: "btn danger"
= link_to 'Cancel', admin_groups_path, class: "btn cancel-btn"
= f.submit 'Rename group', class: "btn btn-remove"
= link_to 'Cancel', admin_groups_path, class: "btn btn-cancel"
......@@ -8,7 +8,7 @@
%br
= form_tag admin_groups_path, method: :get, class: 'form-inline' do
= text_field_tag :name, params[:name], class: "xlarge"
= submit_tag "Search", class: "btn submit primary"
= submit_tag "Search", class: "btn submit btn-primary"
%table
%thead
......@@ -31,5 +31,5 @@
= link_to group.owner_name, admin_user_path(group.owner_id)
%td.bgred
= link_to 'Rename', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn small"
= link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn small danger"
= link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn small btn-remove"
= paginate @groups, theme: "admin"
......@@ -10,7 +10,7 @@
.input
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
 
= f.submit 'Create group', class: "btn primary"
= f.submit 'Create group', class: "btn btn-primary"
%hr
.padded
%ul
......
......@@ -42,7 +42,7 @@
= form_for [:admin, @group] do |f|
= f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'}
%div
= f.submit 'Change Owner', class: "btn danger"
= f.submit 'Change Owner', class: "btn btn-remove"
= link_to "Cancel", "#", class: "btn change-owner-cancel-link"
- if @group.projects.any?
......@@ -63,7 +63,7 @@
%span.monospace= project.path_with_namespace + ".git"
%td= project.users.count
%td.bgred
= link_to 'Transfer project to global namespace', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Remove project from group and move to global namespace. Are you sure?', method: :delete, class: "btn danger small"
= link_to 'Transfer project to global namespace', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Remove project from group and move to global namespace. Are you sure?', method: :delete, class: "btn btn-remove small"
= form_tag project_teams_update_admin_group_path(@group), id: "new_team_member", class: "bulk_import", method: :put do
%table.zebra-striped
......@@ -88,7 +88,7 @@
%td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"}
%tr
%td= submit_tag 'Add user to projects in group', class: "btn primary"
%td= submit_tag 'Add user to projects in group', class: "btn btn-primary"
%td
Read more about project permissions
%strong= link_to "here", help_permissions_path, class: "vlink"
......@@ -110,7 +110,7 @@
.input
= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
.form-actions
= submit_tag 'Add', class: "btn primary"
= submit_tag 'Add', class: "btn btn-primary"
:javascript
$(function(){
......
......@@ -15,7 +15,7 @@
.input
= f.text_field :url, class: "text_field xxlarge"
 
= f.submit "Add System Hook", class: "btn primary"
= f.submit "Add System Hook", class: "btn btn-primary"
%hr
-if @hooks.any?
......
......@@ -65,8 +65,8 @@
.actions
= f.submit 'Save Project', class: "btn save-btn"
= link_to 'Cancel', admin_projects_path, class: "btn cancel-btn"
= f.submit 'Save Project', class: "btn btn-save"
= link_to 'Cancel', admin_projects_path, class: "btn btn-cancel"
......
......@@ -37,7 +37,7 @@
.form-actions
= submit_tag "Search", class: "btn submit primary"
= submit_tag "Search", class: "btn submit btn-primary"
= link_to "Reset", admin_projects_path, class: "btn"
.span8
.ui-box
......@@ -53,7 +53,7 @@
= link_to project.name_with_namespace, [:admin, project]
.right
= link_to 'Edit', edit_admin_project_path(project), id: "edit_#{dom_id(project)}", class: "btn small"
= link_to 'Destroy', [:admin, project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn small danger"
= link_to 'Destroy', [:admin, project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn small btn-remove"
- if @projects.blank?
%p.nothing_here_message 0 projects matches
- else
......
......@@ -12,5 +12,5 @@
%br
.actions
= f.submit 'Save', class: "btn primary"
= f.submit 'Save', class: "btn btn-primary"
= link_to 'Cancel', :back, class: "btn"
......@@ -130,7 +130,7 @@
= link_to tm.name, admin_user_path(tm)
%td= @project.project_access_human(tm)
%td= link_to 'Edit Access', edit_admin_project_member_path(@project, tm), class: "btn small"
%td= link_to 'Remove from team', admin_project_member_path(@project, tm), confirm: 'Are you sure?', method: :delete, class: "btn danger small"
%td= link_to 'Remove from team', admin_project_member_path(@project, tm), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove small"
%br
%h5 Add new team member
......@@ -147,7 +147,7 @@
%td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"}
%tr
%td= submit_tag 'Add', class: "btn primary"
%td= submit_tag 'Add', class: "btn btn-primary"
%td
Read more about project permissions
%strong= link_to "here", help_permissions_path, class: "vlink"
......@@ -19,5 +19,5 @@
%li It will change web url for access team and team projects.
.form-actions
= f.submit 'Rename team', class: "btn danger"
= link_to 'Cancel', admin_teams_path, class: "btn cancel-btn"
= f.submit 'Rename team', class: "btn btn-remove"
= link_to 'Cancel', admin_teams_path, class: "btn btn-cancel"
......@@ -8,7 +8,7 @@
= form_tag admin_teams_path, method: :get, class: 'form-inline' do
= text_field_tag :name, params[:name], class: "xlarge"
= submit_tag "Search", class: "btn submit primary"
= submit_tag "Search", class: "btn submit btn-primary"
%table
%thead
......@@ -33,6 +33,6 @@
= link_to team.owner.name, admin_user_path(team.owner_id)
%td.bgred
= link_to 'Rename', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn small"
= link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn small danger"
= link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn small btn-remove"
= paginate @teams, theme: "admin"
......@@ -16,5 +16,5 @@
%br
.actions
= submit_tag 'Save', class: "btn primary"
= submit_tag 'Save', class: "btn btn-primary"
= link_to 'Cancel', :back, class: "btn"
......@@ -26,4 +26,4 @@
%td
%span= check_box_tag :group_admin
%span Admin?
%td= submit_tag 'Add', class: "btn primary", id: :add_members_to_team
%td= submit_tag 'Add', class: "btn btn-primary", id: :add_members_to_team
......@@ -10,7 +10,7 @@
.input
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
 
= f.submit 'Create team', class: "btn primary"
= f.submit 'Create team', class: "btn btn-primary"
%hr
.padded
%ul
......
......@@ -12,5 +12,5 @@
%br
.actions
= submit_tag 'Save', class: "btn primary"
= submit_tag 'Save', class: "btn btn-primary"
= link_to 'Cancel', :back, class: "btn"
......@@ -20,4 +20,4 @@
%tr
%td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
%td= select_tag :greatest_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
%td= submit_tag 'Add', class: "btn primary", id: :assign_projects_to_team
%td= submit_tag 'Add', class: "btn btn-primary", id: :assign_projects_to_team
......@@ -36,13 +36,13 @@
= form_for @team, url: admin_team_path(@team) do |f|
= f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'}
%div
= f.submit 'Change Owner', class: "btn danger"
= f.submit 'Change Owner', class: "btn btn-remove"
= link_to "Cancel", "#", class: "btn change-owner-cancel-link"
%fieldset
%legend
Members (#{@team.members.count})
%span= link_to 'Add members', new_admin_team_member_path(@team), class: "btn success small right", id: :add_members_to_team
%span= link_to 'Add members', new_admin_team_member_path(@team), class: "btn btn-primary small right", id: :add_members_to_team
- if @team.members.any?
%table#members_list
%thead
......@@ -62,12 +62,12 @@
%td.bgred
= link_to 'Edit', edit_admin_team_member_path(@team, member), class: "btn small"
 
= link_to 'Remove', admin_team_member_path(@team, member), confirm: 'Remove member from team. Are you sure?', method: :delete, class: "btn danger small", id: "remove_member_#{member.id}"
= link_to 'Remove', admin_team_member_path(@team, member), confirm: 'Remove member from team. Are you sure?', method: :delete, class: "btn btn-remove small", id: "remove_member_#{member.id}"
%fieldset
%legend
Projects (#{@team.projects.count})
%span= link_to 'Add projects', new_admin_team_project_path(@team), class: "btn success small right", id: :assign_projects_to_team
%span= link_to 'Add projects', new_admin_team_project_path(@team), class: "btn btn-primary small right", id: :assign_projects_to_team
- if @team.projects.any?
%table#projects_list
%thead
......@@ -84,7 +84,7 @@
%td.bgred
= link_to 'Edit', edit_admin_team_project_path(@team, project), class: "btn small"
 
= link_to 'Relegate', admin_team_project_path(@team, project), confirm: 'Remove project from team. Are you sure?', method: :delete, class: "btn danger small", id: "relegate_project_#{project.id}"
= link_to 'Relegate', admin_team_project_path(@team, project), confirm: 'Remove project from team. Are you sure?', method: :delete, class: "btn btn-remove small", id: "relegate_project_#{project.id}"
:javascript
$(function(){
......
......@@ -66,7 +66,7 @@
= link_to 'Unblock User', unblock_admin_user_path(@admin_user), method: :put, class: "btn small"
- else
%p Blocked users will be removed from all projects & will not be able to login to GitLab.
= link_to 'Block User', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger"
= link_to 'Block User', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small btn-remove"
%fieldset
%legend Profile
.clearfix
......@@ -80,8 +80,8 @@
.input= f.text_field :twitter
.actions
= f.submit 'Save', class: "btn save-btn"
= f.submit 'Save', class: "btn btn-save"
- if @admin_user.new_record?
= link_to 'Cancel', admin_users_path, class: "btn cancel-btn"
= link_to 'Cancel', admin_users_path, class: "btn btn-cancel"
- else
= link_to 'Cancel', admin_user_path(@admin_user), class: "btn cancel-btn"
= link_to 'Cancel', admin_user_path(@admin_user), class: "btn btn-cancel"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment