[Ovirt-devel] [PATCH server] fix for Bug 466731 - There is no title for the third column in User Access page and can't be sorted

Jason Guiditta jason.guiditta at gmail.com
Thu May 28 16:28:22 UTC 2009


ACK

On Tue, May 26, 2009 at 4:11 PM, Scott Seago <sseago at redhat.com> wrote:

> Added column title and made it sortable.
>
> Signed-off-by: Scott Seago <sseago at redhat.com>
> ---
>  src/app/models/pool.rb         |    4 +++-
>  src/app/views/user/_grid.rhtml |    2 +-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/app/models/pool.rb b/src/app/models/pool.rb
> index 0a63723..3c95684 100644
> --- a/src/app/models/pool.rb
> +++ b/src/app/models/pool.rb
> @@ -57,7 +57,9 @@ class Pool < ActiveRecord::Base
>     :in => %w( DirectoryPool HardwarePool VmResourcePool SmartPool )
>
>   # overloading this method such that we can use permissions.admins to get
> all the admins for an object
> -  has_many :permissions, :dependent => :destroy, :include => :role, :order
> => "permissions.id ASC"
> +  has_many :permissions, :dependent => :destroy,
> +           :include => [:role, :pool, {:parent_permission => :pool}],
> +           :order => "permissions.id ASC"
>
>   has_one :quota, :dependent => :destroy
>
> diff --git a/src/app/views/user/_grid.rhtml
> b/src/app/views/user/_grid.rhtml
> index 10a10c8..c16c0c6 100644
> --- a/src/app/views/user/_grid.rhtml
> +++ b/src/app/views/user/_grid.rhtml
> @@ -17,7 +17,7 @@
>         <%= "{display: '', width : 20, align: 'left', process:
> #{table_id}checkbox}," if checkboxes %>
>         {display: 'Name', name : 'uid', width : 180, sortable : true,
> align: 'left'},
>         {display: 'Role', name : 'roles.name', width : 80, sortable :
> true, align: 'left'},
> -        {display: '', width : 80, sortable : true, align: 'left'}
> +        {display: 'Source', name : 'pools_permissions.name', width : 80,
> sortable : true, align: 'left'}
>         ],
>     sortname: "user",
>     sortorder: "asc",
> --
> 1.6.0.6
>
> _______________________________________________
> Ovirt-devel mailing list
> Ovirt-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/ovirt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090528/a2510693/attachment.htm>


More information about the ovirt-devel mailing list