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

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"
......@@ -5,7 +5,7 @@
= form_tag admin_users_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"
%ul.nav.nav-tabs
%li{class: "#{'active' unless params[:filter]}"}
= link_to admin_users_path do
......@@ -52,7 +52,7 @@
- if user.blocked
= 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"
= 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 btn-remove"
= link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn small btn-remove"
= paginate @admin_users, theme: "admin"
......@@ -86,7 +86,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"
......@@ -124,4 +124,4 @@
%td= link_to project.name_with_namespace, admin_project_path(project)
%td= tm.project_access_human
%td= link_to 'Edit Access', edit_admin_project_member_path(project, tm.user), class: "btn small"
%td= link_to 'Remove from team', admin_project_member_path(project, tm.user), confirm: 'Are you sure?', method: :delete, class: "btn small danger"
%td= link_to 'Remove from team', admin_project_member_path(project, tm.user), confirm: 'Are you sure?', method: :delete, class: "btn small btn-remove"
......@@ -13,7 +13,7 @@
%ul.dropdown-menu
%li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch)
%li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff)
= link_to project_tree_path(@project, @commit), class: "btn primary grouped" do
= link_to project_tree_path(@project, @commit), class: "btn btn-primary grouped" do
%span Browse Code »
%h3.commit-title.page_title
= gfm escape_once(@commit.title)
......
......@@ -19,7 +19,7 @@
= text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
.pull-left
 
= submit_tag "Compare", class: "btn primary wide commits-compare-btn"
= submit_tag "Compare", class: "btn btn-primary wide commits-compare-btn"
- if @refs_are_same
.alert
%span Refs are the same
......
......@@ -6,7 +6,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 btn-primary" do
New Project »
- else
If you will be added to project - it will be displayed here
......@@ -18,6 +18,6 @@
= link_to "here", help_ssh_path
.actions
= f.submit 'Save', class: "save-btn btn"
= link_to "Cancel", project_deploy_keys_path(@project), class: "btn cancel-btn"
= f.submit 'Save', class: "btn-save btn"
= link_to "Cancel", project_deploy_keys_path(@project), class: "btn btn-cancel"
......@@ -8,5 +8,5 @@
%div
= f.password_field :password_confirmation, class: "text bottom", placeholder: "Confirm new password"
%div
= f.submit "Change my password", class: "btn primary"
= f.submit "Change my password", class: "btn btn-primary"
.right= render partial: "devise/shared/links"
......@@ -4,6 +4,6 @@
<%= f.email_field :email, :placeholder => "Email", :class => "text" %>
<br/>
<br/>
<%= f.submit "Reset password", :class => "primary btn" %>
<%= f.submit "Reset password", :class => "btn-primary btn" %>
<div class="right"> <%= link_to "Sign in", new_session_path(resource_name), :class => "btn" %><br /></div>
<% end %>
......@@ -12,7 +12,7 @@
%div
= f.password_field :password_confirmation, :class => "text bottom", :placeholder => "Confirm password", :required => true
%div
= f.submit "Sign up", :class => "primary btn wide"
= f.submit "Sign up", :class => "btn-primary btn wide"
%br
%hr
= link_to "Sign in", new_session_path(resource_name)
......
......@@ -3,11 +3,11 @@
= text_field_tag :username, nil, {:class => "text top", :placeholder => "LDAP Login"}
= password_field_tag :password, nil, {:class => "text bottom", :placeholder => "Password"}
%br/
= submit_tag "LDAP Sign in", :class => "primary btn"
= submit_tag "LDAP Sign in", :class => "btn-primary btn"
- if devise_mapping.omniauthable?
- (resource_class.omniauth_providers - [:ldap]).each do |provider|
%hr/
= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), :class => "btn primary"
= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), :class => "btn btn-primary"
%br/
%hr/
%a#other_form_toggle{:href => "#", :onclick => "javascript:$('#new_user').toggle();"} Other Sign in
......@@ -24,6 +24,6 @@
= f.check_box :remember_me
%span Remember me
%br/
= f.submit "Sign in", :class => "primary btn"
= f.submit "Sign in", :class => "btn-primary btn"
.right
= render :partial => "devise/shared/links"
......@@ -11,7 +11,7 @@
= f.check_box :remember_me
%span Remember me
%br/
= f.submit "Sign in", :class => "primary btn wide"
= f.submit "Sign in", :class => "btn-primary btn wide"
.right
= link_to "Forgot your password?", new_password_path(resource_name), :class => "btn"
%br/
......
......@@ -14,5 +14,5 @@
.form-actions
= hidden_field_tag :redirect_to, people_group_path(@group)
= f.submit 'Add', class: "btn save-btn"
= f.submit 'Add', class: "btn btn-save"
......@@ -14,5 +14,5 @@
.form-actions
= hidden_field_tag :redirect_to, people_group_path(@group, project_id: @project.id)
= f.submit 'Add', class: "btn save-btn"
= f.submit 'Add', class: "btn btn-save"
......@@ -10,7 +10,7 @@
.input
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
&nbsp;
= f.submit 'Create group', class: "btn primary"
= f.submit 'Create group', class: "btn btn-primary"
%hr
.padded
%ul
......
......@@ -4,6 +4,6 @@
%strong Looking for
.input
= search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search"
= submit_tag 'Search', class: "btn primary wide"
= submit_tag 'Search', class: "btn btn-primary wide"
- if params[:search].present?
= render 'search/result'
......@@ -18,7 +18,7 @@
.input
= f.text_field :url, class: "text_field xxlarge"
&nbsp;
= f.submit "Add Web Hook", class: "btn primary"
= f.submit "Add Web Hook", class: "btn btn-primary"
%hr
-if @hooks.any?
......
......@@ -44,12 +44,12 @@
.actions
- if @issue.new_record?
= f.submit 'Submit new issue', class: "btn success"
= f.submit 'Submit new issue', class: "btn btn-create"
-else
= f.submit 'Save changes', class: "save-btn btn"
= f.submit 'Save changes', class: "btn-save btn"
- cancel_path = @issue.new_record? ? project_issues_path(@project) : project_issue_path(@project, @issue)
= link_to "Cancel", cancel_path, class: 'btn cancel-btn'
= link_to "Cancel", cancel_path, class: 'btn btn-cancel'
......
......@@ -6,7 +6,7 @@
.right
.span5
- if can? current_user, :write_issue, @project
= link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "right btn primary", title: "New Issue", id: "new_issue_link" do
= link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "right btn btn-primary", title: "New Issue", id: "new_issue_link" do
%i.icon-plus
New Issue
= form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: :right do
......@@ -33,7 +33,7 @@
= select_tag('update[milestone_id]', options_from_collection_for_select(issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
= hidden_field_tag 'update[issues_ids]', []
= hidden_field_tag :status, params[:status]
= button_tag "Save", class: "btn update_selected_issues btn-small save-btn"
= button_tag "Save", class: "btn update_selected_issues btn-small btn-save"
.issues_filters
= form_tag project_issues_path(@project), method: :get do
= select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
......
......@@ -19,6 +19,6 @@
.actions
= f.submit 'Save', class: "btn save-btn"
= link_to "Cancel", keys_path, class: "btn cancel-btn"
= f.submit 'Save', class: "btn btn-save"
= link_to "Cancel", keys_path, class: "btn btn-cancel"
......@@ -8,5 +8,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 btn-remove delete-key right"
......@@ -11,4 +11,4 @@
%pre= @key.key
.right
= 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 btn-remove delete-key"
......@@ -51,19 +51,19 @@
.form-actions
- if @merge_request.new_record?
= f.submit 'Submit merge request', class: "btn success"
= f.submit 'Submit merge request', class: "btn btn-create"
-else
= f.submit 'Save changes', class: "save-btn btn"
= f.submit 'Save changes', class: "btn btn-save"
- if @merge_request.new_record?
= link_to project_merge_requests_path(@project), class: "btn cancel-btn" do
= link_to project_merge_requests_path(@project), class: "btn btn-cancel" do
Cancel
- else
= link_to project_merge_request_path(@project, @merge_request), class: "btn cancel-btn" do
= link_to project_merge_request_path(@project, @merge_request), class: "btn btn-cancel" do
Cancel
:javascript
$(function(){
disableButtonIfEmptyField("#merge_request_title", ".save-btn");
disableButtonIfEmptyField("#merge_request_title", ".btn-save");
var source_branch = $("#merge_request_source_branch")
, target_branch = $("#merge_request_target_branch");
......
- if can? current_user, :write_merge_request, @project
= link_to new_project_merge_request_path(@project), class: "right btn primary", title: "New Merge Request" do
= link_to new_project_merge_request_path(@project), class: "right btn btn-primary", title: "New Merge Request" do
%i.icon-plus
New Merge Request
%h3.page_title
......
......@@ -32,16 +32,16 @@
.form-actions
- if @milestone.new_record?
= f.submit 'Create milestone', class: "save-btn btn"
= link_to "Cancel", project_milestones_path(@project), class: "btn cancel-btn"
= f.submit 'Create milestone', class: "btn-save btn"
= link_to "Cancel", project_milestones_path(@project), class: "btn btn-cancel"
-else
= f.submit 'Save changes', class: "save-btn btn"
= link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn cancel-btn"
= f.submit 'Save changes', class: "btn-save btn"
= link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn btn-cancel"
:javascript
$(function() {
disableButtonIfEmptyField("#milestone_title", ".save-btn");
disableButtonIfEmptyField("#milestone_title", ".btn-save");
$( ".datepicker" ).datepicker({
dateFormat: "yy-mm-dd",
onSelect: function(dateText, inst) { $("#milestone_due_date").val(dateText) }
......
......@@ -25,7 +25,7 @@
%hr
%p
%span All issues for this milestone are closed. You may close milestone now.
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {closed: true }), method: :put, class: "btn small danger"
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {closed: true }), method: :put, class: "btn small btn-remove"
.ui-box.ui-box-show
.ui-box-head
......
......@@ -24,7 +24,7 @@
%p.cgray
- if current_user.private_token
= text_field_tag "token", current_user.private_token, class: "xxlarge large_text"
= f.submit 'Reset', confirm: "Are you sure?", class: "btn primary btn-build-token"
= f.submit 'Reset', confirm: "Are you sure?", class: "btn btn-primary btn-build-token"
- else
%span You don`t have one yet. Click generate to fix it.
= f.submit 'Generate', class: "btn success btn-build-token"
......@@ -49,7 +49,7 @@
= f.password_field :password_confirmation, required: true
.clearfix
.input
= f.submit 'Save password', class: "btn save-btn"
= f.submit 'Save password', class: "btn btn-save"
......@@ -75,6 +75,6 @@
%li It will change web url for personal projects.
%li It will change the git path to repositories for personal projects.
.input
= f.submit 'Save username', class: "btn save-btn"
= f.submit 'Save username', class: "btn btn-save"
......@@ -93,4 +93,4 @@
= link_to "Add Public Key", new_key_path, class: "btn small"
.form-actions
= f.submit 'Save', class: "btn save-btn"
= f.submit 'Save', class: "btn btn-save"
......@@ -77,9 +77,9 @@
%br
.actions
= f.submit 'Save', class: "btn save-btn"
= f.submit 'Save', class: "btn btn-save"
= link_to 'Cancel', @project, class: "btn"
- unless @project.new_record?
- if can?(current_user, :remove_project, @project)
.right
= link_to 'Remove Project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn danger"
= link_to 'Remove Project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn btn-remove"
......@@ -7,7 +7,7 @@
Project name is
.input
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
= f.submit 'Create project', class: "btn success project-submit"
= f.submit 'Create project', class: "btn btn-create project-submit"
- if current_user.can_select_namespace?
.clearfix
......
......@@ -31,4 +31,4 @@
- if can? current_user, :remove_project, @project
.prepend-top-20
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right"
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn btn-remove right"
......@@ -17,6 +17,6 @@
.actions
= submit_tag 'Assign', class: "btn save-btn"
= link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"
= submit_tag 'Assign', class: "btn btn-create"
= link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
......@@ -24,7 +24,7 @@
.span3
= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "chosen span3"})
&nbsp;
= f.submit 'Protect', class: "primary btn"
= f.submit 'Protect', class: "btn-primary btn"
- unless @branches.empty?
%table
......
......@@ -4,7 +4,7 @@
%span Looking for
.input
= search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search"
= submit_tag 'Search', class: "btn primary wide"
= submit_tag 'Search', class: "btn btn-primary wide"
.clearfix
.row
.span3
......
......@@ -40,7 +40,7 @@
.form-actions
= f.submit 'Save', class: 'btn save-btn'
= f.submit 'Save', class: 'btn btn-save'
&nbsp;
- if @service.valid? && @service.active
= link_to 'Test settings', test_project_service_path(@project), class: 'btn btn-small'
......@@ -27,7 +27,7 @@
= f.hidden_field :content, class: 'snippet-file-content'
.form-actions
= f.submit 'Save', class: "save-btn btn"
= f.submit 'Save', class: "btn-save 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}"
......
......@@ -19,5 +19,5 @@
.input= select_tag :project_access, options_for_select(Project.access_options, @user_project_relation.project_access), class: "project-access-select chosen"
.actions
= f.submit 'Save', class: "btn save-btn"
= link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"
= f.submit 'Save', class: "btn btn-save"
= link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
......@@ -23,6 +23,6 @@
- elsif user.blocked
%span.btn.disabled.blocked Blocked
- elsif allow_admin
= link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "very_small btn danger" do
= link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "very_small btn btn-remove" do
%i.icon-minus.icon-white
......@@ -11,5 +11,5 @@
.right
- if allow_admin
.left
= link_to resign_project_team_path(@project, team), method: :delete, confirm: "Are you shure?", class: "btn danger small" do
= link_to resign_project_team_path(@project, team), method: :delete, confirm: "Are you shure?", class: "btn btn-remove small" do
%i.icon-minus.icon-white
......@@ -12,6 +12,6 @@
.input= select_tag(:source_project_id, options_from_collection_for_select(current_user.authorized_projects, :id, :name_with_namespace), prompt: "Select project", class: "chosen xxlarge", required: true)
.actions
= submit_tag 'Import', class: "btn save-btn"
= link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"
= submit_tag 'Import', class: "btn btn-save"
= link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
......@@ -12,7 +12,7 @@
Import team from another project
= link_to available_project_teams_path(@project), class: "btn small grouped", title: "Assign project to team of users" do
Assign project to Team of users
= link_to new_project_team_member_path(@project), class: "btn success small grouped", title: "New Team Member" do
= link_to new_project_team_member_path(@project), class: "btn btn-primary small grouped", title: "New Team Member" do
New Team Member
%hr
......
......@@ -2,7 +2,7 @@
.team_member_show
- if can? current_user, :admin_project, @project
= link_to 'Remove from team', project_team_member_path(@project, @member), confirm: 'Are you sure?', method: :delete, class: "right btn danger"
= link_to 'Remove from team', project_team_member_path(@project, @member), confirm: 'Are you sure?', method: :delete, class: "right btn btn-remove"
.profile_avatar_holder
= image_tag gravatar_icon(@member.email, 60), class: "borders"
%h3.page_title
......
......@@ -17,6 +17,6 @@
= f.text_field :path, placeholder: "opensource", class: "xxlarge left"
.clearfix
.input.span3.center
= f.submit 'Save team changes', class: "btn primary"
= f.submit 'Save team changes', class: "btn btn-primary"
.input.span3.center
= link_to 'Delete team', team_path(@team), method: :delete, confirm: "You are shure?", class: "btn danger"
= link_to 'Delete team', team_path(@team), method: :delete, confirm: "You are shure?", class: "btn btn-remove"
......@@ -16,5 +16,5 @@
%br
.actions
= submit_tag 'Save', class: "btn primary"
= submit_tag 'Save', class: "btn btn-save"
= link_to 'Cancel', :back, class: "btn"
......@@ -17,8 +17,8 @@
= f.select :permission, options_for_select(UsersProject.access_roles, @team.default_projects_access(user)), {}, class: "medium project-access-select span2"
.left.span2
%span
Admin access
= check_box_tag :group_admin, true, @team.admin?(user)
Admin access
.right
- if current_user == user
%span.btn.disabled This is you!
......@@ -27,5 +27,5 @@
- elsif user.blocked
%span.btn.disabled.blocked Blocked
- elsif allow_admin
= link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "very_small btn danger" do
= link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "very_small btn btn-remove" do
%i.icon-minus.icon-white
......@@ -7,7 +7,7 @@
- if can? current_user, :manage_user_team, @team
%span.right
= link_to new_team_member_path(@team), class: "btn success small grouped", title: "New Team Member" do
= link_to new_team_member_path(@team), class: "btn btn-primary small grouped", title: "New Team Member" do
New Team Member
%hr
......
......@@ -25,4 +25,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 User', class: "btn btn-create", id: :add_members_to_team
......@@ -3,7 +3,7 @@
.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 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-remove"
.profile_avatar_holder
= image_tag gravatar_icon(user.email, 60), class: "borders"
%h3.page_title
......
......@@ -10,7 +10,7 @@
.input
= f.text_field :name, placeholder: "Ex. Ruby Developers", class: "xxlarge left"
&nbsp;
= 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"
= link_to 'Cancel', :back, class: "btn"
= submit_tag 'Save', class: "btn btn-save"
= link_to 'Cancel', :back, class: "btn btn-cancel"
%h3
Edit max access in #{@project.name} for #{@team.name} team
%h3.page_title
Edit max access in #{link_to @project.name_with_namespace, @project} for #{link_to(@team.name, team_path(@team))} team
%hr
%table.zebra-striped
%tr
%td Project:
%td= @project.name
%tr
%td Team:
%td= @team.name
%tr
%td Since:
%td= assigned_since(@team, @project).stamp("Nov 11, 2010")
= render 'form'
......@@ -6,7 +6,7 @@
- if current_user.can?(:manage_user_team, @team) && @avaliable_projects.any?
%span.right
= link_to new_team_project_path(@team), class: "btn success small grouped", title: "New Team Member" do
= link_to new_team_project_path(@team), class: "btn btn-primary small grouped", title: "New Team Member" do
Assign project to Team
%hr
......@@ -30,7 +30,7 @@
- if current_user.can?(:admin_user_team, @team)
%td.bgred
= link_to 'Edit max access', edit_team_project_path(@team, project), class: "btn small"
= link_to 'Relegate', team_project_path(@team, project), confirm: 'Remove project from team and move to global namespace. Are you sure?', method: :delete, class: "btn danger small"
= link_to 'Relegate', team_project_path(@team, project), confirm: 'Remove project from team and move to global namespace. Are you sure?', method: :delete, class: "btn btn-remove small"
- else
%p.nothing_here_message This team has no projects yet
......@@ -20,4 +20,4 @@
%tr
%td= select_tag :project_ids, options_from_collection_for_select(@avaliable_projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
%td= select_tag :greatest_project_access, options_for_select(UserTeam.access_roles), {class: "project-access-select chosen span3" }
%td= submit_tag 'Add', class: "btn primary", id: :assign_projects_to_team
%td= submit_tag 'Add Project', class: "btn btn-create", id: :assign_projects_to_team
......@@ -10,7 +10,7 @@
%strong= @ref
%span.options
.btn-group.tree-btn-group
= link_to "Cancel", project_tree_path(@project, @id), class: "btn very_small cancel-btn", confirm: "Are you sure?"
= link_to "Cancel", project_tree_path(@project, @id), class: "btn very_small btn-cancel", confirm: "Are you sure?"
.file_content.code
%pre#editor= @tree.data
......@@ -27,7 +27,7 @@
.message
to branch
%strong= @ref
= link_to "Cancel", project_tree_path(@project, @id), class: "btn cancel-btn", confirm: "Are you sure?"
= link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-cancel", confirm: "Are you sure?"
:javascript
var ace_mode = "#{@tree.language.try(:ace_mode)}";
......
......@@ -23,5 +23,5 @@
= f.label :content
.input= f.text_area :content, class: 'span8 js-gfm-input'
.actions
= f.submit 'Save', class: "save-btn btn"
= link_to "Cancel", project_wiki_path(@project, :index), class: "btn cancel-btn"
= f.submit 'Save', class: "btn-save btn"
= link_to "Cancel", project_wiki_path(@project, :index), class: "btn btn-cancel"
......@@ -4,5 +4,5 @@
.right
- 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, class: "btn small danger" do
= link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn small btn-remove" do
Delete this page
\ No newline at end of file
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