From 096db76d9c39f5b4de75e0913885cef2a7aeb1b4 Mon Sep 17 00:00:00 2001 From: nakamurakazuki Date: Thu, 18 Apr 2024 19:01:16 +0900 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E8=AB=87=E9=83=A8=E5=B1=8B=E3=81=AE?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=81=A8=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=AF=E5=85=88=E3=82=92=E5=A4=89=E6=9B=B4=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=8C=E3=80=81=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E3=81=AE=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=81=A8?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=82=AF=E5=85=88=E3=82=82=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=97=E3=81=BE=E3=81=A3=E3=81=9F=E3=81=AE?= =?UTF-8?q?=E3=81=A7=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/talks/_page_title.html.slim | 30 +++++++++++++++++++++++++++ app/views/talks/show.html.slim | 2 +- app/views/users/_page_title.html.slim | 13 +++--------- 3 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 app/views/talks/_page_title.html.slim diff --git a/app/views/talks/_page_title.html.slim b/app/views/talks/_page_title.html.slim new file mode 100644 index 00000000000..53a582144fc --- /dev/null +++ b/app/views/talks/_page_title.html.slim @@ -0,0 +1,30 @@ +header.page-header + .container + .page-header__inner + .page-header__start + h2.page-header__title + - if current_user.admin? + = user.login_name + - else + | 相談部屋 + .page-header__end + .page-header-actions + ul.page-header-actions__items + li.page-header-actions__item + - if current_user != user + - if current_user.adviser? && current_user.company_id == user.company_id && user.trainee + li.page-main-header-actions__item + .a-button.is-disabled.is-sm.is-block + i.fa-solid.fa-check + span + | 自社研修生 + - else + li.page-main-header-actions__item + = render 'users/following', user: + li.page-header-actions__item + - if current_user.admin? + = link_to users_path, class: 'a-button is-md is-secondary is-block is-back' do + | ユーザー一覧 + - else + = link_to root_path, class: 'a-button is-md is-secondary is-block is-back' do + | ダッシュボード diff --git a/app/views/talks/show.html.slim b/app/views/talks/show.html.slim index 15500d94ee3..28c3d23f8c4 100644 --- a/app/views/talks/show.html.slim +++ b/app/views/talks/show.html.slim @@ -1,7 +1,7 @@ - title "#{@user.login_name}さんの相談部屋" - set_meta_tags description: "#{@user.login_name}さんの相談部屋ページです。" -= render 'users/page_title', user: @user += render 'talks/page_title', user: @user - if admin_login? = render 'users/page_tabs', user: @user diff --git a/app/views/users/_page_title.html.slim b/app/views/users/_page_title.html.slim index 53a582144fc..5a349ce8bdf 100644 --- a/app/views/users/_page_title.html.slim +++ b/app/views/users/_page_title.html.slim @@ -3,10 +3,7 @@ header.page-header .page-header__inner .page-header__start h2.page-header__title - - if current_user.admin? - = user.login_name - - else - | 相談部屋 + = user.login_name .page-header__end .page-header-actions ul.page-header-actions__items @@ -22,9 +19,5 @@ header.page-header li.page-main-header-actions__item = render 'users/following', user: li.page-header-actions__item - - if current_user.admin? - = link_to users_path, class: 'a-button is-md is-secondary is-block is-back' do - | ユーザー一覧 - - else - = link_to root_path, class: 'a-button is-md is-secondary is-block is-back' do - | ダッシュボード + = link_to users_path, class: 'a-button is-md is-secondary is-block is-back' do + | ユーザー一覧