Skip to content

Commit

Permalink
ユーザー個別ページのカウントが0の場合はリンクしないようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
unikounio committed Apr 24, 2024
1 parent 9541c33 commit f23581e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/views/users/_activity_counts.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ dl.card-counts__items
dt.card-counts__item-label
| 日報
dd.card-counts__item-value
= link_to user.reports.size, user_reports_path(user)
= link_to_if !user.reports.size.zero?, user.reports.size, user_reports_path(user)
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| 提出物
dd.card-counts__item-value
= link_to user.products.size, user_products_path(user)
= link_to_if !user.products.size.zero?, user.products.size, user_products_path(user)
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| コメント
dd.card-counts__item-value
= link_to user.comments.size, user_comments_path(user)
= link_to_if !user.comments.size.zero?, user.comments.size, user_comments_path(user)
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| 質問
dd.card-counts__item-value
= link_to user.questions.size, user_questions_path(user)
= link_to_if !user.questions.size.zero?, user.questions.size, user_questions_path(user)
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| 回答
dd.card-counts__item-value
= link_to user.answers.size, user_answers_path(user)
= link_to_if !user.answers.size.zero?, user.answers.size, user_answers_path(user)
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| ポートフォリオ
dd.card-counts__item-value
= link_to user.works.size, user_portfolio_path(user)
= link_to_if !user.works.size.zero?, user.works.size, user_portfolio_path(user)

0 comments on commit f23581e

Please sign in to comment.