diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs
index 80495bcb63e..7631c0d1244 100644
--- a/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs
+++ b/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs
@@ -30,10 +30,7 @@
{{else}}
{{#component reviewableComponent reviewable=reviewable tagName=''}}
-
- {{reviewable-scores reviewable=reviewable tagName=''}}
- {{reviewable-histories histories=reviewable.reviewable_histories tagName=''}}
-
+ {{reviewable-scores reviewable=reviewable tagName=''}}
{{/component}}
{{/if}}
diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-score.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-score.hbs
index 7d8a72e8165..2a75664f9c9 100644
--- a/app/assets/javascripts/discourse/templates/components/reviewable-score.hbs
+++ b/app/assets/javascripts/discourse/templates/components/reviewable-score.hbs
@@ -1,4 +1,7 @@
+
+ {{format-date rs.created_at}}
+ |
{{d-icon rs.score_type.icon}}
{{title}}
@@ -9,8 +12,6 @@
{{avatar rs.user imageSize="tiny"}}
{{rs.user.username}}
{{/user-link}}
- |
-
{{user-flag-percentage
agreed=rs.agree_stats.agreed
disagreed=rs.agree_stats.disagreed
@@ -19,10 +20,21 @@
|
{{reviewable-status rs.status}}
|
+
+ {{#if rs.reviewed_by}}
+ {{#user-link user=rs.reviewed_by}}
+ {{avatar rs.reviewed_by imageSize="tiny"}}
+ {{rs.reviewed_by.username}}
+ {{/user-link}}
+ {{format-date rs.reviewed_at}}
+ {{else}}
+ —
+ {{/if}}
+ |
{{#if rs.reviewable_conversation}}
-
+ |
{{#each rs.reviewable_conversation.conversation_posts as |p index|}}
{{reviewable-conversation-post post=p index=index}}
diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-scores.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-scores.hbs
index e811554285a..3ea03a10daf 100644
--- a/app/assets/javascripts/discourse/templates/components/reviewable-scores.hbs
+++ b/app/assets/javascripts/discourse/templates/components/reviewable-scores.hbs
@@ -1,5 +1,14 @@
{{#if reviewable.reviewable_scores}}
+
+
+ {{i18n "review.scores.date"}} |
+ {{i18n "review.scores.type"}} |
+ {{i18n "review.scores.submitted_by"}} |
+ {{i18n "review.scores.status"}} |
+ {{i18n "review.scores.reviewed_by"}} |
+
+
{{#each reviewable.reviewable_scores as |rs|}}
{{reviewable-score rs=rs reviewable=reviewable}}
diff --git a/app/assets/stylesheets/common/base/reviewables.scss b/app/assets/stylesheets/common/base/reviewables.scss
index 9a5821fe7d6..9d86d3a2053 100644
--- a/app/assets/stylesheets/common/base/reviewables.scss
+++ b/app/assets/stylesheets/common/base/reviewables.scss
@@ -224,15 +224,15 @@
margin-top: 1em;
}
-.reviewable-scores-and-history {
- display: inline-block;
- margin-top: 1em;
-}
-
.reviewable-scores,
.reviewable-histories {
min-width: 50%;
+ .reviewed-by {
+ .date {
+ margin-left: 0.5em;
+ }
+ }
.user {
display: flex;
align-items: center;
@@ -251,6 +251,11 @@
line-height: $line-height-medium;
}
+ thead {
+ th {
+ white-space: nowrap;
+ }
+ }
tbody {
border-width: 1px;
td {
@@ -268,7 +273,7 @@
}
> tr > th,
> tr > td {
- padding: 0.5em;
+ padding: 0.5em 1em 0.5em 0.5em;
}
}
}
diff --git a/app/controllers/reviewables_controller.rb b/app/controllers/reviewables_controller.rb
index 274e4bac74c..f91dcbf6cf2 100644
--- a/app/controllers/reviewables_controller.rb
+++ b/app/controllers/reviewables_controller.rb
@@ -180,7 +180,8 @@ protected
def meta_types
{
created_by: 'user',
- target_created_by: 'user'
+ target_created_by: 'user',
+ reviewed_by: 'user'
}
end
diff --git a/app/serializers/reviewable_score_serializer.rb b/app/serializers/reviewable_score_serializer.rb
index 89165996c5f..c58568944cd 100644
--- a/app/serializers/reviewable_score_serializer.rb
+++ b/app/serializers/reviewable_score_serializer.rb
@@ -2,10 +2,11 @@ require_dependency 'reviewable_score_type_serializer'
class ReviewableScoreSerializer < ApplicationSerializer
- attributes :id, :score, :agree_stats, :status
+ attributes :id, :score, :agree_stats, :status, :created_at, :reviewed_at
has_one :user, serializer: BasicUserSerializer, root: 'users'
has_one :score_type, serializer: ReviewableScoreTypeSerializer
has_one :reviewable_conversation, serializer: ReviewableConversationSerializer
+ has_one :reviewed_by, serializer: BasicUserSerializer, root: 'users'
def agree_stats
{
diff --git a/app/serializers/reviewable_serializer.rb b/app/serializers/reviewable_serializer.rb
index ba86ea9917d..571993449ef 100644
--- a/app/serializers/reviewable_serializer.rb
+++ b/app/serializers/reviewable_serializer.rb
@@ -25,7 +25,6 @@ class ReviewableSerializer < ApplicationSerializer
has_many :editable_fields, serializer: ReviewableEditableFieldSerializer, embed: :objects
has_many :reviewable_scores, serializer: ReviewableScoreSerializer
has_many :bundled_actions, serializer: ReviewableBundledActionSerializer
- has_many :reviewable_histories, serializer: ReviewableHistorySerializer
# Used to keep track of our payload attributes
class_attribute :_payload_for_serialization
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 7833fe2a51f..9b4c0520c79 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -426,13 +426,13 @@ en:
category: "Category:"
conversation:
view_full: "view full conversation"
- history:
- title: "History"
- edited: "Edited"
scores:
- description: "Description"
- score: "Score"
+ date: "Date"
+ type: "Type"
+ status: "Status"
submitted_by: "Submitted By"
+ reviewed_by: "Reviewed By"
+
statuses:
pending:
title: "Pending"
|