-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only zw963 can change user editable.
- Loading branch information
Showing
1 changed file
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,13 @@ class Me::ShowPage < MainLayout | |
|
||
br | ||
|
||
a( | ||
"新建用户", | ||
href: "#modal2", | ||
class: "waves-effect waves-light btn modal-trigger", | ||
# script: " | ||
# on click put '修改 #{user.email} 的密码' into the <#modal1 h5/> | ||
# then set @hx-put of <#modal1 a[hx-put]/> to '#{User::Htmx::Password.with(user_id).path}' | ||
# then js htmx.process(document.body) end | ||
# " | ||
) | ||
if current_user.email == "[email protected]" | ||
a( | ||
"新建用户", | ||
href: "#modal2", | ||
class: "waves-effect waves-light btn modal-trigger", | ||
) | ||
end | ||
|
||
user_list | ||
|
||
|
@@ -103,6 +100,8 @@ class Me::ShowPage < MainLayout | |
"hx-include": "[name='_csrf']", | ||
} | ||
|
||
args = args.merge(disabled: "disabled") if current_user.email != "[email protected]" | ||
|
||
if user.is_editable | ||
input(args.merge(checked: "checked")) | ||
else | ||
|