diff --git a/college/static/src/scss/hide_about_edit.scss b/college/static/src/scss/hide_about_edit.scss index c98be3f..4032cbb 100644 --- a/college/static/src/scss/hide_about_edit.scss +++ b/college/static/src/scss/hide_about_edit.scss @@ -1,7 +1,7 @@ // 关于页(yuthon.about.page)为只读展示页: // form 视图已设 edit="false",但教师组有该模型写权限时控制面板仍会渲染「编辑」按钮, -// 这里用 js_class + CSS 精准隐藏该视图控制面板里的编辑按钮,不影响其他表单。 -.o_view_controller.yuthon_about_form .o_control_panel .o_form_button_edit, -.o_view_controller.yuthon_about_form .o_control_panel button[data-hotkey="e"] { +// 这里用 CSS :has() 精准隐藏该视图控制面板里的编辑按钮,不影响其他表单。 +.o_view_controller:has(.o_form_view.o_about_full_form) .o_control_panel .o_form_button_edit, +.o_view_controller:has(.o_form_view.o_about_full_form) .o_control_panel button[data-hotkey="e"] { display: none !important; } diff --git a/college/views/about_page_views.xml b/college/views/about_page_views.xml index e170676..56f2d1e 100644 --- a/college/views/about_page_views.xml +++ b/college/views/about_page_views.xml @@ -8,7 +8,7 @@ yuthon.about.page -
+