[refs #442] Change build_all button to mass_builds

This commit is contained in:
konstantin.grabar 2012-05-23 20:27:06 +04:00
parent dd9c653a90
commit 43e95b565e
2 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@ class Ability
can [:read, :related, :members], Platform, :owner_type => 'Group', :owner_id => user.group_ids
can([:read, :related, :members], Platform, read_relations_for('platforms')) {|platform| local_reader? platform}
can([:update, :members], Platform) {|platform| local_admin? platform}
can([:destroy, :members, :add_member, :remove_member, :remove_members, :build_all] , Platform) {|platform| owner? platform}
can([:destroy, :members, :add_member, :remove_member, :remove_members, :build_all, :mass_builds] , Platform) {|platform| owner? platform}
can :autocomplete_user_uname, Platform
can [:read, :projects_list], Repository, :platform => {:visibility => 'open'}
@ -123,7 +123,7 @@ class Ability
cannot [:members, :add_member, :remove_member, :remove_members], Platform, :platform_type => 'personal'
cannot [:create, :update, :destroy, :clone], Product, :platform => {:platform_type => 'personal'}
cannot [:clone, :build_all], Platform, :platform_type => 'personal'
cannot [:clone, :build_all, :mass_builds], Platform, :platform_type => 'personal'
can :create, Subscribe do |subscribe|
!subscribe.subscribeable.subscribes.exists?(:user_id => user.id)

View File

@ -30,8 +30,8 @@
%td= @platform.distrib_type
.buttons_block
- if can? :build_all, @platform
= link_to t("layout.platforms.build_all"), build_all_platform_path(@platform), :confirm => I18n.t("layout.confirm"), :method => :post, :class => "button left_floated"
- if can? :mass_builds, @platform
= link_to t("layout.platforms.mass_build"), mass_builds_platform_path(@platform), :class => "button left_floated"
= link_to I18n.t("layout.platforms.clone"), clone_platform_path(@platform), :class => "button left_floated" if can? :clone, @platform
= render 'connection_info' if @platform.platform_type == 'personal' and @platform.visibility == 'open'