refactor buttons pt1

This commit is contained in:
Dmitriy Zaporozhets 2013-01-29 22:18:19 +02:00
parent 9fdbdc662a
commit 033aa1a885
75 changed files with 139 additions and 150 deletions

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -10,7 +10,7 @@
.input
= f.text_field :name, placeholder: "Ex. Ruby Developers", class: "xxlarge left"
 
= f.submit 'Create team', class: "btn primary"
= f.submit 'Create team', class: "btn btn-primary"
%hr
.padded
%ul

View file

@ -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"

View file

@ -1,16 +1,6 @@
%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'

View file

@ -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

View file

@ -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