Rename 'popular' to 'latest'. First stab at 'Hot' tab.

This commit is contained in:
Robin Ward 2013-03-27 16:17:49 -04:00
parent d1945057fd
commit 36269cfbaa
52 changed files with 946 additions and 323 deletions

View File

@ -98,7 +98,7 @@ Discourse.ListController = Discourse.Controller.extend({
}); });
Discourse.ListController.reopenClass({ Discourse.ListController.reopenClass({
filters: ['popular', 'favorited', 'read', 'unread', 'new', 'posted'] filters: ['latest', 'hot', 'favorited', 'read', 'unread', 'new', 'posted']
}); });

View File

@ -11,31 +11,30 @@ Discourse.ListTopicsController = Discourse.ObjectController.extend({
// If we're changing our channel // If we're changing our channel
previousChannel: null, previousChannel: null,
popular: (function() { latest: Ember.computed.equal('content.filter', 'latest'),
return this.get('content.filter') === 'popular';
}).property('content.filter'), filterModeChanged: function() {
filterModeChanged: (function() {
// Unsubscribe from a previous channel if necessary // Unsubscribe from a previous channel if necessary
var channel, filterMode, previousChannel, var previousChannel = this.get('previousChannel');
_this = this; if (previousChannel) {
if (previousChannel = this.get('previousChannel')) {
Discourse.MessageBus.unsubscribe("/" + previousChannel); Discourse.MessageBus.unsubscribe("/" + previousChannel);
this.set('previousChannel', null); this.set('previousChannel', null);
} }
filterMode = this.get('controllers.list.filterMode');
if (!filterMode) { var filterMode = this.get('controllers.list.filterMode');
return; if (!filterMode) return;
}
channel = filterMode; var lsitTopicsController = this;
Discourse.MessageBus.subscribe("/" + channel, function(data) { Discourse.MessageBus.subscribe("/" + filterMode, function(data) {
return _this.get('content').insert(data); return lsitTopicsController.get('content').insert(data);
}); });
return this.set('previousChannel', channel); this.set('previousChannel', filterMode);
}).observes('controllers.list.filterMode'),
draftLoaded: (function() { }.observes('controllers.list.filterMode'),
var draft;
draft = this.get('content.draft'); draftLoaded: function() {
var draft = this.get('content.draft');
if (draft) { if (draft) {
return this.get('controllers.composer').open({ return this.get('controllers.composer').open({
draft: draft, draft: draft,
@ -44,7 +43,7 @@ Discourse.ListTopicsController = Discourse.ObjectController.extend({
ignoreIfChanged: true ignoreIfChanged: true
}); });
} }
}).observes('content.draft'), }.observes('content.draft'),
// Star a topic // Star a topic
toggleStar: function(topic) { toggleStar: function(topic) {

View File

@ -6,9 +6,8 @@
@namespace Discourse @namespace Discourse
@module Discourse @module Discourse
**/ **/
var validAnon, validNavNames; var validNavNames = ['read', 'latest', 'hot', 'categories', 'favorited', 'category', 'unread', 'new', 'posted'];
validNavNames = ['read', 'popular', 'categories', 'favorited', 'category', 'unread', 'new', 'posted']; var validAnon = ['latest', 'hot', 'category', 'categories'];
validAnon = ['popular', 'category', 'categories'];
Discourse.NavItem = Discourse.Model.extend({ Discourse.NavItem = Discourse.Model.extend({
categoryName: (function() { categoryName: (function() {

View File

@ -33,7 +33,8 @@ Discourse.Route.buildRoutes(function() {
router.route(r, { path: "/" + r + "/more" }); router.route(r, { path: "/" + r + "/more" });
}); });
this.route('popular', { path: '/' }); this.route('latest', { path: '/' });
this.route('hot', { path: '/hot' });
this.route('categories', { path: '/categories' }); this.route('categories', { path: '/categories' });
this.route('category', { path: '/category/:slug/more' }); this.route('category', { path: '/category/:slug/more' });
this.route('category', { path: '/category/:slug' }); this.route('category', { path: '/category/:slug' });

View File

@ -1,5 +1,5 @@
/** /**
A class used to handle filtering routes such as popular, read, etc. A class used to handle filtering routes such as latest, hot, read, etc.
@class FilteredListRoute @class FilteredListRoute
@extends Discourse.Route @extends Discourse.Route

View File

@ -70,7 +70,7 @@
<li><a href="/admin/flags/active"><i class='icon-flag'></i>{{i18n flags_title}}</a></li> <li><a href="/admin/flags/active"><i class='icon-flag'></i>{{i18n flags_title}}</a></li>
{{/if}} {{/if}}
<li> <li>
{{#titledLinkTo "list.popular" titleKey="filters.popular.help"}}{{i18n filters.popular.title}}{{/titledLinkTo}} {{#titledLinkTo "list.latest" titleKey="filters.latest.help"}}{{i18n filters.latest.title}}{{/titledLinkTo}}
</li> </li>
<li>{{#linkTo 'faq'}}{{i18n faq}}{{/linkTo}}</li> <li>{{#linkTo 'faq'}}{{i18n faq}}{{/linkTo}}</li>
{{#if Discourse.currentUser.admin}} {{#if Discourse.currentUser.admin}}

View File

@ -54,12 +54,12 @@
<h3> <h3>
{{view.footerMessage}} {{view.footerMessage}}
{{#if view.allLoaded}} {{#if view.allLoaded}}
{{#if controller.popular}} {{#if controller.latest}}
{{#if view.canCreateTopic}} {{#if view.canCreateTopic}}
<a href='#' {{action createTopic}}>{{i18n topic.suggest_create_topic}}</a> <a href='#' {{action createTopic}}>{{i18n topic.suggest_create_topic}}</a>
{{/if}} {{/if}}
{{else}} {{else}}
{{#linkTo list.categories}}{{i18n topic.browse_all_categories}}{{/linkTo}} {{i18n or}} {{#linkTo list.popular}}{{i18n topic.view_popular_topics}}{{/linkTo}} {{#linkTo list.categories}}{{i18n topic.browse_all_categories}}{{/linkTo}} {{i18n or}} {{#linkTo list.latest}}{{i18n topic.view_latest_topics}}{{/linkTo}}
{{/if}} {{/if}}
{{/if}} {{/if}}
</h3> </h3>

View File

@ -115,7 +115,7 @@
<h2>{{message}}</h2> <h2>{{message}}</h2>
<p> <p>
{{#linkTo list.popular}}{{i18n topic.back_to_list}}{{/linkTo}} {{#linkTo list.latest}}{{i18n topic.back_to_list}}{{/linkTo}}
</div> </div>
</div> </div>
{{else}} {{else}}

View File

@ -437,7 +437,7 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
var category, opts; var category, opts;
opts = { opts = {
popularLink: "<a href=\"/\">" + (Em.String.i18n("topic.view_popular_topics")) + "</a>" latestLink: "<a href=\"/\">" + (Em.String.i18n("topic.view_latest_topics")) + "</a>"
}; };
if (category = this.get('controller.content.category')) { if (category = this.get('controller.content.category')) {
opts.catLink = Discourse.Utilities.categoryLink(category); opts.catLink = Discourse.Utilities.categoryLink(category);

View File

@ -1,5 +1,5 @@
// Version: v1.0.0-pre.2-892-g1283274 // Version: v1.0.0-pre.2-924-g9e5ec3b
// Last commit: 1283274 (2013-03-21 14:18:06 -0700) // Last commit: 9e5ec3b (2013-03-26 21:49:38 -0700)
(function() { (function() {
@ -151,8 +151,8 @@ Ember.deprecateFunc = function(message, func) {
})(); })();
// Version: v1.0.0-pre.2-892-g1283274 // Version: v1.0.0-pre.2-924-g9e5ec3b
// Last commit: 1283274 (2013-03-21 14:18:06 -0700) // Last commit: 9e5ec3b (2013-03-26 21:49:38 -0700)
(function() { (function() {
@ -3679,59 +3679,238 @@ Ember.cacheFor = function cacheFor(obj, key) {
} }
}; };
/** function getProperties(self, propertyNames) {
@method computed.not var ret = {};
@for Ember for(var i = 0; i < propertyNames.length; i++) {
@param {String} dependentKey ret[propertyNames[i]] = get(self, propertyNames[i]);
@return {Ember.ComputedProperty} computed property which negate the original value for property }
*/ return ret;
Ember.computed.not = function(dependentKey) { }
return Ember.computed(dependentKey, function(key) {
return !get(this, dependentKey);
});
};
/** function registerComputed(name, macro) {
@method computed.none Ember.computed[name] = function(dependentKey) {
@for Ember var args = a_slice.call(arguments);
@param {String} dependentKey return Ember.computed(dependentKey, function() {
*/ return macro.apply(this, args);
Ember.computed.none = function(dependentKey) {
return Ember.computed(dependentKey, function(key) {
var val = get(this, dependentKey);
return Ember.isNone(val);
}); });
}; };
}
function registerComputedWithProperties(name, macro) {
Ember.computed[name] = function() {
var properties = a_slice.call(arguments);
var computed = Ember.computed(function() {
return macro.apply(this, [getProperties(this, properties)]);
});
return computed.property.apply(computed, properties);
};
}
/** /**
@method computed.empty @method computed.empty
@for Ember @for Ember
@param {String} dependentKey @param {String} dependentKey
@return {Ember.ComputedProperty} computed property which negate
the original value for property
*/ */
Ember.computed.empty = function(dependentKey) { registerComputed('empty', function(dependentKey) {
return Ember.computed(dependentKey, function(key) { return Ember.isEmpty(get(this, dependentKey));
var val = get(this, dependentKey); });
return Ember.isEmpty(val);
}); /**
}; @method computed.notEmpty
@for Ember
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which returns true if
original value for property is not empty.
*/
registerComputed('notEmpty', function(dependentKey) {
return !Ember.isEmpty(get(this, dependentKey));
});
/**
@method computed.none
@for Ember
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which
rturns true if original value for property is null or undefined.
*/
registerComputed('none', function(dependentKey) {
return Ember.isNone(get(this, dependentKey));
});
/**
@method computed.not
@for Ember
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which returns
inverse of the original value for property
*/
registerComputed('not', function(dependentKey) {
return !get(this, dependentKey);
});
/** /**
@method computed.bool @method computed.bool
@for Ember @for Ember
@param {String} dependentKey @param {String} dependentKey
@return {Ember.ComputedProperty} computed property which convert to boolean the original value for property @return {Ember.ComputedProperty} computed property which convert
to boolean the original value for property
*/ */
Ember.computed.bool = function(dependentKey) { registerComputed('bool', function(dependentKey) {
return Ember.computed(dependentKey, function(key) {
return !!get(this, dependentKey); return !!get(this, dependentKey);
}); });
};
/**
@method computed.match
@for Ember
@param {String} dependentKey
@param {RegExp} regexp
@return {Ember.ComputedProperty} computed property which match
the original value for property against a given RegExp
*/
registerComputed('match', function(dependentKey, regexp) {
var value = get(this, dependentKey);
return typeof value === 'string' ? !!value.match(regexp) : false;
});
/**
@method computed.equal
@for Ember
@param {String} dependentKey
@param {String|Number|Object} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is equal to the given value.
*/
registerComputed('equal', function(dependentKey, value) {
return get(this, dependentKey) === value;
});
/**
@method computed.gt
@for Ember
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is greater then given value.
*/
registerComputed('gt', function(dependentKey, value) {
return get(this, dependentKey) > value;
});
/**
@method computed.gte
@for Ember
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is greater or equal then given value.
*/
registerComputed('gte', function(dependentKey, value) {
return get(this, dependentKey) >= value;
});
/**
@method computed.lt
@for Ember
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is less then given value.
*/
registerComputed('lt', function(dependentKey, value) {
return get(this, dependentKey) < value;
});
/**
@method computed.lte
@for Ember
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is less or equal then given value.
*/
registerComputed('lte', function(dependentKey, value) {
return get(this, dependentKey) <= value;
});
/**
@method computed.and
@for Ember
@param {String} dependentKey, [dependentKey...]
@return {Ember.ComputedProperty} computed property which peforms
a logical `and` on the values of all the original values for properties.
*/
registerComputedWithProperties('and', function(properties) {
for (var key in properties) {
if (properties.hasOwnProperty(key) && !properties[key]) {
return false;
}
}
return true;
});
/**
@method computed.or
@for Ember
@param {String} dependentKey, [dependentKey...]
@return {Ember.ComputedProperty} computed property which peforms
a logical `or` on the values of all the original values for properties.
*/
registerComputedWithProperties('or', function(properties) {
for (var key in properties) {
if (properties.hasOwnProperty(key) && properties[key]) {
return true;
}
}
return false;
});
/**
@method computed.any
@for Ember
@param {String} dependentKey, [dependentKey...]
@return {Ember.ComputedProperty} computed property which returns
the first trouthy value of given list of properties.
*/
registerComputedWithProperties('any', function(properties) {
for (var key in properties) {
if (properties.hasOwnProperty(key) && properties[key]) {
return properties[key];
}
}
return null;
});
/**
@method computed.map
@for Ember
@param {String} dependentKey, [dependentKey...]
@return {Ember.ComputedProperty} computed property which maps
values of all passed properties in to an array.
*/
registerComputedWithProperties('map', function(properties) {
var res = [];
for (var key in properties) {
if (properties.hasOwnProperty(key)) {
if (Ember.isNone(properties[key])) {
res.push(null);
} else {
res.push(properties[key]);
}
}
}
return res;
});
/** /**
@method computed.alias @method computed.alias
@for Ember @for Ember
@param {String} dependentKey @param {String} dependentKey
@return {Ember.ComputedProperty} computed property which creates an
alias to the original value for property.
*/ */
Ember.computed.alias = function(dependentKey) { Ember.computed.alias = function(dependentKey) {
return Ember.computed(dependentKey, function(key, value){ return Ember.computed(dependentKey, function(key, value){
@ -3744,6 +3923,23 @@ Ember.computed.alias = function(dependentKey) {
}); });
}; };
/**
@method computed.defaultTo
@for Ember
@param {String} defaultPath
@return {Ember.ComputedProperty} computed property which acts like
a standard getter and setter, but defaults to the value from `defaultPath`.
*/
Ember.computed.defaultTo = function(defaultPath) {
return Ember.computed(function(key, newValue, cachedValue) {
var result;
if (arguments.length === 1) {
return cachedValue != null ? cachedValue : get(this, defaultPath);
}
return newValue != null ? newValue : get(this, defaultPath);
});
};
})(); })();
@ -4576,8 +4772,7 @@ function invokeLaterTimers() {
If you pass a string it will be resolved on the If you pass a string it will be resolved on the
target at the time the method is invoked. target at the time the method is invoked.
@param {Object} [args*] Optional arguments to pass to the timeout. @param {Object} [args*] Optional arguments to pass to the timeout.
@param {Number} wait @param {Number} wait Number of milliseconds to wait.
Number of milliseconds to wait.
@return {String} a string you can use to cancel the timer in @return {String} a string you can use to cancel the timer in
{{#crossLink "Ember/run.cancel"}}{{/crossLink}} later. {{#crossLink "Ember/run.cancel"}}{{/crossLink}} later.
*/ */
@ -4699,15 +4894,54 @@ Ember.run.scheduleOnce = function(queue, target, method, args) {
}; };
/** /**
Schedules an item to run after control has been returned to the system. Schedules an item to run from within a separate run loop, after
This is equivalent to calling `Ember.run.later` with a wait time of 1ms. control has been returned to the system. This is equivalent to calling
`Ember.run.later` with a wait time of 1ms.
```javascript ```javascript
Ember.run.next(myContext, function(){ Ember.run.next(myContext, function(){
// code to be executed in the next RunLoop, which will be scheduled after the current one // code to be executed in the next run loop, which will be scheduled after the current one
}); });
``` ```
Multiple operations scheduled with `Ember.run.next` will coalesce
into the same later run loop, along with any other operations
scheduled by `Ember.run.later` that expire right around the same
time that `Ember.run.next` operations will fire.
Note that there are often alternatives to using `Ember.run.next`.
For instance, if you'd like to schedule an operation to happen
after all DOM element operations have completed within the current
run loop, you can make use of the `afterRender` run loop queue (added
by the `ember-views` package, along with the preceding `render` queue
where all the DOM element operations happen). Example:
```javascript
App.MyCollectionView = Ember.CollectionView.extend({
didInsertElement: function() {
Ember.run.scheduleOnce('afterRender', this, 'processChildElements');
},
processChildElements: function() {
// ... do something with collectionView's child view
// elements after they've finished rendering, which
// can't be done within the CollectionView's
// `didInsertElement` hook because that gets run
// before the child elements have been added to the DOM.
}
});
```
One benefit of the above approach compared to using `Ember.run.next` is
that you will be able to perform DOM/CSS operations before unprocessed
elements are rendered to the screen, which may prevent flickering or
other artifacts caused by delaying processing until after rendering.
The other major benefit to the above approach is that `Ember.run.next`
introduces an element of non-determinism, which can make things much
harder to test, due to its reliance on `setTimeout`; it's much harder
to guarantee the order of scheduled operations when they are scheduled
outside of the current run loop, i.e. with `Ember.run.next`.
@method next @method next
@param {Object} [target] target of method to invoke @param {Object} [target] target of method to invoke
@param {Function|String} method The method to invoke. @param {Function|String} method The method to invoke.
@ -6266,7 +6500,7 @@ define("container",
factory = name; factory = name;
fullName = type; fullName = type;
} else { } else {
Ember.deprecate('register("'+type +'", "'+ name+'") is now deprecated in-favour of register("'+type+':'+name+'");', true); Ember.deprecate('register("'+type +'", "'+ name+'") is now deprecated in-favour of register("'+type+':'+name+'");', false);
fullName = type + ":" + name; fullName = type + ":" + name;
} }
@ -12825,7 +13059,7 @@ Ember Runtime
*/ */
var jQuery = Ember.imports.jQuery; var jQuery = Ember.imports.jQuery;
Ember.assert("Ember Views require jQuery 1.8 or 1.9", jQuery && (jQuery().jquery.match(/^1\.(8|9)(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY)); Ember.assert("Ember Views require jQuery 1.8, 1.9 or 2.0", jQuery && (jQuery().jquery.match(/^((1\.(8|9))|2.0)(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY));
/** /**
Alias for jQuery Alias for jQuery
@ -12967,9 +13201,11 @@ var setInnerHTML = function(element, html) {
if (canSetInnerHTML(tagName)) { if (canSetInnerHTML(tagName)) {
setInnerHTMLWithoutFix(element, html); setInnerHTMLWithoutFix(element, html);
} else { } else {
Ember.assert("Can't set innerHTML on "+element.tagName+" in this browser", element.outerHTML); // Firefox versions < 11 do not have support for element.outerHTML.
var outerHTML = element.outerHTML || new XMLSerializer().serializeToString(element);
Ember.assert("Can't set innerHTML on "+element.tagName+" in this browser", outerHTML);
var startTag = element.outerHTML.match(new RegExp("<"+tagName+"([^>]*)>", 'i'))[0], var startTag = outerHTML.match(new RegExp("<"+tagName+"([^>]*)>", 'i'))[0],
endTag = '</'+tagName+'>'; endTag = '</'+tagName+'>';
var wrapper = document.createElement('div'); var wrapper = document.createElement('div');
@ -13452,7 +13688,9 @@ Ember._RenderBuffer.prototype =
*/ */
string: function() { string: function() {
if (this._element) { if (this._element) {
return this.element().outerHTML; // Firefox versions < 11 do not have support for element.outerHTML.
return this.element().outerHTML ||
new XMLSerializer().serializeToString(this.element());
} else { } else {
return this.innerString(); return this.innerString();
} }
@ -15324,9 +15562,9 @@ Ember.View = Ember.CoreView.extend(
willInsertElement: Ember.K, willInsertElement: Ember.K,
/** /**
Called when the element of the view has been inserted into the DOM. Called when the element of the view has been inserted into the DOM
Override this function to do any set up that requires an element in the or after the view was re-rendered. Override this function to do any
document body. set up that requires an element in the document body.
@event didInsertElement @event didInsertElement
*/ */
@ -17774,7 +18012,7 @@ if(!Handlebars && typeof require === 'function') {
Handlebars = require('handlebars'); Handlebars = require('handlebars');
} }
Ember.assert("Ember Handlebars requires Handlebars 1.0.0-rc.3 or greater", Handlebars && Handlebars.VERSION.match(/^1\.0\.[0-9](\.rc\.[23456789]+)?/)); Ember.assert("Ember Handlebars requires Handlebars 1.0.0-rc.3 or greater. Include a SCRIPT tag in the HTML HEAD linking to the Handlebars file before you link to Ember.", Handlebars && Handlebars.VERSION.match(/^1\.0\.[0-9](\.rc\.[23456789]+)?/));
/** /**
Prepares the Handlebars templating library for use inside Ember's view Prepares the Handlebars templating library for use inside Ember's view
@ -20531,11 +20769,12 @@ Ember.Handlebars.registerHelper('each', function(path, options) {
*/ */
Ember.Handlebars.registerHelper('template', function(name, options) { Ember.Handlebars.registerHelper('template', function(name, options) {
var template = Ember.TEMPLATES[name]; var view = options.data.view,
template = view.templateForName(name);
Ember.assert("Unable to find template with name '"+name+"'.", !!template); Ember.assert("Unable to find template with name '"+name+"'.", !!template);
Ember.TEMPLATES[name](this, { data: options.data }); template(this, { data: options.data });
}); });
})(); })();
@ -20579,10 +20818,10 @@ Ember.Handlebars.registerHelper('partial', function(name, options) {
nameParts[nameParts.length - 1] = "_" + lastPart; nameParts[nameParts.length - 1] = "_" + lastPart;
var underscoredName = nameParts.join("/"); var view = options.data.view,
underscoredName = nameParts.join("/"),
var template = Ember.TEMPLATES[underscoredName], template = view.templateForName(underscoredName),
deprecatedTemplate = Ember.TEMPLATES[name]; deprecatedTemplate = view.templateForName(name);
Ember.deprecate("You tried to render the partial " + name + ", which should be at '" + underscoredName + "', but Ember found '" + name + "'. Please use a leading underscore in your partials", template); Ember.deprecate("You tried to render the partial " + name + ", which should be at '" + underscoredName + "', but Ember found '" + name + "'. Please use a leading underscore in your partials", template);
Ember.assert("Unable to find partial with name '"+name+"'.", template || deprecatedTemplate); Ember.assert("Unable to find partial with name '"+name+"'.", template || deprecatedTemplate);
@ -23051,7 +23290,7 @@ Ember.controllerFor = function(container, controllerName, context, lookupOptions
`App.ObjectController` and `App.ArrayController` `App.ObjectController` and `App.ArrayController`
*/ */
Ember.generateController = function(container, controllerName, context) { Ember.generateController = function(container, controllerName, context) {
var controller, DefaultController; var controller, DefaultController, fullName;
if (context && Ember.isArray(context)) { if (context && Ember.isArray(context)) {
DefaultController = container.resolve('controller:array'); DefaultController = container.resolve('controller:array');
@ -23072,8 +23311,10 @@ Ember.generateController = function(container, controllerName, context) {
return "(generated " + controllerName + " controller)"; return "(generated " + controllerName + " controller)";
}; };
container.register('controller', controllerName, controller);
return container.lookup('controller:' + controllerName); fullName = 'controller:' + controllerName;
container.register(fullName, controller);
return container.lookup(fullName);
}; };
})(); })();
@ -23136,8 +23377,8 @@ Ember.Router = Ember.Object.extend({
setupRouter(this, router, location); setupRouter(this, router, location);
container.register('view', 'default', DefaultView); container.register('view:default', DefaultView);
container.register('view', 'toplevel', Ember.View.extend()); container.register('view:toplevel', Ember.View.extend());
location.onUpdateURL(function(url) { location.onUpdateURL(function(url) {
self.handleURL(url); self.handleURL(url);
@ -23233,7 +23474,9 @@ function getHandlerFunction(router) {
DefaultRoute = container.resolve('route:basic'); DefaultRoute = container.resolve('route:basic');
return function(name) { return function(name) {
var handler = container.lookup('route:' + name); var routeName = 'route:' + name,
handler = container.lookup(routeName);
if (seen[name]) { return handler; } if (seen[name]) { return handler; }
seen[name] = true; seen[name] = true;
@ -23242,8 +23485,8 @@ function getHandlerFunction(router) {
if (name === 'loading') { return {}; } if (name === 'loading') { return {}; }
if (name === 'failure') { return router.constructor.defaultFailureHandler; } if (name === 'failure') { return router.constructor.defaultFailureHandler; }
container.register('route', name, DefaultRoute.extend()); container.register(routeName, DefaultRoute.extend());
handler = container.lookup('route:' + name); handler = container.lookup(routeName);
} }
handler.routeName = name; handler.routeName = name;
@ -23252,7 +23495,8 @@ function getHandlerFunction(router) {
} }
function handlerIsActive(router, handlerName) { function handlerIsActive(router, handlerName) {
var handler = router.container.lookup('route:' + handlerName), var routeName = 'route:' + handlerName,
handler = router.container.lookup(routeName),
currentHandlerInfos = router.router.currentHandlerInfos, currentHandlerInfos = router.router.currentHandlerInfos,
handlerInfo; handlerInfo;
@ -23962,7 +24206,25 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
return ret.concat(resolvedPaths(linkView.parameters)); return ret.concat(resolvedPaths(linkView.parameters));
} }
var LinkView = Ember.View.extend({ /**
Renders a link to the supplied route.
When the rendered link matches the current route, and the same object instance is passed into the helper,
then the link is given class="active" by default.
You may re-open LinkView in order to change the default active class:
``` javascript
Ember.LinkView.reopen({
activeClass: "is-active"
})
```
@class LinkView
@namespace Ember
@extends Ember.View
**/
var LinkView = Ember.LinkView = Ember.View.extend({
tagName: 'a', tagName: 'a',
namedRoute: null, namedRoute: null,
currentWhen: null, currentWhen: null,
@ -25554,7 +25816,7 @@ var get = Ember.get, set = Ember.set,
name: "store", name: "store",
initialize: function(container, application) { initialize: function(container, application) {
container.register('store', 'main', application.Store); container.register('store:main', application.Store);
} }
}); });
``` ```
@ -25596,7 +25858,8 @@ var get = Ember.get, set = Ember.set,
@namespace Ember @namespace Ember
@extends Ember.Namespace @extends Ember.Namespace
*/ */
var Application = Ember.Application = Ember.Namespace.extend({
var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin, {
/** /**
The root DOM element of the Application. This can be specified as an The root DOM element of the Application. This can be specified as an
@ -25750,10 +26013,17 @@ var Application = Ember.Application = Ember.Namespace.extend({
*/ */
scheduleInitialize: function() { scheduleInitialize: function() {
var self = this; var self = this;
this.$().ready(function() {
if (self.isDestroyed || self.isInitialized) { return; } function initialize(){
if (self.isDestroyed) { return; }
Ember.run.schedule('actions', self, 'initialize'); Ember.run.schedule('actions', self, 'initialize');
}); }
if (!this.$ || this.$.isReady) {
initialize();
} else {
this.$().ready(initialize);
}
}, },
/** /**
@ -25861,7 +26131,7 @@ var Application = Ember.Application = Ember.Namespace.extend({
this.isInitialized = true; this.isInitialized = true;
// At this point, the App.Router must already be assigned // At this point, the App.Router must already be assigned
this.register('router', 'main', this.Router); this.register('router:main', this.Router);
this.runInitializers(); this.runInitializers();
Ember.runLoadHooks('application', this); Ember.runLoadHooks('application', this);
@ -25879,8 +26149,11 @@ var Application = Ember.Application = Ember.Namespace.extend({
this.buildContainer(); this.buildContainer();
this.isInitialized = false; this.isInitialized = false;
Ember.run.schedule('actions', this, function(){
this.initialize(); this.initialize();
this.startRouting(); this.startRouting();
});
}, },
/** /**
@ -25920,6 +26193,8 @@ var Application = Ember.Application = Ember.Namespace.extend({
Ember.Namespace.processAll(); Ember.Namespace.processAll();
Ember.BOOTED = true; Ember.BOOTED = true;
} }
this.resolve(this);
}, },
/** /**
@ -26054,7 +26329,7 @@ Ember.Application.reopenClass({
container.resolver = resolverFor(namespace); container.resolver = resolverFor(namespace);
container.optionsForType('view', { singleton: false }); container.optionsForType('view', { singleton: false });
container.optionsForType('template', { instantiate: false }); container.optionsForType('template', { instantiate: false });
container.register('application', 'main', namespace, { instantiate: false }); container.register('application:main', namespace, { instantiate: false });
container.register('controller:basic', Ember.Controller, { instantiate: false }); container.register('controller:basic', Ember.Controller, { instantiate: false });
container.register('controller:object', Ember.ObjectController, { instantiate: false }); container.register('controller:object', Ember.ObjectController, { instantiate: false });
@ -27468,8 +27743,8 @@ Ember States
})(); })();
// Version: v1.0.0-pre.2-892-g1283274 // Version: v1.0.0-pre.2-924-g9e5ec3b
// Last commit: 1283274 (2013-03-21 14:18:06 -0700) // Last commit: 9e5ec3b (2013-03-26 21:49:38 -0700)
(function() { (function() {

View File

@ -3518,59 +3518,238 @@ Ember.cacheFor = function cacheFor(obj, key) {
} }
}; };
/** function getProperties(self, propertyNames) {
@method computed.not var ret = {};
@for Ember for(var i = 0; i < propertyNames.length; i++) {
@param {String} dependentKey ret[propertyNames[i]] = get(self, propertyNames[i]);
@return {Ember.ComputedProperty} computed property which negate the original value for property }
*/ return ret;
Ember.computed.not = function(dependentKey) { }
return Ember.computed(dependentKey, function(key) {
return !get(this, dependentKey);
});
};
/** function registerComputed(name, macro) {
@method computed.none Ember.computed[name] = function(dependentKey) {
@for Ember var args = a_slice.call(arguments);
@param {String} dependentKey return Ember.computed(dependentKey, function() {
*/ return macro.apply(this, args);
Ember.computed.none = function(dependentKey) {
return Ember.computed(dependentKey, function(key) {
var val = get(this, dependentKey);
return Ember.isNone(val);
}); });
}; };
}
function registerComputedWithProperties(name, macro) {
Ember.computed[name] = function() {
var properties = a_slice.call(arguments);
var computed = Ember.computed(function() {
return macro.apply(this, [getProperties(this, properties)]);
});
return computed.property.apply(computed, properties);
};
}
/** /**
@method computed.empty @method computed.empty
@for Ember @for Ember
@param {String} dependentKey @param {String} dependentKey
@return {Ember.ComputedProperty} computed property which negate
the original value for property
*/ */
Ember.computed.empty = function(dependentKey) { registerComputed('empty', function(dependentKey) {
return Ember.computed(dependentKey, function(key) { return Ember.isEmpty(get(this, dependentKey));
var val = get(this, dependentKey); });
return Ember.isEmpty(val);
}); /**
}; @method computed.notEmpty
@for Ember
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which returns true if
original value for property is not empty.
*/
registerComputed('notEmpty', function(dependentKey) {
return !Ember.isEmpty(get(this, dependentKey));
});
/**
@method computed.none
@for Ember
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which
rturns true if original value for property is null or undefined.
*/
registerComputed('none', function(dependentKey) {
return Ember.isNone(get(this, dependentKey));
});
/**
@method computed.not
@for Ember
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which returns
inverse of the original value for property
*/
registerComputed('not', function(dependentKey) {
return !get(this, dependentKey);
});
/** /**
@method computed.bool @method computed.bool
@for Ember @for Ember
@param {String} dependentKey @param {String} dependentKey
@return {Ember.ComputedProperty} computed property which convert to boolean the original value for property @return {Ember.ComputedProperty} computed property which convert
to boolean the original value for property
*/ */
Ember.computed.bool = function(dependentKey) { registerComputed('bool', function(dependentKey) {
return Ember.computed(dependentKey, function(key) {
return !!get(this, dependentKey); return !!get(this, dependentKey);
}); });
};
/**
@method computed.match
@for Ember
@param {String} dependentKey
@param {RegExp} regexp
@return {Ember.ComputedProperty} computed property which match
the original value for property against a given RegExp
*/
registerComputed('match', function(dependentKey, regexp) {
var value = get(this, dependentKey);
return typeof value === 'string' ? !!value.match(regexp) : false;
});
/**
@method computed.equal
@for Ember
@param {String} dependentKey
@param {String|Number|Object} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is equal to the given value.
*/
registerComputed('equal', function(dependentKey, value) {
return get(this, dependentKey) === value;
});
/**
@method computed.gt
@for Ember
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is greater then given value.
*/
registerComputed('gt', function(dependentKey, value) {
return get(this, dependentKey) > value;
});
/**
@method computed.gte
@for Ember
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is greater or equal then given value.
*/
registerComputed('gte', function(dependentKey, value) {
return get(this, dependentKey) >= value;
});
/**
@method computed.lt
@for Ember
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is less then given value.
*/
registerComputed('lt', function(dependentKey, value) {
return get(this, dependentKey) < value;
});
/**
@method computed.lte
@for Ember
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is less or equal then given value.
*/
registerComputed('lte', function(dependentKey, value) {
return get(this, dependentKey) <= value;
});
/**
@method computed.and
@for Ember
@param {String} dependentKey, [dependentKey...]
@return {Ember.ComputedProperty} computed property which peforms
a logical `and` on the values of all the original values for properties.
*/
registerComputedWithProperties('and', function(properties) {
for (var key in properties) {
if (properties.hasOwnProperty(key) && !properties[key]) {
return false;
}
}
return true;
});
/**
@method computed.or
@for Ember
@param {String} dependentKey, [dependentKey...]
@return {Ember.ComputedProperty} computed property which peforms
a logical `or` on the values of all the original values for properties.
*/
registerComputedWithProperties('or', function(properties) {
for (var key in properties) {
if (properties.hasOwnProperty(key) && properties[key]) {
return true;
}
}
return false;
});
/**
@method computed.any
@for Ember
@param {String} dependentKey, [dependentKey...]
@return {Ember.ComputedProperty} computed property which returns
the first trouthy value of given list of properties.
*/
registerComputedWithProperties('any', function(properties) {
for (var key in properties) {
if (properties.hasOwnProperty(key) && properties[key]) {
return properties[key];
}
}
return null;
});
/**
@method computed.map
@for Ember
@param {String} dependentKey, [dependentKey...]
@return {Ember.ComputedProperty} computed property which maps
values of all passed properties in to an array.
*/
registerComputedWithProperties('map', function(properties) {
var res = [];
for (var key in properties) {
if (properties.hasOwnProperty(key)) {
if (Ember.isNone(properties[key])) {
res.push(null);
} else {
res.push(properties[key]);
}
}
}
return res;
});
/** /**
@method computed.alias @method computed.alias
@for Ember @for Ember
@param {String} dependentKey @param {String} dependentKey
@return {Ember.ComputedProperty} computed property which creates an
alias to the original value for property.
*/ */
Ember.computed.alias = function(dependentKey) { Ember.computed.alias = function(dependentKey) {
return Ember.computed(dependentKey, function(key, value){ return Ember.computed(dependentKey, function(key, value){
@ -3583,6 +3762,23 @@ Ember.computed.alias = function(dependentKey) {
}); });
}; };
/**
@method computed.defaultTo
@for Ember
@param {String} defaultPath
@return {Ember.ComputedProperty} computed property which acts like
a standard getter and setter, but defaults to the value from `defaultPath`.
*/
Ember.computed.defaultTo = function(defaultPath) {
return Ember.computed(function(key, newValue, cachedValue) {
var result;
if (arguments.length === 1) {
return cachedValue != null ? cachedValue : get(this, defaultPath);
}
return newValue != null ? newValue : get(this, defaultPath);
});
};
})(); })();
@ -4415,8 +4611,7 @@ function invokeLaterTimers() {
If you pass a string it will be resolved on the If you pass a string it will be resolved on the
target at the time the method is invoked. target at the time the method is invoked.
@param {Object} [args*] Optional arguments to pass to the timeout. @param {Object} [args*] Optional arguments to pass to the timeout.
@param {Number} wait @param {Number} wait Number of milliseconds to wait.
Number of milliseconds to wait.
@return {String} a string you can use to cancel the timer in @return {String} a string you can use to cancel the timer in
{{#crossLink "Ember/run.cancel"}}{{/crossLink}} later. {{#crossLink "Ember/run.cancel"}}{{/crossLink}} later.
*/ */
@ -4538,15 +4733,54 @@ Ember.run.scheduleOnce = function(queue, target, method, args) {
}; };
/** /**
Schedules an item to run after control has been returned to the system. Schedules an item to run from within a separate run loop, after
This is equivalent to calling `Ember.run.later` with a wait time of 1ms. control has been returned to the system. This is equivalent to calling
`Ember.run.later` with a wait time of 1ms.
```javascript ```javascript
Ember.run.next(myContext, function(){ Ember.run.next(myContext, function(){
// code to be executed in the next RunLoop, which will be scheduled after the current one // code to be executed in the next run loop, which will be scheduled after the current one
}); });
``` ```
Multiple operations scheduled with `Ember.run.next` will coalesce
into the same later run loop, along with any other operations
scheduled by `Ember.run.later` that expire right around the same
time that `Ember.run.next` operations will fire.
Note that there are often alternatives to using `Ember.run.next`.
For instance, if you'd like to schedule an operation to happen
after all DOM element operations have completed within the current
run loop, you can make use of the `afterRender` run loop queue (added
by the `ember-views` package, along with the preceding `render` queue
where all the DOM element operations happen). Example:
```javascript
App.MyCollectionView = Ember.CollectionView.extend({
didInsertElement: function() {
Ember.run.scheduleOnce('afterRender', this, 'processChildElements');
},
processChildElements: function() {
// ... do something with collectionView's child view
// elements after they've finished rendering, which
// can't be done within the CollectionView's
// `didInsertElement` hook because that gets run
// before the child elements have been added to the DOM.
}
});
```
One benefit of the above approach compared to using `Ember.run.next` is
that you will be able to perform DOM/CSS operations before unprocessed
elements are rendered to the screen, which may prevent flickering or
other artifacts caused by delaying processing until after rendering.
The other major benefit to the above approach is that `Ember.run.next`
introduces an element of non-determinism, which can make things much
harder to test, due to its reliance on `setTimeout`; it's much harder
to guarantee the order of scheduled operations when they are scheduled
outside of the current run loop, i.e. with `Ember.run.next`.
@method next @method next
@param {Object} [target] target of method to invoke @param {Object} [target] target of method to invoke
@param {Function|String} method The method to invoke. @param {Function|String} method The method to invoke.
@ -12800,9 +13034,11 @@ var setInnerHTML = function(element, html) {
if (canSetInnerHTML(tagName)) { if (canSetInnerHTML(tagName)) {
setInnerHTMLWithoutFix(element, html); setInnerHTMLWithoutFix(element, html);
} else { } else {
// Firefox versions < 11 do not have support for element.outerHTML.
var outerHTML = element.outerHTML || new XMLSerializer().serializeToString(element);
var startTag = element.outerHTML.match(new RegExp("<"+tagName+"([^>]*)>", 'i'))[0], var startTag = outerHTML.match(new RegExp("<"+tagName+"([^>]*)>", 'i'))[0],
endTag = '</'+tagName+'>'; endTag = '</'+tagName+'>';
var wrapper = document.createElement('div'); var wrapper = document.createElement('div');
@ -13285,7 +13521,9 @@ Ember._RenderBuffer.prototype =
*/ */
string: function() { string: function() {
if (this._element) { if (this._element) {
return this.element().outerHTML; // Firefox versions < 11 do not have support for element.outerHTML.
return this.element().outerHTML ||
new XMLSerializer().serializeToString(this.element());
} else { } else {
return this.innerString(); return this.innerString();
} }
@ -15150,9 +15388,9 @@ Ember.View = Ember.CoreView.extend(
willInsertElement: Ember.K, willInsertElement: Ember.K,
/** /**
Called when the element of the view has been inserted into the DOM. Called when the element of the view has been inserted into the DOM
Override this function to do any set up that requires an element in the or after the view was re-rendered. Override this function to do any
document body. set up that requires an element in the document body.
@event didInsertElement @event didInsertElement
*/ */
@ -20345,10 +20583,11 @@ Ember.Handlebars.registerHelper('each', function(path, options) {
*/ */
Ember.Handlebars.registerHelper('template', function(name, options) { Ember.Handlebars.registerHelper('template', function(name, options) {
var template = Ember.TEMPLATES[name]; var view = options.data.view,
template = view.templateForName(name);
Ember.TEMPLATES[name](this, { data: options.data }); template(this, { data: options.data });
}); });
})(); })();
@ -20392,10 +20631,10 @@ Ember.Handlebars.registerHelper('partial', function(name, options) {
nameParts[nameParts.length - 1] = "_" + lastPart; nameParts[nameParts.length - 1] = "_" + lastPart;
var underscoredName = nameParts.join("/"); var view = options.data.view,
underscoredName = nameParts.join("/"),
var template = Ember.TEMPLATES[underscoredName], template = view.templateForName(underscoredName),
deprecatedTemplate = Ember.TEMPLATES[name]; deprecatedTemplate = view.templateForName(name);
@ -22862,7 +23101,7 @@ Ember.controllerFor = function(container, controllerName, context, lookupOptions
`App.ObjectController` and `App.ArrayController` `App.ObjectController` and `App.ArrayController`
*/ */
Ember.generateController = function(container, controllerName, context) { Ember.generateController = function(container, controllerName, context) {
var controller, DefaultController; var controller, DefaultController, fullName;
if (context && Ember.isArray(context)) { if (context && Ember.isArray(context)) {
DefaultController = container.resolve('controller:array'); DefaultController = container.resolve('controller:array');
@ -22883,8 +23122,10 @@ Ember.generateController = function(container, controllerName, context) {
return "(generated " + controllerName + " controller)"; return "(generated " + controllerName + " controller)";
}; };
container.register('controller', controllerName, controller);
return container.lookup('controller:' + controllerName); fullName = 'controller:' + controllerName;
container.register(fullName, controller);
return container.lookup(fullName);
}; };
})(); })();
@ -22947,8 +23188,8 @@ Ember.Router = Ember.Object.extend({
setupRouter(this, router, location); setupRouter(this, router, location);
container.register('view', 'default', DefaultView); container.register('view:default', DefaultView);
container.register('view', 'toplevel', Ember.View.extend()); container.register('view:toplevel', Ember.View.extend());
location.onUpdateURL(function(url) { location.onUpdateURL(function(url) {
self.handleURL(url); self.handleURL(url);
@ -23044,7 +23285,9 @@ function getHandlerFunction(router) {
DefaultRoute = container.resolve('route:basic'); DefaultRoute = container.resolve('route:basic');
return function(name) { return function(name) {
var handler = container.lookup('route:' + name); var routeName = 'route:' + name,
handler = container.lookup(routeName);
if (seen[name]) { return handler; } if (seen[name]) { return handler; }
seen[name] = true; seen[name] = true;
@ -23053,8 +23296,8 @@ function getHandlerFunction(router) {
if (name === 'loading') { return {}; } if (name === 'loading') { return {}; }
if (name === 'failure') { return router.constructor.defaultFailureHandler; } if (name === 'failure') { return router.constructor.defaultFailureHandler; }
container.register('route', name, DefaultRoute.extend()); container.register(routeName, DefaultRoute.extend());
handler = container.lookup('route:' + name); handler = container.lookup(routeName);
} }
handler.routeName = name; handler.routeName = name;
@ -23063,7 +23306,8 @@ function getHandlerFunction(router) {
} }
function handlerIsActive(router, handlerName) { function handlerIsActive(router, handlerName) {
var handler = router.container.lookup('route:' + handlerName), var routeName = 'route:' + handlerName,
handler = router.container.lookup(routeName),
currentHandlerInfos = router.router.currentHandlerInfos, currentHandlerInfos = router.router.currentHandlerInfos,
handlerInfo; handlerInfo;
@ -23767,7 +24011,25 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
return ret.concat(resolvedPaths(linkView.parameters)); return ret.concat(resolvedPaths(linkView.parameters));
} }
var LinkView = Ember.View.extend({ /**
Renders a link to the supplied route.
When the rendered link matches the current route, and the same object instance is passed into the helper,
then the link is given class="active" by default.
You may re-open LinkView in order to change the default active class:
``` javascript
Ember.LinkView.reopen({
activeClass: "is-active"
})
```
@class LinkView
@namespace Ember
@extends Ember.View
**/
var LinkView = Ember.LinkView = Ember.View.extend({
tagName: 'a', tagName: 'a',
namedRoute: null, namedRoute: null,
currentWhen: null, currentWhen: null,
@ -25356,7 +25618,7 @@ var get = Ember.get, set = Ember.set,
name: "store", name: "store",
initialize: function(container, application) { initialize: function(container, application) {
container.register('store', 'main', application.Store); container.register('store:main', application.Store);
} }
}); });
``` ```
@ -25398,7 +25660,8 @@ var get = Ember.get, set = Ember.set,
@namespace Ember @namespace Ember
@extends Ember.Namespace @extends Ember.Namespace
*/ */
var Application = Ember.Application = Ember.Namespace.extend({
var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin, {
/** /**
The root DOM element of the Application. This can be specified as an The root DOM element of the Application. This can be specified as an
@ -25552,10 +25815,17 @@ var Application = Ember.Application = Ember.Namespace.extend({
*/ */
scheduleInitialize: function() { scheduleInitialize: function() {
var self = this; var self = this;
this.$().ready(function() {
if (self.isDestroyed || self.isInitialized) { return; } function initialize(){
if (self.isDestroyed) { return; }
Ember.run.schedule('actions', self, 'initialize'); Ember.run.schedule('actions', self, 'initialize');
}); }
if (!this.$ || this.$.isReady) {
initialize();
} else {
this.$().ready(initialize);
}
}, },
/** /**
@ -25663,7 +25933,7 @@ var Application = Ember.Application = Ember.Namespace.extend({
this.isInitialized = true; this.isInitialized = true;
// At this point, the App.Router must already be assigned // At this point, the App.Router must already be assigned
this.register('router', 'main', this.Router); this.register('router:main', this.Router);
this.runInitializers(); this.runInitializers();
Ember.runLoadHooks('application', this); Ember.runLoadHooks('application', this);
@ -25681,8 +25951,11 @@ var Application = Ember.Application = Ember.Namespace.extend({
this.buildContainer(); this.buildContainer();
this.isInitialized = false; this.isInitialized = false;
Ember.run.schedule('actions', this, function(){
this.initialize(); this.initialize();
this.startRouting(); this.startRouting();
});
}, },
/** /**
@ -25722,6 +25995,8 @@ var Application = Ember.Application = Ember.Namespace.extend({
Ember.Namespace.processAll(); Ember.Namespace.processAll();
Ember.BOOTED = true; Ember.BOOTED = true;
} }
this.resolve(this);
}, },
/** /**
@ -25855,7 +26130,7 @@ Ember.Application.reopenClass({
container.resolver = resolverFor(namespace); container.resolver = resolverFor(namespace);
container.optionsForType('view', { singleton: false }); container.optionsForType('view', { singleton: false });
container.optionsForType('template', { instantiate: false }); container.optionsForType('template', { instantiate: false });
container.register('application', 'main', namespace, { instantiate: false }); container.register('application:main', namespace, { instantiate: false });
container.register('controller:basic', Ember.Controller, { instantiate: false }); container.register('controller:basic', Ember.Controller, { instantiate: false });
container.register('controller:object', Ember.ObjectController, { instantiate: false }); container.register('controller:object', Ember.ObjectController, { instantiate: false });

View File

@ -5,7 +5,7 @@ class ExceptionsController < ApplicationController
def not_found def not_found
f = Topic.where(deleted_at: nil, archetype: "regular") f = Topic.where(deleted_at: nil, archetype: "regular")
@popular = f.order('views desc').take(10) @latest = f.order('views desc').take(10)
@recent = f.order('created_at desc').take(10) @recent = f.order('created_at desc').take(10)
@slug = params[:slug].class == String ? params[:slug] : '' @slug = params[:slug].class == String ? params[:slug] : ''
@slug.gsub!('-',' ') @slug.gsub!('-',' ')

View File

@ -1,10 +1,10 @@
class ListController < ApplicationController class ListController < ApplicationController
before_filter :ensure_logged_in, except: [:index, :category, :category_feed] before_filter :ensure_logged_in, except: [:index, :hot, :category, :category_feed]
skip_before_filter :check_xhr skip_before_filter :check_xhr
# Create our filters # Create our filters
[:popular, :favorited, :read, :posted, :unread, :new].each do |filter| [:latest, :hot, :favorited, :read, :posted, :unread, :new].each do |filter|
define_method(filter) do define_method(filter) do
list_opts = {page: params[:page]} list_opts = {page: params[:page]}
@ -14,7 +14,7 @@ class ListController < ApplicationController
#TODO objectify this stuff #TODO objectify this stuff
SiteSetting.top_menu.split('|').each do |f| SiteSetting.top_menu.split('|').each do |f|
s = f.split(",") s = f.split(",")
if s[0] == action_name || (action_name == "index" && s[0] == "popular") if s[0] == action_name || (action_name == "index" && s[0] == "latest")
list_opts[:exclude_category] = s[1][1..-1] if s.length == 2 list_opts[:exclude_category] = s[1][1..-1] if s.length == 2
end end
end end
@ -27,7 +27,7 @@ class ListController < ApplicationController
respond(list) respond(list)
end end
end end
alias_method :index, :popular alias_method :index, :latest
def category def category
@ -60,6 +60,12 @@ class ListController < ApplicationController
end end
end end
def popular_redirect
# We've renamed popular to latest. Use a redirect until we're sure we can
# safely remove this.
redirect_to latest_path, :status => 301
end
protected protected
def respond(list) def respond(list)

View File

@ -22,7 +22,7 @@ class Category < ActiveRecord::Base
after_create :create_category_definition after_create :create_category_definition
after_destroy :invalidate_site_cache after_destroy :invalidate_site_cache
scope :popular, ->{ order('topic_count desc') } scope :latest, ->{ order('topic_count desc') }
delegate :post_template, to: 'self.class' delegate :post_template, to: 'self.class'

View File

@ -27,7 +27,7 @@ class MessageBusObserver < DiscourseObserver
topic.posters = topic.posters_summary topic.posters = topic.posters_summary
topic.posts_count = 1 topic.posts_count = 1
topic_json = TopicListItemSerializer.new(topic).as_json topic_json = TopicListItemSerializer.new(topic).as_json
MessageBus.publish("/popular", topic_json) MessageBus.publish("/latest", topic_json)
# If it has a category, add it to the category views too # If it has a category, add it to the category views too
if topic.category.present? if topic.category.present?

View File

@ -22,7 +22,7 @@ class Site
end end
def categories def categories
Category.popular.includes(:topic_only_relative_url) Category.latest.includes(:topic_only_relative_url)
end end
def archetypes def archetypes

View File

@ -17,7 +17,7 @@ class SiteSetting < ActiveRecord::Base
setting(:company_domain, 'www.example.com') setting(:company_domain, 'www.example.com')
setting(:api_key, '') setting(:api_key, '')
client_setting(:traditional_markdown_linebreaks, false) client_setting(:traditional_markdown_linebreaks, false)
client_setting(:top_menu, 'popular|new|unread|favorited|categories') client_setting(:top_menu, 'latest|hot|new|unread|favorited|categories')
client_setting(:post_menu, 'like|edit|flag|delete|share|bookmark|reply') client_setting(:post_menu, 'like|edit|flag|delete|share|bookmark|reply')
client_setting(:share_links, 'twitter|facebook|google+') client_setting(:share_links, 'twitter|facebook|google+')
client_setting(:track_external_right_clicks, false) client_setting(:track_external_right_clicks, false)

View File

@ -40,5 +40,4 @@
return Discourse.routeBuilder.call(this); return Discourse.routeBuilder.call(this);
}); });
Discourse.start() Discourse.start()
Discourse.initialize()
</script> </script>

View File

@ -4,12 +4,12 @@
<table> <table>
<tr> <tr>
<td style="vertical-align:top; padding:0 20px 20px 0;"> <td style="vertical-align:top; padding:0 20px 20px 0;">
<h2><%= t 'page_not_found.popular_topics' %></h2> <h2><%= t 'page_not_found.latest_topics' %></h2>
<% @popular.each do |t| %> <% @latest.each do |t| %>
<%= link_to t.title, t.relative_url %><br/> <%= link_to t.title, t.relative_url %><br/>
<% end %> <% end %>
<br/> <br/>
<a href="/popular" class="btn"><%= t 'page_not_found.see_more' %>&hellip;</a> <a href="/latest" class="btn"><%= t 'page_not_found.see_more' %>&hellip;</a>
</td> </td>
<td style="vertical-align:top; padding:0 0 20px 0;"> <td style="vertical-align:top; padding:0 0 20px 0;">
<h2><%= t 'page_not_found.recent_topics' %></h2> <h2><%= t 'page_not_found.recent_topics' %></h2>

View File

@ -373,10 +373,10 @@ cs:
new: "Nemáte žádná nová témata ke čtení." new: "Nemáte žádná nová témata ke čtení."
read: "Zatím jste nečetli žádná témata." read: "Zatím jste nečetli žádná témata."
posted: "Zatím jste nepřispěli do žádného tématu." posted: "Zatím jste nepřispěli do žádného tématu."
popular: "Nejsou tu žádná populární témata. To je docela smutné." latest: "Nejsou tu žádná populární témata. To je docela smutné."
category: "V kategorii {{category}} nejsou žádná témata." category: "V kategorii {{category}} nejsou žádná témata."
bottom: bottom:
popular: "Nejsou tu žádná další populární témata k přečtení." latest: "Nejsou tu žádná další populární témata k přečtení."
posted: "Nejsou tu žádná další zaslaná témata k přečtení." posted: "Nejsou tu žádná další zaslaná témata k přečtení."
read: "Nejsou tu žádná další přečtená témata." read: "Nejsou tu žádná další přečtená témata."
new: "Nejsou tu žádná další nová témata k přečtení." new: "Nejsou tu žádná další nová témata k přečtení."
@ -412,10 +412,11 @@ cs:
options: "Možnosti" options: "Možnosti"
show_links: "zobrazit odkazy v tomto tématu" show_links: "zobrazit odkazy v tomto tématu"
toggle_information: "zobrazit/skrýt detaily tématu" toggle_information: "zobrazit/skrýt detaily tématu"
read_more_in_category: "Chcete si přečíst další informace? Projděte si témata v {{catLink}} nebo {{popularLink}}." read_more_in_category: "Chcete si přečíst další informace? Projděte si témata v {{catLink}} nebo {{latestLink}}."
read_more: "Chcete si přečíst další informace? {{catLink}} nebo {{popularLink}}." read_more: "Chcete si přečíst další informace? {{catLink}} nebo {{latestLink}}."
browse_all_categories: Procházet všechny kategorie browse_all_categories: Procházet všechny kategorie
view_popular_topics: zobrazit populární témata
view_latest_topics: zobrazit populární témata
suggest_create_topic: Co takhle založit nové téma? suggest_create_topic: Co takhle založit nové téma?
read_position_reset: "Vaše pozice čtení byla zresetována." read_position_reset: "Vaše pozice čtení byla zresetována."
jump_reply_up: přejít na předchozí odpověď jump_reply_up: přejít na předchozí odpověď
@ -652,7 +653,7 @@ cs:
categories_list: "Seznam kategorií" categories_list: "Seznam kategorií"
filters: filters:
popular: latest:
title: "Populární" title: "Populární"
help: "populární témata z poslední doby" help: "populární témata z poslední doby"
favorited: favorited:

View File

@ -366,10 +366,10 @@ da:
new: "Du har ingen nye emner." new: "Du har ingen nye emner."
read: "Du har ikke læst nogen emner endnu." read: "Du har ikke læst nogen emner endnu."
posted: "Du har ikke skrevet nogen indlæg endnu." posted: "Du har ikke skrevet nogen indlæg endnu."
popular: "Der er ikke nogen populære emner. Det er sørgeligt." latest: "Der er ikke nogen populære emner. Det er sørgeligt."
category: "Der er ingen emner i kategorien {{category}}." category: "Der er ingen emner i kategorien {{category}}."
bottom: bottom:
popular: "Der er ikke flere populære emner." latest: "Der er ikke flere populære emner."
posted: "Der er ikke flere emner." posted: "Der er ikke flere emner."
read: "Der er ikke flere læste emner." read: "Der er ikke flere læste emner."
new: "Der er ikke flere nye emner." new: "Der er ikke flere nye emner."
@ -405,10 +405,11 @@ da:
options: "Emneindstillinger" options: "Emneindstillinger"
show_links: "vis links i dette emne" show_links: "vis links i dette emne"
toggle_information: "vis detaljer om emnet" toggle_information: "vis detaljer om emnet"
read_more_in_category: "Mere læsestof? Se andre emner i {{catLink}} eller {{popularLink}}." read_more_in_category: "Mere læsestof? Se andre emner i {{catLink}} eller {{latestLink}}."
read_more: "Mere læsestof? {{catLink}} else {{popularLink}}." read_more: "Mere læsestof? {{catLink}} else {{latestLink}}."
browse_all_categories: Vis alle kategorier browse_all_categories: Vis alle kategorier
view_popular_topics: vis populære emner
view_latest_topics: vis populære emner
suggest_create_topic: Hvorfor ikke oprette et emne? suggest_create_topic: Hvorfor ikke oprette et emne?
read_position_reset: "Din læseposition er blevet nulstillet." read_position_reset: "Din læseposition er blevet nulstillet."
jump_reply_up: hop til tidligere svar jump_reply_up: hop til tidligere svar
@ -640,7 +641,7 @@ da:
categories_list: "Kategorioversigt" categories_list: "Kategorioversigt"
filters: filters:
popular: latest:
title: "Populære" title: "Populære"
help: "de mest populære nyere emner" help: "de mest populære nyere emner"
favorited: favorited:

View File

@ -354,10 +354,10 @@ de:
new: "Es sind keine für Dich neuen Themen da." new: "Es sind keine für Dich neuen Themen da."
read: "Du hast bislang keine Themen gelesen." read: "Du hast bislang keine Themen gelesen."
posted: "Du hast bislang keine Beiträge gepostet." posted: "Du hast bislang keine Beiträge gepostet."
popular: "Es gibt keine populären Themen. Wie traurig." latest: "Es gibt keine populären Themen. Wie traurig."
category: "Es gibt keine Themen in {{category}}." category: "Es gibt keine Themen in {{category}}."
bottom: bottom:
popular: "Das waren alle populären Themen." latest: "Das waren alle populären Themen."
posted: "Das waren alle Themen." posted: "Das waren alle Themen."
read: "Das waren alle gelesenen Themen." read: "Das waren alle gelesenen Themen."
new: "Das waren alle neuen Themen." new: "Das waren alle neuen Themen."
@ -393,10 +393,11 @@ de:
options: "Themenoptionen" options: "Themenoptionen"
show_links: "Zeige Links in diesem Thema" show_links: "Zeige Links in diesem Thema"
toggle_information: "Themendetails ein-/ausblenden" toggle_information: "Themendetails ein-/ausblenden"
read_more_in_category: "Möchtest Du mehr lesen? Finde andere Themen in {{catLink}} oder {{popularLink}}." read_more_in_category: "Möchtest Du mehr lesen? Finde andere Themen in {{catLink}} oder {{latestLink}}."
read_more: "Möchtest Du mehr lesen? {{catLink}} oder {{popularLink}}." read_more: "Möchtest Du mehr lesen? {{catLink}} oder {{latestLink}}."
browse_all_categories: Zeige alle Kategorien browse_all_categories: Zeige alle Kategorien
view_popular_topics: Zeige populäre Themen
view_latest_topics: Zeige populäre Themen
suggest_create_topic: Fang ein neues Thema an? suggest_create_topic: Fang ein neues Thema an?
read_position_reset: "Deine Leseposition wurde zurückgesetzt." read_position_reset: "Deine Leseposition wurde zurückgesetzt."
jump_reply_up: Springe zur vorigen Antwort jump_reply_up: Springe zur vorigen Antwort
@ -622,7 +623,7 @@ de:
categories_list: "Liste der Kategorien" categories_list: "Liste der Kategorien"
filters: filters:
popular: latest:
title: "Populär" title: "Populär"
help: "Die populärsten unter den jüngsten Themen" help: "Die populärsten unter den jüngsten Themen"
favorited: favorited:

View File

@ -373,10 +373,12 @@ en:
new: "You have no new topics to read." new: "You have no new topics to read."
read: "You haven't read any topics yet." read: "You haven't read any topics yet."
posted: "You haven't posted in any topics yet." posted: "You haven't posted in any topics yet."
popular: "There are no popular topics. That's sad." latest: "There are no latest topics. That's sad."
hot: "There are no hot topics."
category: "There are no {{category}} topics." category: "There are no {{category}} topics."
bottom: bottom:
popular: "There are no more popular topics to read." latest: "There are no more latest topics to read."
hot: "There are no more hot topics to read."
posted: "There are no more posted topics to read." posted: "There are no more posted topics to read."
read: "There are no more read topics to read." read: "There are no more read topics to read."
new: "There are no more new topics to read." new: "There are no more new topics to read."
@ -412,10 +414,11 @@ en:
options: "Topic Options" options: "Topic Options"
show_links: "show links within this topic" show_links: "show links within this topic"
toggle_information: "toggle topic details" toggle_information: "toggle topic details"
read_more_in_category: "Want to read more? Browse other topics in {{catLink}} or {{popularLink}}." read_more_in_category: "Want to read more? Browse other topics in {{catLink}} or {{latestLink}}."
read_more: "Want to read more? {{catLink}} or {{popularLink}}." read_more: "Want to read more? {{catLink}} or {{latestLink}}."
browse_all_categories: Browse all categories browse_all_categories: Browse all categories
view_popular_topics: view popular topics
view_latest_topics: view latest topics
suggest_create_topic: Why not create a topic? suggest_create_topic: Why not create a topic?
read_position_reset: "Your read position has been reset." read_position_reset: "Your read position has been reset."
jump_reply_up: jump to earlier reply jump_reply_up: jump to earlier reply
@ -652,9 +655,12 @@ en:
categories_list: "Categories List" categories_list: "Categories List"
filters: filters:
popular: latest:
title: "Popular" title: "Latest"
help: "the most popular recent topics" help: "the most recent topics"
hot:
title: "Hot"
help: "a seclection of the hottest topics"
favorited: favorited:
title: "Favorited" title: "Favorited"
help: "topics you marked as favorites" help: "topics you marked as favorites"
@ -685,7 +691,7 @@ en:
zero: "{{categoryName}}" zero: "{{categoryName}}"
one: "{{categoryName}} (1)" one: "{{categoryName}} (1)"
other: "{{categoryName}} ({{count}})" other: "{{categoryName}} ({{count}})"
help: "popular topics in the {{categoryName}} category" help: "latest topics in the {{categoryName}} category"
# This section is exported to the javascript for i18n in the admin section # This section is exported to the javascript for i18n in the admin section
admin_js: admin_js:

View File

@ -367,10 +367,10 @@ es:
new: "No tienes temas nuevos por leer." new: "No tienes temas nuevos por leer."
read: "Todavía no has leído ningún tema." read: "Todavía no has leído ningún tema."
posted: "Todavía no has publicado en ningún tema." posted: "Todavía no has publicado en ningún tema."
popular: "No hay temas populares. Eso es triste." latest: "No hay temas populares. Eso es triste."
category: "No hay temas en la categoría {{category}}." category: "No hay temas en la categoría {{category}}."
bottom: bottom:
popular: "No hay más temas populares para leer." latest: "No hay más temas populares para leer."
posted: "No hay más temas publicados para leer." posted: "No hay más temas publicados para leer."
read: "No hay más temas leídos." read: "No hay más temas leídos."
new: "No hay temas nuevos para leer." new: "No hay temas nuevos para leer."
@ -407,10 +407,11 @@ es:
options: "Opciones del Tema" options: "Opciones del Tema"
show_links: "show links within this topic" show_links: "show links within this topic"
toggle_information: "toggle topic details" toggle_information: "toggle topic details"
read_more_in_category: "Want to read more? Browse other topics in {{catLink}} or {{popularLink}}." read_more_in_category: "Want to read more? Browse other topics in {{catLink}} or {{latestLink}}."
read_more: "Want to read more? {{catLink}} or {{popularLink}}." read_more: "Want to read more? {{catLink}} or {{latestLink}}."
browse_all_categories: Browse all categories browse_all_categories: Browse all categories
view_popular_topics: view popular topics
view_latest_topics: view latest topics
suggest_create_topic: Why not create a topic? suggest_create_topic: Why not create a topic?
read_position_reset: "Your read position has been reset." read_position_reset: "Your read position has been reset."
jump_reply_up: jump to earlier reply jump_reply_up: jump to earlier reply
@ -639,7 +640,7 @@ es:
categories_list: "Lista de Categorías" categories_list: "Lista de Categorías"
filters: filters:
popular: latest:
title: "Populares" title: "Populares"
help: "los temas más recientes más populares" help: "los temas más recientes más populares"
favorited: favorited:
@ -672,7 +673,7 @@ es:
zero: "{{categoryName}}" zero: "{{categoryName}}"
one: "{{categoryName}} (1)" one: "{{categoryName}} (1)"
other: "{{categoryName}} ({{count}})" other: "{{categoryName}} ({{count}})"
help: "popular topics in the {{categoryName}} category" help: "latest topics in the {{categoryName}} category"
# This section is exported to the javascript for i18n in the admin section # This section is exported to the javascript for i18n in the admin section
admin_js: admin_js:

View File

@ -377,10 +377,10 @@ fr:
new: "Vous n'avez aucune discussion non lue." new: "Vous n'avez aucune discussion non lue."
read: "Vous n'avez lu aucune discussion pour le moment." read: "Vous n'avez lu aucune discussion pour le moment."
posted: "Vous n'avez écrit aucun message pour le moment." posted: "Vous n'avez écrit aucun message pour le moment."
popular: "Il n'y a aucune discussion populaire pour le moment. C'est triste..." latest: "Il n'y a aucune discussion populaire pour le moment. C'est triste..."
category: "Il n'y a aucune discussion sur {{category}}." category: "Il n'y a aucune discussion sur {{category}}."
bottom: bottom:
popular: "Il n'y a plus de discussion populaire à lire." latest: "Il n'y a plus de discussion populaire à lire."
posted: "Il n'y a plus de discussion à lire." posted: "Il n'y a plus de discussion à lire."
read: "Il n'y a plus de discussion à lire." read: "Il n'y a plus de discussion à lire."
new: "Il n'y a plus de discussion à lire." new: "Il n'y a plus de discussion à lire."
@ -416,10 +416,11 @@ fr:
options: "options de la discussion" options: "options de la discussion"
show_links: "afficher les liens de cette discussion" show_links: "afficher les liens de cette discussion"
toggle_information: "afficher les détails de la discussion" toggle_information: "afficher les détails de la discussion"
read_more_in_category: "Vous voulez en lire plus ? Afficher d'autres discussions dans {{catLink}} ou {{popularLink}}." read_more_in_category: "Vous voulez en lire plus ? Afficher d'autres discussions dans {{catLink}} ou {{latestLink}}."
read_more: "Vous voulez en lire plus? {{catLink}} or {{popularLink}}." read_more: "Vous voulez en lire plus? {{catLink}} or {{latestLink}}."
browse_all_categories: 'Voir toutes les catégories' browse_all_categories: 'Voir toutes les catégories'
view_popular_topics: "voir la liste des discussions populaires"
view_latest_topics: "voir la liste des discussions populaires"
suggest_create_topic: "pourquoi ne pas créer une nouvelle discussion ?" suggest_create_topic: "pourquoi ne pas créer une nouvelle discussion ?"
read_position_reset: "Votre position de lecture à été remise à zéro." read_position_reset: "Votre position de lecture à été remise à zéro."
jump_reply_up: "aller à des réponses précédentes" jump_reply_up: "aller à des réponses précédentes"
@ -656,7 +657,7 @@ fr:
categories_list: "Liste des catégories" categories_list: "Liste des catégories"
filters: filters:
popular: latest:
title: "Populaires" title: "Populaires"
help: "discussions récentes les plus populaires" help: "discussions récentes les plus populaires"
favorited: favorited:

View File

@ -326,10 +326,10 @@ id:
new: "You have no new topics to read." new: "You have no new topics to read."
read: "You haven't read any topics yet." read: "You haven't read any topics yet."
posted: "You haven't posted in any topics yet." posted: "You haven't posted in any topics yet."
popular: "There are no popular topics. That's sad." latest: "There are no latest topics. That's sad."
category: "There are no {{category}} topics." category: "There are no {{category}} topics."
bottom: bottom:
popular: "There are no more popular topics to read." latest: "There are no more latest topics to read."
posted: "There are no more posted topics to read." posted: "There are no more posted topics to read."
read: "There are no more read topics to read." read: "There are no more read topics to read."
new: "There are no more new topics to read." new: "There are no more new topics to read."
@ -365,10 +365,11 @@ id:
options: "Topic Options" options: "Topic Options"
show_links: "show links within this topic" show_links: "show links within this topic"
toggle_information: "toggle topic details" toggle_information: "toggle topic details"
read_more_in_category: "Want to read more? Browse other topics in {{catLink}} or {{popularLink}}." read_more_in_category: "Want to read more? Browse other topics in {{catLink}} or {{latestLink}}."
read_more: "Want to read more? {{catLink}} or {{popularLink}}." read_more: "Want to read more? {{catLink}} or {{latestLink}}."
browse_all_categories: Browse all categories browse_all_categories: Browse all categories
view_popular_topics: view popular topics
view_latest_topics: view latest topics
suggest_create_topic: Why not create a topic? suggest_create_topic: Why not create a topic?
read_position_reset: "Your read position has been reset." read_position_reset: "Your read position has been reset."
jump_reply_up: jump to earlier reply jump_reply_up: jump to earlier reply
@ -590,9 +591,9 @@ id:
categories_list: "Categories List" categories_list: "Categories List"
filters: filters:
popular: latest:
title: "Popular" title: "Latest"
help: "the most popular recent topics" help: "the latest topics"
favorited: favorited:
title: "Favorited" title: "Favorited"
help: "topics you marked as favorites" help: "topics you marked as favorites"
@ -623,7 +624,7 @@ id:
zero: "{{categoryName}}" zero: "{{categoryName}}"
one: "{{categoryName}} (1)" one: "{{categoryName}} (1)"
other: "{{categoryName}} ({{count}})" other: "{{categoryName}} ({{count}})"
help: "popular topics in the {{categoryName}} category" help: "latest topics in the {{categoryName}} category"
# This section is exported to the javascript for i18n in the admin section # This section is exported to the javascript for i18n in the admin section
admin_js: admin_js:

View File

@ -370,10 +370,10 @@ it:
new: "Non hai nuovi topic da leggere." new: "Non hai nuovi topic da leggere."
read: "Non hai ancora letto alcun topic." read: "Non hai ancora letto alcun topic."
posted: "Non hai ancora postato in nessun topic." posted: "Non hai ancora postato in nessun topic."
popular: "Non ci sono post popolari. È molto triste." latest: "Non ci sono post popolari. È molto triste."
category: "Non ci sono topic nella categoria {{category}}." category: "Non ci sono topic nella categoria {{category}}."
bottom: bottom:
popular: "Non ci sono altri topic popolari topics da leggere." latest: "Non ci sono altri topic popolari topics da leggere."
posted: "Non ci sono altri post da leggere." posted: "Non ci sono altri post da leggere."
read: "Non ci sono altri topic da leggere." read: "Non ci sono altri topic da leggere."
new: "Non ci sono altri nuovi topic da leggere." new: "Non ci sono altri nuovi topic da leggere."
@ -409,10 +409,11 @@ it:
options: "Opzioni Topic" options: "Opzioni Topic"
show_links: "mostra i links in questo topic" show_links: "mostra i links in questo topic"
toggle_information: "informazioni sul topic" toggle_information: "informazioni sul topic"
read_more_in_category: "Vuoi leggere di più? Guarda altri topic nella categoria {{catLink}} o {{popularLink}}." read_more_in_category: "Vuoi leggere di più? Guarda altri topic nella categoria {{catLink}} o {{latestLink}}."
read_more: "Vuoi leggere di più? {{catLink}} o {{popularLink}}." read_more: "Vuoi leggere di più? {{catLink}} o {{latestLink}}."
browse_all_categories: Guarda tutte le categorie browse_all_categories: Guarda tutte le categorie
view_popular_topics: guarda i topic popolari
view_latest_topics: guarda i topic popolari
suggest_create_topic: Perchè non creare un topic? suggest_create_topic: Perchè non creare un topic?
read_position_reset: "La tua posizione di lettura è stata resettata (wtf?)." read_position_reset: "La tua posizione di lettura è stata resettata (wtf?)."
jump_reply_up: vai alla risposta precedente jump_reply_up: vai alla risposta precedente
@ -648,7 +649,7 @@ it:
categories_list: "Lista Categorie" categories_list: "Lista Categorie"
filters: filters:
popular: latest:
title: "Popolari" title: "Popolari"
help: "i topic recenti più popolari" help: "i topic recenti più popolari"
favorited: favorited:

View File

@ -304,7 +304,7 @@ nl:
no_new: "Je hebt geen nieuwe topics om te lezen." no_new: "Je hebt geen nieuwe topics om te lezen."
no_read: "Je hebt nog geen topics gelezen." no_read: "Je hebt nog geen topics gelezen."
no_posted: "Je hebt nog niet in een topic gepost." no_posted: "Je hebt nog niet in een topic gepost."
no_popular: "Er zijn geen populaire topics. Dat is best wel sneu." no_latest: "Er zijn geen populaire topics. Dat is best wel sneu."
topic: topic:
create_in: 'Maak een {{categoryName}} Topic' create_in: 'Maak een {{categoryName}} Topic'
@ -327,10 +327,11 @@ nl:
options: "Topic Opties" options: "Topic Opties"
show_links: "laat links binnen dit topic zien" show_links: "laat links binnen dit topic zien"
toggle_information: "Zet topic details Aan/Uit" toggle_information: "Zet topic details Aan/Uit"
read_more_in_category: "Wil je meer lezen? Kijk dan voor andere topics in {{catLink}} of {{popularLink}}." read_more_in_category: "Wil je meer lezen? Kijk dan voor andere topics in {{catLink}} of {{latestLink}}."
read_more: "Wil je meer lezen? {{catLink}} of {{popularLink}}." read_more: "Wil je meer lezen? {{catLink}} of {{latestLink}}."
browse_all_categories: Bekijk alle categorieën browse_all_categories: Bekijk alle categorieën
view_popular_topics: bekijk populaire topics
view_latest_topics: bekijk populaire topics
progress: progress:
title: topic voortgang title: topic voortgang
@ -543,7 +544,7 @@ nl:
categories_list: "Categorie-lijst" categories_list: "Categorie-lijst"
filters: filters:
popular: latest:
title: "Populair" title: "Populair"
help: "de meest populaire recente topics" help: "de meest populaire recente topics"
favorited: favorited:

View File

@ -371,10 +371,10 @@ pseudo:
new: '[[ Ýóů ĥáνé ɳó ɳéŵ ťóƿíčš ťó řéáď. ]]' new: '[[ Ýóů ĥáνé ɳó ɳéŵ ťóƿíčš ťó řéáď. ]]'
read: '[[ Ýóů ĥáνéɳ''ť řéáď áɳý ťóƿíčš ýéť. ]]' read: '[[ Ýóů ĥáνéɳ''ť řéáď áɳý ťóƿíčš ýéť. ]]'
posted: '[[ Ýóů ĥáνéɳ''ť ƿóšťéď íɳ áɳý ťóƿíčš ýéť. ]]' posted: '[[ Ýóů ĥáνéɳ''ť ƿóšťéď íɳ áɳý ťóƿíčš ýéť. ]]'
popular: '[[ Ťĥéřé ářé ɳó ƿóƿůłář ťóƿíčš. Ťĥáť''š šáď. ]]' latest: '[[ Ťĥéřé ářé ɳó ƿóƿůłář ťóƿíčš. Ťĥáť''š šáď. ]]'
category: '[[ Ťĥéřé ářé ɳó {{category}} ťóƿíčš. ]]' category: '[[ Ťĥéřé ářé ɳó {{category}} ťóƿíčš. ]]'
bottom: bottom:
popular: '[[ Ťĥéřé ářé ɳó ɱóřé ƿóƿůłář ťóƿíčš ťó řéáď. ]]' latest: '[[ Ťĥéřé ářé ɳó ɱóřé ƿóƿůłář ťóƿíčš ťó řéáď. ]]'
posted: '[[ Ťĥéřé ářé ɳó ɱóřé ƿóšťéď ťóƿíčš ťó řéáď. ]]' posted: '[[ Ťĥéřé ářé ɳó ɱóřé ƿóšťéď ťóƿíčš ťó řéáď. ]]'
read: '[[ Ťĥéřé ářé ɳó ɱóřé řéáď ťóƿíčš ťó řéáď. ]]' read: '[[ Ťĥéřé ářé ɳó ɱóřé řéáď ťóƿíčš ťó řéáď. ]]'
new: '[[ Ťĥéřé ářé ɳó ɱóřé ɳéŵ ťóƿíčš ťó řéáď. ]]' new: '[[ Ťĥéřé ářé ɳó ɱóřé ɳéŵ ťóƿíčš ťó řéáď. ]]'
@ -414,10 +414,11 @@ pseudo:
show_links: '[[ šĥóŵ łíɳǩš ŵíťĥíɳ ťĥíš ťóƿíč ]]' show_links: '[[ šĥóŵ łíɳǩš ŵíťĥíɳ ťĥíš ťóƿíč ]]'
toggle_information: '[[ ťóǧǧłé ťóƿíč ďéťáíłš ]]' toggle_information: '[[ ťóǧǧłé ťóƿíč ďéťáíłš ]]'
read_more_in_category: '[[ Ŵáɳť ťó řéáď ɱóřé? Ɓřóŵšé óťĥéř ťóƿíčš íɳ {{catLink}} read_more_in_category: '[[ Ŵáɳť ťó řéáď ɱóřé? Ɓřóŵšé óťĥéř ťóƿíčš íɳ {{catLink}}
óř {{popularLink}}. ]]' óř {{latestLink}}. ]]'
read_more: '[[ Ŵáɳť ťó řéáď ɱóřé? {{catLink}} óř {{popularLink}}. ]]' read_more: '[[ Ŵáɳť ťó řéáď ɱóřé? {{catLink}} óř {{latestLink}}. ]]'
browse_all_categories: '[[ Ɓřóŵšé áłł čáťéǧóříéš ]]' browse_all_categories: '[[ Ɓřóŵšé áłł čáťéǧóříéš ]]'
view_popular_topics: '[[ νíéŵ ƿóƿůłář ťóƿíčš ]]'
view_latest_topics: '[[ νíéŵ ƿóƿůłář ťóƿíčš ]]'
suggest_create_topic: '[[ Ŵĥý ɳóť čřéáťé á ťóƿíč? ]]' suggest_create_topic: '[[ Ŵĥý ɳóť čřéáťé á ťóƿíč? ]]'
read_position_reset: '[[ Ýóůř řéáď ƿóšíťíóɳ ĥáš ƀééɳ řéšéť. ]]' read_position_reset: '[[ Ýóůř řéáď ƿóšíťíóɳ ĥáš ƀééɳ řéšéť. ]]'
jump_reply_up: '[[ ʲůɱƿ ťó éářłíéř řéƿłý ]]' jump_reply_up: '[[ ʲůɱƿ ťó éářłíéř řéƿłý ]]'
@ -651,7 +652,7 @@ pseudo:
changed_by: '[[ ƀý {{author}} ]]' changed_by: '[[ ƀý {{author}} ]]'
categories_list: '[[ Čáťéǧóříéš Łíšť ]]' categories_list: '[[ Čáťéǧóříéš Łíšť ]]'
filters: filters:
popular: latest:
title: '[[ Рóƿůłář ]]' title: '[[ Рóƿůłář ]]'
help: '[[ ťĥé ɱóšť ƿóƿůłář řéčéɳť ťóƿíčš ]]' help: '[[ ťĥé ɱóšť ƿóƿůłář řéčéɳť ťóƿíčš ]]'
favorited: favorited:

View File

@ -315,7 +315,7 @@ pt:
no_new: "Não tens novos tópicos para ler." no_new: "Não tens novos tópicos para ler."
no_read: "Ainda não leste nenhum tópico." no_read: "Ainda não leste nenhum tópico."
no_posted: "Ainda não postaste em nenhum tópico." no_posted: "Ainda não postaste em nenhum tópico."
no_popular: "Não há tópicos populares. Isso é triste." no_latest: "Não há tópicos populares. Isso é triste."
footer: "Não há mais tópicos neste categoria. <a href=\"/categories\">Procurar todas as categorias</a> ou <a href=\"/\">ver tópicos populares</a>" footer: "Não há mais tópicos neste categoria. <a href=\"/categories\">Procurar todas as categorias</a> ou <a href=\"/\">ver tópicos populares</a>"
topic: topic:
@ -339,10 +339,11 @@ pt:
options: "Opções do Tópico" options: "Opções do Tópico"
show_links: "mostrar links dentro deste post" show_links: "mostrar links dentro deste post"
toggle_information: "alternar detalhes do tópico" toggle_information: "alternar detalhes do tópico"
read_more_in_category: "Queres ler mais? Procura outros tópicos em {{catLink}} ou {{popularLink}}." read_more_in_category: "Queres ler mais? Procura outros tópicos em {{catLink}} ou {{latestLink}}."
read_more: "Queres ler mais? {{catLink}} ou {{popularLink}}." read_more: "Queres ler mais? {{catLink}} ou {{latestLink}}."
browse_all_categories: Procurar todas as categorias browse_all_categories: Procurar todas as categorias
view_popular_topics: ver tópicos populares
view_latest_topics: ver tópicos populares
progress: progress:
title: progresso do tópico title: progresso do tópico
@ -555,7 +556,7 @@ pt:
categories_list: "Lista de Categorias" categories_list: "Lista de Categorias"
filters: filters:
popular: latest:
title: "Populares" title: "Populares"
help: "os tópicos recentes mais populares" help: "os tópicos recentes mais populares"
favorited: favorited:

View File

@ -323,10 +323,10 @@ sv:
new: "Du har inga nya trådar att läsa." new: "Du har inga nya trådar att läsa."
read: "Du har inte läst några trådar än." read: "Du har inte läst några trådar än."
posted: "Du har inte postat i några trådar än." posted: "Du har inte postat i några trådar än."
popular: "Det finns inga populära trådar. Det är lite sorgligt." latest: "Det finns inga populära trådar. Det är lite sorgligt."
category: "Det finns inga {{category}}-trådar." category: "Det finns inga {{category}}-trådar."
bottom: bottom:
popular: "Det finns inga fler populära trådar att läsa." latest: "Det finns inga fler populära trådar att läsa."
posted: "Det finns inga fler postade trådar att läsa" posted: "Det finns inga fler postade trådar att läsa"
read: "Det finns inga fler lästa trådar att läsa." read: "Det finns inga fler lästa trådar att läsa."
new: "Det finns inga fler nya trådar att läsa." new: "Det finns inga fler nya trådar att läsa."
@ -363,10 +363,11 @@ sv:
options: "Trådinställningar" options: "Trådinställningar"
show_links: "visa länkar som finns i den här tråden" show_links: "visa länkar som finns i den här tråden"
toggle_information: "slå på/av tråddetaljer" toggle_information: "slå på/av tråddetaljer"
read_more_in_category: "Vill du läsa mer? Bläddra bland andra trådar i {{catLink}} eller {{popularLink}}." read_more_in_category: "Vill du läsa mer? Bläddra bland andra trådar i {{catLink}} eller {{latestLink}}."
read_more: "Vill du läsa mer? {{catLink}} eller {{popularLink}}." read_more: "Vill du läsa mer? {{catLink}} eller {{latestLink}}."
browse_all_categories: Bläddra bland alla kategorier browse_all_categories: Bläddra bland alla kategorier
view_popular_topics: visa populära trådar
view_latest_topics: visa populära trådar
suggest_create_topic: Varför inte skapa en tråd? suggest_create_topic: Varför inte skapa en tråd?
read_position_reset: "Din läsposition har blivit återställd." read_position_reset: "Din läsposition har blivit återställd."
jump_reply_up: hoppa till tidigare svar jump_reply_up: hoppa till tidigare svar
@ -587,7 +588,7 @@ sv:
categories_list: "Kategorilista" categories_list: "Kategorilista"
filters: filters:
popular: latest:
title: "Populära" title: "Populära"
help: "det populäraste trådarna nyligen" help: "det populäraste trådarna nyligen"
favorited: favorited:

View File

@ -376,10 +376,10 @@ zh_CN:
new: "你没有新主题可读。" new: "你没有新主题可读。"
read: "你尚未阅读任何主题。" read: "你尚未阅读任何主题。"
posted: "你尚未在任何主题中发帖。" posted: "你尚未在任何主题中发帖。"
popular: "伤心啊,没有热门主题。" latest: "伤心啊,没有热门主题。"
category: "没有 {{category}} 分类的主题。" category: "没有 {{category}} 分类的主题。"
bottom: bottom:
popular: "没有更多热门主题可看了。" latest: "没有更多热门主题可看了。"
posted: "没有更多已发布主题可看了。" posted: "没有更多已发布主题可看了。"
read: "没有更多已阅主题可看了。" read: "没有更多已阅主题可看了。"
new: "没有更多新主题可看了。" new: "没有更多新主题可看了。"
@ -415,10 +415,11 @@ zh_CN:
options: "主题选项" options: "主题选项"
show_links: "显示此主题中的链接" show_links: "显示此主题中的链接"
toggle_information: "切换主题详细" toggle_information: "切换主题详细"
read_more_in_category: "想阅读更多内容?浏览 {{catLink}} 或 {{popularLink}} 里的其它主题。" read_more_in_category: "想阅读更多内容?浏览 {{catLink}} 或 {{latestLink}} 里的其它主题。"
read_more: "想阅读更多内容?{{catLink}} 或 {{popularLink}}。" read_more: "想阅读更多内容?{{catLink}} 或 {{latestLink}}。"
browse_all_categories: 浏览所有分类 browse_all_categories: 浏览所有分类
view_popular_topics: 浏览热门主题
view_latest_topics: 浏览热门主题
suggest_create_topic: 这就创建一个主题吧! suggest_create_topic: 这就创建一个主题吧!
read_position_reset: "你的阅读位置已经被重置。" read_position_reset: "你的阅读位置已经被重置。"
jump_reply_up: 跳转至更早的回复 jump_reply_up: 跳转至更早的回复
@ -654,7 +655,7 @@ zh_CN:
categories_list: "分类列表" categories_list: "分类列表"
filters: filters:
popular: latest:
title: "热门" title: "热门"
help: "最近最受欢迎的主题" help: "最近最受欢迎的主题"
favorited: favorited:

View File

@ -376,10 +376,10 @@ zh_TW:
new: "你沒有新主題可讀。" new: "你沒有新主題可讀。"
read: "你尚未閱讀任何主題。" read: "你尚未閱讀任何主題。"
posted: "你尚未在任何主題中發帖。" posted: "你尚未在任何主題中發帖。"
popular: "傷心啊,沒有熱門主題。" latest: "傷心啊,沒有熱門主題。"
category: "沒有 {{category}} 分類的主題。" category: "沒有 {{category}} 分類的主題。"
bottom: bottom:
popular: "沒有更多熱門主題可看了。" latest: "沒有更多熱門主題可看了。"
posted: "沒有更多已發布主題可看了。" posted: "沒有更多已發布主題可看了。"
read: "沒有更多已閱主題可看了。" read: "沒有更多已閱主題可看了。"
new: "沒有更多新主題可看了。" new: "沒有更多新主題可看了。"
@ -415,10 +415,11 @@ zh_TW:
options: "主題選項" options: "主題選項"
show_links: "顯示此主題中的鏈接" show_links: "顯示此主題中的鏈接"
toggle_information: "切換主題詳細" toggle_information: "切換主題詳細"
read_more_in_category: "想閱讀更多內容?浏覽 {{catLink}} 或 {{popularLink}} 裏的其它主題。" read_more_in_category: "想閱讀更多內容?浏覽 {{catLink}} 或 {{latestLink}} 裏的其它主題。"
read_more: "想閱讀更多內容?{{catLink}} 或 {{popularLink}}。" read_more: "想閱讀更多內容?{{catLink}} 或 {{latestLink}}。"
browse_all_categories: 浏覽所有分類 browse_all_categories: 浏覽所有分類
view_popular_topics: 浏覽熱門主題
view_latest_topics: 浏覽熱門主題
suggest_create_topic: 這就創建一個主題吧! suggest_create_topic: 這就創建一個主題吧!
read_position_reset: "你的閱讀位置已經被重置。" read_position_reset: "你的閱讀位置已經被重置。"
jump_reply_up: 跳轉至更早的回複 jump_reply_up: 跳轉至更早的回複
@ -654,7 +655,7 @@ zh_TW:
categories_list: "分類列表" categories_list: "分類列表"
filters: filters:
popular: latest:
title: "熱門" title: "熱門"
help: "最近最受歡迎的主題" help: "最近最受歡迎的主題"
favorited: favorited:

View File

@ -360,7 +360,7 @@ cs:
post_undo_action_window_mins: "Počet sekund, během kterých smí uživatelé vrátit akce na příspěvcích (líbí se, nahlášení, atd.)" post_undo_action_window_mins: "Počet sekund, během kterých smí uživatelé vrátit akce na příspěvcích (líbí se, nahlášení, atd.)"
must_approve_users: "Administrátoři musí schválit všechny uživatele, než získají přístup" must_approve_users: "Administrátoři musí schválit všechny uživatele, než získají přístup"
ga_tracking_code: "Kód pro sledování přes 'Google analytics', např. UA-12345678-9; viz http://google.com/analytics" ga_tracking_code: "Kód pro sledování přes 'Google analytics', např. UA-12345678-9; viz http://google.com/analytics"
top_menu: "Určuje, které položky se zobrazí v navigaci na hlavní stránce a v jakém pořadí. Příklad: popular|read|favorited|unread|new|posted|categories" top_menu: "Určuje, které položky se zobrazí v navigaci na hlavní stránce a v jakém pořadí. Příklad: latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "Určuje, které položky se zobrazí v menu u příspěvku a v jakém pořadí. Příklad: like|edit|flag|delete|share|bookmark|reply" post_menu: "Určuje, které položky se zobrazí v menu u příspěvku a v jakém pořadí. Příklad: like|edit|flag|delete|share|bookmark|reply"
share_links: "Určuje, které položky se zobrazí ve sdílecím dialogu a v jakém pořadí. Příklad: twitter|facebook|google+" share_links: "Určuje, které položky se zobrazí ve sdílecím dialogu a v jakém pořadí. Příklad: twitter|facebook|google+"
track_external_right_clicks: "Počítat kliknutí na externí odkazy pravým tlačítkem (např. otevření do nové záložky); defaultně zakázáno kvůli přepisu URL" track_external_right_clicks: "Počítat kliknutí na externí odkazy pravým tlačítkem (např. otevření do nové záložky); defaultně zakázáno kvůli přepisu URL"
@ -822,7 +822,7 @@ cs:
page_not_found: page_not_found:
title: "Stránka, kterou žádáte, na tomto diskuzním fóru neexistuje. Možná vám můžeme pomoci ji najít, nebo poradit jiné téma, které se vám může líbit:" title: "Stránka, kterou žádáte, na tomto diskuzním fóru neexistuje. Možná vám můžeme pomoci ji najít, nebo poradit jiné téma, které se vám může líbit:"
popular_topics: "Populární témata" latest_topics: "Populární témata"
recent_topics: "Témata z poslední doby" recent_topics: "Témata z poslední doby"
see_more: "Více" see_more: "Více"
search_title: "Hledat toto téma" search_title: "Hledat toto téma"

View File

@ -343,7 +343,7 @@ da:
post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)" post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)"
must_approve_users: "Admins must approve all users before they gain access" must_approve_users: "Admins must approve all users before they gain access"
ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics" ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics"
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example popular|read|favorited|unread|new|posted|categories" top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply" post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs" track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs"
topics_per_page: "How many topics are loaded by default on the topics list page" topics_per_page: "How many topics are loaded by default on the topics list page"
@ -800,7 +800,7 @@ da:
page_not_found: page_not_found:
title: "Den side du efterspurgte findes ikke. Måske kan vi hjælpe dig med at finde den, eller et andet lignende emne:" title: "Den side du efterspurgte findes ikke. Måske kan vi hjælpe dig med at finde den, eller et andet lignende emne:"
popular_topics: "Populære emner" latest_topics: "Populære emner"
recent_topics: "Nyeste emner" recent_topics: "Nyeste emner"
see_more: "Se mere" see_more: "Se mere"
search_title: "Søg efter dette emne" search_title: "Søg efter dette emne"

View File

@ -312,7 +312,7 @@ de:
post_undo_action_window_mins: "Sekunden, die ein Nutzer hat, um Aktionen auf Beiträgen rückgängig zu machen (Like, Meldung, etc.)." post_undo_action_window_mins: "Sekunden, die ein Nutzer hat, um Aktionen auf Beiträgen rückgängig zu machen (Like, Meldung, etc.)."
must_approve_users: "Administratoren müssen Nutzer freischalten, bevor sie Zugriff erlangen." must_approve_users: "Administratoren müssen Nutzer freischalten, bevor sie Zugriff erlangen."
ga_tracking_code: "Google Analytics Trackingcode, zum Beispiel: UA-12345678-9; siehe http://google.com/analytics" ga_tracking_code: "Google Analytics Trackingcode, zum Beispiel: UA-12345678-9; siehe http://google.com/analytics"
top_menu: "Bestimme, welche Navigationselemente in welcher Reihenfolge auftauchen. Beispiel: popular|read|favorited|unread|new|posted|categories" top_menu: "Bestimme, welche Navigationselemente in welcher Reihenfolge auftauchen. Beispiel: latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "Bestimme, welche Funktionen in welcher Reihenfolge im Beitragsmenü auftauchen. Beispiel: like|edit|flag|delete|share|bookmark|reply" post_menu: "Bestimme, welche Funktionen in welcher Reihenfolge im Beitragsmenü auftauchen. Beispiel: like|edit|flag|delete|share|bookmark|reply"
track_external_right_clicks: "Verfolge, welche externen Links per Rechtsklick geöffnet werden (zum Beispiel in einem neuen Browser-Tab). Standardmäßig deaktiviert, da dies URL-Rewrites erfordert." track_external_right_clicks: "Verfolge, welche externen Links per Rechtsklick geöffnet werden (zum Beispiel in einem neuen Browser-Tab). Standardmäßig deaktiviert, da dies URL-Rewrites erfordert."
topics_per_page: "Zahl der Themen, die standardmäßig auf die Themenübersichtsseite geladen werden." topics_per_page: "Zahl der Themen, die standardmäßig auf die Themenübersichtsseite geladen werden."
@ -763,7 +763,7 @@ de:
page_not_found: page_not_found:
title: "Die angefragte Seite, gibt es in diesem Forum nicht. Vielleicht können wir aber dabei behilflich sein, sie oder ein ähnliches Thema zu finden:" title: "Die angefragte Seite, gibt es in diesem Forum nicht. Vielleicht können wir aber dabei behilflich sein, sie oder ein ähnliches Thema zu finden:"
popular_topics: "Populäre Themen" latest_topics: "Populäre Themen"
recent_topics: "Kürzliche Themen" recent_topics: "Kürzliche Themen"
see_more: "Mehr ansehen" see_more: "Mehr ansehen"
search_title: "Suche nach diesem Thema" search_title: "Suche nach diesem Thema"

View File

@ -360,7 +360,7 @@ en:
post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)" post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)"
must_approve_users: "Admins must approve all users before they gain access" must_approve_users: "Admins must approve all users before they gain access"
ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics" ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics"
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example popular|read|favorited|unread|new|posted|categories" top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply" post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
share_links: "Determine which items appear on the share dialog, and in what order. Example twitter|facebook|google+" share_links: "Determine which items appear on the share dialog, and in what order. Example twitter|facebook|google+"
track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs" track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs"
@ -822,7 +822,7 @@ en:
page_not_found: page_not_found:
title: "The page you requested doesn't exist on this discussion forum. Perhaps we can help find it, or another topic like it:" title: "The page you requested doesn't exist on this discussion forum. Perhaps we can help find it, or another topic like it:"
popular_topics: "Popular topics" latest_topics: "Latest topics"
recent_topics: "Recent topics" recent_topics: "Recent topics"
see_more: "See More" see_more: "See More"
search_title: "Search for this topic" search_title: "Search for this topic"

View File

@ -333,7 +333,7 @@ es:
post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)" post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)"
must_approve_users: "Admins must approve all users before they gain access" must_approve_users: "Admins must approve all users before they gain access"
ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics" ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics"
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example popular|read|favorited|unread|new|posted|categories" top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply" post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs" track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs"
topics_per_page: "How many topics are loaded by default on the topics list page" topics_per_page: "How many topics are loaded by default on the topics list page"
@ -784,7 +784,7 @@ es:
page_not_found: page_not_found:
title: "The page you requested doesn't exist on this discussion forum. Perhaps we can help find it, or another topic like it:" title: "The page you requested doesn't exist on this discussion forum. Perhaps we can help find it, or another topic like it:"
popular_topics: "Temas populares" latest_topics: "Temas populares"
recent_topics: "Temas recientes" recent_topics: "Temas recientes"
see_more: "Ver Más" see_more: "Ver Más"
search_title: "Buscar por este tema" search_title: "Buscar por este tema"

View File

@ -832,7 +832,7 @@ fr:
page_not_found: page_not_found:
title: "La page que vous avez demandée n'existe pas dans ce forum de discussion.Peut-être nous pouvons vous aider à la trouver, ou une autre discussion similaire :" title: "La page que vous avez demandée n'existe pas dans ce forum de discussion.Peut-être nous pouvons vous aider à la trouver, ou une autre discussion similaire :"
popular_topics: "Discussions populaires" latest_topics: "Discussions populaires"
recent_topics: "Discussions récentes" recent_topics: "Discussions récentes"
see_more: "Voir plus" see_more: "Voir plus"
search_title: "Rechercher pour cette discussion" search_title: "Rechercher pour cette discussion"

View File

@ -348,7 +348,7 @@ id:
post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)" post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)"
must_approve_users: "Admins must approve all users before they gain access" must_approve_users: "Admins must approve all users before they gain access"
ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics" ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics"
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example popular|read|favorited|unread|new|posted|categories" top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply" post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs" track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs"
topics_per_page: "How many topics are loaded by default on the topics list page" topics_per_page: "How many topics are loaded by default on the topics list page"
@ -804,7 +804,7 @@ id:
page_not_found: page_not_found:
title: "The page you requested doesn't exist on this discussion forum. Perhaps we can help find it, or another topic like it:" title: "The page you requested doesn't exist on this discussion forum. Perhaps we can help find it, or another topic like it:"
popular_topics: "Popular topics" latest_topics: "Latest topics"
recent_topics: "Recent topics" recent_topics: "Recent topics"
see_more: "See More" see_more: "See More"
search_title: "Search for this topic" search_title: "Search for this topic"

View File

@ -348,7 +348,7 @@ it:
post_undo_action_window_mins: "Numero di secondi durante i quali gli utenti sono autorizzati ad annullare le loro azioni su un post (segnalazioni, like, etc)" post_undo_action_window_mins: "Numero di secondi durante i quali gli utenti sono autorizzati ad annullare le loro azioni su un post (segnalazioni, like, etc)"
must_approve_users: "Gli amministratori devono autorizzare ogni utente prima che esso abbia accesso" must_approve_users: "Gli amministratori devono autorizzare ogni utente prima che esso abbia accesso"
ga_tracking_code: "Codice Google Analytics per il tracking, es: UA-12345678-9; per informazioni http://google.com/analytics" ga_tracking_code: "Codice Google Analytics per il tracking, es: UA-12345678-9; per informazioni http://google.com/analytics"
top_menu: "Determina quali elementi vengono mostrati nella navigazione in homepage, ed in quale ordine. Esempio popular|read|favorited|unread|new|posted|categories" top_menu: "Determina quali elementi vengono mostrati nella navigazione in homepage, ed in quale ordine. Esempio latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "Determina quali elementi vengono mostrati nel menù del post, ed in quale ordine. Esempio like|edit|flag|delete|share|bookmark|reply" post_menu: "Determina quali elementi vengono mostrati nel menù del post, ed in quale ordine. Esempio like|edit|flag|delete|share|bookmark|reply"
track_external_right_clicks: "Traccia i link esterni sui quali viene fatto click destro (es: apri in una nuova tab). Disabilitato di default perchè viene fatto il rewrite delle URL" track_external_right_clicks: "Traccia i link esterni sui quali viene fatto click destro (es: apri in una nuova tab). Disabilitato di default perchè viene fatto il rewrite delle URL"
topics_per_page: "Quanti topic vengono caricati di default nella pagina di lista topic" topics_per_page: "Quanti topic vengono caricati di default nella pagina di lista topic"
@ -805,7 +805,7 @@ it:
page_not_found: page_not_found:
title: "La pagina richiesta non esiste in questo forum. Forse possiamo aiutarti a trovarla, o un topic simile:" title: "La pagina richiesta non esiste in questo forum. Forse possiamo aiutarti a trovarla, o un topic simile:"
popular_topics: "Topic popolari" latest_topics: "Topic popolari"
recent_topics: "Topic recenti" recent_topics: "Topic recenti"
see_more: "Di più" see_more: "Di più"
search_title: "Cerca per questo topic" search_title: "Cerca per questo topic"

View File

@ -879,7 +879,7 @@ pseudo:
page_not_found: page_not_found:
title: '[[ Ťĥé ƿáǧé ýóů řéƣůéšťéď ďóéšɳ''ť éхíšť óɳ ťĥíš ďíščůššíóɳ ƒóřůɱ. Рéřĥáƿš title: '[[ Ťĥé ƿáǧé ýóů řéƣůéšťéď ďóéšɳ''ť éхíšť óɳ ťĥíš ďíščůššíóɳ ƒóřůɱ. Рéřĥáƿš
ŵé čáɳ ĥéłƿ ƒíɳď íť, óř áɳóťĥéř ťóƿíč łíǩé íť: ]]' ŵé čáɳ ĥéłƿ ƒíɳď íť, óř áɳóťĥéř ťóƿíč łíǩé íť: ]]'
popular_topics: '[[ Рóƿůłář ťóƿíčš ]]' latest_topics: '[[ Рóƿůłář ťóƿíčš ]]'
recent_topics: '[[ Řéčéɳť ťóƿíčš ]]' recent_topics: '[[ Řéčéɳť ťóƿíčš ]]'
see_more: '[[ Šéé Ϻóřé ]]' see_more: '[[ Šéé Ϻóřé ]]'
search_title: '[[ Šéářčĥ ƒóř ťĥíš ťóƿíč ]]' search_title: '[[ Šéářčĥ ƒóř ťĥíš ťóƿíč ]]'

View File

@ -284,7 +284,7 @@ pt:
post_undo_action_window_mins: "The window in which someone can reverse an action on a post (such as liking)" post_undo_action_window_mins: "The window in which someone can reverse an action on a post (such as liking)"
must_approve_users: "The owners of the forum must approve users before they gain access." must_approve_users: "The owners of the forum must approve users before they gain access."
ga_tracking_code: "Google analytics tracking code, see: http://google.com/analytics" ga_tracking_code: "Google analytics tracking code, see: http://google.com/analytics"
top_menu: "The order of the items in the top menu. Example popular|read|favorited|unread|new|posted|categories" top_menu: "The order of the items in the top menu. Example latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "The order of the items on the post menu." post_menu: "The order of the items on the post menu."
max_length_show_reply: "Embedded replies to posts won't be shown if they directly below and are below this length." max_length_show_reply: "Embedded replies to posts won't be shown if they directly below and are below this length."
track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default cause it has to re-write urls, hurting usability" track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default cause it has to re-write urls, hurting usability"

View File

@ -348,7 +348,7 @@ sv:
post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)" post_undo_action_window_mins: "Number of seconds users are allowed to reverse actions on a post (like, flag, etc)"
must_approve_users: "Admins must approve all users before they gain access" must_approve_users: "Admins must approve all users before they gain access"
ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics" ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics"
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example popular|read|favorited|unread|new|posted|categories" top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply" post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs" track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs"
topics_per_page: "How many topics are loaded by default on the topics list page" topics_per_page: "How many topics are loaded by default on the topics list page"
@ -804,7 +804,7 @@ sv:
page_not_found: page_not_found:
title: "The page you requested doesn't exist on this discussion forum. Perhaps we can help find it, or another topic like it:" title: "The page you requested doesn't exist on this discussion forum. Perhaps we can help find it, or another topic like it:"
popular_topics: "Popular topics" latest_topics: "Latest topics"
recent_topics: "Recent topics" recent_topics: "Recent topics"
see_more: "See More" see_more: "See More"
search_title: "Search for this topic" search_title: "Search for this topic"

View File

@ -348,7 +348,7 @@ zh_CN:
post_undo_action_window_mins: "允许用户在帖子上进行撤销操作(赞、投诉等)所需等待的间隔秒数" post_undo_action_window_mins: "允许用户在帖子上进行撤销操作(赞、投诉等)所需等待的间隔秒数"
must_approve_users: "用户必须获得管理员批准方能访问" must_approve_users: "用户必须获得管理员批准方能访问"
ga_tracking_code: "谷歌分析追踪代码例如UA-12345678-9。参考 http://google.com/analytics" ga_tracking_code: "谷歌分析追踪代码例如UA-12345678-9。参考 http://google.com/analytics"
top_menu: "确定在主页导航条包含哪些条目,以及排列顺序。例如:popular|read|favorited|unread|new|posted|categories" top_menu: "确定在主页导航条包含哪些条目,以及排列顺序。例如:latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "确定在帖子菜单条包含哪些条目以及排列顺序。例如like|edit|flag|delete|share|bookmark|reply" post_menu: "确定在帖子菜单条包含哪些条目以及排列顺序。例如like|edit|flag|delete|share|bookmark|reply"
track_external_right_clicks: "追踪外部链接的右键点击例如在浏览器新标签打开缺省是禁用的因为它会重写URL" track_external_right_clicks: "追踪外部链接的右键点击例如在浏览器新标签打开缺省是禁用的因为它会重写URL"
topics_per_page: "在主题列表页面,缺省载入多少个主题" topics_per_page: "在主题列表页面,缺省载入多少个主题"
@ -813,7 +813,7 @@ zh_CN:
page_not_found: page_not_found:
title: "你请求的页面在本论坛不存在。可能我们能帮助你找到它,或者类似的其它主题:" title: "你请求的页面在本论坛不存在。可能我们能帮助你找到它,或者类似的其它主题:"
popular_topics: "热门主题" latest_topics: "热门主题"
recent_topics: "近期主题" recent_topics: "近期主题"
see_more: "查看更多" see_more: "查看更多"
search_title: "搜索该主题" search_title: "搜索该主题"

View File

@ -348,7 +348,7 @@ zh_TW:
post_undo_action_window_mins: "允許用戶在帖子上進行撤銷操作(贊、投訴等)所需等待的間隔秒數" post_undo_action_window_mins: "允許用戶在帖子上進行撤銷操作(贊、投訴等)所需等待的間隔秒數"
must_approve_users: "用戶必須獲得管理員批准方能訪問" must_approve_users: "用戶必須獲得管理員批准方能訪問"
ga_tracking_code: "谷歌分析追蹤代碼例如UA-12345678-9。參考 http://google.com/analytics" ga_tracking_code: "谷歌分析追蹤代碼例如UA-12345678-9。參考 http://google.com/analytics"
top_menu: "確定在主頁導航條包含哪些條目,以及排列順序。例如:popular|read|favorited|unread|new|posted|categories" top_menu: "確定在主頁導航條包含哪些條目,以及排列順序。例如:latest|hot|read|favorited|unread|new|posted|categories"
post_menu: "確定在帖子菜單條包含哪些條目以及排列順序。例如like|edit|flag|delete|share|bookmark|reply" post_menu: "確定在帖子菜單條包含哪些條目以及排列順序。例如like|edit|flag|delete|share|bookmark|reply"
track_external_right_clicks: "追蹤外部鏈接的右鍵點擊例如在浏覽器新標簽打開缺省是禁用的因爲它會重寫URL" track_external_right_clicks: "追蹤外部鏈接的右鍵點擊例如在浏覽器新標簽打開缺省是禁用的因爲它會重寫URL"
topics_per_page: "在主題列表頁面,缺省載入多少個主題" topics_per_page: "在主題列表頁面,缺省載入多少個主題"
@ -813,7 +813,7 @@ zh_TW:
page_not_found: page_not_found:
title: "你請求的頁面在本論壇不存在。可能我們能幫助你找到它,或者類似的其它主題:" title: "你請求的頁面在本論壇不存在。可能我們能幫助你找到它,或者類似的其它主題:"
popular_topics: "熱門主題" latest_topics: "熱門主題"
recent_topics: "近期主題" recent_topics: "近期主題"
see_more: "查看更多" see_more: "查看更多"
search_title: "搜索該主題" search_title: "搜索該主題"

View File

@ -149,8 +149,15 @@ Discourse::Application.routes.draw do
get 'category/:category' => 'list#category', as: 'category' get 'category/:category' => 'list#category', as: 'category'
get 'category/:category/more' => 'list#category', as: 'category' get 'category/:category/more' => 'list#category', as: 'category'
get 'categories' => 'categories#index' get 'categories' => 'categories#index'
get 'popular' => 'list#index'
get 'popular/more' => 'list#index' # We've renamed popular to latest. If people access it we want a permanent redirect.
get 'popular' => 'list#popular_redirect'
get 'popular/more' => 'list#popular_redirect'
get 'latest' => 'list#index'
get 'latest/more' => 'list#index'
get 'hot' => 'list#hot'
get 'hot/more' => 'list#hot'
get 'favorited' => 'list#favorited' get 'favorited' => 'list#favorited'
get 'favorited/more' => 'list#favorited' get 'favorited/more' => 'list#favorited'
get 'read' => 'list#read' get 'read' => 'list#read'

View File

@ -0,0 +1,9 @@
class UpdateSiteSettingsForHot < ActiveRecord::Migration
def up
execute "UPDATE site_settings SET value = REPLACE(value, 'popular|', 'latest|hot|') where name = 'top_menu'"
end
def down
execute "UPDATE site_settings SET value = REPLACE(value, 'latest|hot', 'popular|') where name = 'top_menu'"
end
end

View File

@ -103,8 +103,8 @@ class TopicQuery
TopicList.new(@user, results) TopicList.new(@user, results)
end end
# The popular view of topics # The latest view of topics
def list_popular def list_latest
TopicList.new(@user, default_list) TopicList.new(@user, default_list)
end end
@ -121,6 +121,16 @@ class TopicQuery
end end
end end
def list_hot
return_list(unordered: true) do |list|
# Let's not include topic categories on hot
list = list.where("categories.topic_id <> topics.id")
list =list.order("coalesce(categories.hotness, 5) desc, topics.bumped_at desc")
end
end
def list_new def list_new
TopicList.new(@user, new_results) TopicList.new(@user, new_results)
end end

View File

@ -16,19 +16,19 @@ describe TopicQuery do
let!(:archived_topic) { Fabricate(:topic, title: 'this is an archived topic', user: creator, archived: true, bumped_at: 6.minutes.ago) } let!(:archived_topic) { Fabricate(:topic, title: 'this is an archived topic', user: creator, archived: true, bumped_at: 6.minutes.ago) }
let!(:invisible_topic) { Fabricate(:topic, title: 'this is an invisible topic', user: creator, visible: false, bumped_at: 5.minutes.ago) } let!(:invisible_topic) { Fabricate(:topic, title: 'this is an invisible topic', user: creator, visible: false, bumped_at: 5.minutes.ago) }
let!(:closed_topic) { Fabricate(:topic, title: 'this is a closed topic', user: creator, closed: true, bumped_at: 1.minute.ago) } let!(:closed_topic) { Fabricate(:topic, title: 'this is a closed topic', user: creator, closed: true, bumped_at: 1.minute.ago) }
let(:topics) { topic_query.list_popular.topics } let(:topics) { topic_query.list_latest.topics }
context 'list_popular' do context 'list_latest' do
it "returns the topics in the correct order" do it "returns the topics in the correct order" do
topics.should == [pinned_topic, closed_topic, archived_topic, regular_topic] topics.should == [pinned_topic, closed_topic, archived_topic, regular_topic]
end end
it "includes the invisible topic if you're a moderator" do it "includes the invisible topic if you're a moderator" do
TopicQuery.new(moderator).list_popular.topics.include?(invisible_topic).should be_true TopicQuery.new(moderator).list_latest.topics.include?(invisible_topic).should be_true
end end
it "includes the invisible topic if you're an admin" do it "includes the invisible topic if you're an admin" do
TopicQuery.new(admin).list_popular.topics.include?(invisible_topic).should be_true TopicQuery.new(admin).list_latest.topics.include?(invisible_topic).should be_true
end end
end end
@ -71,6 +71,21 @@ describe TopicQuery do
end end
end end
context 'hot' do
let(:cold_category) { Fabricate(:category, name: 'brrrrrr', hotness: 5) }
let(:hot_category) { Fabricate(:category, name: 'yeeouch', hotness: 10) }
let!(:t1) { Fabricate(:topic, category: cold_category)}
let!(:t2) { Fabricate(:topic, category: hot_category)}
let!(:t3) { Fabricate(:topic, category: hot_category)}
let!(:t4) { Fabricate(:topic, category: cold_category)}
it "returns the hot categories first" do
topic_query.list_hot.topics.should == [t3, t2, t4, t1]
end
end
context 'unread / read topics' do context 'unread / read topics' do
context 'with no data' do context 'with no data' do

View File

@ -69,6 +69,14 @@ describe ListController do
end end
context 'hot' do
before do
xhr :get, :hot
end
it { should respond_with(:success) }
end
context 'favorited' do context 'favorited' do
it 'raises an error when not logged in' do it 'raises an error when not logged in' do
lambda { xhr :get, :favorited }.should raise_error(Discourse::NotLoggedIn) lambda { xhr :get, :favorited }.should raise_error(Discourse::NotLoggedIn)
@ -84,6 +92,7 @@ describe ListController do
end end
end end
context 'read' do context 'read' do
it 'raises an error when not logged in' do it 'raises an error when not logged in' do
lambda { xhr :get, :read }.should raise_error(Discourse::NotLoggedIn) lambda { xhr :get, :read }.should raise_error(Discourse::NotLoggedIn)

View File

@ -365,7 +365,7 @@ describe Topic do
end end
it "should be excluded from the list view" do it "should be excluded from the list view" do
TopicQuery.new(evil_trout).list_popular.topics.should_not include(topic) TopicQuery.new(evil_trout).list_latest.topics.should_not include(topic)
end end
context 'invite' do context 'invite' do