diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-flagged-post.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-flagged-post.hbs index 047da85c33b..9f6fd37efcf 100644 --- a/app/assets/javascripts/discourse/templates/components/reviewable-flagged-post.hbs +++ b/app/assets/javascripts/discourse/templates/components/reviewable-flagged-post.hbs @@ -1,12 +1,11 @@ +{{reviewable-topic-link reviewable=reviewable tagName=''}} +
{{reviewable-created-by user=reviewable.target_created_by tagName=''}} -
{{reviewable-created-by-name user=reviewable.target_created_by tagName=''}} - {{reviewable-topic-link reviewable=reviewable}} -
{{{reviewable.cooked}}}
- {{yield}}
+
diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-histories.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-histories.hbs index 318ce235f55..33c3e016ac4 100644 --- a/app/assets/javascripts/discourse/templates/components/reviewable-histories.hbs +++ b/app/assets/javascripts/discourse/templates/components/reviewable-histories.hbs @@ -1,23 +1,29 @@ {{#if filteredHistories}} - + + + + {{#each filteredHistories as |rh|}} {{#unless rh.created}} - + - + + {{/unless}} {{/each}} + +
{{i18n "review.history.title"}}
{{format-date rh.created_at format="medium"}} + {{reviewable-history-description rh}} + {{#user-link user=rs.user}} {{avatar rh.created_by imageSize="tiny"}} {{rh.created_by.username}} {{/user-link}} - {{reviewable-history-description rh}} - {{format-date rh.created_at format="medium"}}
{{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs index 9c2c8d937b0..37737caf73a 100644 --- a/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs +++ b/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs @@ -1,16 +1,12 @@
-
{{reviewable.humanType}}
-
- {{category-badge reviewable.category}} -
- -
+ {{reviewable.humanType}} + {{format-score reviewable.score}} + {{#link-to 'review.show' reviewable.id}}{{age-with-tooltip reviewable.created_at}}{{/link-to}} -
-
{{format-score reviewable.score}}
- -
+ + {{i18n "review.topic_replies" count=reviewable.topic.reply_count}} + {{#if reviewable.approved}} {{d-icon "check"}} {{i18n "review.statuses.approved.title"}} {{else if reviewable.rejected}} @@ -18,7 +14,7 @@ {{else if reviewable.ignored}} {{d-icon "external-link-alt"}} {{i18n "review.statuses.ignored.title"}} {{/if}} -
+
@@ -38,8 +34,10 @@
{{else}} {{#component reviewableComponent reviewable=reviewable tagName=''}} - {{reviewable-scores scores=reviewable.reviewable_scores}} - {{reviewable-histories histories=reviewable.reviewable_histories}} +
+ {{reviewable-scores scores=reviewable.reviewable_scores tagName=''}} + {{reviewable-histories histories=reviewable.reviewable_histories tagName=''}} +
{{/component}} {{/if}}
diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-scores.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-scores.hbs index b9a6bf0046e..1d049169430 100644 --- a/app/assets/javascripts/discourse/templates/components/reviewable-scores.hbs +++ b/app/assets/javascripts/discourse/templates/components/reviewable-scores.hbs @@ -1,24 +1,23 @@ {{#if scores}} - - - - - + {{#each scores as |rs|}} + + + - - {{#if rs.reviewable_conversation}} @@ -37,5 +36,6 @@ {{/if}} {{/each}} +
{{i18n "review.scores.submitted_by"}}{{i18n "review.scores.description"}}{{i18n "review.scores.score"}}
{{d-icon "flag"}} {{rs.score_type.title}} {{format-score rs.score}} {{#user-link user=rs.user}} {{avatar rs.user imageSize="tiny"}} {{rs.user.username}} {{/user-link}} + + {{user-flag-percentage agreed=rs.agree_stats.agreed disagreed=rs.agree_stats.disagreed ignored=rs.agree_stats.ignored}} {{rs.score_type.title}}{{format-score rs.score}}
{{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-topic-link.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-topic-link.hbs index f19fc01dd80..12b2aa3598d 100644 --- a/app/assets/javascripts/discourse/templates/components/reviewable-topic-link.hbs +++ b/app/assets/javascripts/discourse/templates/components/reviewable-topic-link.hbs @@ -1,9 +1,8 @@
{{#if reviewable.topic}} - {{i18n "review.topic"}} {{topic-status topic=reviewable.topic}} {{reviewable.topic.title}} - {{i18n "review.topic_replies" count=reviewable.topic.reply_count}} + {{category-badge reviewable.category}} {{else if (has-block)}} {{yield}} {{else}} diff --git a/app/assets/stylesheets/common/base/reviewables.scss b/app/assets/stylesheets/common/base/reviewables.scss index 0656f122b2c..34f438a4bf1 100644 --- a/app/assets/stylesheets/common/base/reviewables.scss +++ b/app/assets/stylesheets/common/base/reviewables.scss @@ -2,6 +2,7 @@ .reviewable-container { display: flex; flex-direction: row; + margin-top: 1em; .reviewable-list { flex: 1; @@ -91,6 +92,7 @@ .user-flag-percentage { display: flex; align-items: center; + justify-content: flex-end; margin-left: 0.5em; .percentage-label { @@ -122,11 +124,11 @@ color: dark-light-choose($primary-medium, $secondary-medium); display: flex; width: 100%; - margin-bottom: 0.5em; + margin-bottom: 0.15em; font-size: $font-down-1; - align-items: center; + align-items: baseline; .reviewable-type { - margin-right: 1em; + margin-right: 0.25em; } .created-at { a { @@ -136,6 +138,7 @@ } .score { margin-right: 1em; + font-size: $font-down-1; } .status { color: dark-light-choose($primary-high, $secondary-high); @@ -144,11 +147,17 @@ .reviewable-contents { display: flex; + flex-wrap: wrap; } .reviewable-actions { - margin-top: 0.5em; + margin-top: 1.5em; display: flex; + flex-wrap: wrap; + + button { + white-space: nowrap; + } .reviewable-action, .reviewable-action-dropdown { @@ -166,24 +175,48 @@ margin-top: 1em; } +.reviewable-scores-and-history { + display: inline-block; +} + .reviewable-scores, .reviewable-histories { min-width: 50%; + width: 100%; .user { display: flex; align-items: center; + white-space: nowrap; .user-flag-percentage { margin-left: 0.5em; } } - > tr > th { - text-align: left; + + .d-icon { + font-size: $font-down-1; + color: $primary-high; } - > tr > th, - > tr > td { - padding: 0.25em; + + .badge-notification { + line-height: $line-height-medium; + } + + tbody { + border-width: 1px; + td:first-of-type { + padding-right: 1em; + min-width: 150px; + width: 25%; + } + > tr > th { + text-align: left; + } + > tr > th, + > tr > td { + padding: 0.25em; + } } } @@ -207,24 +240,44 @@ .reviewable-queued-post, .reviewable-flagged-post { - .reviewable-contents { - margin-top: 1em; - } - .post-title { background-color: yellow; } .created-by { margin-right: 1em; + padding-top: 0.35em; + } + + .names { + font-weight: bold; + } + + .post-contents-wrapper { + display: flex; } .post-contents { width: 100%; } .post-topic { + width: 100%; font-weight: bold; color: $primary-medium; - margin-bottom: 1em; + margin-bottom: 0.75em; + a { + display: block; + font-size: $font-up-2; + margin-right: 0.75em; + } + .topic-statuses { + &:empty { + display: none; + } + } + .reply-count { + font-size: $font-down-1; + font-weight: normal; + } } } @@ -232,6 +285,7 @@ .post-body { max-width: $topic-body-width; max-height: 300px; + margin-top: 0.5em; overflow-y: auto; p, diff --git a/app/assets/stylesheets/mobile/reviewables.scss b/app/assets/stylesheets/mobile/reviewables.scss index 4d8d074d0d2..50dce6a4d49 100644 --- a/app/assets/stylesheets/mobile/reviewables.scss +++ b/app/assets/stylesheets/mobile/reviewables.scss @@ -54,23 +54,32 @@ } .reviewable-actions { + margin-right: -0.5em; + + > div, + > button { + flex: 0 1 47%; + margin-right: 0.25em; + margin-bottom: 0.5em; + } + .reviewable-action, .reviewable-action-dropdown .dropdown-select-box-header { display: flex; - flex-direction: column; align-items: center; + justify-content: center; .d-icon { - margin: 0; + margin: 0 0.15 0 0; } } +} - .reviewable-action, - .reviewable-action-dropdown { - flex: 1; - } - - .reviewable-action-dropdown:last-of-type { - margin-right: 0; +.reviewable-scores-and-history table { + width: 100%; + table-layout: fixed; + td { + display: block; + white-space: nowrap; } } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 63ed644fb59..1d99af234ef 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -395,8 +395,8 @@ en: one: "1 user" other: "{{count}} users" topic_replies: - one: "(1 reply)" - other: "({{count}} replies)" + one: "1 reply" + other: "{{count}} replies" edit: "Edit" save: "Save" cancel: "Cancel" @@ -437,12 +437,12 @@ en: types: reviewable_flagged_post: - title: 'Flagged Post' + title: "Flagged Post" flagged_by: "Flagged By" reviewable_queued_post: - title: 'Queued Post' + title: "Queued Post" reviewable_user: - title: 'User' + title: "User" approval: title: "Post Needs Approval" description: "We've received your new post but it needs to be approved by a moderator before it will appear. Please be patient."