mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 03:06:28 +08:00
21 lines
1.1 KiB
Text
21 lines
1.1 KiB
Text
<div class="select-user-container">
|
|
<%= select_tag 'user_my_modules',
|
|
options_for_select(my_module.user_my_modules.map{ |um|
|
|
user = um.user
|
|
[
|
|
user.full_name,
|
|
user.id,
|
|
{'data-params' => {avatar_url: avatar_path(user, :icon_small), user_module_id: um.id }.to_json}
|
|
]
|
|
}),
|
|
{
|
|
id: 'module-assigned-users-selector',
|
|
'data-module-id': my_module.id,
|
|
'data-project-id': my_module.experiment.project_id,
|
|
'data-placeholder': t('my_modules.details.no_assigned_users'),
|
|
'data-users-create-url': my_module_user_my_modules_path(my_module_id: my_module.id),
|
|
'data-ajax-url': search_my_module_user_my_module_path(my_module),
|
|
'data-update-module-users-url': my_module_user_my_modules_url(my_module),
|
|
'data-view-mode': !can_manage_my_module_designated_users?(my_module)
|
|
} %>
|
|
</div>
|