diff --git a/app/assets/javascripts/discourse/templates/modal/history.hbs b/app/assets/javascripts/discourse/templates/modal/history.hbs index 5ef0ef98366..ad9930c724c 100644 --- a/app/assets/javascripts/discourse/templates/modal/history.hbs +++ b/app/assets/javascripts/discourse/templates/modal/history.hbs @@ -3,11 +3,16 @@
-
{{{boundI18n revisionsTextKey previousBinding="previousVersion" currentBinding="version" totalBinding="revisions_count"}}}
+
+ {{#if loading}} +
{{i18n loading}}
+ {{else}} + {{boundI18n revisionsTextKey previousBinding="previousVersion" currentBinding="version" totalBinding="revisions_count"}} + {{/if}} +
- {{#if loading}}
{{i18n loading}}
{{/if}}
{{#unless site.mobileView}} diff --git a/app/assets/stylesheets/common/base/history.scss b/app/assets/stylesheets/common/base/history.scss index 13b4da2e7ff..05f86349ff5 100644 --- a/app/assets/stylesheets/common/base/history.scss +++ b/app/assets/stylesheets/common/base/history.scss @@ -1,70 +1,16 @@ // styles that apply to the popup that appears when you show the edit history of a post .modal.history-modal { - .modal-inner-container { - min-width: 960px; - min-height: 500px; - } - #revision-controls { - float: left; - .btn[disabled]:hover { - color: $primary; - } - } #revision-numbers { display: inline-block; - min-width: 80px; + min-width: 100px; text-align: center; } - #display-modes { - text-align: right; - } #revision-loading { - float: left; - margin: 5px 0 0 10px; .fa { margin-right: 7px; } } - #revision-details { - background-color: scale-color-diff(); - padding: 5px; - margin-top: 10px; - } - #revisions { - word-wrap: break-word; - .row, table { - margin-top: 10px; - padding-bottom: 10px; - border-bottom: 1px dotted; - } - } - img { - max-width: 670px; - height: auto; - } - .inline-diff { - width: 670px; - } - .markdown { - font-family: monospace; - font-size: 12px; - width: 100%; - border-collapse: collapse; - border-spacing: 0; - td { - width: 50%; - vertical-align: top; - max-width: 440px; - word-wrap: break-word; - white-space: pre-wrap; - } - } - .span8, .markdown { - img { - max-width: 400px; - } - } ins, .diff-ins { code, img { border: 2px solid $success; @@ -126,9 +72,6 @@ background-color: lighten($highlight, 23%); padding: 3px 5px 5px 5px; } - .modal-header { - height: 42px; - } .fa-ban { color: #f00; } diff --git a/app/assets/stylesheets/desktop.scss b/app/assets/stylesheets/desktop.scss index fa2cf8ed38c..513ac47a5b4 100644 --- a/app/assets/stylesheets/desktop.scss +++ b/app/assets/stylesheets/desktop.scss @@ -15,6 +15,7 @@ @import "desktop/topic"; @import "desktop/upload"; @import "desktop/user"; +@import "desktop/history"; /* These files doesn't actually exist, they are injected by DiscourseSassImporter. */ diff --git a/app/assets/stylesheets/desktop/history.scss b/app/assets/stylesheets/desktop/history.scss new file mode 100644 index 00000000000..75aa5bbbdeb --- /dev/null +++ b/app/assets/stylesheets/desktop/history.scss @@ -0,0 +1,59 @@ +// styles that apply to the popup that appears when you show the edit history of a post + +.modal.history-modal { + .modal-inner-container { + min-width: 960px; + min-height: 500px; + } + #revision-controls { + float: left; + .btn[disabled]:hover { + color: $primary; + } + } + #display-modes { + text-align: right; + } + #revision-details { + background-color: scale-color-diff(); + padding: 5px; + margin-top: 10px; + } + #revisions { + word-wrap: break-word; + .row, table { + margin-top: 10px; + padding-bottom: 10px; + border-bottom: 1px dotted; + } + } + img { + max-width: 670px; + height: auto; + } + .inline-diff { + width: 670px; + } + .markdown { + font-family: monospace; + font-size: 12px; + width: 100%; + border-collapse: collapse; + border-spacing: 0; + td { + width: 50%; + vertical-align: top; + max-width: 440px; + word-wrap: break-word; + white-space: pre-wrap; + } + } + .span8, .markdown { + img { + max-width: 400px; + } + } + .modal-header { + height: 42px; + } +} diff --git a/app/assets/stylesheets/mobile.scss b/app/assets/stylesheets/mobile.scss index c3c022763c7..58636be4cfe 100644 --- a/app/assets/stylesheets/mobile.scss +++ b/app/assets/stylesheets/mobile.scss @@ -16,6 +16,7 @@ @import "mobile/topic"; @import "mobile/upload"; @import "mobile/user"; +@import "mobile/history"; /* These files doesn't actually exist, they are injected by DiscourseSassImporter. */ diff --git a/app/assets/stylesheets/mobile/history.scss b/app/assets/stylesheets/mobile/history.scss new file mode 100644 index 00000000000..518e968ca3f --- /dev/null +++ b/app/assets/stylesheets/mobile/history.scss @@ -0,0 +1,23 @@ +.modal.history-modal { + .modal-body { + max-height: 100% !important; + } + button { + float: none; + } + #display-modes { + display: none; + } + #revision-numbers { + line-height: 2em; + } + #revision-details { + background-color: scale-color-diff(); + padding: 5px; + margin-top: 10px; + } + img { + max-width: 95%; + height: auto; + } +}