-
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.
Browse files
Browse the repository at this point in the history
ユーザー個別のコメント一覧で提出物のタイトルを出す
- Loading branch information
Showing
12 changed files
with
44 additions
and
18 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
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
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
- commentable = comment.commentable | ||
.thread-list-item(class="is-#{commentable.class.to_s.tableize.singularize}") | ||
.thread-list-item__inner | ||
.thread-list-item__label | ||
= t("activerecord.models.#{commentable.class.to_s.tableize.singularize}") | ||
header.thread-list-item__header | ||
- if user_comments_page? | ||
h2.thread-list-item__title | ||
= link_to commentable, class: "thread-list-item__title-link" do | ||
= image_tag commentable.user.avatar.variant(resize: "40x40"), class: "thread-comment__title-icon" | ||
= truncate(commentable.title, length: 50) | ||
- else | ||
h2.thread-list-item__title | ||
= link_to comment.user, itempro: "url", class: "thread-list-item__title-link" do | ||
= comment.user.login_name | ||
time.thread-comment__created-at(datetime="#{commentable.created_at.to_datetime}" pubdate="pubdate") | ||
= l comment.updated_at | ||
.thread-list-item__body | ||
= comment_summury(comment.description, 90) |
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,3 @@ | ||
.thread-comments-container | ||
.thread-comments | ||
= render partial: "comment", collection: comments.order(:created_at), as: :comment |
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
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