Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions app/components/products/product_component.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,26 @@
| 提出物作成中
- elsif @product.published_at
.card-list-item-meta__item
time.a-meta
time.a-meta datetime=@product.published_at.iso8601
span.a-meta__label
| 提出
= l(@product.published_at)
- else
.card-list-item-meta__item
time.a-meta
time.a-meta datetime=@product.created_at.iso8601
span.a-meta__label
| 提出
= l(@product.created_at)

.card-list-item-meta__item
- if @product.updated_at
time.a-meta
time.a-meta datetime=@product.updated_at.iso8601
span.a-meta__label
| 更新
= l(@product.updated_at)

- if @display_until_next_elapsed_days && elapsed_days < @reply_deadline_days
time.a-meta
.a-meta
Copy link
Copy Markdown
Contributor Author

@s-tone-gs s-tone-gs Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「1時間未満」や「約○○時間」という曖昧な値は機械可読な形式で指定できないので、timeタグで扱うことをやめた。
ref: https://developer.mozilla.org/ja/docs/Web/HTML/Reference/Elements/time

span.a-meta__label
| 次の経過日数まで
- if until_next_elapsed_days < 1
Expand All @@ -73,15 +73,17 @@
= link_to user, class: 'card-list-item__user-icons-icon' do
= image_tag user.avatar_url, class: "a-user-icon #{role_class_for_user(user)}", title: user.icon_title, alt: user.icon_title
.card-list-item-meta__item
time.a-meta
= "〜 #{l @product.comments.last.created_at, format: :date_and_time}"
.a-meta
| 〜
time datetime=@product.comments.last.created_at.iso8601
= l @product.comments.last.created_at, format: :date_and_time
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「〜(から)」という記号は時間情報ではないため「~」だけtimeタグの外に出した


- if (@is_mentor || @is_admin) && @product.user.primary_role == 'trainee'
.card-list-item__row
.card-list-item-meta__items
.card-list-item-meta__item
- if @product.user.training_ends_on
time.a-meta dateTime=@product.user.training_ends_on
time.a-meta datetime=@product.user.training_ends_on.in_time_zone.iso8601
span.a-meta__label
| 研修終了日
span.a-meta__value
Expand Down
2 changes: 1 addition & 1 deletion app/components/searchable_component.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
= image_tag resource_user.avatar_url, class: 'card-list-item-meta__icon a-user-icon'
= link_to resource_user.login_name, resource_user, class: 'a-user-name'
.card-list-item-meta__item
time.a-meta datetime=resource.updated_at.iso8601 pubdate='pubdate'
time.a-meta datetime=resource.updated_at.iso8601
= l(resource.updated_at)
.card-list-item-meta__item
.a-meta
Expand Down
2 changes: 1 addition & 1 deletion app/components/users/users_answer_component.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
user_path(answer.question.user),
class: 'a-user-name'
.card-list-item-meta__item
time.a-meta datetime=answer.updated_at pubdate="pubdate"
time.a-meta datetime=answer.updated_at.iso8601
= formatted_updated_at
- if best_answer?
.answer-badge
Expand Down
2 changes: 1 addition & 1 deletion app/components/works/work_component.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
= link_to work.user.name, user_path(work.user), class: 'a-user-name'
.thumbnail-card__metas
.thumbnail-card__meta
.thumbnail-card__date
time.thumbnail-card__date datetime=work.created_at.iso8601
= l(work.created_at)
2 changes: 1 addition & 1 deletion app/views/announcements/_announcement.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.a-meta
| お知らせ作成中
- else
time.a-meta(datetime='announcement.published_at_date_time')
time.a-meta datetime=announcement.published_at.iso8601
span.a-meta__label
| 公開
span.a-meta__value
Expand Down
2 changes: 1 addition & 1 deletion app/views/announcements/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ hr.a-border
.page-content-header__end
.page-content-header__row
.page-content-header__before-title
time.a-meta(datetime="#{@announcement.created_at.to_datetime}" pubdate='pubdate')
time.a-meta datetime=@announcement.updated_at.iso8601
= l @announcement.updated_at
h1.page-content-header__title(class="#{@announcement.wip? ? 'is-wip' : ''}")
- if @announcement.wip?
Expand Down
1 change: 1 addition & 0 deletions app/views/api/products/_product.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ json.user do
json.partial! "api/users/user", user: product.user
if product.user.training_ends_on
json.training_ends_on l(product.user.training_ends_on)
json.training_ends_on_date_time product.user.training_ends_on.in_time_zone.iso8601
json.training_remaining_days product.user.training_remaining_days
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
= link_to cts.user, class: 'a-user-name' do
= cts.user.long_name
.card-list-item-meta__item
time.a-meta(datetime="#{cts.updated_at}")
time.a-meta datetime=cts.updated_at.iso8601
= l cts.updated_at
.card-list-item__row
.a-long-text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ruby:
.page-content-header-metas__meta
.a-meta
.a-meta__label 提出日
time.a-meta__value(datetime="#{cts.created_at}" pubdate='pubdate')
time.a-meta__value datetime=cts.created_at.iso8601
= l cts.created_at

.a-card
Expand Down
34 changes: 23 additions & 11 deletions app/views/companies/products/_product.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
.a-meta 提出物作成中
- elsif product.published_at
.card-list-item-meta__item
time.a-meta
time.a-meta datetime=product.published_at.iso8601
span.a-meta__label 提出
| #{l product.published_at}
- else
.card-list-item-meta__item
time.a-meta
time.a-meta datetime=product.created_at.iso8601
span.a-meta__label 提出
| #{l product.created_at}
.card-list-item-meta__item
- if product.updated_at
time.a-meta
time.a-meta datetime=product.updated_at.iso8601
span.a-meta__label 更新
| #{l product.updated_at}
- if !product.comments.empty?
Expand All @@ -58,23 +58,35 @@
- if product.self_last_commented_at && product.mentor_last_commented_at
.card-list-item-meta__item
- if product.self_last_commented_at > product.mentor_last_commented_at
time.a-meta
| 〜 #{l product.self_last_commented_at}(
.a-meta
| 〜
time.a-meta datetime=product.self_last_commented_at.iso8601
= l product.self_last_commented_at
|(
strong 提出者
| )
- elsif product.self_last_commented_at < product.mentor_last_commented_at
time.a-meta
| 〜 #{l product.mentor_last_commented_at}(メンター)
.a-meta
| ~
time.a-meta datetime=product.mentor_last_commented_at.iso8601
= l product.mentor_last_commented_at
|(メンター)
- elsif product.self_last_commented_at || product.mentor_last_commented_at
.card-list-item-meta__item
- if product.self_last_commented_at
time.a-meta
| 〜 #{l product.self_last_commented_at}(
.a-meta
| 〜
time.a-meta datetime=product.self_last_commented_at
= l product.self_last_commented_at
|(
strong 提出者
| )
- elsif product.mentor_last_commented_at
time.a-meta
| 〜 #{l product.mentor_last_commented_at}(メンター)
.a-meta
| ~
time.a-meta datetime=product.mentor_last_commented_at
= l product.mentor_last_commented_at
|(メンター)
- if current_user.mentor? && product.checks.empty?
.card-list-item__row.is-only-mentor
.card-list-item__assignee
Expand Down
4 changes: 2 additions & 2 deletions app/views/current_user/bookmarks/_list.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ hr.a-border
= link_to bookmark.bookmarkable.user.url, class: 'a-user-name' do
= "#{bookmark.bookmarkable.user.login_name}(#{bookmark.bookmarkable.user.name_kana})"
.card-list-item-meta__item
- date = bookmark.bookmarkable_type == 'Report' ? bookmark.bookmarkable.reported_on.to_time : bookmark.bookmarkable.created_at
time.a-meta datetime=date
- date = bookmark.bookmarkable_type == 'Report' ? bookmark.bookmarkable.reported_on.in_time_zone : bookmark.bookmarkable.created_at
time.a-meta datetime=date.iso8601
= l(date, format: :default)

.card-list-item__option
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/_event.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
= event.user.long_name
.page-content-header-metas__meta
.a-meta
time.a-meta__value(datetime="#{event.created_at.to_datetime}" pubdate='pubdate')
time.a-meta__value datetime=event.updated_at.iso8601
= l event.updated_at
.page-content-header-metas__end
.page-content-header-metas__meta
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/_events.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ul.card-list.a-card
.card-list-item-meta
.card-list-item-meta__items
.card-list-item-meta__item
time.a-meta(datetime=event.start_at)
time.a-meta datetime=event.start_at.iso8601
span.a-meta__label 開催日時
span.a-meta__value = l event.start_at
.card-list-item-meta__item
Expand Down
4 changes: 2 additions & 2 deletions app/views/events/_upcoming_event.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
.card-list-item-meta__items
.card-list-item-meta__item
- if event.held_on_scheduled_date?
time.a-meta
.a-meta
span.a-meta__label
| 開催日時
span.a-meta__value
time.a-meta__value datetime=event.scheduled_date_with_start_time.iso8601
= I18n.localize(event.scheduled_date_with_start_time)
- else
.a-meta.is-important
Expand Down
2 changes: 1 addition & 1 deletion app/views/external_entries/_external_entry.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.card-list-item-meta
.card-list-item-meta__items
.card-list-item-meta__item
time.a-meta
time.a-meta datetime=external_entry.published_at.iso8601
= l(external_entry.published_at)
.card-list-item__thumbnail
= link_to external_entry.url, class: 'card-list-item__thumbnail-inner', target: '_blank', rel: 'noopener' do
Expand Down
2 changes: 1 addition & 1 deletion app/views/home/_announcement.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
// TODOエラー回避のためにつけたので不要になったら削除
- if announcement.published_at?
.card-list-item-meta__item
time.a-meta(datetime="#{announcement.published_at.to_datetime}" pubdate='pubdate')
time.a-meta datetime=announcement.published_at.iso8601
= l announcement.published_at
2 changes: 1 addition & 1 deletion app/views/home/_colleague_trainee_recent_report.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
= link_to user_path(report.user), class: 'a-user-name' do
= report.user.long_name
.card-list-item-meta__item
time.a-meta(datetime="#{report.reported_on.to_datetime}")
time.a-meta datetime=report.reported_on.in_time_zone.iso8601
= l report.reported_on
| の日報
2 changes: 1 addition & 1 deletion app/views/home/_recent_report.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
= link_to report.user, class: 'a-user-name' do
= report.user.long_name
.card-list-item-meta__item
time.a-meta
time.a-meta datetime=report.reported_on.in_time_zone.iso8601
= "#{l report.reported_on}の日報"
2 changes: 1 addition & 1 deletion app/views/movies/_movie_header.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ header.page-content-header
span.a-meta__label
| 公開
.a-meta__value
time(datetime="#{movie.published_at.to_datetime}")
time(datetime="#{movie.published_at.iso8601}")
| #{l movie.published_at}
- if movie.user
= render 'users/icon',
Expand Down
2 changes: 1 addition & 1 deletion app/views/notifications/_notification.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
.card-list-item-meta
.card-list-item-meta__items
.card-list-item-meta__item
time.a-meta dateTime=notification.created_at
time.a-meta datetime=notification.created_at.iso8601
= l(notification.created_at, format: :long)
4 changes: 2 additions & 2 deletions app/views/pages/_doc_header.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ header.page-content-header
span.a-meta__label
| 公開
.a-meta__value
time(datetime="#{page.published_at.to_datetime}")
time(datetime="#{page.published_at.iso8601}")
| #{l page.published_at}
= render 'users/icon',
user: page.user,
Expand All @@ -47,7 +47,7 @@ header.page-content-header
span.a-meta__label
| 更新
span.a-meta__value
time(datetime="#{page.updated_at.to_datetime}")
time(datetime="#{page.updated_at.iso8601}")
| #{l page.updated_at}
= render 'users/icon',
user: page.last_updated_user,
Expand Down
4 changes: 2 additions & 2 deletions app/views/pair_works/_pair_work.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
span.a-meta__label
| 投稿日時
- if pair_work.wip?
span.a-meta__value
time.a-meta__value datetime=pair_work.created_at.iso8601
= l pair_work.created_at
- else
span.a-meta__value
time.a-meta__value datetime=pair_work.published_at.iso8601
= l pair_work.published_at
.card-list-item-meta__item
.a-meta(class="#{pair_work.important? ? 'is-important' : ''}")
Expand Down
12 changes: 7 additions & 5 deletions app/views/products/_product.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
.a-meta
| 提出物作成中
- elsif product.published_at.present?
time.a-meta(datetime="#{product.published_at.to_datetime}")
time.a-meta datetime=product.published_at.iso8601
span.a-meta__label
| 提出
span.a-meta__value
= l product.published_at
- else
time.a-meta(datetime="#{product.created_at.to_datetime}")
time.a-meta datetime=product.created_at.iso8601
span.a-meta__label
| 提出
span.a-meta__value
= l product.created_at

- if product.updated_at.present?
.card-list-item-meta__item
time.a-meta(datetime="#{product.updated_at.to_datetime}")
time.a-meta datetime=product.updated_at.iso8601
span.a-meta__label
| 更新
span.a-meta__value
Expand All @@ -59,8 +59,10 @@
as: :user,
cached: true
.card-list-item-meta__item
time.a-meta(datetime="#{product.commented_users.last.created_at.to_datetime}")
| 〜 #{l product.comments.last.created_at, format: :date_and_time}
.a-meta
| 〜
time.a-meta datetime=product.comments.last.created_at.iso8601
= l product.comments.last.created_at, format: :date_and_time
- if !current_user.adviser? && product.practice.open_product?
.card-list-item__row
.card-list-item-meta
Expand Down
6 changes: 3 additions & 3 deletions app/views/products/_product_header.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@ header.page-content-header.is-product
- elsif product.published_at.present?
span.a-meta__label
| 提出
time.a-meta__value(datetime="#{product.published_at.to_datetime}")
time.a-meta__value datetime=product.published_at.iso8601
= l product.published_at
- else
span.a-meta__label
| 提出
time.a-meta__value(datetime="#{product.created_at.to_datetime}")
time.a-meta__value datetime=product.created_at.iso8601
= l product.created_at

- if product.updated_at.present?
.page-content-header-metas__meta
.a-meta
span.a-meta__label
| 更新
time.a-meta__value(datetime="#{product.updated_at.to_datetime}")
time.a-meta__value datetime=product.updated_at.iso8601
= l product.updated_at

.page-content-header-metas__end
Expand Down
6 changes: 3 additions & 3 deletions app/views/products/_product_list_item.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ ruby:
.card-list-item-meta
.card-list-item-meta__items
.card-list-item-meta__item
time.a-meta(datetime="#{product.created_at.to_datetime}")
time.a-meta datetime=product.created_at.to_datetime
span.a-meta__label 提出
span.a-meta__value = l product.created_at
.card-list-item-meta__item
time.a-meta(datetime="#{product.updated_at.to_datetime}")
time.a-meta datetime=product.updated_at.to_datetime
span.a-meta__label 更新
span.a-meta__value = l product.updated_at
- if (elapsed_days != product_deadline_day + 3 && is_unassigned_page) || is_dashboard_page
Expand All @@ -67,7 +67,7 @@ ruby:
.card-list-item-meta__items
.card-list-item-meta__item
- if product.user.training_ends_on.present?
time.a-meta(datetime="#{product.user.training_ends_on}")
time.a-meta datetime=product.user.training_ends_on
span.a-meta__label 研修終了日
span.a-meta__value = l(product.user.training_ends_on)
- remaining_days = (product.user.training_ends_on.to_date - Date.current).to_i
Expand Down
Loading
Loading