Version bump

This commit is contained in:
Neil Lalonde 2014-12-12 14:34:42 -05:00
commit c97833b1fc
4771 changed files with 33070 additions and 15522 deletions

23
Gemfile
View File

@ -67,17 +67,19 @@ unless Bundler::Dependency::PLATFORM_MAP.include? :mri_21
end
end
gem 'seed-fu', '~> 2.3.3'
if rails_master?
gem 'arel', git: 'https://github.com/rails/arel.git'
gem 'rails', git: 'https://github.com/rails/rails.git'
gem 'rails-observers', git: 'https://github.com/SamSaffron/rails-observers.git'
gem 'seed-fu', git: 'https://github.com/SamSaffron/seed-fu.git', branch: 'discourse'
else
gem 'seed-fu', '~> 2.3.3'
gem 'rails'
gem 'rails-observers'
end
gem 'actionpack-action_caching'
gem 'rails-observers'
# Rails 4.1.6+ will relax the mail gem version requirement to `~> 2.5, >= 2.5.4`.
# However, mail gem 2.6.x currently does not work with discourse because of the
@ -118,11 +120,7 @@ gem 'fastimage'
gem 'fog', '1.22.1', require: false
gem 'unf', require: false
# see: https://twitter.com/samsaffron/status/412360162297393152
# Massive amount of changes made in branch we use, no PR upstreamed
# We need to get this sorted
# https://github.com/samsaffron/email_reply_parser
gem 'email_reply_parser-discourse', require: 'email_reply_parser'
gem 'email_reply_parser'
# note: for image_optim to correctly work you need
# sudo apt-get install -y advancecomp gifsicle jpegoptim libjpeg-progs optipng pngcrush
@ -144,8 +142,15 @@ gem 'omniauth-github-discourse', require: 'omniauth-github'
gem 'omniauth-oauth2', require: false
gem 'omniauth-google-oauth2'
gem 'oj'
# while resolving https://groups.google.com/forum/#!topic/ruby-pg/5_ylGmog1S4
gem 'pg', '0.15.1'
if rails_master?
# native casting
gem 'pg', '0.18.0.pre20141117110243'
else
# while resolving https://groups.google.com/forum/#!topic/ruby-pg/5_ylGmog1S4
gem 'pg', '0.15.1'
end
gem 'pry-rails', require: false
gem 'rake'

View File

@ -65,7 +65,7 @@ GEM
dotenv (0.11.1)
dotenv-deployment (~> 0.0.2)
dotenv-deployment (0.0.2)
email_reply_parser-discourse (0.6)
email_reply_parser (0.5.8)
ember-data-source (0.14)
ember-source
ember-rails (0.14.1)
@ -82,7 +82,7 @@ GEM
erubis (2.7.0)
eventmachine (1.0.3)
excon (0.39.6)
execjs (2.2.1)
execjs (2.2.2)
exifr (1.1.3)
fabrication (2.9.8)
fakeweb (1.3.0)
@ -99,7 +99,7 @@ GEM
fastimage (1.6.3)
addressable (~> 2.3, >= 2.3.5)
ffi (1.9.5)
flamegraph (0.0.8)
flamegraph (0.0.9)
fast_stack
fog (1.22.1)
fog-brightbox
@ -185,7 +185,7 @@ GEM
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
netrc (0.7.7)
nokogiri (1.6.4.1)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
nokogumbo (1.1.12)
nokogiri
@ -273,7 +273,7 @@ GEM
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.3.2)
rake (10.4.0)
rake-compiler (0.9.3)
rake
rb-fsevent (0.9.4)
@ -390,7 +390,7 @@ GEM
trollop (2.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.5.3)
uglifier (2.6.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.4)
@ -412,7 +412,7 @@ DEPENDENCIES
better_errors
binding_of_caller
certified
email_reply_parser-discourse
email_reply_parser
ember-rails
ember-source (= 1.6.0.beta.2)
eventmachine

View File

@ -7,66 +7,26 @@ GIT
activemodel (>= 3.0)
GIT
remote: https://github.com/rails/arel.git
revision: 1fefe71b1872c0a83f09231164863cd8dbb57174
remote: https://github.com/SamSaffron/rails-observers.git
revision: 7d2222d758603a004f6599f82a7068ffeb2d7ebf
specs:
arel (6.0.0)
rails-observers (0.1.2)
activemodel (> 4.0)
GIT
remote: https://github.com/rails/rails.git
revision: 2f8be7ebafcf7815f9f3ec7983789157525a60fa
remote: https://github.com/SamSaffron/seed-fu.git
revision: d93df3b6364ea938d87c5629bf950b0d1ffe037e
branch: discourse
specs:
actionmailer (4.2.0.beta4)
actionpack (= 4.2.0.beta4)
actionview (= 4.2.0.beta4)
activejob (= 4.2.0.beta4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.0.beta4)
actionview (= 4.2.0.beta4)
activesupport (= 4.2.0.beta4)
rack (~> 1.6.0.beta)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.0.beta4)
activesupport (= 4.2.0.beta4)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.0.beta4)
activesupport (= 4.2.0.beta4)
globalid (>= 0.3.0)
activemodel (4.2.0.beta4)
activesupport (= 4.2.0.beta4)
builder (~> 3.1)
activerecord (4.2.0.beta4)
activemodel (= 4.2.0.beta4)
activesupport (= 4.2.0.beta4)
arel (~> 6.0)
activesupport (4.2.0.beta4)
i18n (>= 0.7.0.beta1, < 0.8)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
rails (4.2.0.beta4)
actionmailer (= 4.2.0.beta4)
actionpack (= 4.2.0.beta4)
actionview (= 4.2.0.beta4)
activejob (= 4.2.0.beta4)
activemodel (= 4.2.0.beta4)
activerecord (= 4.2.0.beta4)
activesupport (= 4.2.0.beta4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.0.beta4)
sprockets-rails (~> 3.0.0.beta1)
railties (4.2.0.beta4)
actionpack (= 4.2.0.beta4)
activesupport (= 4.2.0.beta4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
seed-fu (2.3.3)
activerecord (>= 3.1)
activesupport (>= 3.1)
GIT
remote: https://github.com/rails/arel.git
revision: 98fc25991137ee09b6800578117f8c1c322680f2
specs:
arel (6.0.0)
GIT
remote: https://github.com/rails/sass-rails.git
@ -78,6 +38,61 @@ GIT
sprockets (~> 2.12)
sprockets-rails (>= 2.0, < 4.0)
PATH
remote: ../rails
specs:
actionmailer (5.0.0.alpha)
actionpack (= 5.0.0.alpha)
actionview (= 5.0.0.alpha)
activejob (= 5.0.0.alpha)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (5.0.0.alpha)
actionview (= 5.0.0.alpha)
activesupport (= 5.0.0.alpha)
rack (~> 1.6.0.beta2)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (5.0.0.alpha)
activesupport (= 5.0.0.alpha)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (5.0.0.alpha)
activesupport (= 5.0.0.alpha)
globalid (>= 0.3.0)
activemodel (5.0.0.alpha)
activesupport (= 5.0.0.alpha)
builder (~> 3.1)
activerecord (5.0.0.alpha)
activemodel (= 5.0.0.alpha)
activesupport (= 5.0.0.alpha)
arel (~> 6.0)
activesupport (5.0.0.alpha)
i18n (>= 0.7.0.beta1, < 0.8)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
rails (5.0.0.alpha)
actionmailer (= 5.0.0.alpha)
actionpack (= 5.0.0.alpha)
actionview (= 5.0.0.alpha)
activejob (= 5.0.0.alpha)
activemodel (= 5.0.0.alpha)
activerecord (= 5.0.0.alpha)
activesupport (= 5.0.0.alpha)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.0.alpha)
sprockets-rails
railties (5.0.0.alpha)
actionpack (= 5.0.0.alpha)
activesupport (= 5.0.0.alpha)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
PATH
remote: vendor/gems/rails_multisite
specs:
@ -150,7 +165,7 @@ GEM
fastimage (1.6.3)
addressable (~> 2.3, >= 2.3.5)
ffi (1.9.5)
flamegraph (0.0.8)
flamegraph (0.0.9)
fast_stack
fog (1.22.1)
fog-brightbox
@ -285,7 +300,7 @@ GEM
openid-redis-store (0.0.2)
redis
ruby-openid
pg (0.15.1)
pg (0.18.0.pre20141117110243)
polyglot (0.3.5)
progress (3.0.1)
pry (0.10.1)
@ -300,7 +315,7 @@ GEM
rack (>= 1.1, < 2.0)
qunit-rails (0.0.7)
railties
rack (1.6.0.beta)
rack (1.6.0.beta2)
rack-mini-profiler (0.9.2)
rack (>= 1.1.3)
rack-openid (1.3.1)
@ -318,8 +333,6 @@ GEM
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.1)
loofah (~> 2.0)
rails-observers (0.1.2)
activemodel (~> 4.0)
raindrops (0.13.0)
rake (10.4.0)
rake-compiler (0.9.3)
@ -373,9 +386,6 @@ GEM
nokogiri (>= 1.4.4)
nokogumbo (= 1.1.12)
sass (3.2.19)
seed-fu (2.3.3)
activerecord (>= 3.1, < 4.2)
activesupport (>= 3.1, < 4.2)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
@ -498,7 +508,7 @@ DEPENDENCIES
omniauth-twitter
onebox
openid-redis-store
pg (= 0.15.1)
pg (= 0.18.0.pre20141117110243)
pry-nav
pry-rails
puma
@ -506,7 +516,7 @@ DEPENDENCIES
rack-mini-profiler
rack-protection
rails!
rails-observers
rails-observers!
rails_multisite!
rake
rb-fsevent
@ -525,7 +535,7 @@ DEPENDENCIES
sanitize
sass
sass-rails!
seed-fu (~> 2.3.3)
seed-fu!
shoulda
sidekiq
simple-rss

View File

@ -10,12 +10,12 @@ To learn more about the philosophy and goals of the project, [visit **discourse.
## Screenshots
[![](https://raw2.github.com/discourse/discourse-docimages/master/readme/boing-boing-latest-small2.png)](http://bbs.boingboing.net)
[![](https://raw2.github.com/discourse/discourse-docimages/master/readme/how-to-geek-profile-small2.png?breakcache=1)](http://discuss.howtogeek.com)
[![](https://raw2.github.com/discourse/discourse-docimages/master/readme/new-relic-categories-small2.png)](http://discuss.newrelic.com)
[![](https://raw2.github.com/discourse/discourse-docimages/master/readme/turtle-rock-topic-small2.jpg)](https://talk.turtlerockstudios.com/)
[![](https://raw.github.com/discourse/discourse-docimages/master/readme/nexus-7-mobile-discourse-small3.png)](http://discuss.atom.io)
[![](https://raw.github.com/discourse/discourse-docimages/master/readme/iphone-5s-mobile-discourse-small4.png)](http://discourse.soylent.me)
[![](https://raw.githubusercontent.com/discourse/discourse-docimages/master/readme/boing-boing-latest-small2.png)](http://bbs.boingboing.net)
[![](https://raw.githubusercontent.com/discourse/discourse-docimages/master/readme/how-to-geek-profile-small2.png)](http://discuss.howtogeek.com)
[![](https://raw.githubusercontent.com/discourse/discourse-docimages/master/readme/new-relic-categories-small2.png)](http://discuss.newrelic.com)
[![](https://raw.githubusercontent.com/discourse/discourse-docimages/master/readme/turtle-rock-topic-small2.jpg)](https://talk.turtlerockstudios.com/)
[![](https://raw.githubusercontent.com/discourse/discourse-docimages/master/readme/nexus-7-mobile-discourse-small3.png)](http://discuss.atom.io)
[![](https://raw.githubusercontent.com/discourse/discourse-docimages/master/readme/iphone-5s-mobile-discourse-small4.png)](http://discourse.soylent.me)
## Development

View File

@ -1,12 +1,5 @@
<%
if Rails.env.development?
require_asset ("development/list-view.js")
else
require_asset ("production/list-view.js")
end
require_asset("main_include_admin.js")
DiscoursePluginRegistry.admin_javascripts.each { |js| require_asset(js) }
%>

View File

@ -9,13 +9,8 @@
error="errorAction"
uploadText="UPLOAD"
}}
@class ResumableUploadComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
Discourse.ResumableUploadComponent = Ember.Component.extend({
Discourse.ResumableUploadComponent = Ember.Component.extend(Discourse.StringBuffer, {
tagName: "button",
classNames: ["btn", "ru"],
classNameBindings: ["isUploading"],
@ -25,7 +20,7 @@ Discourse.ResumableUploadComponent = Ember.Component.extend({
isUploading: false,
progress: 0,
shouldRerender: Discourse.View.renderIfChanged("isUploading", "progress"),
rerenderTriggers: ['isUploading', 'progress'],
text: function() {
if (this.get("isUploading")) {
@ -35,7 +30,7 @@ Discourse.ResumableUploadComponent = Ember.Component.extend({
}
}.property("isUploading", "progress"),
render: function(buffer) {
renderString: function(buffer) {
var icon = this.get("isUploading") ? "times" : "upload";
buffer.push("<i class='fa fa-" + icon + "'></i>");
buffer.push("<span class='ru-label'>" + this.get("text") + "</span>");

View File

@ -1,3 +1,5 @@
import { outputExportResult } from 'admin/lib/export-result';
export default Ember.ArrayController.extend(Discourse.Presence, {
loading: false,
@ -7,12 +9,16 @@ export default Ember.ArrayController.extend(Discourse.Presence, {
// feeling lazy
window.location.reload();
});
},
exportScreenedEmailList: function(subject) {
Discourse.ExportCsv.exportScreenedEmailList().then(outputExportResult);
}
},
show: function() {
var self = this;
this.set('loading', true);
self.set('loading', true);
Discourse.ScreenedEmail.findAll().then(function(result) {
self.set('model', result);
self.set('loading', false);

View File

@ -1,10 +1,12 @@
import { outputExportResult } from 'admin/lib/export-result';
export default Ember.ArrayController.extend(Discourse.Presence, {
loading: false,
itemController: 'admin-log-screened-ip-address',
show: function() {
var self = this;
this.set('loading', true);
self.set('loading', true);
Discourse.ScreenedIpAddress.findAll().then(function(result) {
self.set('model', result);
self.set('loading', false);
@ -34,6 +36,10 @@ export default Ember.ArrayController.extend(Discourse.Presence, {
});
}
});
},
exportScreenedIpList: function(subject) {
Discourse.ExportCsv.exportScreenedIpList().then(outputExportResult);
}
}
});

View File

@ -1,12 +1,20 @@
import { outputExportResult } from 'admin/lib/export-result';
export default Ember.ArrayController.extend(Discourse.Presence, {
loading: false,
show: function() {
var self = this;
this.set('loading', true);
self.set('loading', true);
Discourse.ScreenedUrl.findAll().then(function(result) {
self.set('model', result);
self.set('loading', false);
});
},
actions: {
exportScreenedUrlList: function(subject) {
Discourse.ExportCsv.exportScreenedUrlList().then(outputExportResult);
}
}
});

View File

@ -6,6 +6,8 @@
@namespace Discourse
@module Discourse
**/
import { outputExportResult } from 'admin/lib/export-result';
export default Ember.ArrayController.extend(Discourse.Presence, {
loading: false,
filters: {},
@ -60,6 +62,10 @@ export default Ember.ArrayController.extend(Discourse.Presence, {
filterBySubject: function(subject) {
this.set('filters.subject', subject);
},
exportStaffActionLogs: function(subject) {
Discourse.ExportCsv.exportStaffActionLogs().then(outputExportResult);
}
}
});

View File

@ -0,0 +1,7 @@
export function outputExportResult(result) {
if (result.success) {
bootbox.alert(I18n.t("admin.export_csv.success"));
} else {
bootbox.alert(I18n.t("admin.export_csv.failed"));
}
}

View File

@ -298,9 +298,7 @@ Discourse.AdminUser = Discourse.User.extend({
});
},
deleteForbidden: function() {
return (!this.get('can_be_deleted') || this.get('post_count') > 0);
}.property('post_count'),
deleteForbidden: Em.computed.not("canBeDeleted"),
deleteExplanation: function() {
if (this.get('deleteForbidden')) {
@ -316,9 +314,10 @@ Discourse.AdminUser = Discourse.User.extend({
destroy: function(opts) {
var user = this;
var location = document.location.pathname;
var performDestroy = function(block) {
var formData = { context: window.location.pathname };
var formData = { context: location };
if (block) {
formData["block_email"] = true;
formData["block_urls"] = true;
@ -332,7 +331,7 @@ Discourse.AdminUser = Discourse.User.extend({
data: formData
}).then(function(data) {
if (data.deleted) {
document.location = "/admin/users/list/active";
document.location = location;
} else {
bootbox.alert(I18n.t("admin.user.delete_failed"));
if (data.user) {

View File

@ -15,15 +15,42 @@ Discourse.ExportCsv.reopenClass({
@method export_user_list
**/
exportUserList: function() {
return Discourse.ajax("/admin/export_csv/users.json");
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'user'}});
},
/**
Exports screened IPs list
Exports staff action logs
@method export_screened_ips_list
@method export_staff_action_logs
**/
exportScreenedIpsList: function() {
return Discourse.ajax("/admin/export_csv/screened_ips.json");
exportStaffActionLogs: function() {
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'staff_action'}});
},
/**
Exports screened email list
@method export_screened_email_list
**/
exportScreenedEmailList: function() {
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'screened_email'}});
},
/**
Exports screened IP list
@method export_screened_ip_list
**/
exportScreenedIpList: function() {
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'screened_ip'}});
},
/**
Exports screened URL list
@method export_screened_url_list
**/
exportScreenedUrlList: function() {
return Discourse.ajax("/admin/export_csv/export_entity.json", {data: {entity: 'screened_url'}});
}
});

View File

@ -1,11 +1,3 @@
/**
Our data model for interacting with site settings.
@class SiteSetting
@extends Discourse.Model
@namespace Discourse
@module Discourse
**/
Discourse.SiteSetting = Discourse.Model.extend({
validationMessage: null,

View File

@ -1,15 +0,0 @@
export default Discourse.Route.extend({
actions: {
exportScreenedIps: function() {
Discourse.ExportCsv.exportScreenedIpsList().then(function(result) {
if (result.success) {
bootbox.alert(I18n.t("admin.export_csv.success"));
} else {
bootbox.alert(I18n.t("admin.export_csv.failed"));
}
});
}
}
});

View File

@ -0,0 +1,19 @@
export default Discourse.Route.extend({
actions: {
exportUsers: function() {
Discourse.ExportCsv.exportUserList().then(function(result) {
if (result.success) {
bootbox.alert(I18n.t("admin.export_csv.success"));
} else {
bootbox.alert(I18n.t("admin.export_csv.failed"));
}
});
},
deleteUser: function(user) {
Discourse.AdminUser.create(user).destroy({ deletePosts: true });
}
}
});

View File

@ -4,24 +4,24 @@
<div class="full-width">
<ul class="nav nav-pills">
<li>{{#link-to 'admin.dashboard'}}{{i18n admin.dashboard.title}}{{/link-to}}</li>
<li>{{#link-to 'admin.dashboard'}}{{i18n 'admin.dashboard.title'}}{{/link-to}}</li>
{{#if currentUser.admin}}
<li>{{#link-to 'adminSiteSettings'}}{{i18n admin.site_settings.title}}{{/link-to}}</li>
<li>{{#link-to 'adminSiteSettings'}}{{i18n 'admin.site_settings.title'}}{{/link-to}}</li>
{{/if}}
<li>{{#link-to 'adminUsersList.show' 'active'}}{{i18n admin.users.title}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'active'}}{{i18n 'admin.users.title'}}{{/link-to}}</li>
{{#if showBadges}}
<li>{{#link-to 'adminBadges.index'}}{{i18n admin.badges.title}}{{/link-to}}</li>
<li>{{#link-to 'adminBadges.index'}}{{i18n 'admin.badges.title'}}{{/link-to}}</li>
{{/if}}
{{#if currentUser.admin}}
<li>{{#link-to 'adminGroups.index'}}{{i18n admin.groups.title}}{{/link-to}}</li>
<li>{{#link-to 'adminGroups.index'}}{{i18n 'admin.groups.title'}}{{/link-to}}</li>
{{/if}}
<li>{{#link-to 'adminEmail'}}{{i18n admin.email.title}}{{/link-to}}</li>
<li>{{#link-to 'adminFlags'}}{{i18n admin.flags.title}}{{/link-to}}</li>
<li>{{#link-to 'adminLogs'}}{{i18n admin.logs.title}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail'}}{{i18n 'admin.email.title'}}{{/link-to}}</li>
<li>{{#link-to 'adminFlags'}}{{i18n 'admin.flags.title'}}{{/link-to}}</li>
<li>{{#link-to 'adminLogs'}}{{i18n 'admin.logs.title'}}{{/link-to}}</li>
{{#if currentUser.admin}}
<li>{{#link-to 'adminCustomize.colors'}}{{i18n admin.customize.title}}{{/link-to}}</li>
<li>{{#link-to 'admin.api'}}{{i18n admin.api.title}}{{/link-to}}</li>
<li>{{#link-to 'admin.backups'}}{{i18n admin.backups.title}}{{/link-to}}</li>
<li>{{#link-to 'adminCustomize.colors'}}{{i18n 'admin.customize.title'}}{{/link-to}}</li>
<li>{{#link-to 'admin.api'}}{{i18n 'admin.api.title'}}{{/link-to}}</li>
<li>{{#link-to 'admin.backups'}}{{i18n 'admin.backups.title'}}{{/link-to}}</li>
{{/if}}
</ul>

View File

@ -1,8 +1,8 @@
{{#if model}}
<table class='api-keys'>
<tr>
<th>{{i18n admin.api.key}}</th>
<th>{{i18n admin.api.user}}</th>
<th>{{i18n 'admin.api.key'}}</th>
<th>{{i18n 'admin.api.user'}}</th>
<th>&nbsp;</th>
</tr>
{{#each model}}
@ -14,20 +14,20 @@
{{avatar user imageSize="small"}}
{{/link-to}}
{{else}}
{{i18n admin.api.all_users}}
{{i18n 'admin.api.all_users'}}
{{/if}}
</td>
<td>
<button class='btn' {{action "regenerateKey" this}}><i class="fa fa-undo"></i>{{i18n admin.api.regenerate}}</button>
<button class='btn' {{action "revokeKey" this}}><i class="fa fa-times"></i>{{i18n admin.api.revoke}}</button>
<button class='btn' {{action "regenerateKey" this}}><i class="fa fa-undo"></i>{{i18n 'admin.api.regenerate'}}</button>
<button class='btn' {{action "revokeKey" this}}><i class="fa fa-times"></i>{{i18n 'admin.api.revoke'}}</button>
</td>
</tr>
{{/each}}
</table>
{{else}}
<p>{{i18n admin.api.none}}</p>
<p>{{i18n 'admin.api.none'}}</p>
{{/if}}
{{#unless hasMasterKey}}
<button class='btn' {{action "generateMasterKey"}}><i class="fa fa-key"></i>{{i18n admin.api.generate_master}}</button>
<button class='btn' {{action "generateMasterKey"}}><i class="fa fa-key"></i>{{i18n 'admin.api.generate_master'}}</button>
{{/unless }}

View File

@ -1,18 +1,18 @@
<div class="admin-controls">
<div class="span15">
<ul class="nav nav-pills">
<li>{{#link-to "admin.backups.index"}}{{i18n admin.backups.menu.backups}}{{/link-to}}</li>
<li>{{#link-to "admin.backups.logs"}}{{i18n admin.backups.menu.logs}}{{/link-to}}</li>
<li>{{#link-to "admin.backups.index"}}{{i18n 'admin.backups.menu.backups'}}{{/link-to}}</li>
<li>{{#link-to "admin.backups.logs"}}{{i18n 'admin.backups.menu.logs'}}{{/link-to}}</li>
</ul>
</div>
<div class="pull-right">
{{#if canRollback}}
<button {{action "rollback"}} class="btn btn-rollback" title="{{i18n admin.backups.operations.rollback.title}}" {{bind-attr disabled="rollbackDisabled"}}><i class="fa fa-ambulance fa-flip-horizontal"></i>{{i18n admin.backups.operations.rollback.text}}</button>
<button {{action "rollback"}} class="btn btn-rollback" title="{{i18n 'admin.backups.operations.rollback.title'}}" {{bind-attr disabled="rollbackDisabled"}}><i class="fa fa-ambulance fa-flip-horizontal"></i>{{i18n 'admin.backups.operations.rollback.text'}}</button>
{{/if}}
{{#if isOperationRunning}}
<button {{action "cancelOperation"}} class="btn btn-danger" title="{{i18n admin.backups.operations.cancel.title}}"><i class="fa fa-times"></i>{{i18n admin.backups.operations.cancel.text}}</button>
<button {{action "cancelOperation"}} class="btn btn-danger" title="{{i18n 'admin.backups.operations.cancel.title'}}"><i class="fa fa-times"></i>{{i18n 'admin.backups.operations.cancel.text'}}</button>
{{else}}
<button {{action "startBackup"}} class="btn btn-primary" title="{{i18n admin.backups.operations.backup.title}}"><i class="fa fa-rocket"></i>{{i18n admin.backups.operations.backup.text}}</button>
<button {{action "startBackup"}} class="btn btn-primary" title="{{i18n 'admin.backups.operations.backup.title'}}"><i class="fa fa-rocket"></i>{{i18n 'admin.backups.operations.backup.text'}}</button>
{{/if}}
</div>
</div>

View File

@ -1,7 +1,7 @@
<table>
<tr>
<th width="55%">{{i18n admin.backups.columns.filename}}</th>
<th width="10%">{{i18n admin.backups.columns.size}}</th>
<th width="55%">{{i18n 'admin.backups.columns.filename'}}</th>
<th width="10%">{{i18n 'admin.backups.columns.size'}}</th>
<th>
<div class="pull-right">
{{resumable-upload target="/admin/backups/upload" success="uploadSuccess" error="uploadError" uploadText=uploadText}}
@ -15,15 +15,15 @@
<td>{{human-size backup.size}}</td>
<td>
<div class="pull-right">
<a {{bind-attr href="backup.link"}} class="btn download" title="{{i18n admin.backups.operations.download.title}}"><i class="fa fa-download"></i>{{i18n admin.backups.operations.download.text}}</a>
<a {{bind-attr href="backup.link"}} class="btn download" title="{{i18n 'admin.backups.operations.download.title'}}"><i class="fa fa-download"></i>{{i18n 'admin.backups.operations.download.text'}}</a>
<button {{action "destroyBackup" backup}} class="btn btn-danger no-text" {{bind-attr disabled="destroyDisabled" title="destroyTitle"}}><i class="fa fa-trash-o"></i></button>
<button {{action "startRestore" backup}} class="btn" {{bind-attr disabled="restoreDisabled" title="restoreTitle"}}><i class="fa fa-play"></i>{{i18n admin.backups.operations.restore.text}}</button>
<button {{action "startRestore" backup}} class="btn" {{bind-attr disabled="restoreDisabled" title="restoreTitle"}}><i class="fa fa-play"></i>{{i18n 'admin.backups.operations.restore.text'}}</button>
</div>
</td>
</tr>
{{else}}
<tr>
<td>{{i18n admin.backups.none}}</td>
<td>{{i18n 'admin.backups.none'}}</td>
<td></td>
<td></td>
</tr>

View File

@ -1,9 +1,9 @@
<div class='span13'>
<p>{{i18n admin.badges.none_selected}}</p>
<p>{{i18n 'admin.badges.none_selected'}}</p>
<div>
{{#link-to 'adminBadges.show' 'new' class="btn"}}
{{fa-icon "plus"}} {{i18n admin.badges.new}}
{{fa-icon "plus"}} {{i18n 'admin.badges.new'}}
{{/link-to}}
</div>
</div>

View File

@ -1,31 +1,31 @@
<div class='current-badge span13'>
<form class="form-horizontal">
<div>
<label for="name">{{i18n admin.badges.name}}</label>
<label for="name">{{i18n 'admin.badges.name'}}</label>
{{input type="text" name="name" value=buffered.name}}
</div>
{{#if showDisplayName}}
<div>
<strong>{{i18n admin.badges.display_name}}</strong>
<strong>{{i18n 'admin.badges.display_name'}}</strong>
{{buffered.displayName}}
</div>
{{/if}}
<div>
<label for="name">{{i18n admin.badges.icon}}</label>
<label for="name">{{i18n 'admin.badges.icon'}}</label>
{{input type="text" name="name" value=buffered.icon}}
<p class='help'>{{i18n admin.badges.icon_help}}</p>
<p class='help'>{{i18n 'admin.badges.icon_help'}}</p>
</div>
<div>
<label for="name">{{i18n admin.badges.image}}</label>
<label for="name">{{i18n 'admin.badges.image'}}</label>
{{input type="text" name="name" value=buffered.image}}
<p class='help'>{{i18n admin.badges.icon_help}}</p>
<p class='help'>{{i18n 'admin.badges.icon_help'}}</p>
</div>
<div>
<label for="badge_type_id">{{i18n admin.badges.badge_type}}</label>
<label for="badge_type_id">{{i18n 'admin.badges.badge_type'}}</label>
{{view Ember.Select name="badge_type_id"
value=buffered.badge_type_id
content=badgeTypes
@ -35,7 +35,7 @@
</div>
<div>
<label for="badge_grouping_id">{{i18n admin.badges.badge_grouping}}</label>
<label for="badge_grouping_id">{{i18n 'admin.badges.badge_grouping'}}</label>
{{view Ember.Select name="badge_grouping_id"
value=buffered.badge_grouping_id
content=badgeGroupings
@ -46,7 +46,7 @@
<div>
<label for="description">{{i18n admin.badges.description}}</label>
<label for="description">{{i18n 'admin.badges.description'}}</label>
{{#if canEditDescription}}
{{textarea name="description" value=buffered.description}}
{{else}}
@ -55,34 +55,34 @@
</div>
<div>
<label for="query">{{i18n admin.badges.query}}</label>
<label for="query">{{i18n 'admin.badges.query'}}</label>
{{textarea name="query" value=buffered.query disabled=readOnly}}
</div>
{{#if hasQuery}}
<a href {{action "preview" buffered "false"}}>{{i18n admin.badges.preview.link_text}}</a>
<a href {{action "preview" buffered "false"}}>{{i18n 'admin.badges.preview.link_text'}}</a>
|
<a href {{action "preview" buffered "true"}}>{{i18n admin.badges.preview.plan_text}}</a>
<a href {{action "preview" buffered "true"}}>{{i18n 'admin.badges.preview.plan_text'}}</a>
{{#if preview_loading}}
{{i18n loading}}...
{{i18n 'loading'}}...
{{/if}}
<div>
<label>
{{input type="checkbox" checked=buffered.auto_revoke disabled=readOnly}}
{{i18n admin.badges.auto_revoke}}
{{i18n 'admin.badges.auto_revoke'}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.target_posts disabled=readOnly}}
{{i18n admin.badges.target_posts}}
{{i18n 'admin.badges.target_posts'}}
</label>
</div>
<div>
<label for="trigger">{{i18n admin.badges.trigger}}</label>
<label for="trigger">{{i18n 'admin.badges.trigger'}}</label>
{{view Ember.Select name="trigger"
value=buffered.trigger
content=badgeTriggers
@ -95,43 +95,43 @@
<div>
<label>
{{input type="checkbox" checked=buffered.allow_title}}
{{i18n admin.badges.allow_title}}
{{i18n 'admin.badges.allow_title'}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.multiple_grant disabled=readOnly}}
{{i18n admin.badges.multiple_grant}}
{{i18n 'admin.badges.multiple_grant'}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.listable disabled=readOnly}}
{{i18n admin.badges.listable}}
{{i18n 'admin.badges.listable'}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.show_posts disabled=readOnly}}
{{i18n admin.badges.show_posts}}
{{i18n 'admin.badges.show_posts'}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=buffered.enabled}}
{{i18n admin.badges.enabled}}
{{i18n 'admin.badges.enabled'}}
</label>
</div>
<div class='buttons'>
<button {{action "save"}} {{bind-attr disabled=saving}} class='btn btn-primary'>{{i18n admin.badges.save}}</button>
<button {{action "save"}} {{bind-attr disabled=saving}} class='btn btn-primary'>{{i18n 'admin.badges.save'}}</button>
<span class='saving'>{{savingStatus}}</span>
{{#unless readOnly}}
<a {{action "destroy"}} class='delete-link'>{{i18n admin.badges.delete}}</a>
<a {{action "destroy"}} class='delete-link'>{{i18n 'admin.badges.delete'}}</a>
{{/unless}}
</div>
</form>
@ -140,7 +140,7 @@
{{#if grant_count}}
<div class="span13 current-badge-actions">
<div>
{{#link-to 'badges.show' this}}{{i18n badges.granted count=grant_count}}{{/link-to}}
{{#link-to 'badges.show' this}}{{i18n 'badges.granted' count=grant_count}}{{/link-to}}
</div>
</div>
{{/if}}

View File

@ -1,21 +1,21 @@
<div class="badges">
<div class='content-list span6'>
<h3>{{i18n admin.badges.title}}</h3>
<h3>{{i18n 'admin.badges.title'}}</h3>
<ul>
{{#each}}
<li>
{{#link-to 'adminBadges.show' id}}
{{badge-button badge=this}}
{{#if newBadge}}
<span class="list-badge">{{i18n filters.new.lower_title}}</span>
<span class="list-badge">{{i18n 'filters.new.lower_title'}}</span>
{{/if}}
{{/link-to}}
</li>
{{/each}}
</ul>
{{#link-to 'adminBadges.show' 'new' class="btn"}}
{{fa-icon "plus"}} {{i18n admin.badges.new}}
{{fa-icon "plus"}} {{i18n 'admin.badges.new'}}
{{/link-to}}
<br>
<br>

View File

@ -1,10 +1,10 @@
<div class='admin-controls'>
<div class='span15'>
<ul class="nav nav-pills">
<li>{{#link-to 'adminCustomize.colors'}}{{i18n admin.customize.colors.title}}{{/link-to}}</li>
<li>{{#link-to 'adminCustomize.css_html'}}{{i18n admin.customize.css_html.title}}{{/link-to}}</li>
<li>{{#link-to 'adminSiteText'}}{{i18n admin.site_text.title}}{{/link-to}}</li>
<li>{{#link-to 'adminUserFields'}}{{i18n admin.user_fields.title}}{{/link-to}}</li>
<li>{{#link-to 'adminCustomize.colors'}}{{i18n 'admin.customize.colors.title'}}{{/link-to}}</li>
<li>{{#link-to 'adminCustomize.css_html'}}{{i18n 'admin.customize.css_html.title'}}{{/link-to}}</li>
<li>{{#link-to 'adminSiteText'}}{{i18n 'admin.site_text.title'}}{{/link-to}}</li>
<li>{{#link-to 'adminUserFields'}}{{i18n 'admin.user_fields.title'}}{{/link-to}}</li>
</ul>
</div>
</div>

View File

@ -1,5 +1,5 @@
<div class='content-list span6'>
<h3>{{i18n admin.customize.colors.long_title}}</h3>
<h3>{{i18n 'admin.customize.colors.long_title'}}</h3>
<ul>
{{#each model}}
{{#unless is_base}}
@ -7,7 +7,7 @@
{{/unless}}
{{/each}}
</ul>
<button {{action "newColorScheme"}} class='btn'><i class="fa fa-plus"></i>{{i18n admin.customize.new}}</button>
<button {{action "newColorScheme"}} class='btn'><i class="fa fa-plus"></i>{{i18n 'admin.customize.new'}}</button>
</div>
{{#if selectedItem}}
@ -17,16 +17,16 @@
<h1>{{text-field class="style-name" value=name}}</h1>
<div class="controls">
<button {{action "save"}} {{bind-attr disabled="disableSave"}} class='btn'>{{i18n admin.customize.save}}</button>
<button {{action "save"}} {{bind-attr disabled="disableSave"}} class='btn'>{{i18n 'admin.customize.save'}}</button>
<button {{action "toggleEnabled"}} {{bind-attr disabled="disableEnable"}} class="btn">
{{#if enabled}}
{{i18n disable}}
{{i18n 'disable'}}
{{else}}
{{i18n enable}}
{{i18n 'enable'}}
{{/if}}
</button>
<button {{action "copy" this}} class='btn'><i class="fa fa-copy"></i> {{i18n admin.customize.copy}}</button>
<button {{action "destroy"}} class='btn btn-danger'><i class="fa fa-trash-o"></i> {{i18n admin.customize.delete}}</button>
<button {{action "copy" this}} class='btn'><i class="fa fa-copy"></i> {{i18n 'admin.customize.copy'}}</button>
<button {{action "destroy"}} class='btn btn-danger'><i class="fa fa-trash-o"></i> {{i18n 'admin.customize.delete'}}</button>
<span {{bind-attr class=":saving savingStatus::hidden" }}>{{savingStatus}}</span>
</div>
{{/with}}
@ -37,7 +37,7 @@
<div class='search controls'>
<label>
{{input type="checkbox" checked=onlyOverridden}}
{{i18n admin.site_settings.show_overriden}}
{{i18n 'admin.site_settings.show_overriden'}}
</label>
</div>
</div>
@ -47,7 +47,7 @@
<thead>
<tr>
<th></th>
<th class="hex">{{i18n admin.customize.color}}</th>
<th class="hex">{{i18n 'admin.customize.color'}}</th>
<th></th>
</tr>
</thead>
@ -61,20 +61,20 @@
</td>
<td class="hex">{{color-input hexValue=hex brightnessValue=brightness valid=valid}}</td>
<td class="actions">
<button {{bind-attr class=":btn :revert savedIsOverriden::invisible"}} {{action "revert" this}} title="{{i18n admin.customize.colors.revert_title}}">{{i18n revert}}</button>
<button {{bind-attr class=":btn :undo changed::invisible"}} {{action "undo" this}} title="{{i18n admin.customize.colors.undo_title}}">{{i18n undo}}</button>
<button {{bind-attr class=":btn :revert savedIsOverriden::invisible"}} {{action "revert" this}} title="{{i18n 'admin.customize.colors.revert_title'}}">{{i18n 'revert'}}</button>
<button {{bind-attr class=":btn :undo changed::invisible"}} {{action "undo" this}} title="{{i18n 'admin.customize.colors.undo_title'}}">{{i18n 'undo'}}</button>
</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
<p>{{i18n search.no_results}}</p>
<p>{{i18n 'search.no_results'}}</p>
{{/if}}
</div>
</div>
{{else}}
<p class="about">{{i18n admin.customize.colors.about}}</p>
<p class="about">{{i18n 'admin.customize.colors.about'}}</p>
{{/if}}
<div class="clearfix"></div>

View File

@ -1,12 +1,12 @@
<div class='content-list span6'>
<h3>{{i18n admin.customize.css_html.long_title}}</h3>
<h3>{{i18n 'admin.customize.css_html.long_title'}}</h3>
<ul>
{{#each model}}
<li><a {{action "selectStyle" this}} {{bind-attr class="this.selected:active"}}>{{this.description}}</a></li>
{{/each}}
</ul>
<button {{action "newCustomization"}} class='btn'>
{{fa-icon "plus"}}{{i18n admin.customize.new}}
{{fa-icon "plus"}}{{i18n 'admin.customize.new'}}
</button>
</div>
@ -17,12 +17,12 @@
<div class='admin-controls'>
<ul class="nav nav-pills">
<li><a {{bind-attr class="view.stylesheetActive:active"}} {{action "selectStylesheet" target="view"}}>{{i18n admin.customize.css}}</a></li>
<li><a {{bind-attr class="view.headerActive:active"}} {{action "selectHeader" target="view"}}>{{i18n admin.customize.header}}</a></li>
<li><a {{bind-attr class="view.footerActive:active"}} {{action "selectFooter" target="view"}}>{{i18n admin.customize.footer}}</a></li>
<li><a {{bind-attr class="view.mobileStylesheetActive:active"}} {{action "selectMobileStylesheet" target="view"}}>{{fa-icon "mobile"}}&nbsp;{{i18n admin.customize.css}}</a></li>
<li><a {{bind-attr class="view.mobileHeaderActive:active"}} {{action "selectMobileHeader" target="view"}}>{{fa-icon "mobile"}}&nbsp;{{i18n admin.customize.header}}</a></li>
<li><a {{bind-attr class="view.mobileFooterActive:active"}} {{action "selectMobileFooter" target="view"}}>{{fa-icon "mobile"}}&nbsp;{{i18n admin.customize.footer}}</a></li>
<li><a {{bind-attr class="view.stylesheetActive:active"}} {{action "selectStylesheet" target="view"}}>{{i18n 'admin.customize.css'}}</a></li>
<li><a {{bind-attr class="view.headerActive:active"}} {{action "selectHeader" target="view"}}>{{i18n 'admin.customize.header'}}</a></li>
<li><a {{bind-attr class="view.footerActive:active"}} {{action "selectFooter" target="view"}}>{{i18n 'admin.customize.footer'}}</a></li>
<li><a {{bind-attr class="view.mobileStylesheetActive:active"}} {{action "selectMobileStylesheet" target="view"}}>{{fa-icon "mobile"}}&nbsp;{{i18n 'admin.customize.css'}}</a></li>
<li><a {{bind-attr class="view.mobileHeaderActive:active"}} {{action "selectMobileHeader" target="view"}}>{{fa-icon "mobile"}}&nbsp;{{i18n 'admin.customize.header'}}</a></li>
<li><a {{bind-attr class="view.mobileFooterActive:active"}} {{action "selectMobileFooter" target="view"}}>{{fa-icon "mobile"}}&nbsp;{{i18n 'admin.customize.footer'}}</a></li>
</ul>
</div>
@ -37,23 +37,23 @@
{{/with}}
<br>
<div class='status-actions'>
<span>{{i18n admin.customize.override_default}} {{view Ember.Checkbox checkedBinding="selectedItem.override_default_style"}}</span>
<span>{{i18n admin.customize.enabled}} {{view Ember.Checkbox checkedBinding="selectedItem.enabled"}}</span>
<span>{{i18n 'admin.customize.override_default'}} {{view Ember.Checkbox checkedBinding="selectedItem.override_default_style"}}</span>
<span>{{i18n 'admin.customize.enabled'}} {{view Ember.Checkbox checkedBinding="selectedItem.enabled"}}</span>
{{#unless selectedItem.changed}}
<a class='preview-link' {{bind-attr href="selectedItem.previewUrl"}} target='_blank' title="{{i18n admin.customize.explain_preview}}">{{i18n admin.customize.preview}}</a>
<a class='preview-link' {{bind-attr href="selectedItem.previewUrl"}} target='_blank' title="{{i18n 'admin.customize.explain_preview'}}">{{i18n 'admin.customize.preview'}}</a>
|
<a href="/?preview-style=" target='_blank' title="{{i18n admin.customize.explain_undo_preview}}">{{i18n admin.customize.undo_preview}}</a>
<a href="/?preview-style=" target='_blank' title="{{i18n 'admin.customize.explain_undo_preview'}}">{{i18n 'admin.customize.undo_preview'}}</a>
|
<a href="/?preview-style=default" target='_blank' title="{{i18n admin.customize.explain_rescue_preview}}">{{i18n admin.customize.rescue_preview}}</a><br>
<a href="/?preview-style=default" target='_blank' title="{{i18n 'admin.customize.explain_rescue_preview'}}">{{i18n 'admin.customize.rescue_preview'}}</a><br>
{{/unless}}
</div>
<div class='buttons'>
<button {{action "save"}} {{bind-attr disabled="selectedItem.disableSave"}} class='btn'>{{i18n admin.customize.save}}</button>
<button {{action "save"}} {{bind-attr disabled="selectedItem.disableSave"}} class='btn'>{{i18n 'admin.customize.save'}}</button>
<span class='saving'>{{selectedItem.savingStatus}}</span>
<a {{action "destroy"}} class='delete-link'>{{i18n admin.customize.delete}}</a>
<a {{action "destroy"}} class='delete-link'>{{i18n 'admin.customize.delete'}}</a>
</div>
</div>
{{else}}
<p class="about">{{i18n admin.customize.about}}</p>
<p class="about">{{i18n 'admin.customize.about'}}</p>
{{/if}}

View File

@ -24,15 +24,15 @@
<div class="dashboard-stats totals">
<table>
<tr>
<td class="title"><i class='fa fa-shield'></i> {{i18n admin.dashboard.admins}}</td>
<td class="title"><i class='fa fa-shield'></i> {{i18n 'admin.dashboard.admins'}}</td>
<td class="value">{{#link-to 'adminUsersList.show' 'admins'}}{{admins}}{{/link-to}}</td>
<td class="title"><i class='fa fa-ban'></i> {{i18n admin.dashboard.suspended}}</td>
<td class="title"><i class='fa fa-ban'></i> {{i18n 'admin.dashboard.suspended'}}</td>
<td class="value">{{#link-to 'adminUsersList.show' 'suspended'}}{{suspended}}{{/link-to}}</td>
</tr>
<tr>
<td class="title"><i class='fa fa-shield'></i> {{i18n admin.dashboard.moderators}}</td>
<td class="title"><i class='fa fa-shield'></i> {{i18n 'admin.dashboard.moderators'}}</td>
<td class="value">{{#link-to 'adminUsersList.show' 'moderators'}}{{moderators}}{{/link-to}}</td>
<td class="title"><i class='fa fa-ban'></i> {{i18n admin.dashboard.blocked}}</td>
<td class="title"><i class='fa fa-ban'></i> {{i18n 'admin.dashboard.blocked'}}</td>
<td class="value">{{#link-to 'adminUsersList.show' 'blocked'}}{{blocked}}{{/link-to}}</td>
</tr>
</table>
@ -43,11 +43,11 @@
<thead>
<tr>
<th>&nbsp;</th>
<th>{{i18n admin.dashboard.reports.today}}</th>
<th>{{i18n admin.dashboard.reports.yesterday}}</th>
<th>{{i18n admin.dashboard.reports.last_7_days}}</th>
<th>{{i18n admin.dashboard.reports.last_30_days}}</th>
<th>{{i18n admin.dashboard.reports.all}}</th>
<th>{{i18n 'admin.dashboard.reports.today'}}</th>
<th>{{i18n 'admin.dashboard.reports.yesterday'}}</th>
<th>{{i18n 'admin.dashboard.reports.last_7_days'}}</th>
<th>{{i18n 'admin.dashboard.reports.last_30_days'}}</th>
<th>{{i18n 'admin.dashboard.reports.all'}}</th>
</tr>
</thead>
{{#unless loading}}
@ -67,12 +67,12 @@
<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="title" title="{{i18n admin.dashboard.private_messages_title}}"><i class="fa fa-envelope"></i> {{i18n admin.dashboard.private_messages_short}}</th>
<th>{{i18n admin.dashboard.reports.today}}</th>
<th>{{i18n admin.dashboard.reports.yesterday}}</th>
<th>{{i18n admin.dashboard.reports.last_7_days}}</th>
<th>{{i18n admin.dashboard.reports.last_30_days}}</th>
<th>{{i18n admin.dashboard.reports.all}}</th>
<th class="title" title="{{i18n 'admin.dashboard.private_messages_title'}}"><i class="fa fa-envelope"></i> {{i18n 'admin.dashboard.private_messages_short'}}</th>
<th>{{i18n 'admin.dashboard.reports.today'}}</th>
<th>{{i18n 'admin.dashboard.reports.yesterday'}}</th>
<th>{{i18n 'admin.dashboard.reports.last_7_days'}}</th>
<th>{{i18n 'admin.dashboard.reports.last_30_days'}}</th>
<th>{{i18n 'admin.dashboard.reports.all'}}</th>
</tr>
</thead>
{{#unless loading}}
@ -90,10 +90,10 @@
<thead>
<tr>
<th>&nbsp;</th>
<th>{{i18n admin.dashboard.reports.today}}</th>
<th>{{i18n admin.dashboard.reports.yesterday}}</th>
<th>{{i18n admin.dashboard.reports.7_days_ago}}</th>
<th>{{i18n admin.dashboard.reports.30_days_ago}}</th>
<th>{{i18n 'admin.dashboard.reports.today'}}</th>
<th>{{i18n 'admin.dashboard.reports.yesterday'}}</th>
<th>{{i18n 'admin.dashboard.reports.7_days_ago'}}</th>
<th>{{i18n 'admin.dashboard.reports.30_days_ago'}}</th>
</tr>
</thead>
{{#unless loading}}
@ -110,7 +110,7 @@
<div class="look-here"><i class="fa fa-exclamation-triangle"></i></div>
<div class="problem-messages">
<p {{bind-attr class="loadingProblems:invisible"}}>
{{i18n admin.dashboard.problems_found}}
{{i18n 'admin.dashboard.problems_found'}}
<ul {{bind-attr class="loadingProblems:invisible"}}>
{{#each problem in problems}}
<li>{{{problem}}}</li>
@ -118,8 +118,8 @@
</ul>
</p>
<p class="actions">
<small>{{i18n admin.dashboard.last_checked}}: {{problemsTimestamp}}</small>
<button {{action "refreshProblems"}} class="btn btn-small"><i class="fa fa-refresh"></i>{{i18n admin.dashboard.refresh_problems}}</button>
<small>{{i18n 'admin.dashboard.last_checked'}}: {{problemsTimestamp}}</small>
<button {{action "refreshProblems"}} class="btn btn-small"><i class="fa fa-refresh"></i>{{i18n 'admin.dashboard.refresh_problems'}}</button>
</p>
</div>
<div class="clearfix"></div>
@ -130,8 +130,8 @@
<div class="look-here">&nbsp;</div>
<div class="problem-messages">
<p>
{{i18n admin.dashboard.no_problems}}
<button {{action "refreshProblems"}} class="btn btn-small"><i class="fa fa-refresh"></i>{{i18n admin.dashboard.refresh_problems}}</button>
{{i18n 'admin.dashboard.no_problems'}}
<button {{action "refreshProblems"}} class="btn btn-small"><i class="fa fa-refresh"></i>{{i18n 'admin.dashboard.refresh_problems'}}</button>
</p>
</div>
<div class="clearfix"></div>
@ -143,7 +143,7 @@
<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="title">{{top_referred_topics.title}} ({{i18n admin.dashboard.reports.last_30_days}})</th>
<th class="title">{{top_referred_topics.title}} ({{i18n 'admin.dashboard.reports.last_30_days'}})</th>
<th>{{top_referred_topics.ytitles.num_clicks}}</th>
</tr>
</thead>
@ -170,7 +170,7 @@
<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="title">{{top_traffic_sources.title}} ({{i18n admin.dashboard.reports.last_30_days}})</th>
<th class="title">{{top_traffic_sources.title}} ({{i18n 'admin.dashboard.reports.last_30_days'}})</th>
<th>{{top_traffic_sources.ytitles.num_clicks}}</th>
<th>{{top_traffic_sources.ytitles.num_topics}}</th>
</tr>
@ -193,7 +193,7 @@
<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="title">{{top_referrers.title}} ({{i18n admin.dashboard.reports.last_30_days}})</th>
<th class="title">{{top_referrers.title}} ({{i18n 'admin.dashboard.reports.last_30_days'}})</th>
<th>{{top_referrers.ytitles.num_clicks}}</th>
<th>{{top_referrers.ytitles.num_topics}}</th>
</tr>
@ -215,7 +215,7 @@
<div class='clearfix'></div>
<div class="dashboard-stats pull-right">
<div class="pull-right">{{i18n admin.dashboard.last_updated}} {{updatedTimestamp}}</div>
<div class="pull-right">{{i18n 'admin.dashboard.last_updated'}} {{updatedTimestamp}}</div>
<div class='clearfix'></div>
</div>
<div class='clearfix'></div>

View File

@ -1,11 +1,11 @@
<div class='admin-controls'>
<div class='span15'>
<ul class="nav nav-pills">
<li>{{#link-to 'adminEmail.index'}}{{i18n admin.email.settings}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.all'}}{{i18n admin.email.all}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.sent'}}{{i18n admin.email.sent}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.skipped'}}{{i18n admin.email.skipped}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.previewDigest'}}{{i18n admin.email.preview_digest}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.index'}}{{i18n 'admin.email.settings'}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.all'}}{{i18n 'admin.email.all'}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.sent'}}{{i18n 'admin.email.sent'}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.skipped'}}{{i18n 'admin.email.skipped'}}{{/link-to}}</li>
<li>{{#link-to 'adminEmail.previewDigest'}}{{i18n 'admin.email.preview_digest'}}{{/link-to}}</li>
</ul>
</div>
</div>

View File

@ -1,16 +1,16 @@
<table class='table'>
<thead>
<tr>
<th>{{i18n admin.email.time}}</th>
<th>{{i18n admin.email.user}}</th>
<th>{{i18n admin.email.to_address}}</th>
<th>{{i18n admin.email.email_type}}</th>
<th>{{i18n admin.email.skipped_reason}}</th>
<th>{{i18n 'admin.email.time'}}</th>
<th>{{i18n 'admin.email.user'}}</th>
<th>{{i18n 'admin.email.to_address'}}</th>
<th>{{i18n 'admin.email.email_type'}}</th>
<th>{{i18n 'admin.email.skipped_reason'}}</th>
</tr>
</thead>
<tr class="filters">
<td>{{i18n admin.email.logs.filters.title}}</td>
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
@ -33,7 +33,7 @@
<td>{{skipped_reason}}</td>
</tr>
{{else}}
<tr><td colspan="5">{{i18n admin.email.logs.none}}</td></tr>
<tr><td colspan="5">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/each}}
</table>

View File

@ -1,6 +1,6 @@
<table class="table">
<tr>
<th>{{i18n admin.email.delivery_method}}</th>
<th>{{i18n 'admin.email.delivery_method'}}</th>
<td>{{model.delivery_method}}</td>
</tr>
@ -14,14 +14,14 @@
<div class='admin-controls'>
{{#if sendingEmail}}
<div class='span15 controls'>{{i18n admin.email.sending_test}}</div>
<div class='span15 controls'>{{i18n 'admin.email.sending_test'}}</div>
{{else}}
<div class='controls'>
{{text-field value=testEmailAddress placeholderKey="admin.email.test_email_address"}}
</div>
<div class='span10 controls'>
<button class='btn btn-primary' {{action "sendTestEmail"}} {{bind-attr disabled="sendTestEmailDisabled"}}>{{i18n admin.email.send_test}}</button>
{{#if sentTestEmail}}<span class='result-message'>{{i18n admin.email.sent_test}}</span>{{/if}}
<button class='btn btn-primary' {{action "sendTestEmail"}} {{bind-attr disabled="sendTestEmailDisabled"}}>{{i18n 'admin.email.send_test'}}</button>
{{#if sentTestEmail}}<span class='result-message'>{{i18n 'admin.email.sent_test'}}</span>{{/if}}
</div>
{{/if}}
</div>

View File

@ -1,19 +1,19 @@
<p>{{i18n admin.email.preview_digest_desc}}</p>
<p>{{i18n 'admin.email.preview_digest_desc'}}</p>
<div class='admin-controls'>
<div class='span7 controls'>
<label for='last-seen'>{{i18n admin.email.last_seen_user}}</label>
<label for='last-seen'>{{i18n 'admin.email.last_seen_user'}}</label>
{{input type="date" value=lastSeen id="last-seen"}}
</div>
<div>
<button class='btn' {{action "refresh"}}>{{i18n admin.email.refresh}}</button>
<button class='btn' {{action "refresh"}}>{{i18n 'admin.email.refresh'}}</button>
</div>
<div class="span7 toggle">
<label>{{i18n admin.email.format}}</label>
<label>{{i18n 'admin.email.format'}}</label>
{{#if showHtml}}
<span>{{i18n admin.email.html}}</span> | <a href='#' {{action "toggleShowHtml"}}>{{i18n admin.email.text}}</a>
<span>{{i18n 'admin.email.html'}}</span> | <a href='#' {{action "toggleShowHtml"}}>{{i18n 'admin.email.text'}}</a>
{{else}}
<a href='#' {{action "toggleShowHtml"}}>{{i18n admin.email.html}}</a> | <span>{{i18n admin.email.text}}</span>
<a href='#' {{action "toggleShowHtml"}}>{{i18n 'admin.email.html'}}</a> | <span>{{i18n 'admin.email.text'}}</span>
{{/if}}
</div>
</div>

View File

@ -1,16 +1,16 @@
<table class='table'>
<thead>
<tr>
<th>{{i18n admin.email.sent_at}}</th>
<th>{{i18n admin.email.user}}</th>
<th>{{i18n admin.email.to_address}}</th>
<th>{{i18n admin.email.email_type}}</th>
<th>{{i18n admin.email.reply_key}}</th>
<th>{{i18n 'admin.email.sent_at'}}</th>
<th>{{i18n 'admin.email.user'}}</th>
<th>{{i18n 'admin.email.to_address'}}</th>
<th>{{i18n 'admin.email.email_type'}}</th>
<th>{{i18n 'admin.email.reply_key'}}</th>
</tr>
</thead>
<tr class="filters">
<td>{{i18n admin.email.logs.filters.title}}</td>
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
@ -33,7 +33,7 @@
<td>{{reply_key}}</td>
</tr>
{{else}}
<tr><td colspan="5">{{i18n admin.email.logs.none}}</td></tr>
<tr><td colspan="5">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/each}}
</table>

View File

@ -1,16 +1,16 @@
<table class='table'>
<thead>
<tr>
<th>{{i18n admin.email.time}}</th>
<th>{{i18n admin.email.user}}</th>
<th>{{i18n admin.email.to_address}}</th>
<th>{{i18n admin.email.email_type}}</th>
<th>{{i18n admin.email.skipped_reason}}</th>
<th>{{i18n 'admin.email.time'}}</th>
<th>{{i18n 'admin.email.user'}}</th>
<th>{{i18n 'admin.email.to_address'}}</th>
<th>{{i18n 'admin.email.email_type'}}</th>
<th>{{i18n 'admin.email.skipped_reason'}}</th>
</tr>
</thead>
<tr class="filters">
<td>{{i18n admin.email.logs.filters.title}}</td>
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
@ -33,7 +33,7 @@
<td>{{skipped_reason}}</td>
</tr>
{{else}}
<tr><td colspan="5">{{i18n admin.email.logs.none}}</td></tr>
<tr><td colspan="5">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/each}}
</table>

View File

@ -4,8 +4,8 @@
<tr>
<th class='user'></th>
<th class='excerpt'></th>
<th class='flaggers'>{{i18n admin.flags.flagged_by}}</th>
<th class='flaggers'>{{#if adminOldFlagsView}}{{i18n admin.flags.resolved_by}}{{/if}}</th>
<th class='flaggers'>{{i18n 'admin.flags.flagged_by'}}</th>
<th class='flaggers'>{{#if adminOldFlagsView}}{{i18n 'admin.flags.resolved_by'}}{{/if}}</th>
</tr>
</thead>
<tbody>
@ -16,12 +16,12 @@
{{#if flaggedPost.postAuthorFlagged}}
{{#if flaggedPost.user}}
{{#link-to 'adminUser' flaggedPost.user}}{{avatar flaggedPost.user imageSize="small"}}{{/link-to}}
{{#if flaggedPost.wasEdited}}<i class="fa fa-pencil" title="{{i18n admin.flags.was_edited}}"></i>{{/if}}
{{#if flaggedPost.wasEdited}}<i class="fa fa-pencil" title="{{i18n 'admin.flags.was_edited'}}"></i>{{/if}}
{{/if}}
{{/if}}
{{#if adminActiveFlagsView}}
{{#if flaggedPost.previous_flags_count}}
<span title="{{i18n admin.flags.previous_flags_count count=flaggedPost.previous_flags_count}}" class="badge-notification flagged-posts">{{flaggedPost.previous_flags_count}}</span>
<span title="{{i18n 'admin.flags.previous_flags_count' count=flaggedPost.previous_flags_count}}" class="badge-notification flagged-posts">{{flaggedPost.previous_flags_count}}</span>
{{/if}}
{{/if}}
</td>
@ -78,7 +78,7 @@
{{format-age disposedAt}}
{{{dispositionIcon}}}
{{#if tookAction}}
<i class='fa fa-gavel' title='{{i18n admin.flags.took_action}}'></i>
<i class='fa fa-gavel' title='{{i18n 'admin.flags.took_action'}}'></i>
{{/if}}
</td>
</tr>
@ -95,7 +95,7 @@
<td></td>
<td colspan="3">
<div>
{{{i18n admin.flags.topic_flagged}}}&nbsp;<a href='{{unbound flaggedPost.url}}' class="btn">{{i18n admin.flags.visit_topic}}</a>
{{{i18n 'admin.flags.topic_flagged'}}}&nbsp;<a href='{{unbound flaggedPost.url}}' class="btn">{{i18n 'admin.flags.visit_topic'}}</a>
</div>
</td>
</tr>
@ -114,12 +114,12 @@
<p>
{{#link-to 'adminUser' reply.user}}{{avatar reply.user imageSize="small"}}{{/link-to}}&nbsp;{{{reply.excerpt}}}
{{#if hasMore}}
<a href="{{unbound permalink}}">{{i18n admin.flags.more}}</a>
<a href="{{unbound permalink}}">{{i18n 'admin.flags.more'}}</a>
{{/if}}
</p>
{{/if}}
<a href="{{unbound permalink}}">
<button class='btn btn-reply'><i class="fa fa-reply"></i>&nbsp;{{i18n admin.flags.reply_message}}</button>
<button class='btn btn-reply'><i class="fa fa-reply"></i>&nbsp;{{i18n 'admin.flags.reply_message'}}</button>
</a>
{{/if}}
</div>
@ -130,14 +130,14 @@
<tr>
<td colspan="4" class="action">
{{#if adminActiveFlagsView}}
<button title='{{i18n admin.flags.agree_title}}' class='btn' {{action "showAgreeFlagModal" flaggedPost}}><i class="fa fa-thumbs-o-up"></i>{{i18n admin.flags.agree}}&hellip;</button>
<button title='{{i18n 'admin.flags.agree_title'}}' class='btn' {{action "showAgreeFlagModal" flaggedPost}}><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.agree'}}&hellip;</button>
{{#if flaggedPost.postHidden}}
<button title='{{i18n admin.flags.disagree_flag_unhide_post_title}}' class='btn' {{action "disagreeFlags" flaggedPost}}><i class="fa fa-thumbs-o-down"></i>{{i18n admin.flags.disagree_flag_unhide_post}}</button>
<button title='{{i18n 'admin.flags.disagree_flag_unhide_post_title'}}' class='btn' {{action "disagreeFlags" flaggedPost}}><i class="fa fa-thumbs-o-down"></i>{{i18n 'admin.flags.disagree_flag_unhide_post'}}</button>
{{else}}
<button title='{{i18n admin.flags.disagree_flag_title}}' class='btn' {{action "disagreeFlags" flaggedPost}}><i class="fa fa-thumbs-o-down"></i>{{i18n admin.flags.disagree_flag}}</button>
<button title='{{i18n 'admin.flags.disagree_flag_title'}}' class='btn' {{action "disagreeFlags" flaggedPost}}><i class="fa fa-thumbs-o-down"></i>{{i18n 'admin.flags.disagree_flag'}}</button>
{{/if}}
<button title='{{i18n admin.flags.defer_flag_title}}' class='btn' {{action "deferFlags" flaggedPost}}><i class="fa fa-external-link"></i>{{i18n admin.flags.defer_flag}}</button>
<button title='{{i18n admin.flags.delete_title}}' class='btn btn-danger' {{action "showDeleteFlagModal" flaggedPost}}><i class="fa fa-trash-o"></i>{{i18n admin.flags.delete}}&hellip;</button>
<button title='{{i18n 'admin.flags.defer_flag_title'}}' class='btn' {{action "deferFlags" flaggedPost}}><i class="fa fa-external-link"></i>{{i18n 'admin.flags.defer_flag'}}</button>
<button title='{{i18n 'admin.flags.delete_title'}}' class='btn btn-danger' {{action "showDeleteFlagModal" flaggedPost}}><i class="fa fa-trash-o"></i>{{i18n 'admin.flags.delete'}}&hellip;</button>
{{/if}}
</td>
</tr>
@ -149,5 +149,5 @@
{{loading-spinner condition=view.loading}}
{{else}}
<p>{{i18n admin.flags.no_results}}</p>
<p>{{i18n 'admin.flags.no_results'}}</p>
{{/if}}

View File

@ -1,8 +1,8 @@
<div class='admin-controls'>
<div class='span15'>
<ul class="nav nav-pills">
<li>{{#link-to 'adminFlags.list' 'active'}}{{i18n admin.flags.active}}{{/link-to}}</li>
<li>{{#link-to 'adminFlags.list' 'old'}}{{i18n admin.flags.old}}{{/link-to}}</li>
<li>{{#link-to 'adminFlags.list' 'active'}}{{i18n 'admin.flags.active'}}{{/link-to}}</li>
<li>{{#link-to 'adminFlags.list' 'old'}}{{i18n 'admin.flags.old'}}{{/link-to}}</li>
</ul>
</div>
</div>

View File

@ -5,25 +5,25 @@
{{/if}}
<div class="control-group">
<label class="control-label">{{i18n admin.groups.group_members}}</label>
<label class="control-label">{{i18n 'admin.groups.group_members'}}</label>
<div class="controls">
{{user-selector usernames=usernames id="group-users" placeholderKey="admin.groups.selector_placeholder" tabindex="1" disabled=automatic}}
</div>
</div>
<div class="control-group">
<div class="controls">
{{input type="checkbox" checked=visible}} {{i18n groups.visible}}
{{input type="checkbox" checked=visible}} {{i18n 'groups.visible'}}
</div>
</div>
<div class="control-group">
<label class="control-label">{{i18n groups.alias_levels.title}}</label>
<label class="control-label">{{i18n 'groups.alias_levels.title'}}</label>
<div class="controls">
{{combo-box valueAttribute="value" value=alias_level content=aliasLevelOptions}}
</div>
</div>
<div class='controls'>
<button {{action "save"}} {{bind-attr disabled="disableSave"}} class='btn'>{{i18n admin.customize.save}}</button>
<button {{action "save"}} {{bind-attr disabled="disableSave"}} class='btn'>{{i18n 'admin.customize.save'}}</button>
{{#unless automatic}}
<button {{action "destroy"}} class='btn btn-danger'><i class="fa fa-trash-o"></i>{{i18n admin.customize.delete}}</button>
<button {{action "destroy"}} class='btn btn-danger'><i class="fa fa-trash-o"></i>{{i18n 'admin.customize.delete'}}</button>
{{/unless}}
</div>

View File

@ -1,6 +1,6 @@
<div class='row groups'>
<div class='content-list span6'>
<h3>{{i18n admin.groups.edit}}</h3>
<h3>{{i18n 'admin.groups.edit'}}</h3>
<ul>
{{#each group in arrangedContent}}
<li>
@ -9,8 +9,8 @@
{{/each}}
</ul>
<div class='controls'>
<button class='btn' {{bind-attr disabled="refreshingAutoGroups"}} {{action "refreshAutoGroups"}}><i class="fa fa-refresh"></i>{{i18n admin.groups.refresh}}</button>
<button class='btn' {{action "newGroup"}}><i class="fa fa-plus"></i>{{i18n admin.groups.new}}</button>
<button class='btn' {{bind-attr disabled="refreshingAutoGroups"}} {{action "refreshAutoGroups"}}><i class="fa fa-refresh"></i>{{i18n 'admin.groups.refresh'}}</button>
<button class='btn' {{action "newGroup"}}><i class="fa fa-plus"></i>{{i18n 'admin.groups.new'}}</button>
</div>
</div>

View File

@ -1 +1 @@
{{i18n admin.groups.about}}
{{i18n 'admin.groups.about'}}

View File

@ -1,16 +1,13 @@
<div class='admin-controls'>
<div class='span15'>
<ul class="nav nav-pills">
<li>{{#link-to 'adminLogs.staffActionLogs'}}{{i18n admin.logs.staff_actions.title}}{{/link-to}}</li>
<li>{{#link-to 'adminLogs.screenedEmails'}}{{i18n admin.logs.screened_emails.title}}{{/link-to}}</li>
<li>{{#link-to 'adminLogs.screenedIpAddresses'}}{{i18n admin.logs.screened_ips.title}}{{/link-to}}</li>
<li>{{#link-to 'adminLogs.screenedUrls'}}{{i18n admin.logs.screened_urls.title}}{{/link-to}}</li>
<li><a href="/logs" data-auto-route="true">{{i18n admin.logs.logster.title}}</a></li>
<li>{{#link-to 'adminLogs.staffActionLogs'}}{{i18n 'admin.logs.staff_actions.title'}}{{/link-to}}</li>
<li>{{#link-to 'adminLogs.screenedEmails'}}{{i18n 'admin.logs.screened_emails.title'}}{{/link-to}}</li>
<li>{{#link-to 'adminLogs.screenedIpAddresses'}}{{i18n 'admin.logs.screened_ips.title'}}{{/link-to}}</li>
<li>{{#link-to 'adminLogs.screenedUrls'}}{{i18n 'admin.logs.screened_urls.title'}}{{/link-to}}</li>
<li><a href="/logs" data-auto-route="true">{{i18n 'admin.logs.logster.title'}}</a></li>
</ul>
</div>
<div class="pull-right">
<button {{action "exportScreenedIps"}} class="btn" title="{{i18n admin.export_csv.screened_ips.title}}">{{fa-icon "download"}}{{i18n admin.export_csv.button_text}}</button>
</div>
</div>
<div class="admin-container">

View File

@ -1,22 +1,22 @@
<section class="field">
<b>{{i18n admin.customize.css}}</b>:
<b>{{i18n 'admin.customize.css'}}</b>:
{{#if stylesheet}}
({{i18n character_count count=stylesheet.length}})
({{i18n 'character_count' count=stylesheet.length}})
{{/if}}
<br/>
{{textarea value=stylesheet class="plain"}}
</section>
<section class="field">
<b>{{i18n admin.customize.header}}</b>:
<b>{{i18n 'admin.customize.header'}}</b>:
{{#if header}}
({{i18n character_count count=header.length}})
({{i18n 'character_count' count=header.length}})
{{/if}}
<br/>
{{textarea value=header class="plain"}}
</section>
<section class="field">
<b>{{i18n admin.customize.enabled}}</b>: {{enabled}}
<b>{{i18n 'admin.customize.enabled'}}</b>: {{enabled}}
</section>
<section class="field">
<b>{{i18n admin.customize.override_default}}</b>: {{override_default_style}}
<b>{{i18n 'admin.customize.override_default'}}</b>: {{override_default_style}}
</section>

View File

@ -2,5 +2,5 @@
<pre>{{details}}</pre>
</div>
<div class="modal-footer">
<button class='btn btn-primary' {{action "closeModal"}}>{{i18n close}}</button>
<button class='btn btn-primary' {{action "closeModal"}}>{{i18n 'close'}}</button>
</div>

View File

@ -1,16 +1,20 @@
<p>{{i18n admin.logs.screened_emails.description}}</p>
<p>
{{i18n 'admin.logs.screened_emails.description'}}
<button class="btn pull-right" {{action "exportScreenedEmailList"}} title="{{i18n 'admin.export_csv.button_title.screened_email'}}">{{fa-icon "download"}}{{i18n 'admin.export_csv.button_text'}}</button>
</p>
</br>
{{#loading-spinner condition=loading}}
{{#if model.length}}
<div class='table screened-emails'>
<div class="heading-container">
<div class="col heading first email">{{i18n admin.logs.screened_emails.email}}</div>
<div class="col heading action">{{i18n admin.logs.action}}</div>
<div class="col heading match_count">{{i18n admin.logs.match_count}}</div>
<div class="col heading last_match_at">{{i18n admin.logs.last_match_at}}</div>
<div class="col heading created_at">{{i18n admin.logs.created_at}}</div>
<div class="col heading ip_address">{{i18n admin.logs.ip_address}}</div>
<div class="col heading first email">{{i18n 'admin.logs.screened_emails.email'}}</div>
<div class="col heading action">{{i18n 'admin.logs.action'}}</div>
<div class="col heading match_count">{{i18n 'admin.logs.match_count'}}</div>
<div class="col heading last_match_at">{{i18n 'admin.logs.last_match_at'}}</div>
<div class="col heading created_at">{{i18n 'admin.logs.created_at'}}</div>
<div class="col heading ip_address">{{i18n 'admin.logs.ip_address'}}</div>
<div class="col heading action"></div>
<div class="clearfix"></div>
</div>
@ -19,6 +23,6 @@
</div>
{{else}}
{{i18n search.no_results}}
{{i18n 'search.no_results'}}
{{/if}}
{{/loading-spinner}}

View File

@ -6,5 +6,5 @@
<div class="col last_match_at">{{age-with-tooltip last_match_at}}</div>
<div class="col created_at">{{age-with-tooltip created_at}}</div>
<div class="col ip_address">{{ip_address}}</div>
<div class="col action"><button class="btn" {{action "clearBlock" this}}><i class='fa fa-check'></i> {{i18n admin.logs.screened_emails.actions.allow}}</button></div>
<div class="col action"><button class="btn" {{action "clearBlock" this}}><i class='fa fa-check'></i> {{i18n 'admin.logs.screened_emails.actions.allow'}}</button></div>
<div class="clearfix"></div>

View File

@ -1,5 +1,8 @@
<p>{{i18n admin.logs.screened_ips.description}}</p>
<button class="btn pull-right" {{action "rollUp"}} title="{{i18n admin.logs.screened_ips.roll_up.title}}">{{i18n admin.logs.screened_ips.roll_up.text}}</button>
<p>{{i18n 'admin.logs.screened_ips.description'}}</p>
<div class="pull-right">
<button class="btn" {{action "rollUp"}} title="{{i18n 'admin.logs.screened_ips.roll_up.title'}}">{{i18n 'admin.logs.screened_ips.roll_up.text'}}</button>
<button class="btn" {{action "exportScreenedIpList"}} title="{{i18n 'admin.export_csv.button_title.screened_ip'}}">{{fa-icon "download"}}{{i18n 'admin.export_csv.button_text'}}</button>
</div>
{{screened-ip-address-form action="recordAdded"}}
<br/>
@ -8,11 +11,11 @@
<div class='table admin-logs-table screened-ip-addresses'>
<div class="heading-container">
<div class="col heading first ip_address">{{i18n admin.logs.ip_address}}</div>
<div class="col heading action">{{i18n admin.logs.action}}</div>
<div class="col heading match_count">{{i18n admin.logs.match_count}}</div>
<div class="col heading last_match_at">{{i18n admin.logs.last_match_at}}</div>
<div class="col heading created_at">{{i18n admin.logs.created_at}}</div>
<div class="col heading first ip_address">{{i18n 'admin.logs.ip_address'}}</div>
<div class="col heading action">{{i18n 'admin.logs.action'}}</div>
<div class="col heading match_count">{{i18n 'admin.logs.match_count'}}</div>
<div class="col heading last_match_at">{{i18n 'admin.logs.last_match_at'}}</div>
<div class="col heading created_at">{{i18n 'admin.logs.created_at'}}</div>
<div class="col heading actions"></div>
<div class="clearfix"></div>
</div>
@ -21,6 +24,6 @@
</div>
{{else}}
{{i18n search.no_results}}
{{i18n 'search.no_results'}}
{{/if}}
{{/loading-spinner}}

View File

@ -27,13 +27,13 @@
<button class="btn btn-danger" {{action "destroy" this}}><i class="fa fa-trash-o"></i></button>
<button class="btn" {{action "edit" this}}><i class="fa fa-pencil"></i></button>
{{#if isBlocked}}
<button class="btn" {{action "allow" this}}><i {{bind-attr class=":fa doNothingIcon"}}></i> {{i18n admin.logs.screened_ips.actions.do_nothing}}</button>
<button class="btn" {{action "allow" this}}><i {{bind-attr class=":fa doNothingIcon"}}></i> {{i18n 'admin.logs.screened_ips.actions.do_nothing'}}</button>
{{else}}
<button class="btn" {{action "block" this}}><i {{bind-attr class=":fa blockIcon"}}></i> {{i18n admin.logs.screened_ips.actions.block}}</button>
<button class="btn" {{action "block" this}}><i {{bind-attr class=":fa blockIcon"}}></i> {{i18n 'admin.logs.screened_ips.actions.block'}}</button>
{{/if}}
{{else}}
<button class="btn" {{action "save" this}}>{{i18n admin.logs.save}}</button>
<a {{action "cancel" this}}>{{i18n cancel}}</a>
<button class="btn" {{action "save" this}}>{{i18n 'admin.logs.save'}}</button>
<a {{action "cancel" this}}>{{i18n 'cancel'}}</a>
{{/unless}}
</div>
<div class="clearfix"></div>

View File

@ -1,20 +1,24 @@
<p>{{i18n admin.logs.screened_urls.description}}</p>
<p>
{{i18n 'admin.logs.screened_urls.description'}}
<button class="btn pull-right" {{action "exportScreenedUrlList"}} title="{{i18n 'admin.export_csv.button_title.screened_url'}}">{{fa-icon "download"}}{{i18n 'admin.export_csv.button_text'}}</button>
</p>
</br>
{{#loading-spinner condition=loading}}
{{#if model.length}}
<div class='table screened-urls'>
<div class="heading-container">
<div class="col heading first domain">{{i18n admin.logs.screened_urls.domain}}</div>
<div class="col heading action">{{i18n admin.logs.action}}</div>
<div class="col heading match_count">{{i18n admin.logs.match_count}}</div>
<div class="col heading last_match_at">{{i18n admin.logs.last_match_at}}</div>
<div class="col heading created_at">{{i18n admin.logs.created_at}}</div>
<div class="col heading first domain">{{i18n 'admin.logs.screened_urls.domain'}}</div>
<div class="col heading action">{{i18n 'admin.logs.action'}}</div>
<div class="col heading match_count">{{i18n 'admin.logs.match_count'}}</div>
<div class="col heading last_match_at">{{i18n 'admin.logs.last_match_at'}}</div>
<div class="col heading created_at">{{i18n 'admin.logs.created_at'}}</div>
<div class="clearfix"></div>
</div>
{{view 'screened-urls-list' content=controller}}
</div>
{{else}}
{{i18n search.no_results}}
{{i18n 'search.no_results'}}
{{/if}}
{{/loading-spinner}}

View File

@ -1,10 +1,10 @@
<div>
<ul class="nav nav-pills">
<li {{bind-attr class="newSelected:active"}}>
<a href="#" {{action "selectNew"}}>{{i18n admin.logs.staff_actions.new_value}}</a>
<a href="#" {{action "selectNew"}}>{{i18n 'admin.logs.staff_actions.new_value'}}</a>
</li>
<li {{bind-attr class="previousSelected:active"}}>
<a href="#" {{action "selectPrevious"}}>{{i18n admin.logs.staff_actions.previous_value}}</a>
<a href="#" {{action "selectPrevious"}}>{{i18n 'admin.logs.staff_actions.previous_value'}}</a>
</li>
</ul>
<div class="modal-body">
@ -14,7 +14,7 @@
{{partial "admin/templates/logs/site_customization_change_details"}}
{{/with}}
{{else}}
{{i18n admin.logs.staff_actions.deleted}}
{{i18n 'admin.logs.staff_actions.deleted'}}
{{/if}}
</div>
<div {{bind-attr class=":modal-tab :previous-tab previousSelected::invisible"}}>
@ -23,11 +23,11 @@
{{partial "admin/templates/logs/site_customization_change_details"}}
{{/with}}
{{else}}
{{i18n admin.logs.staff_actions.no_previous}}
{{i18n 'admin.logs.staff_actions.no_previous'}}
{{/if}}
</div>
</div>
<div class="modal-footer">
<button class='btn btn-primary' {{action "closeModal"}}>{{i18n close}}</button>
<button class='btn btn-primary' {{action "closeModal"}}>{{i18n 'close'}}</button>
</div>
</div>

View File

@ -1,45 +1,50 @@
<div class="staff-action-logs-controls">
<a {{action "clearAllFilters"}} {{bind-attr class=":clear-filters :filter filtersExists::invisible"}}>
<span class="label">{{i18n admin.logs.staff_actions.clear_filters}}</span>
<span class="label">{{i18n 'admin.logs.staff_actions.clear_filters'}}</span>
</a>
{{#if actionFilter}}
<a {{action "clearFilter" "action_name"}} class="filter">
<span class="label">{{i18n admin.logs.action}}</span>: {{actionFilter}}
<span class="label">{{i18n 'admin.logs.action'}}</span>: {{actionFilter}}
<i class="fa fa-times-circle"></i>
</a>
{{/if}}
{{#if filters.acting_user}}
<a {{action "clearFilter" "acting_user"}} class="filter">
<span class="label">{{i18n admin.logs.staff_actions.staff_user}}</span>: {{filters.acting_user}}
<span class="label">{{i18n 'admin.logs.staff_actions.staff_user'}}</span>: {{filters.acting_user}}
<i class="fa fa-times-circle"></i>
</a>
{{/if}}
{{#if filters.target_user}}
<a {{action "clearFilter" "target_user"}} class="filter">
<span class="label">{{i18n admin.logs.staff_actions.target_user}}</span>: {{filters.target_user}}
<span class="label">{{i18n 'admin.logs.staff_actions.target_user'}}</span>: {{filters.target_user}}
<i class="fa fa-times-circle"></i>
</a>
{{/if}}
{{#if filters.subject}}
<a {{action "clearFilter" "subject"}} class="filter">
<span class="label">{{i18n admin.logs.staff_actions.subject}}</span>: {{filters.subject}}
<span class="label">{{i18n 'admin.logs.staff_actions.subject'}}</span>: {{filters.subject}}
<i class="fa fa-times-circle"></i>
</a>
{{/if}}
</div>
<div class="pull-right">
<button class="btn" {{action "exportStaffActionLogs"}} title="{{i18n 'admin.export_csv.button_title.staff_action'}}">{{fa-icon "download"}}{{i18n 'admin.export_csv.button_text'}}</button>
</div>
</br>
<div class="staff-action-logs-instructions" {{bind-attr class=":staff-action-logs-instructions showInstructions::invisible"}}>
{{i18n admin.logs.staff_actions.instructions}}
{{i18n 'admin.logs.staff_actions.instructions'}}
</div>
<div class='table staff-actions'>
<div class="heading-container">
<div class="col heading first staff_user">{{i18n admin.logs.staff_actions.staff_user}}</div>
<div class="col heading action">{{i18n admin.logs.action}}</div>
<div class="col heading subject">{{i18n admin.logs.staff_actions.subject}}</div>
<div class="col heading created_at">{{i18n admin.logs.staff_actions.when}}</div>
<div class="col heading details">{{i18n admin.logs.staff_actions.details}}</div>
<div class="col heading context">{{i18n admin.logs.staff_actions.context}}</div>
<div class="col heading first staff_user">{{i18n 'admin.logs.staff_actions.staff_user'}}</div>
<div class="col heading action">{{i18n 'admin.logs.action'}}</div>
<div class="col heading subject">{{i18n 'admin.logs.staff_actions.subject'}}</div>
<div class="col heading created_at">{{i18n 'admin.logs.staff_actions.when'}}</div>
<div class="col heading details">{{i18n 'admin.logs.staff_actions.details'}}</div>
<div class="col heading context">{{i18n 'admin.logs.staff_actions.context'}}</div>
<div class="clearfix"></div>
</div>
@ -47,7 +52,7 @@
{{#if model.length}}
{{view "staff-action-logs-list" content=controller}}
{{else}}
{{i18n search.no_results}}
{{i18n 'search.no_results'}}
{{/if}}
{{/loading-spinner}}
</div>

View File

@ -18,10 +18,10 @@
<div class="col value details">
{{{formattedDetails}}}
{{#if useCustomModalForDetails}}
<a {{action "showCustomDetailsModal" this}}>{{i18n admin.logs.staff_actions.show}}</a>
<a {{action "showCustomDetailsModal" this}}>{{i18n 'admin.logs.staff_actions.show'}}</a>
{{/if}}
{{#if useModalForDetails}}
<a {{action "showDetailsModal" this}}>{{i18n admin.logs.staff_actions.show}}</a>
<a {{action "showDetailsModal" this}}>{{i18n 'admin.logs.staff_actions.show'}}</a>
{{/if}}
</div>
<div class="col value context">{{context}}</div>

View File

@ -1,11 +1,11 @@
{{#if user_deleted}}
<button title="{{i18n admin.flags.agree_flag_restore_post_title}}" {{action "agreeFlagRestorePost"}} class="btn"><i class="fa fa-thumbs-o-up"></i><i class="fa fa-eye"></i>{{i18n admin.flags.agree_flag_restore_post}}</button>
<button title="{{i18n 'admin.flags.agree_flag_restore_post_title'}}" {{action "agreeFlagRestorePost"}} class="btn"><i class="fa fa-thumbs-o-up"></i><i class="fa fa-eye"></i>{{i18n 'admin.flags.agree_flag_restore_post'}}</button>
{{else}}
{{#unless postHidden}}
<button title="{{i18n admin.flags.agree_flag_hide_post_title}}" {{action "agreeFlagHidePost"}} class="btn"><i class="fa fa-thumbs-o-up"></i><i class="fa fa-eye-slash"></i>{{i18n admin.flags.agree_flag_hide_post}}</button>
<button title="{{i18n 'admin.flags.agree_flag_hide_post_title'}}" {{action "agreeFlagHidePost"}} class="btn"><i class="fa fa-thumbs-o-up"></i><i class="fa fa-eye-slash"></i>{{i18n 'admin.flags.agree_flag_hide_post'}}</button>
{{/unless}}
{{/if}}
<button title="{{i18n admin.flags.agree_flag_title}}" {{action "agreeFlagKeepPost"}} class="btn"><i class="fa fa-thumbs-o-up"></i>{{i18n admin.flags.agree_flag}}</button>
<button title="{{i18n 'admin.flags.agree_flag_title'}}" {{action "agreeFlagKeepPost"}} class="btn"><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.agree_flag'}}</button>
{{#if canDeleteAsSpammer}}
<button title="{{i18n admin.flags.delete_spammer_title}}" {{action "deleteSpammer" user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n admin.flags.delete_spammer}}</button>
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
{{/if}}

View File

@ -1,31 +1,31 @@
<div class="badge-query-preview">
{{#if errors}}
<p class="error-header">{{i18n admin.badges.preview.sql_error_header}}</p>
<p class="error-header">{{i18n 'admin.badges.preview.sql_error_header'}}</p>
<pre class="badge-errors">{{errors}}</pre>
<!--
TODO we want some help pages for this, link to those instead
<p>
{{i18n admin.badges.preview.error_help}}
{{i18n 'admin.badges.preview.error_help'}}
</p>
<ul>
<li><a href="https://meta.discourse.org/t/triggered-custom-badge-queries/19336">https://meta.discourse.org/t/triggered-custom-badge-queries/19336</a></li>
</ul>
-->
{{else}}
<p class="grant-count">{{{i18n admin.badges.preview.grant_count count=count}}}</p>
<p class="grant-count">{{{i18n 'admin.badges.preview.grant_count' count=count}}}</p>
{{#if count_warning}}
<div class="count-warning">
<p class="heading"><i class="fa fa-warning"></i> {{i18n admin.badges.preview.bad_count_warning.header}}</p>
<p class="body">{{i18n admin.badges.preview.bad_count_warning.text}}</p>
<p class="heading"><i class="fa fa-warning"></i> {{i18n 'admin.badges.preview.bad_count_warning.header'}}</p>
<p class="body">{{i18n 'admin.badges.preview.bad_count_warning.text'}}</p>
</div>
{{/if}}
{{#if sample}}
<p class="sample">
{{i18n admin.badges.preview.sample}}
{{i18n 'admin.badges.preview.sample'}}
</p>
<ul>
{{#each html in processed_sample}}

View File

@ -1,5 +1,5 @@
<button title="{{i18n admin.flags.delete_post_defer_flag_title}}" {{action "deletePostDeferFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-external-link"></i>{{i18n admin.flags.delete_post_defer_flag}}</button>
<button title="{{i18n admin.flags.delete_post_agree_flag_title}}" {{action "deletePostAgreeFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-thumbs-o-up"></i>{{i18n admin.flags.delete_post_agree_flag}}</button>
<button title="{{i18n 'admin.flags.delete_post_defer_flag_title'}}" {{action "deletePostDeferFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-external-link"></i>{{i18n 'admin.flags.delete_post_defer_flag'}}</button>
<button title="{{i18n 'admin.flags.delete_post_agree_flag_title'}}" {{action "deletePostAgreeFlag"}} class="btn"><i class="fa fa-trash-o"></i><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.delete_post_agree_flag'}}</button>
{{#if canDeleteAsSpammer}}
<button title="{{i18n admin.flags.delete_spammer_title}}" {{action "deleteSpammer" user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n admin.flags.delete_spammer}}</button>
<button title="{{i18n 'admin.flags.delete_spammer_title'}}" {{action "deleteSpammer" user}} class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i>{{i18n 'admin.flags.delete_spammer'}}</button>
{{/if}}

View File

@ -20,9 +20,9 @@
{{/each}}
</ul>
</div>
<button class='btn' {{action "add"}}>{{i18n admin.badges.new}}</button>
<button class='btn' {{action "add"}}>{{i18n 'admin.badges.new'}}</button>
</div>
<div class="modal-footer">
<button class='btn btn-primary' {{action "saveAll"}} {{bind-attr disabled="submitDisabled"}}>{{i18n admin.badges.save}}</button>
<a {{action "cancel"}}>{{i18n cancel}}</a>
<button class='btn btn-primary' {{action "saveAll"}} {{bind-attr disabled="submitDisabled"}}>{{i18n 'admin.badges.save'}}</button>
<a {{action "cancel"}}>{{i18n 'cancel'}}</a>
</div>

View File

@ -1,3 +1,3 @@
<button {{action "startBackup"}} class="btn btn-primary">{{i18n yes_value}}</button>
<button {{action "startBackupWithoutUpload"}} class="btn">{{i18n admin.backups.operations.backup.without_uploads}}</button>
<button {{action "cancel"}} class="btn">{{i18n no_value}}</button>
<button {{action "startBackup"}} class="btn btn-primary">{{i18n 'yes_value'}}</button>
<button {{action "startBackupWithoutUpload"}} class="btn">{{i18n 'admin.backups.operations.backup.without_uploads'}}</button>
<button {{action "cancel"}} class="btn">{{i18n 'no_value'}}</button>

View File

@ -1,15 +1,15 @@
<div class="modal-body">
<form>
{{i18n admin.user.suspend_duration}}
{{i18n 'admin.user.suspend_duration'}}
{{text-field value=duration maxlength="5" autofocus="autofocus"}}
{{i18n admin.user.suspend_duration_units}}<br/>
{{i18n 'admin.user.suspend_duration_units'}}<br/>
<br/>
{{{i18n admin.user.suspend_reason_label}}}<br/>
{{{i18n 'admin.user.suspend_reason_label'}}}<br/>
<br/>
{{text-field value=reason class="span8"}}
</form>
</div>
<div class="modal-footer">
<button class='btn btn-danger' {{action "suspend"}} {{bind-attr disabled="submitDisabled"}}><i class='fa fa-ban'></i>{{i18n admin.user.suspend}}</button>
<a {{action "closeModal"}}>{{i18n cancel}}</a>
<button class='btn btn-danger' {{action "suspend"}} {{bind-attr disabled="submitDisabled"}}><i class='fa fa-ban'></i>{{i18n 'admin.user.suspend'}}</button>
<a {{action "closeModal"}}>{{i18n 'cancel'}}</a>
</div>

View File

@ -1,22 +1,22 @@
<h3>{{title}}</h3>
<div>
{{i18n admin.dashboard.reports.start_date}} {{input type="date" value=startDate}}
{{i18n admin.dashboard.reports.end_date}} {{input type="date" value=endDate}}
<button {{action "refreshReport"}} class='btn btn-primary'>{{i18n admin.dashboard.reports.refresh_report}}</button>
{{i18n 'admin.dashboard.reports.start_date'}} {{input type="date" value=startDate}}
{{i18n 'admin.dashboard.reports.end_date'}} {{input type="date" value=endDate}}
<button {{action "refreshReport"}} class='btn btn-primary'>{{i18n 'admin.dashboard.reports.refresh_report'}}</button>
</div>
<div class='view-options'>
{{#if viewingTable}}
{{i18n admin.dashboard.reports.view_table}}
{{i18n 'admin.dashboard.reports.view_table'}}
{{else}}
<a href {{action "viewAsTable"}}>{{i18n admin.dashboard.reports.view_table}}</a>
<a href {{action "viewAsTable"}}>{{i18n 'admin.dashboard.reports.view_table'}}</a>
{{/if}}
|
{{#if viewingBarChart}}
{{i18n admin.dashboard.reports.view_chart}}
{{i18n 'admin.dashboard.reports.view_chart'}}
{{else}}
<a href {{action "viewAsBarChart"}}>{{i18n admin.dashboard.reports.view_chart}}</a>
<a href {{action "viewAsBarChart"}}>{{i18n 'admin.dashboard.reports.view_chart'}}</a>
{{/if}}
</div>

View File

@ -2,12 +2,12 @@
<div class='search controls'>
<label>
{{input type="checkbox" checked=onlyOverridden}}
{{i18n admin.site_settings.show_overriden}}
{{i18n 'admin.site_settings.show_overriden'}}
</label>
</div>
<div class='controls'>
{{text-field value=filter placeholderKey="type_to_filter"}}
<button {{action "clearFilter"}} class="btn">{{i18n admin.site_settings.clear_filter}}</button>
<button {{action "clearFilter"}} class="btn">{{i18n 'admin.site_settings.clear_filter'}}</button>
</div>
</div>

View File

@ -14,6 +14,6 @@
</div>
{{else}}
{{#if overridden}}
<button class='btn' href='#' {{action "resetDefault" this}}><i class="fa fa-undo"></i>{{i18n admin.site_settings.reset}}</button>
<button class='btn' href='#' {{action "resetDefault" this}}><i class="fa fa-undo"></i>{{i18n 'admin.site_settings.reset'}}</button>
{{/if}}
{{/if}}

View File

@ -12,6 +12,6 @@
</div>
{{else}}
{{#if overridden}}
<button class='btn' href='#' {{action "resetDefault" this}}><i class="fa fa-undo"></i>{{i18n admin.site_settings.reset}}</button>
<button class='btn' href='#' {{action "resetDefault" this}}><i class="fa fa-undo"></i>{{i18n 'admin.site_settings.reset'}}</button>
{{/if}}
{{/if}}

View File

@ -12,6 +12,6 @@
</div>
{{else}}
{{#if overridden}}
<button class='btn' href='#' {{action "resetDefault" this}}><i class="fa fa-undo"></i>{{i18n admin.site_settings.reset}}</button>
<button class='btn' href='#' {{action "resetDefault" this}}><i class="fa fa-undo"></i>{{i18n 'admin.site_settings.reset'}}</button>
{{/if}}
{{/if}}

View File

@ -13,6 +13,6 @@
</div>
{{else}}
{{#if overridden}}
<button class='btn' href='#' {{action "resetDefault" this}}><i class="fa fa-undo"></i>{{i18n admin.site_settings.reset}}</button>
<button class='btn' href='#' {{action "resetDefault" this}}><i class="fa fa-undo"></i>{{i18n 'admin.site_settings.reset'}}</button>
{{/if}}
{{/if}}

View File

@ -2,5 +2,5 @@
{{collection contentBinding="filteredContent" classNames="form-horizontal settings" itemView="site-setting"}}
{{else}}
<br/>
{{i18n admin.site_settings.no_results}}
{{i18n 'admin.site_settings.no_results'}}
{{/if}}

View File

@ -17,10 +17,10 @@
<div class='controls'>
<button class='btn' {{action "saveChanges"}} {{bind-attr disabled="saveDisabled"}}>
{{#if saving}}
{{i18n saving}}
{{i18n 'saving'}}
{{else}}
{{i18n save}}
{{i18n 'save'}}
{{/if}}
</button>
{{#if saved}}{{i18n saved}}{{/if}}
{{#if saved}}{{i18n 'saved'}}{{/if}}
</div>

View File

@ -1 +1 @@
<p>{{i18n admin.site_text.none}}</p>
<p>{{i18n 'admin.site_text.none'}}</p>

View File

@ -1,7 +1,7 @@
<div class='user-fields'>
<h2>{{i18n admin.user_fields.title}}</h2>
<h2>{{i18n 'admin.user_fields.title'}}</h2>
<p class="desc">{{i18n admin.user_fields.help}}</p>
<p class="desc">{{i18n 'admin.user_fields.help'}}</p>
{{#if model}}
{{#each f in model itemController="admin-user-field-item" itemView="admin-user-field-item"}}
@ -17,19 +17,19 @@
{{combo-box content=fieldTypes valueAttribute="id" value=f.buffered.field_type}}
</div>
<div class='form-element controls'>
<button {{action "save"}}class='btn btn-primary'>{{fa-icon 'check'}} {{i18n admin.user_fields.save}}</button>
<button {{action "cancel"}} class='btn btn-danger'>{{fa-icon 'times'}} {{i18n admin.user_fields.cancel}}</button>
<button {{action "save"}}class='btn btn-primary'>{{fa-icon 'check'}} {{i18n 'admin.user_fields.save'}}</button>
<button {{action "cancel"}} class='btn btn-danger'>{{fa-icon 'times'}} {{i18n 'admin.user_fields.cancel'}}</button>
</div>
</div>
<div class="row">
<div class='form-element'>
<label>
{{input type="checkbox" checked=f.buffered.editable}} {{i18n admin.user_fields.editable.title}}
{{input type="checkbox" checked=f.buffered.editable}} {{i18n 'admin.user_fields.editable.title'}}
</label>
</div>
<div class='form-element'>
<label>
{{input type="checkbox" checked=f.buffered.required}} {{i18n admin.user_fields.required.title}}
{{input type="checkbox" checked=f.buffered.required}} {{i18n 'admin.user_fields.required.title'}}
</label>
</div>
</div>
@ -41,8 +41,8 @@
<div class='form-display'>
</div>
<div class='form-element controls'>
<button {{action "edit"}}class='btn btn-default'>{{fa-icon 'pencil'}} {{i18n admin.user_fields.edit}}</button>
<button {{action "destroy"}}class='btn btn-danger'>{{fa-icon 'trash-o'}} {{i18n admin.user_fields.delete}}</button>
<button {{action "edit"}}class='btn btn-default'>{{fa-icon 'pencil'}} {{i18n 'admin.user_fields.edit'}}</button>
<button {{action "destroy"}}class='btn btn-danger'>{{fa-icon 'trash-o'}} {{i18n 'admin.user_fields.delete'}}</button>
</div>
</div>
<div class="row">{{f.flags}}</div>
@ -53,6 +53,6 @@
<button {{bind-attr disabled="createDisabled"}} class='btn btn-primary' {{action "createField"}}>
{{fa-icon "plus"}}
{{i18n admin.user_fields.create}}
{{i18n 'admin.user_fields.create'}}
</button>
</div>

View File

@ -8,26 +8,26 @@
{{#loading-spinner condition=loading}}
<div class='admin-container user-badges'>
<h2>{{i18n admin.badges.grant_badge}}</h2>
<h2>{{i18n 'admin.badges.grant_badge'}}</h2>
{{#if noBadges}}
<p>{{i18n admin.badges.no_badges}}</p>
<p>{{i18n 'admin.badges.no_badges'}}</p>
{{else}}
<br>
{{combo-box valueAttribute="id" value=controller.selectedBadgeId content=controller.grantableBadges}}
<button class='btn btn-primary' {{action "grantBadge" controller.selectedBadgeId}}>{{i18n admin.badges.grant}}</button>
<button class='btn btn-primary' {{action "grantBadge" controller.selectedBadgeId}}>{{i18n 'admin.badges.grant'}}</button>
{{/if}}
<br>
<br>
<h2>{{i18n admin.badges.granted_badges}}</h2>
<h2>{{i18n 'admin.badges.granted_badges'}}</h2>
<br>
<table>
<tr>
<th>{{i18n admin.badges.badge}}</th>
<th>{{i18n admin.badges.granted_by}}</th>
<th>{{i18n admin.badges.granted_at}}</th>
<th>{{i18n 'admin.badges.badge'}}</th>
<th>{{i18n 'admin.badges.granted_by'}}</th>
<th>{{i18n 'admin.badges.granted_at'}}</th>
<th></th>
</tr>
@ -42,13 +42,13 @@
</td>
<td>{{age-with-tooltip granted_at}}</td>
<td>
<button class='btn' {{action "revokeBadge" this}}>{{i18n admin.badges.revoke}}</button>
<button class='btn' {{action "revokeBadge" this}}>{{i18n 'admin.badges.revoke'}}</button>
</td>
</tr>
{{else}}
<tr>
<td colspan="5">
<p>{{i18n admin.badges.no_user_badges name=user.username}}</p>
<p>{{i18n 'admin.badges.no_user_badges' name=user.username}}</p>
</td>
</tr>
{{/each}}

View File

@ -4,68 +4,68 @@
{{#if active}}
{{#link-to 'user' model class="btn"}}
<i class='fa fa-user'></i>
{{i18n admin.user.show_public_profile}}
{{i18n 'admin.user.show_public_profile'}}
{{/link-to}}
{{#if can_impersonate}}
<button class='btn btn-danger' {{action "impersonate" target="content"}} title="{{i18n admin.impersonate.help}}">
<button class='btn btn-danger' {{action "impersonate" target="content"}} title="{{i18n 'admin.impersonate.help'}}">
<i class='fa fa-crosshairs'></i>
{{i18n admin.impersonate.title}}
{{i18n 'admin.impersonate.title'}}
</button>
{{/if}}
{{#if currentUser.admin}}
<button class='btn' {{action "log_out" target="content"}}>
<i class='fa fa-power-off'></i>
{{i18n admin.user.log_out}}
{{i18n 'admin.user.log_out'}}
</button>
{{/if}}
{{/if}}
</div>
<div class='display-row username'>
<div class='field'>{{i18n user.username.title}}</div>
<div class='field'>{{i18n 'user.username.title'}}</div>
<div class='value'>{{username}}</div>
<div class='controls'>
{{#link-to 'preferences.username' model class="btn"}}
<i class='fa fa-pencil'></i>
{{i18n user.change_username.title}}
{{i18n 'user.change_username.title'}}
{{/link-to}}
</div>
</div>
{{#if canCheckEmails}}
<div class='display-row email'>
<div class='field'>{{i18n user.email.title}}</div>
<div class='field'>{{i18n 'user.email.title'}}</div>
<div class='value'>
{{#unless active}}
<div class='controls'>{{i18n admin.users.not_verified}}</div>
<div class='controls'>{{i18n 'admin.users.not_verified'}}</div>
{{/unless}}
{{#if email}}
<a href="mailto:{{unbound email}}">{{email}}</a>
{{else}}
<button class="btn" title="{{i18n admin.users.check_email.title}}" {{action "checkEmail" this}}>{{fa-icon "envelope-o"}} {{i18n admin.users.check_email.text}}</button>
<button class="btn" title="{{i18n 'admin.users.check_email.title'}}" {{action "checkEmail" this}}>{{fa-icon "envelope-o"}} {{i18n 'admin.users.check_email.text'}}</button>
{{/if}}
</div>
</div>
<div class='display-row associations'>
<div class='field'>{{i18n user.associated_accounts}}</div>
<div class='field'>{{i18n 'user.associated_accounts'}}</div>
<div class='value'>
{{#if associated_accounts}}
{{associated_accounts}}
{{else}}
<button class="btn" title="{{i18n admin.users.check_email.title}}" {{action "checkEmail" this}}>{{fa-icon "envelope-o"}} {{i18n admin.users.check_email.text}}</button>
<button class="btn" title="{{i18n 'admin.users.check_email.title'}}" {{action "checkEmail" this}}>{{fa-icon "envelope-o"}} {{i18n 'admin.users.check_email.text'}}</button>
{{/if}}
</div>
</div>
{{/if}}
<div class='display-row'>
<div class='field'>{{i18n user.avatar.title}}</div>
<div class='field'>{{i18n 'user.avatar.title'}}</div>
<div class='value'>{{avatar content imageSize="large"}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n user.title.title}}</div>
<div class='field'>{{i18n 'user.title.title'}}</div>
<div class='value'>
{{#if editingTitle}}
{{text-field value=title autofocus="autofocus"}}
@ -75,23 +75,23 @@
</div>
<div class='controls'>
{{#if editingTitle}}
<button class='btn' {{action "saveTitle"}}>{{i18n admin.user.save_title}}</button>
<a href="#" {{action "toggleTitleEdit"}}>{{i18n cancel}}</a>
<button class='btn' {{action "saveTitle"}}>{{i18n 'admin.user.save_title'}}</button>
<a href="#" {{action "toggleTitleEdit"}}>{{i18n 'cancel'}}</a>
{{else}}
<button class='btn' {{action "toggleTitleEdit"}}><i class="fa fa-pencil"></i>{{i18n admin.user.edit_title}}</button>
<button class='btn' {{action "toggleTitleEdit"}}><i class="fa fa-pencil"></i>{{i18n 'admin.user.edit_title'}}</button>
{{/if}}
</div>
</div>
{{#if currentUser.admin}}
<div class='display-row'>
<div class='field'>{{i18n admin.groups.title}}</div>
<div class='field'>{{i18n 'admin.groups.title'}}</div>
<div class='value'>
{{admin-group-selector selected=model.groups available=availableGroups}}
</div>
<div class='controls'>
{{#if custom_groups}}
{{i18n admin.groups.primary}}
{{i18n 'admin.groups.primary'}}
{{combo-box content=custom_groups value=primary_group_id nameProperty="name" none="admin.groups.no_primary"}}
{{/if}}
{{#if primaryGroupDirty}}
@ -103,12 +103,12 @@
{{/if}}
<div class='display-row'>
<div class='field'>{{i18n user.ip_address.title}}</div>
<div class='field'>{{i18n 'user.ip_address.title'}}</div>
<div class='value'>{{ip_address}}</div>
<div class='controls'>
{{#if currentUser.staff}}
<button class='btn' {{action "refreshBrowsers" target="content"}}>
{{i18n admin.user.refresh_browsers}}
{{i18n 'admin.user.refresh_browsers'}}
</button>
{{ip-lookup ip=ip_address userId=id}}
{{/if}}
@ -116,7 +116,7 @@
</div>
<div class='display-row'>
<div class='field'>{{i18n user.registration_ip_address.title}}</div>
<div class='field'>{{i18n 'user.registration_ip_address.title'}}</div>
<div class='value'>{{registration_ip_address}}</div>
<div class='controls'>
{{#if currentUser.staff}}
@ -127,12 +127,12 @@
{{#if showBadges}}
<div class='display-row'>
<div class='field'>{{i18n admin.badges.title}}</div>
<div class='field'>{{i18n 'admin.badges.title'}}</div>
<div class='value'>
{{i18n badges.badge_count count=badge_count}}
{{i18n 'badges.badge_count' count=badge_count}}
</div>
<div class='controls'>
{{#link-to 'adminUser.badges' this class="btn"}}<i class="fa fa-certificate"></i>{{i18n admin.badges.edit_badges}}{{/link-to}}
{{#link-to 'adminUser.badges' this class="btn"}}<i class="fa fa-certificate"></i>{{i18n 'admin.badges.edit_badges'}}{{/link-to}}
</div>
</div>
{{/if}}
@ -157,30 +157,30 @@
<section class='details'>
<h1>{{i18n admin.user.permissions}}</h1>
<h1>{{i18n 'admin.user.permissions'}}</h1>
{{#if showApproval}}
<div class='display-row'>
<div class='field'>{{i18n admin.users.approved}}</div>
<div class='field'>{{i18n 'admin.users.approved'}}</div>
<div class='value'>
{{#if approved}}
{{i18n admin.user.approved_by}}
{{i18n 'admin.user.approved_by'}}
{{#link-to 'adminUser' approvedBy}}{{avatar approvedBy imageSize="small"}}{{/link-to}}
{{#link-to 'adminUser' approvedBy}}{{approvedBy.username}}{{/link-to}}
{{else}}
{{i18n no_value}}
{{i18n 'no_value'}}
{{/if}}
</div>
<div class='controls'>
{{#if approved}}
{{i18n admin.user.approve_success}}
{{i18n 'admin.user.approve_success'}}
{{else}}
{{#if can_approve}}
<button class='btn' {{action "approve" target="content"}}>
<i class='fa fa-check'></i>
{{i18n admin.user.approve}}
{{i18n 'admin.user.approve'}}
</button>
{{/if}}
{{/if}}
@ -189,31 +189,31 @@
{{/if}}
<div class='display-row'>
<div class='field'>{{i18n admin.users.active}}</div>
<div class='field'>{{i18n 'admin.users.active'}}</div>
<div class='value'>
{{#if active}}
{{i18n yes_value}}
{{i18n 'yes_value'}}
{{else}}
{{i18n no_value}}
{{i18n 'no_value'}}
{{/if}}
</div>
<div class='controls'>
{{#if active}}
{{#if can_deactivate}}
<button class='btn' {{action "deactivate" target="content"}}>{{i18n admin.user.deactivate_account}}</button>
{{i18n admin.user.deactivate_explanation}}
<button class='btn' {{action "deactivate" target="content"}}>{{i18n 'admin.user.deactivate_account'}}</button>
{{i18n 'admin.user.deactivate_explanation'}}
{{/if}}
{{else}}
{{#if can_send_activation_email}}
<button class='btn' {{action "sendActivationEmail" target="content"}}>
<i class='fa fa-envelope'></i>
{{i18n admin.user.send_activation_email}}
{{i18n 'admin.user.send_activation_email'}}
</button>
{{/if}}
{{#if can_activate}}
<button class='btn' {{action "activate" target="content"}}>
<i class='fa fa-check'></i>
{{i18n admin.user.activate}}
{{i18n 'admin.user.activate'}}
</button>
{{/if}}
{{/if}}
@ -221,57 +221,57 @@
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.api.key}}</div>
<div class='field'>{{i18n 'admin.api.key'}}</div>
{{#if api_key}}
<div class='long-value'>
{{api_key.key}}
<button class='btn' {{action "regenerateApiKey"}}><i class="fa fa-undo"></i>{{i18n admin.api.regenerate}}</button>
<button {{action "revokeApiKey"}} class="btn"><i class="fa fa-times"></i>{{i18n admin.api.revoke}}</button>
<button class='btn' {{action "regenerateApiKey"}}><i class="fa fa-undo"></i>{{i18n 'admin.api.regenerate'}}</button>
<button {{action "revokeApiKey"}} class="btn"><i class="fa fa-times"></i>{{i18n 'admin.api.revoke'}}</button>
</div>
{{else}}
<div class='value'>
&mdash;
</div>
<div class='controls'>
<button {{action "generateApiKey"}} class="btn"><i class="fa fa-key"></i>{{i18n admin.api.generate}}</button>
<button {{action "generateApiKey"}} class="btn"><i class="fa fa-key"></i>{{i18n 'admin.api.generate'}}</button>
</div>
{{/if}}
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.admin}}</div>
<div class='field'>{{i18n 'admin.user.admin'}}</div>
<div class='value'>{{admin}}</div>
<div class='controls'>
{{#if can_revoke_admin}}
<button class='btn' {{action "revokeAdmin" target="content"}}>
<i class='fa fa-shield'></i>
{{i18n admin.user.revoke_admin}}
{{i18n 'admin.user.revoke_admin'}}
</button>
{{/if}}
{{#if can_grant_admin}}
<button class='btn' {{action "grantAdmin" target="content"}}>
<i class='fa fa-shield'></i>
{{i18n admin.user.grant_admin}}
{{i18n 'admin.user.grant_admin'}}
</button>
{{/if}}
</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.moderator}}</div>
<div class='field'>{{i18n 'admin.user.moderator'}}</div>
<div class='value'>{{moderator}}</div>
<div class='controls'>
{{#if can_revoke_moderation}}
<button class='btn' {{action "revokeModeration" target="content"}}>
<i class='fa fa-shield'></i>
{{i18n admin.user.revoke_moderation}}
{{i18n 'admin.user.revoke_moderation'}}
</button>
{{/if}}
{{#if can_grant_moderation}}
<button class='btn' {{action "grantModeration" target="content"}}>
<i class='fa fa-shield'></i>
{{i18n admin.user.grant_moderation}}
{{i18n 'admin.user.grant_moderation'}}
</button>
{{/if}}
</div>
@ -279,7 +279,7 @@
</div>
<div class='display-row'>
<div class='field'>{{i18n trust_level}}</div>
<div class='field'>{{i18n 'trust_level'}}</div>
<div class="value">
{{combo-box content=trustLevels value=trust_level nameProperty="detailedName"}}
{{#if dirty}}
@ -292,36 +292,36 @@
<div class="controls">
{{#if model.canLockTrustLevel}}
{{#if model.trust_level_locked}}
<i title='{{i18n admin.user.trust_level_locked_tip}}' {{action "lockTrustLevel" false target="model"}} class='fa fa-lock'></i> <button class="btn" {{action "lockTrustLevel" false target="model"}}>{{i18n admin.user.unlock_trust_level}}</button>
<i title='{{i18n 'admin.user.trust_level_locked_tip'}}' {{action "lockTrustLevel" false target="model"}} class='fa fa-lock'></i> <button class="btn" {{action "lockTrustLevel" false target="model"}}>{{i18n 'admin.user.unlock_trust_level'}}</button>
{{else}}
<i title='{{i18n admin.user.trust_level_unlocked_tip}}' class='fa fa-unlock'></i> <button class="btn" {{action "lockTrustLevel" true target="model"}}>{{i18n admin.user.lock_trust_level}}</button>
<i title='{{i18n 'admin.user.trust_level_unlocked_tip'}}' class='fa fa-unlock'></i> <button class="btn" {{action "lockTrustLevel" true target="model"}}>{{i18n 'admin.user.lock_trust_level'}}</button>
{{/if}}
{{/if}}
{{#if tl3Requirements}}
{{#link-to 'adminUser.tl3Requirements' this class="btn"}}{{i18n admin.user.trust_level_3_requirements}}{{/link-to}}
{{#link-to 'adminUser.tl3Requirements' this class="btn"}}{{i18n 'admin.user.trust_level_3_requirements'}}{{/link-to}}
{{/if}}
</div>
</div>
<div {{bind-attr class=":display-row isSuspended:highlight-danger"}}>
<div class='field'>{{i18n admin.user.suspended}}</div>
<div class='field'>{{i18n 'admin.user.suspended'}}</div>
<div class='value'>{{isSuspended}}</div>
<div class='controls'>
{{#if isSuspended}}
<button class='btn btn-danger' {{action "unsuspend" target="content"}}>
<i class='fa fa-ban'></i>
{{i18n admin.user.unsuspend}}
{{i18n 'admin.user.unsuspend'}}
</button>
{{suspendDuration}}
{{i18n admin.user.suspended_explanation}}
{{i18n 'admin.user.suspended_explanation'}}
{{else}}
{{#if canSuspend}}
<button class='btn btn-danger' {{action "showSuspendModal" this}}>
<i class='fa fa-ban'></i>
{{i18n admin.user.suspend}}
{{i18n 'admin.user.suspend'}}
</button>
{{i18n admin.user.suspended_explanation}}
{{i18n 'admin.user.suspended_explanation'}}
{{/if}}
{{/if}}
</div>
@ -329,64 +329,64 @@
{{#if isSuspended}}
<div class='display-row highlight-danger'>
<div class='field'>{{i18n admin.user.suspended_by}}</div>
<div class='field'>{{i18n 'admin.user.suspended_by'}}</div>
<div class='value'>
{{#link-to 'adminUser' suspendedBy}}{{avatar suspendedBy imageSize="tiny"}}{{/link-to}}
{{#link-to 'adminUser' suspendedBy}}{{suspendedBy.username}}{{/link-to}}
</div>
<div class='controls'>
<b>{{i18n admin.user.suspend_reason}}</b>:
<b>{{i18n 'admin.user.suspend_reason'}}</b>:
{{suspend_reason}}
</div>
</div>
{{/if}}
<div class='display-row' {{bind-attr class=":display-row blocked:highlight-danger"}}>
<div class='field'>{{i18n admin.user.blocked}}</div>
<div class='field'>{{i18n 'admin.user.blocked'}}</div>
<div class='value'>{{blocked}}</div>
<div class='controls'>
{{#if blocked}}
<button class='btn' {{action "unblock" target="content"}}>
<i class='fa fa-thumbs-o-up'></i>
{{i18n admin.user.unblock}}
{{i18n 'admin.user.unblock'}}
</button>
{{i18n admin.user.block_explanation}}
{{i18n 'admin.user.block_explanation'}}
{{/if}}
</div>
</div>
</section>
<section class='details'>
<h1>{{i18n admin.user.activity}}</h1>
<h1>{{i18n 'admin.user.activity'}}</h1>
<div class='display-row'>
<div class='field'>{{i18n created}}</div>
<div class='field'>{{i18n 'created'}}</div>
<div class='value'>{{{created_at_age}}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.users.last_emailed}}</div>
<div class='field'>{{i18n 'admin.users.last_emailed'}}</div>
<div class='value'>{{{last_emailed_age}}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n last_seen}}</div>
<div class='field'>{{i18n 'last_seen'}}</div>
<div class='value'>{{{last_seen_age}}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.like_count}}</div>
<div class='field'>{{i18n 'admin.user.like_count'}}</div>
<div class='value'>{{like_given_count}} / {{like_count}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.topics_entered}}</div>
<div class='field'>{{i18n 'admin.user.topics_entered'}}</div>
<div class='value'>{{topics_entered}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.post_count}}</div>
<div class='field'>{{i18n 'admin.user.post_count'}}</div>
<div class='value'>{{post_count}}</div>
<div class='controls'>
{{#if can_delete_all_posts}}
<button class='btn btn-danger' {{action "deleteAllPosts" target="content"}}>
<i class='fa fa-trash-o'></i>
{{i18n admin.user.delete_all_posts}}
{{i18n 'admin.user.delete_all_posts'}}
</button>
{{else}}
{{deleteAllPostsExplanation}}
@ -394,54 +394,54 @@
</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.posts_read_count}}</div>
<div class='field'>{{i18n 'admin.user.posts_read_count'}}</div>
<div class='value'>{{posts_read_count}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.warnings_received_count}}</div>
<div class='field'>{{i18n 'admin.user.warnings_received_count'}}</div>
<div class='value'>{{warnings_received_count}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.flags_given_received_count}}</div>
<div class='field'>{{i18n 'admin.user.flags_given_received_count'}}</div>
<div class='value'>{{flags_given_count}} / {{flags_received_count}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.private_topics_count}}</div>
<div class='field'>{{i18n 'admin.user.private_topics_count'}}</div>
<div class='value'>{{private_topics_count}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.time_read}}</div>
<div class='field'>{{i18n 'admin.user.time_read'}}</div>
<div class='value'>{{{time_read}}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n user.invited.days_visited}}</div>
<div class='field'>{{i18n 'user.invited.days_visited'}}</div>
<div class='value'>{{{days_visited}}}</div>
</div>
</section>
{{#if single_sign_on_record}}
<section class='details'>
<h1>{{i18n admin.user.sso.title}}</h1>
<h1>{{i18n 'admin.user.sso.title'}}</h1>
{{#with single_sign_on_record}}
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_id}}</div>
<div class='field'>{{i18n 'admin.user.sso.external_id'}}</div>
<div class='value'>{{external_id}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_username}}</div>
<div class='field'>{{i18n 'admin.user.sso.external_username'}}</div>
<div class='value'>{{external_username}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_name}}</div>
<div class='field'>{{i18n 'admin.user.sso.external_name'}}</div>
<div class='value'>{{external_name}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_email}}</div>
<div class='field'>{{i18n 'admin.user.sso.external_email'}}</div>
<div class='value'>{{external_email}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_avatar_url}}</div>
<div class='field'>{{i18n 'admin.user.sso.external_avatar_url'}}</div>
<div class='value'>{{external_avatar_url}}</div>
</div>
{{/with}}
@ -452,7 +452,7 @@
<hr/>
<button {{bind-attr class=":btn :btn-danger :pull-right deleteForbidden:hidden"}} {{action "destroy" target="content"}} {{bind-attr disabled="deleteForbidden"}}>
<i class="fa fa-exclamation-triangle"></i>
{{i18n admin.user.delete}}
{{i18n 'admin.user.delete'}}
</button>
{{#if deleteExplanation}}
<div class="clearfix"></div>

View File

@ -2,15 +2,15 @@
<div class='span15'>
<ul class="nav nav-pills">
<li>{{#link-to 'adminUser' this}}<i class="fa fa-caret-left"></i> &nbsp;{{username}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'regular'}}{{i18n admin.user.trust_level_2_users}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'regular'}}{{i18n 'admin.user.trust_level_2_users'}}{{/link-to}}</li>
</ul>
</div>
</div>
<div class="admin-container tl3-requirements">
<h2>{{username}} - {{i18n admin.user.tl3_requirements.title}}</h2>
<h2>{{username}} - {{i18n 'admin.user.tl3_requirements.title'}}</h2>
<br/>
<p>{{i18n admin.user.tl3_requirements.table_title}}</p>
<p>{{i18n 'admin.user.tl3_requirements.table_title'}}</p>
{{#with tl3Requirements}}
<table class="table" style="width: auto;">
@ -18,81 +18,81 @@
<tr>
<th></th>
<th></th>
<th>{{i18n admin.user.tl3_requirements.value_heading}}</th>
<th>{{i18n admin.user.tl3_requirements.requirement_heading}}</th>
<th>{{i18n 'admin.user.tl3_requirements.value_heading'}}</th>
<th>{{i18n 'admin.user.tl3_requirements.requirement_heading'}}</th>
</tr>
</thead>
<tbody>
<tr>
<th>{{i18n admin.user.tl3_requirements.visits}}</th>
<th>{{i18n 'admin.user.tl3_requirements.visits'}}</th>
<td><i {{bind-attr class=":fa met.days_visited:fa-check:fa-times"}}></i></td>
<td>
{{days_visited_percent}}% ({{days_visited}} / {{time_period}} {{i18n admin.user.tl3_requirements.days}})
{{days_visited_percent}}% ({{days_visited}} / {{time_period}} {{i18n 'admin.user.tl3_requirements.days'}})
</td>
<td>{{min_days_visited_percent}}%</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.topics_replied_to}}</th>
<th>{{i18n 'admin.user.tl3_requirements.topics_replied_to'}}</th>
<td><i {{bind-attr class=":fa met.topics_replied_to:fa-check:fa-times"}}></i></td>
<td>{{num_topics_replied_to}}</td>
<td>{{min_topics_replied_to}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.topics_viewed}}</th>
<th>{{i18n 'admin.user.tl3_requirements.topics_viewed'}}</th>
<td><i {{bind-attr class=":fa met.topics_viewed:fa-check:fa-times"}}></i></td>
<td>{{topics_viewed}}</td>
<td>{{min_topics_viewed}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.topics_viewed_all_time}}</th>
<th>{{i18n 'admin.user.tl3_requirements.topics_viewed_all_time'}}</th>
<td><i {{bind-attr class=":fa met.topics_viewed_all_time:fa-check:fa-times"}}></i></td>
<td>{{topics_viewed_all_time}}</td>
<td>{{min_topics_viewed_all_time}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.posts_read}}</th>
<th>{{i18n 'admin.user.tl3_requirements.posts_read'}}</th>
<td><i {{bind-attr class=":fa met.posts_read:fa-check:fa-times"}}></i></td>
<td>{{posts_read}}</td>
<td>{{min_posts_read}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.posts_read_all_time}}</th>
<th>{{i18n 'admin.user.tl3_requirements.posts_read_all_time'}}</th>
<td><i {{bind-attr class=":fa met.posts_read_all_time:fa-check:fa-times"}}></i></td>
<td>{{posts_read_all_time}}</td>
<td>{{min_posts_read_all_time}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.flagged_posts}}</th>
<th>{{i18n 'admin.user.tl3_requirements.flagged_posts'}}</th>
<td><i {{bind-attr class=":fa met.flagged_posts:fa-check:fa-times"}}></i></td>
<td>{{num_flagged_posts}}</td>
<td>{{i18n max_of_count count=max_flagged_posts}}</td>
<td>{{i18n 'max_of_count' count=max_flagged_posts}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.flagged_by_users}}</th>
<th>{{i18n 'admin.user.tl3_requirements.flagged_by_users'}}</th>
<td><i {{bind-attr class=":fa met.flagged_by_users:fa-check:fa-times"}}></i></td>
<td>{{num_flagged_by_users}}</td>
<td>{{i18n max_of_count count=max_flagged_by_users}}</td>
<td>{{i18n 'max_of_count' count=max_flagged_by_users}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.likes_given}}</th>
<th>{{i18n 'admin.user.tl3_requirements.likes_given'}}</th>
<td><i {{bind-attr class=":fa met.likes_given:fa-check:fa-times"}}></i></td>
<td>{{num_likes_given}}</td>
<td>{{min_likes_given}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.likes_received}}</th>
<th>{{i18n 'admin.user.tl3_requirements.likes_received'}}</th>
<td><i {{bind-attr class=":fa met.likes_received:fa-check:fa-times"}}></i></td>
<td>{{num_likes_received}}</td>
<td>{{min_likes_received}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.likes_received_days}}</th>
<th>{{i18n 'admin.user.tl3_requirements.likes_received_days'}}</th>
<td><i {{bind-attr class=":fa met.likes_received_days:fa-check:fa-times"}}></i></td>
<td>{{num_likes_received_days}}</td>
<td>{{min_likes_received_days}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.likes_received_users}}</th>
<th>{{i18n 'admin.user.tl3_requirements.likes_received_users'}}</th>
<td><i {{bind-attr class=":fa met.likes_received_users:fa-check:fa-times"}}></i></td>
<td>{{num_likes_received_users}}</td>
<td>{{min_likes_received_users}}</td>
@ -107,31 +107,31 @@
{{#if tl3Requirements.requirements_lost}}
{{! tl implicitly not locked }}
{{#if tl3Requirements.on_grace_period}}
<i class="fa fa-times"></i> {{i18n admin.user.tl3_requirements.on_grace_period}}
<i class="fa fa-times"></i> {{i18n 'admin.user.tl3_requirements.on_grace_period'}}
{{else}} {{! not on grace period }}
<i class="fa fa-times"></i> {{i18n admin.user.tl3_requirements.does_not_qualify}}
{{i18n admin.user.tl3_requirements.will_be_demoted}}
<i class="fa fa-times"></i> {{i18n 'admin.user.tl3_requirements.does_not_qualify'}}
{{i18n 'admin.user.tl3_requirements.will_be_demoted'}}
{{/if}}
{{else}} {{! requirements not lost - remains tl3 }}
{{#if tl3Requirements.trust_level_locked}}
<i class="fa fa-lock"></i> {{i18n admin.user.tl3_requirements.locked_will_not_be_demoted}}
<i class="fa fa-lock"></i> {{i18n 'admin.user.tl3_requirements.locked_will_not_be_demoted'}}
{{else}} {{! tl not locked }}
<i class="fa fa-check"></i> {{i18n admin.user.tl3_requirements.qualifies}}
<i class="fa fa-check"></i> {{i18n 'admin.user.tl3_requirements.qualifies'}}
{{#if tl3Requirements.on_grace_period}}
{{i18n admin.user.tl3_requirements.on_grace_period}}
{{i18n 'admin.user.tl3_requirements.on_grace_period'}}
{{/if}}
{{/if}}
{{/if}}
{{else}} {{! is not tl3 }}
{{#if tl3Requirements.requirements_met}}
{{! met & not tl3 - will be promoted}}
<i class="fa fa-check"></i> {{i18n admin.user.tl3_requirements.qualifies}}
{{i18n admin.user.tl3_requirements.will_be_promoted}}
<i class="fa fa-check"></i> {{i18n 'admin.user.tl3_requirements.qualifies'}}
{{i18n 'admin.user.tl3_requirements.will_be_promoted'}}
{{else}} {{! requirements not met - remains regular }}
{{#if tl3Requirements.trust_level_locked}}
<i class="fa fa-lock"></i> {{i18n admin.user.tl3_requirements.locked_will_not_be_promoted}}
<i class="fa fa-lock"></i> {{i18n 'admin.user.tl3_requirements.locked_will_not_be_promoted'}}
{{else}}
<i class="fa fa-times"></i> {{i18n admin.user.tl3_requirements.does_not_qualify}}
<i class="fa fa-times"></i> {{i18n 'admin.user.tl3_requirements.does_not_qualify'}}
{{/if}}
{{/if}}
{{/if}}

View File

@ -14,7 +14,7 @@
{{text-field value=listFilter placeholder=searchHint}}
{{#unless showEmails}}
<div class="pull-right">
<button {{action "showEmails"}} class="btn">{{i18n admin.users.show_emails}}</button>
<button {{action "showEmails"}} class="btn">{{i18n 'admin.users.show_emails'}}</button>
</div>
{{/unless}}
</div>
@ -27,26 +27,26 @@
<th>{{input type="checkbox" checked=selectAll}}</th>
{{/if}}
<th>&nbsp;</th>
<th>{{i18n username}}</th>
<th>{{i18n email}}</th>
<th>{{i18n admin.users.last_emailed}}</th>
<th>{{i18n last_seen}}</th>
<th>{{i18n admin.user.topics_entered}}</th>
<th>{{i18n admin.user.posts_read_count}}</th>
<th>{{i18n admin.user.time_read}}</th>
<th>{{i18n created}}</th>
<th>{{i18n 'username'}}</th>
<th>{{i18n 'email'}}</th>
<th>{{i18n 'admin.users.last_emailed'}}</th>
<th>{{i18n 'last_seen'}}</th>
<th>{{i18n 'admin.user.topics_entered'}}</th>
<th>{{i18n 'admin.user.posts_read_count'}}</th>
<th>{{i18n 'admin.user.time_read'}}</th>
<th>{{i18n 'created'}}</th>
{{#if showApproval}}
<th>{{i18n admin.users.approved}}</th>
<th>{{i18n 'admin.users.approved'}}</th>
{{/if}}
<th>&nbsp;</th>
</tr>
{{#each user in model}}
<tr {{bind-attr class="selected user.active::not-activated"}}>
<tr {{bind-attr class="user.selected user.active::not-activated"}}>
{{#if controller.showApproval}}
<td>
{{#if user.can_approve}}
{{input type="checkbox" checked=selected}}
{{input type="checkbox" checked=user.selected}}
{{/if}}
</td>
{{/if}}
@ -64,21 +64,21 @@
{{#if showApproval}}
<td>
{{#if user.approved}}
{{i18n yes_value}}
{{i18n 'yes_value'}}
{{else}}
{{i18n no_value}}
{{i18n 'no_value'}}
{{/if}}
</td>
{{/if}}
<td>
{{#if user.admin}}<i class="fa fa-shield" title="{{i18n admin.title}}"></i>{{/if}}
{{#if user.moderator}}<i class="fa fa-shield" title="{{i18n admin.moderator}}"></i>{{/if}}
<td>
{{#if user.admin}}<i class="fa fa-shield" title="{{i18n 'admin.title'}}"></i>{{/if}}
{{#if user.moderator}}<i class="fa fa-shield" title="{{i18n 'admin.moderator'}}"></i>{{/if}}
</td>
</tr>
{{/each}}
</table>
{{else}}
<p>{{i18n search.no_results}}</p>
<p>{{i18n 'search.no_results'}}</p>
{{/if}}
{{/loading-spinner}}

View File

@ -1,19 +1,19 @@
<div class='admin-controls'>
<div class='span15'>
<ul class="nav nav-pills">
<li>{{#link-to 'adminUsersList.show' 'active'}}{{i18n admin.users.nav.active}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'new'}}{{i18n admin.users.nav.new}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'active'}}{{i18n 'admin.users.nav.active'}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'new'}}{{i18n 'admin.users.nav.new'}}{{/link-to}}</li>
{{#if siteSettings.must_approve_users}}
<li>{{#link-to 'adminUsersList.show' 'pending'}}{{i18n admin.users.nav.pending}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'pending'}}{{i18n 'admin.users.nav.pending'}}{{/link-to}}</li>
{{/if}}
<li>{{#link-to 'adminUsersList.show' 'staff'}}{{i18n admin.users.nav.staff}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'suspended'}}{{i18n admin.users.nav.suspended}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'blocked'}}{{i18n admin.users.nav.blocked}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'suspect'}}{{i18n admin.users.nav.suspect}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'staff'}}{{i18n 'admin.users.nav.staff'}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'suspended'}}{{i18n 'admin.users.nav.suspended'}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'blocked'}}{{i18n 'admin.users.nav.blocked'}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.show' 'suspect'}}{{i18n 'admin.users.nav.suspect'}}{{/link-to}}</li>
</ul>
</div>
<div class="pull-right">
<button {{action "exportUsers"}} class="btn" title="{{i18n admin.export_csv.users.title}}"><i class="fa fa-download"></i>{{i18n admin.export_csv.button_text}}</button>
<button {{action "exportUsers"}} class="btn" title="{{i18n 'admin.export_csv.button_title.user'}}"><i class="fa fa-download"></i>{{i18n 'admin.export_csv.button_text'}}</button>
</div>
</div>

View File

@ -5,15 +5,15 @@
{{custom-html 'upgrade-header'}}
<tr>
<th>&nbsp;</th>
<th>{{i18n admin.dashboard.installed_version}}</th>
<th>{{i18n admin.dashboard.latest_version}}</th>
<th>{{i18n 'admin.dashboard.installed_version'}}</th>
<th>{{i18n 'admin.dashboard.latest_version'}}</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
{{#unless loading}}
<tbody>
<td class="title">{{i18n admin.dashboard.version}}</td>
<td class="title">{{i18n 'admin.dashboard.version'}}</td>
<td class="version-number"><a {{bind-attr href="versionCheck.gitLink"}} target="_blank">{{ versionCheck.installed_version }}</a></td>
{{#if versionCheck.noCheckPerformed}}
@ -22,7 +22,7 @@
<span class="icon critical-updates-available">☹</span>
</td>
<td class="version-notes">
<span class="normal-note">{{i18n admin.dashboard.no_check_performed}}</span>
<span class="normal-note">{{i18n 'admin.dashboard.no_check_performed'}}</span>
</td>
{{else}}
{{#if versionCheck.staleData}}
@ -37,9 +37,9 @@
<td class="version-notes">
<span class="normal-note">
{{#if versionCheck.version_check_pending}}
{{i18n admin.dashboard.version_check_pending}}
{{i18n 'admin.dashboard.version_check_pending'}}
{{else}}
{{i18n admin.dashboard.stale_data}}
{{i18n 'admin.dashboard.stale_data'}}
{{/if}}
</span>
</td>
@ -60,11 +60,11 @@
</td>
<td class="version-notes">
{{#if versionCheck.upToDate }}
{{i18n admin.dashboard.up_to_date}}
{{i18n 'admin.dashboard.up_to_date'}}
{{else}}
<span class="critical-note">{{i18n admin.dashboard.critical_available}}</span>
<span class="normal-note">{{i18n admin.dashboard.updates_available}}</span>
{{i18n admin.dashboard.please_upgrade}}
<span class="critical-note">{{i18n 'admin.dashboard.critical_available'}}</span>
<span class="normal-note">{{i18n 'admin.dashboard.updates_available'}}</span>
{{i18n 'admin.dashboard.please_upgrade'}}
{{/if}}
</td>
{{/if}}

View File

@ -6,4 +6,16 @@ require_asset ("./main_include.js")
DiscoursePluginRegistry.javascripts.each { |js| require_asset(js) }
DiscoursePluginRegistry.handlebars.each { |hb| require_asset(hb) }
# Load any glob dependencies
DiscoursePluginRegistry.asset_globs.each do |g|
root, extension = *g
Dir.glob("#{root}/**/*") do |f|
if File.directory?(f)
depend_on(f)
elsif f.to_s.end_with?(".#{extension}")
require_asset(f)
end
end
end
%>

View File

@ -1,23 +1,16 @@
/**
This component handles rendering of what actions have been taken on a post. It uses
buffer rendering for performance rather than a template.
import StringBuffer from 'discourse/mixins/string-buffer';
@class ActionsHistoryComponent
@extends Em.Component
@namespace Discourse
@module Discourse
**/
export default Em.Component.extend({
export default Em.Component.extend(StringBuffer, {
tagName: 'section',
classNameBindings: [':post-actions', 'hidden'],
actionsHistory: Em.computed.alias('post.actionsHistory'),
emptyHistory: Em.computed.empty('actionsHistory'),
hidden: Em.computed.and('emptyHistory', 'post.notDeleted'),
shouldRerender: Discourse.View.renderIfChanged('actionsHistory.@each', 'actionsHistory.users.length', 'post.deleted'),
rerenderTriggers: ['actionsHistory.@each', 'actionsHistory.users.length', 'post.deleted'],
// This was creating way too many bound ifs and subviews in the handlebars version.
render: function(buffer) {
renderString: function(buffer) {
if (!this.get('emptyHistory')) {
this.get('actionsHistory').forEach(function(c) {
buffer.push("<div class='post-action'>");

View File

@ -1,8 +1,9 @@
export default Ember.Component.extend({
import StringBuffer from 'discourse/mixins/string-buffer';
shouldRerender: Discourse.View.renderIfChanged("site.isReadOnly"),
export default Ember.Component.extend(StringBuffer, {
rerenderTriggers: ['site.isReadOnly'],
render: function(buffer) {
renderString: function(buffer) {
var notices = [];
if (this.site.get("isReadOnly")) {

View File

@ -1,17 +1,11 @@
/**
This view handles rendering of a navigation item
import StringBuffer from 'discourse/mixins/string-buffer';
@class NavigationItemComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
export default Ember.Component.extend({
export default Ember.Component.extend(StringBuffer, {
tagName: 'li',
classNameBindings: ['active', 'content.hasIcon:has-icon'],
attributeBindings: ['title'],
hidden: Em.computed.not('content.visible'),
shouldRerender: Discourse.View.renderIfChanged('content.count'),
rerenderTriggers: ['content.count'],
title: function() {
var categoryName = this.get('content.categoryName'),
@ -42,7 +36,7 @@ export default Ember.Component.extend({
return I18n.t("filters." + name + ".title", extra);
}.property('content.count'),
render: function(buffer) {
renderString: function(buffer) {
var content = this.get('content');
buffer.push("<a href='" + content.get('href') + "'>");
if (content.get('hasIcon')) {

View File

@ -1,8 +1,12 @@
var MAX_SHOWN = 5;
export default Em.Component.extend({
import StringBuffer from 'discourse/mixins/string-buffer';
export default Em.Component.extend(StringBuffer, {
classNameBindings: [':gutter'],
rerenderTriggers: ['expanded'],
// Roll up links to avoid duplicates
collapsed: function() {
var seen = {},
@ -21,7 +25,7 @@ export default Em.Component.extend({
return result;
}.property('links'),
render: function(buffer) {
renderString: function(buffer) {
var links = this.get('collapsed'),
toRender = links,
collapsed = !this.get('expanded');
@ -62,10 +66,6 @@ export default Em.Component.extend({
}
},
_rerenderIfNeeded: function() {
this.rerender();
}.observes('expanded'),
click: function(e) {
var $target = $(e.target);
if ($target.hasClass('toggle-more')) {

View File

@ -1,12 +0,0 @@
export default Ember.Component.extend({
tagName: 'a',
attributeBindings: ['href','data-user-card'],
classNames: ['trigger-user-card'],
href: Em.computed.oneWay('post.usernameUrl'),
"data-user-card": Em.computed.oneWay('post.username'),
render: function(buffer) {
var avatar = Handlebars.helpers.avatar(this.get('post'), {hash: {imageSize: 'large'}});
buffer.push(avatar);
}
});

View File

@ -1,8 +1,10 @@
export default Ember.Component.extend({
tagName: 'h2',
import StringBuffer from 'discourse/mixins/string-buffer';
_shouldRerender: Discourse.View.renderIfChanged('period.title'),
render: function(buffer) {
export default Ember.Component.extend(StringBuffer, {
tagName: 'h2',
rerenderTriggers: ['period.title'],
renderString: function(buffer) {
buffer.push("<i class='fa fa-calendar-o'></i> " + this.get('period.title'));
}
});

View File

@ -1,3 +1,4 @@
import StringBuffer from 'discourse/mixins/string-buffer';
// Creates a link
function link(buffer, prop, url, cssClass, i18nKey, text) {
@ -7,12 +8,12 @@ function link(buffer, prop, url, cssClass, i18nKey, text) {
buffer.push("<a href='" + url + "' class='badge " + cssClass + " badge-notification' title='" + title + "'>" + (text || prop) + "</a>\n");
}
export default Ember.Component.extend({
export default Ember.Component.extend(StringBuffer, {
tagName: 'span',
classNameBindings: [':topic-post-badges'],
_shouldRerender: Discourse.View.renderIfChanged('url', 'unread', 'newPosts', 'unseen'),
rerenderTriggers: ['url', 'unread', 'newPosts', 'unseen'],
render: function(buffer) {
renderString: function(buffer) {
var url = this.get('url');
link(buffer, this.get('unread'), url, 'unread', 'unread_posts');

View File

@ -1,18 +1,12 @@
/**
This view is for rendering an icon representing the status of a topic
import StringBuffer from 'discourse/mixins/string-buffer';
@class TopicStatusComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
export default Ember.Component.extend({
export default Ember.Component.extend(StringBuffer, {
classNames: ['topic-statuses'],
hasDisplayableStatus: Em.computed.or('topic.archived','topic.closed', 'topic.pinned', 'topic.unpinned', 'topic.invisible', 'topic.archetypeObject.notDefault', 'topic.is_warning'),
shouldRerender: Discourse.View.renderIfChanged('topic.archived', 'topic.closed', 'topic.pinned', 'topic.visible', 'topic.unpinned', 'topic.is_warning'),
rerenderTriggers: ['topic.archived', 'topic.closed', 'topic.pinned', 'topic.visible', 'topic.unpinned', 'topic.is_warning'],
didInsertElement: function(){
watchClick: function(){
var self = this;
this.$('a').click(function(){
@ -27,13 +21,13 @@ export default Ember.Component.extend({
return false;
});
},
}.on('didInsertElement'),
canAct: function() {
return Discourse.User.current() && !this.get('disableActions');
}.property('disableActions'),
render: function(buffer) {
renderString: function(buffer) {
if (!this.get('hasDisplayableStatus')) { return; }
var self = this;
@ -41,7 +35,7 @@ export default Ember.Component.extend({
var renderIconIf = function(conditionProp, name, key, actionable) {
if (!self.get(conditionProp)) { return; }
var title = Handlebars.Utils.escapeExpression(I18n.t("topic_statuses." + key + ".help"));
var startTag = actionable ? "a href='#'" : "span";
var startTag = actionable ? "a href" : "span";
var endTag = actionable ? "a" : "span";
buffer.push("<" + startTag + " title='" + title + "' class='topic-status'><i class='fa fa-" + name + "'></i></" + endTag + ">");

View File

@ -73,14 +73,34 @@ export default DiscourseController.extend({
if (c) { c.updateDraftStatus(); }
},
appendText: function(text) {
appendText: function(text, opts) {
var c = this.get('model');
if (c) { c.appendText(text); }
if (c) {
opts = opts || {};
var wmd = $('#wmd-input');
var val = wmd.val() || '';
var position = opts.position === "cursor" ? wmd.caret() : val.length;
var caret = c.appendText(text, position, opts);
if(wmd[0]){
Em.run.next(function(){
Discourse.Utilities.setCaretPosition(wmd[0], caret);
});
}
}
},
appendBlockAtCursor: function(text) {
var c = this.get('model');
if (c) { c.appendText(text, $('#wmd-input').caret(), {block: true}); }
appendTextAtCursor: function(text, opts) {
opts = opts || {};
opts.position = "cursor";
this.appendText(text, opts);
},
appendBlockAtCursor: function(text, opts) {
opts = opts || {};
opts.position = "cursor";
opts.block = true;
this.appendText(text, opts);
},
categories: function() {
@ -445,6 +465,11 @@ export default DiscourseController.extend({
canEdit: function() {
return this.get("model.action") === "edit" && Discourse.User.current().get("can_edit");
}.property("model.action")
}.property("model.action"),
visible: function() {
var state = this.get('model.composeState');
return state && state !== 'closed';
}.property('model.composeState')
});

View File

@ -46,7 +46,7 @@ export default DiscourseController.extend(ModalFunctionality, {
}).then(success, fail).finally(function(){
setTimeout(function(){
self.set('disabled',false);
}, 10*1000);
}, 1000);
});
return false;

View File

@ -4,13 +4,23 @@ var _dontSearch = false;
export default Em.Controller.extend(Discourse.Presence, {
contextType: function(key, value){
if(arguments.length > 1) {
// a bit hacky, consider cleaning this up, need to work through all observers though
var context = $.extend({}, this.get('searchContext'));
context.type = value;
this.set('searchContext', context);
}
return this.get('searchContext.type');
}.property('searchContext'),
contextChanged: function(){
if (this.get('searchContextEnabled')) {
_dontSearch = true;
this.set('searchContextEnabled', false);
_dontSearch = false;
}
}.observes("searchContext"),
}.observes('searchContext'),
searchContextDescription: function(){
var ctx = this.get('searchContext');
@ -22,6 +32,8 @@ export default Em.Controller.extend(Discourse.Presence, {
return I18n.t('search.context.user', {username: Em.get(ctx, 'user.username')});
case 'category':
return I18n.t('search.context.category', {category: Em.get(ctx, 'category.name')});
case 'private_messages':
return I18n.t('search.context.private_messages');
}
}
}.property('searchContext'),

View File

@ -78,6 +78,10 @@ export default ObjectController.extend(Discourse.SelectedPostsCount, {
},
actions: {
deleteTopic: function() {
this.deleteTopic();
},
// Post related methods
replyToPost: function(post) {
var composerController = this.get('controllers.composer'),
@ -370,8 +374,13 @@ export default ObjectController.extend(Discourse.SelectedPostsCount, {
},
togglePinnedForUser: function() {
if (this.get('pinned_at'))
this.get('pinned') ? this.get('content').clearPin() : this.get('content').rePin();
if (this.get('pinned_at')) {
if (this.get('pinned')) {
this.get('content').clearPin();
} else {
this.get('content').rePin();
}
}
},
replyAsNewTopic: function(post) {

View File

@ -13,23 +13,19 @@ export default ObjectController.extend({
postStream: Em.computed.alias('controllers.topic.postStream'),
enoughPostsForFiltering: Em.computed.gte('participant.post_count', 2),
viewingTopic: Em.computed.match('controllers.application.currentPath', /^topic\./),
viewingAdmin: Em.computed.match('controllers.application.currentPath', /^admin\./),
showFilter: Em.computed.and('viewingTopic', 'postStream.hasNoFilters', 'enoughPostsForFiltering'),
// showFilter: Em.computed.and('postStream.hasNoFilters', 'enoughPostsForFiltering'),
showName: Discourse.computed.propertyNotEqual('user.name', 'user.username'),
hasUserFilters: Em.computed.gt('postStream.userFilters.length', 0),
isSuspended: Em.computed.notEmpty('user.suspend_reason'),
showBadges: Discourse.computed.setting('enable_badges'),
showMoreBadges: Em.computed.gt('moreBadgesCount', 0),
showDelete: Em.computed.and("viewingAdmin", "showName", "user.canBeDeleted"),
moreBadgesCount: function() {
return this.get('user.badge_count') - this.get('user.featured_user_badges.length');
}.property('user.badge_count', 'user.featured_user_badges.@each'),
showMoreBadges: Em.computed.gt('moreBadgesCount', 0),
hasCardBadgeImage: function() {
var img = this.get('user.card_badge.image');
return img && img.indexOf('fa-') !== 0;
@ -77,6 +73,7 @@ export default ObjectController.extend({
self.set('cardTarget', target);
Discourse.User.findByUsername(username).then(function (user) {
user = Discourse.User.create(user);
self.setProperties({ user: user, avatar: user, visible: true});
self.appEvents.trigger('usercard:shown');
}).finally(function(){

View File

@ -80,7 +80,7 @@ export default Ember.ObjectController.extend({
var self = this;
var model = self.get('model');
if(self.get('canLoadMore')) {
if (self.get('canLoadMore') && !self.get('invitesLoading')) {
self.set('invitesLoading', true);
Discourse.Invite.findInvitedBy(self.get('user'), self.get('searchTerm'), model.invites.length).then(function(invite_model) {
self.set('invitesLoading', false);

View File

@ -1,8 +1,8 @@
import ObjectController from 'discourse/controllers/object';
// Lists of topics on a user's page.
export default ObjectController.extend({
needs: ["application"],
export default ObjectController.extend(Discourse.HasCurrentUser, {
needs: ["application", "user"],
hideCategory: false,
showParticipants: false,
@ -14,6 +14,11 @@ export default ObjectController.extend({
loadMore: function() {
this.get('model').loadMore();
}
}
},
showNewPM: function(){
return this.get('controllers.user.viewingSelf') &&
Discourse.User.currentProp('can_send_private_messages');
}.property('controllers.user.viewingSelf'),
});

View File

@ -71,8 +71,10 @@ export default Ember.DefaultResolver.extend({
customResolve: function(parsedName) {
// If we end with the name we want, use it. This allows us to define components within plugins.
var suffix = parsedName.type + 's/' + parsedName.fullNameWithoutType,
dashed = Ember.String.dasherize(suffix),
moduleName = Ember.keys(requirejs.entries).find(function(e) {
return e.indexOf(suffix, e.length - suffix.length) !== -1;
return (e.indexOf(suffix, e.length - suffix.length) !== -1) ||
(e.indexOf(dashed, e.length - dashed.length) !== -1);
});
var module;

View File

@ -26,7 +26,11 @@ I18n.toHumanSize = function(number, options) {
Handlebars.registerHelper('i18n', function(property, options) {
// Resolve any properties
var params = options.hash,
self = this;
self = this;
if (options.types[0] !== "STRING") {
Em.warn("Using the `{{i18n}}` helper without quotes is deprecated.");
}
_.each(params, function(value, key) {
params[key] = Em.Handlebars.get(self, value, options);
@ -49,14 +53,13 @@ Ember.Handlebars.registerBoundHelper("boundI18n", function(property, options) {
@for Handlebars
**/
Ember.Handlebars.registerHelper('countI18n', function(key, options) {
var view = Discourse.View.extend({
var view = Discourse.View.extend(Discourse.StringBuffer, {
tagName: 'span',
shouldRerender: Discourse.View.renderIfChanged('count', 'suffix'),
rerenderTriggers: ['count', 'suffix'],
render: function(buffer) {
renderString: function(buffer) {
buffer.push(I18n.t(key + (this.get('suffix') || ''), { count: this.get('count') }));
}
});
return Ember.Handlebars.helpers.view.call(this, view, options);
});

View File

@ -1214,6 +1214,17 @@
makeSpritedButtonRow();
var keyEvent = "keydown";
var extendedEvents = [];
if(window.PagedownCustom){
window.PagedownCustom.appendButtons.concat(window.PagedownCustom.insertButtons).forEach(function(button){
if(button.shortcut){
extendedEvents.push([button.shortcut, button.execute]);
}
});
}
util.addEvent(inputBox, keyEvent, function (key) {
// Check to see if we have a button key and, if so execute the callback.
@ -1222,6 +1233,12 @@
var keyCode = key.charCode || key.keyCode;
var keyCodeStr = String.fromCharCode(keyCode).toLowerCase();
for(var i=0; i<extendedEvents.length; i++){
if(keyCodeStr===extendedEvents[i][0]){
extendedEvents[i][1]();
}
}
switch (keyCodeStr) {
case "b":
doClick(buttons.bold);
@ -1439,6 +1456,19 @@
}));
buttons.heading = makeButton("wmd-heading-button", getString("heading"), bindCommand("doHeading"));
buttons.hr = makeButton("wmd-hr-button", getString("hr"), bindCommand("doHorizontalRule"));
// If we have any buttons to append, do it!
if (typeof PagedownCustom != "undefined") {
var appendButtons = PagedownCustom.appendButtons
if (appendButtons && (appendButtons.length > 0)) {
for (var i=0; i< appendButtons.length; i++) {
var b = appendButtons[i];
makeButton(b.id, b.description, b.execute)
}
}
}
//makeSpacer(3);
//buttons.undo = makeButton("wmd-undo-button", getString("undo"), null);
//buttons.undo.execute = function (manager) { if (manager) manager.undo(); };
@ -1450,23 +1480,23 @@
//buttons.redo = makeButton("wmd-redo-button", redoTitle, null);
//buttons.redo.execute = function (manager) { if (manager) manager.redo(); };
if (helpOptions) {
var helpButton = document.createElement("li");
var helpButtonImage = document.createElement("span");
helpButton.appendChild(helpButtonImage);
helpButton.className = "wmd-button wmd-help-button";
helpButton.id = "wmd-help-button" + postfix;
helpButton.isHelp = true;
helpButton.style.right = "0px";
helpButton.title = getString("help");
helpButton.onclick = helpOptions.handler;
// if (helpOptions) {
// var helpButton = document.createElement("li");
// var helpButtonImage = document.createElement("span");
// helpButton.appendChild(helpButtonImage);
// helpButton.className = "wmd-button wmd-help-button";
// helpButton.id = "wmd-help-button" + postfix;
// helpButton.isHelp = true;
// helpButton.style.right = "0px";
// helpButton.title = getString("help");
// helpButton.onclick = helpOptions.handler;
//
// setupButton(helpButton, true);
// buttonRow.appendChild(helpButton);
// buttons.help = helpButton;
// }
setupButton(helpButton, true);
buttonRow.appendChild(helpButton);
buttons.help = helpButton;
}
setUndoRedoButtonStates();
// setUndoRedoButtonStates();
}
function setUndoRedoButtonStates() {

View File

@ -39,9 +39,8 @@ export default function searchForTerm(term, opts) {
});
results.categories = results.categories.map(function(category){
category = Discourse.Category.list().findProperty('id', category.id);
return category;
});
return Discourse.Category.list().findProperty('id', category.id);
}).compact();
var r = results.grouped_search_result;
results.resultTypes = [];

View File

@ -0,0 +1,27 @@
export default Ember.Mixin.create({
_watchProps: function() {
var args = this.get('rerenderTriggers');
if (!Ember.isNone(args)) {
var self = this;
args.forEach(function(k) {
self.addObserver(k, self.rerenderString);
});
}
}.on('init'),
render: function(buffer) {
this.renderString(buffer);
},
_rerenderString: function() {
var buffer = [];
this.renderString(buffer);
this.$().html(buffer.join(''));
},
rerenderString: function() {
Ember.run.once(this, '_rerenderString');
}
});

View File

@ -8,7 +8,7 @@
**/
Discourse.CategoryList = Ember.ArrayProxy.extend({
init: function() {
this.content = [];
this.set('content', []);
this._super();
}
});

View File

@ -100,33 +100,29 @@ Discourse.Composer = Discourse.Model.extend({
hidePreview: Em.computed.not('showPreview'),
// Whether to disable the post button
// whether to disable the post button
cantSubmitPost: function() {
// Can't submit while loading
// can't submit while loading
if (this.get('loading')) return true;
// Title is required when:
// - creating a new topic
// - editing the 1st post
// - creating a private message
// title is required when
// - creating a new topic/private message
// - editing the 1st post
if (this.get('canEditTitle') && !this.get('titleLengthValid')) return true;
// Need at least one user when sending a private message
if ( this.get('creatingPrivateMessage') &&
this.get('targetUsernames') &&
(this.get('targetUsernames').trim() + ',').indexOf(',') === 0) {
return true;
}
// reply is always required
if (this.get('missingReplyCharacters') > 0) return true;
return this.get('canCategorize') &&
!Discourse.SiteSettings.allow_uncategorized_topics &&
!this.get('categoryId') &&
!Discourse.User.currentProp('staff');
if (this.get("privateMessage")) {
// need at least one user when sending a PM
return this.get('targetUsernames') && (this.get('targetUsernames').trim() + ',').indexOf(',') === 0;
} else {
// has a category? (when needed)
return this.get('canCategorize') &&
!Discourse.SiteSettings.allow_uncategorized_topics &&
!this.get('categoryId') &&
!Discourse.User.currentProp('staff');
}
}.property('loading', 'canEditTitle', 'titleLength', 'targetUsernames', 'replyLength', 'categoryId', 'missingReplyCharacters'),
/**
@ -306,7 +302,18 @@ Discourse.Composer = Discourse.Model.extend({
}
}
if(opts && opts.space){
if(before.length > 0 && !before[before.length-1].match(/\s/)){
before = before + " ";
}
if(after.length > 0 && !after[0].match(/\s/)){
after = " " + after;
}
}
this.set('reply', before + text + after);
return before.length + text.length;
},
togglePreview: function() {

View File

@ -1,59 +1,17 @@
/**
We use this class to keep on top of streaming and filtering posts within a topic.
@class PostStream
@extends Ember.Object
@namespace Discourse
@module Discourse
**/
Discourse.PostStream = Em.Object.extend({
/**
Are we currently loading posts in any way?
@property loading
**/
loading: Em.computed.or('loadingAbove', 'loadingBelow', 'loadingFilter', 'stagingPost'),
notLoading: Em.computed.not('loading'),
filteredPostsCount: Em.computed.alias("stream.length"),
/**
Have we loaded any posts?
@property hasPosts
**/
hasPosts: function(){
hasPosts: function() {
return this.get('posts.length') > 0;
}.property("posts.@each"),
/**
Do we have a stream list of post ids?
@property hasStream
**/
hasStream: Em.computed.gt('filteredPostsCount', 0),
/**
Can we append more posts to our current stream?
@property canAppendMore
**/
canAppendMore: Em.computed.and('notLoading', 'hasPosts', 'lastPostNotLoaded'),
/**
Can we prepend more posts to our current stream?
@property canPrependMore
**/
canPrependMore: Em.computed.and('notLoading', 'hasPosts', 'firstPostNotLoaded'),
/**
Have we loaded the first post in the stream?
@property firstPostPresent
**/
firstPostPresent: function() {
if (!this.get('hasLoadedData')) { return false; }
return !!this.get('posts').findProperty('id', this.get('firstPostId'));
@ -61,47 +19,22 @@ Discourse.PostStream = Em.Object.extend({
firstPostNotLoaded: Em.computed.not('firstPostPresent'),
/**
The first post that we have loaded. Useful for checking to see if we should scroll upwards
@property firstLoadedPost
**/
firstLoadedPost: function() {
return _.first(this.get('posts'));
}.property('posts.@each'),
/**
The last post we have loaded. Useful for checking to see if we should load more
@property lastLoadedPost
**/
lastLoadedPost: function() {
return _.last(this.get('posts'));
}.property('posts.@each'),
/**
Returns the id of the first post in the set
@property firstPostId
**/
firstPostId: function() {
return this.get('stream')[0];
}.property('stream.@each'),
/**
Returns the id of the last post in the set
@property lastPostId
**/
lastPostId: function() {
return _.last(this.get('stream'));
}.property('stream.@each'),
/**
Have we loaded the last post in the stream?
@property loadedAllPosts
**/
loadedAllPosts: function() {
if (!this.get('hasLoadedData')) { return false; }
return !!this.get('posts').findProperty('id', this.get('lastPostId'));
@ -149,7 +82,7 @@ Discourse.PostStream = Em.Object.extend({
var firstIndex = this.indexOf(firstPost);
if (firstIndex === -1) { return []; }
var startIndex = firstIndex - Discourse.SiteSettings.posts_chunksize;
var startIndex = firstIndex - this.get('topic.chunk_size');
if (startIndex < 0) { startIndex = 0; }
return stream.slice(startIndex, firstIndex);
@ -173,7 +106,7 @@ Discourse.PostStream = Em.Object.extend({
if ((lastIndex + 1) >= this.get('highest_post_number')) { return []; }
// find our window of posts
return stream.slice(lastIndex+1, lastIndex+Discourse.SiteSettings.posts_chunksize+1);
return stream.slice(lastIndex+1, lastIndex + this.get('topic.chunk_size') + 1);
}.property('lastLoadedPost', 'stream.@each'),
@ -527,7 +460,7 @@ Discourse.PostStream = Em.Object.extend({
this.get('stream').removeObjects(postIds);
this.get('posts').removeObjects(posts);
postIds.forEach(function(id){
identityMap.remove(id);
identityMap.delete(id);
});
},

View File

@ -1,11 +1,3 @@
/**
A data model representing the site (instance of Discourse)
@class Site
@extends Discourse.Model
@namespace Discourse
@module Discourse
**/
Discourse.Site = Discourse.Model.extend({
isReadOnly: Em.computed.alias('is_readonly'),
@ -66,7 +58,12 @@ Discourse.Site = Discourse.Model.extend({
updateCategory: function(newCategory) {
var existingCategory = this.get('categories').findProperty('id', Em.get(newCategory, 'id'));
if (existingCategory) existingCategory.setProperties(newCategory);
if (existingCategory) {
// Don't update null permissions
if (newCategory.permission === null) { delete newCategory.permission; }
existingCategory.setProperties(newCategory);
}
}
});

View File

@ -11,6 +11,9 @@ Discourse.User = Discourse.Model.extend({
hasPMs: Em.computed.gt("private_messages_stats.all", 0),
hasStartedPMs: Em.computed.gt("private_messages_stats.mine", 0),
hasUnreadPMs: Em.computed.gt("private_messages_stats.unread", 0),
hasPosted: Em.computed.gt("post_count", 0),
hasNotPosted: Em.computed.not("hasPosted"),
canBeDeleted: Em.computed.and("can_be_deleted", "hasNotPosted"),
/**
The user's stream

View File

@ -15,7 +15,7 @@ var ApplicationRoute = Discourse.Route.extend({
composePrivateMessage: function(user) {
var self = this;
this.transitionTo('userActivity', user).then(function () {
self.controllerFor('user-activity').send('composePrivateMessage');
self.controllerFor('user-activity').send('composePrivateMessage', user);
});
},
@ -27,10 +27,16 @@ var ApplicationRoute = Discourse.Route.extend({
}
var exceptionController = this.controllerFor('exception'),
errorString = err.toString();
if (err.statusText) {
errorString = err.statusText;
}
errorString = err.toString(),
stack = err.stack;
// If we have a stack call `toString` on it. It gives us a better
// stack trace since `console.error` uses the stack track of this
// error callback rather than the original error.
if (stack) { errorString = stack.toString(); }
if (err.statusText) { errorString = err.statusText; }
var c = window.console;
if (c && c.error) {
c.error(errorString);

View File

@ -25,7 +25,12 @@ export default function (viewName, path) {
showParticipants: true
});
this.controllerFor('user').set("pmView", viewName);
this.controllerFor('user').set('pmView', viewName);
this.controllerFor('search').set('contextType', 'private_messages');
},
deactivate: function(){
this.controllerFor('search').set('contextType', 'user');
}
});
}

View File

@ -15,11 +15,11 @@ export default Discourse.Route.extend({
Discourse.logout();
},
composePrivateMessage: function() {
var user = this.modelFor('user');
composePrivateMessage: function(user) {
var recipient = user ? user.get('username') : '';
return this.controllerFor('composer').open({
action: Discourse.Composer.PRIVATE_MESSAGE,
usernames: user.get('username'),
usernames: recipient,
archetypeId: 'private_message',
draftKey: 'new_private_message'
});

Some files were not shown because too many files have changed in this diff Show More