Skip to content

Commit

Permalink
Merge pull request #7708 from fjordllc/bug/talk_page_title
Browse files Browse the repository at this point in the history
相談部屋のタイトルとリンク先を変更したが、ユーザー画面のタイトルとリンク先も変更してしまったので修正した
  • Loading branch information
komagata authored Apr 18, 2024
2 parents 833aa37 + 096db76 commit 7441259
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
30 changes: 30 additions & 0 deletions app/views/talks/_page_title.html.slim
Original file line number Diff line number Diff line change
@@ -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
| ダッシュボード
2 changes: 1 addition & 1 deletion app/views/talks/show.html.slim
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 3 additions & 10 deletions app/views/users/_page_title.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
| ユーザー一覧

0 comments on commit 7441259

Please sign in to comment.