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 + | ユーザー一覧