From 4824550efed48b56e2fb76baa83841ddcdcf1ac4 Mon Sep 17 00:00:00 2001 From: unikounio Date: Tue, 12 Mar 2024 14:10:27 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E5=80=8B?= =?UTF-8?q?=E5=88=A5=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E3=82=AB=E3=82=A6?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=8C0=E3=81=AE=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=AF=E3=83=AA=E3=83=B3=E3=82=AF=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_activity_counts.html.slim | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/views/users/_activity_counts.html.slim b/app/views/users/_activity_counts.html.slim index 57b89a0f01e..7f95326824b 100644 --- a/app/views/users/_activity_counts.html.slim +++ b/app/views/users/_activity_counts.html.slim @@ -4,34 +4,40 @@ 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.empty?, + 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.empty?, + 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.empty?, + 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.empty?, + 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.empty?, + 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.empty?, + user.works.size, user_portfolio_path(user)