Skip to content
Snippets Groups Projects
Commit 033aa1a8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

refactor buttons pt1

parent 9fdbdc66
No related branches found
No related tags found
2 merge requests!2940Expanding repos and hooks paths in settings,!2770Capistrano deploy
Showing
with 53 additions and 54 deletions
Loading
Loading
@@ -7,11 +7,7 @@
color: #333;
}
 
&.btn-white {
background: #FFF;
}
&.primary {
&.btn-primary {
background: #2a79A3;
@include linear-gradient(#47A7b7, #2585b5);
border-color: #2A79A3;
Loading
Loading
@@ -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;
 
Loading
Loading
@@ -82,8 +74,13 @@
}
}
 
&.danger {
@extend .btn-danger;
&.btn-cancel {
float: right;
}
&.wide {
padding-left: 20px;
padding-right: 20px;
}
 
&.small {
Loading
Loading
Loading
Loading
@@ -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 {
Loading
Loading
Loading
Loading
@@ -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"
Loading
Loading
@@ -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
Loading
Loading
@@ -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"
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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?
Loading
Loading
@@ -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
Loading
Loading
@@ -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"
Loading
Loading
@@ -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(){
Loading
Loading
Loading
Loading
@@ -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?
Loading
Loading
Loading
Loading
@@ -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"
 
 
 
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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"
Loading
Loading
@@ -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
Loading
Loading
@@ -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"
Loading
Loading
@@ -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"
Loading
Loading
@@ -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
Loading
Loading
@@ -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"
Loading
Loading
@@ -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"
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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"
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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(){
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment