-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7765 from fjordllc/chore/convert-daily-reports-to…
…-slim 日報一覧(全て、未読)を非JS化
- Loading branch information
Showing
6 changed files
with
126 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
class Reports::UncheckedController < ApplicationController | ||
PAGER_NUMBER = 25 | ||
|
||
before_action :require_staff_login | ||
def index; end | ||
def index | ||
@reports = Report.unchecked.not_wip.list.page(params[:page]).per(PAGER_NUMBER) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
hr.a-border | ||
hr.a-border-tint | ||
.card-footer | ||
.card-main-actions | ||
ul.card-main-actions__items | ||
li.card-main-actions__item | ||
button#js-shortcut-unconfirmed-links-open.thread-unconfirmed-links-form__action(class="a-button is-sm is-secondary") | ||
button#js-shortcut-unconfirmed-links-open.thread-unconfirmed-links-form__action(class="a-button is-sm is-block is-secondary") | ||
| #{label} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.card-list-item(class="#{report.wip? ? 'is-wip' : ''}") | ||
.card-list-item__inner | ||
.card-list-item__user | ||
= render 'users/icon', user: report.user, link_class: 'card-list-item__user-link', image_class: 'card-list-item__user-icon' | ||
.card-list-item__rows | ||
.card-list-item__row | ||
.card-list-item-title | ||
.card-list-item-title__start | ||
- if report.wip? | ||
.a-list-item-badge.is-wip | ||
span | ||
| WIP | ||
h2.card-list-item-title__title(itemprop='name') | ||
= link_to report, itemprop: 'url', class: 'card-list-item-title__link a-text-link js-unconfirmed-link' do | ||
= image_tag("emotion/#{report.emotion}.svg", alt: report.emotion, class: 'card-list-item-title__emotion-image') | ||
= report.title | ||
- if current_user == report.user | ||
.card-list-item-title__end | ||
label.card-list-item-actions__trigger(for="#{report.id}") | ||
i.fa-solid.fa-ellipsis-h | ||
.card-list-item-actions | ||
input.a-toggle-checkbox(type="checkbox" id=="#{report.id}") | ||
.card-list-item-actions__inner | ||
ul.card-list-item-actions__items | ||
li.card-list-item-actions__item | ||
= link_to edit_report_path(report), class: 'card-list-item-actions__action' do | ||
i.fa-solid.fa-pen | ||
| 内容変更 | ||
li.card-list-item-actions__item | ||
= link_to new_report_path(id: report), class: 'card-list-item-actions__action' do | ||
i.fa-solid.fa-copy | ||
| コピー | ||
label.a-overlay(for="#{report.id}") | ||
.card-list-item__row | ||
.card-list-item-meta | ||
.card-list-item-meta__items | ||
.card-list-item-meta__item | ||
= link_to 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}") | ||
= l report.reported_on | ||
| の日報 | ||
- if report.comments.any? | ||
hr.card-list-item__row-separator | ||
.card-list-item__row | ||
.card-list-item-meta | ||
.card-list-item-meta__items | ||
.card-list-item-meta__item | ||
.a-meta | ||
| コメント(#{report.comments.size}) | ||
.card-list-item-meta__item | ||
.card-list-item__user-icons | ||
= render partial: 'comments/user_icons', collection: report.comments.commented_users, as: :user | ||
.card-list-item-meta__item | ||
time.a-meta(datetime="#{report.comments.last.updated_at.to_datetime}" pubdate='pubdate') | ||
| 〜 #{l report.comments.last.updated_at, format: :date_and_time} | ||
|
||
- if report.checks.any? | ||
.stamp.stamp-approve | ||
h2.stamp__content.is-title 確認済 | ||
time.stamp__content.is-created-at | ||
= l report.checks.last.created_at.to_date, format: :short | ||
.stamp__content.is-user-name | ||
.stamp__content-inner | ||
= report.checks.last.user.login_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters