mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Use CSS-compatible row IDs in datatables
In CSS IDs may not begin with a number: - https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
This commit is contained in:
parent
38f266f716
commit
57e9135287
3 changed files with 7 additions and 2 deletions
|
|
@ -3,6 +3,7 @@
|
|||
class UserDatatable < AjaxDatatablesRails::ActiveRecord
|
||||
extend Forwardable
|
||||
|
||||
def_delegator :@view, :dom_id
|
||||
def_delegator :@view, :show_roles
|
||||
def_delegator :@view, :admin_user_path
|
||||
def_delegator :@view, :edit_admin_user_path
|
||||
|
|
@ -39,7 +40,7 @@ class UserDatatable < AjaxDatatablesRails::ActiveRecord
|
|||
roles: record.roles.any? ? show_roles(record.get_roles) : 'None',
|
||||
view_url: admin_user_path(record),
|
||||
edit_url: edit_admin_user_path(record),
|
||||
DT_RowId: record.id
|
||||
DT_RowId: dom_id(record)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue