mirror of
https://github.com/flarum/core.git
synced 2025-08-07 00:47:00 +02:00
Extract EventPost description into separate method
This makes it easier to override in subclasses. In preparation for #428.
This commit is contained in:
7
js/forum/dist/app.js
vendored
7
js/forum/dist/app.js
vendored
@@ -21923,7 +21923,7 @@ System.register('flarum/components/EventPost', ['flarum/components/Post', 'flaru
|
||||
return [icon(this.icon(), { className: 'EventPost-icon' }), m(
|
||||
'div',
|
||||
{ 'class': 'EventPost-info' },
|
||||
app.translator.transChoice(this.descriptionKey(), data.count, data)
|
||||
this.description(data)
|
||||
)];
|
||||
}
|
||||
}, {
|
||||
@@ -21931,6 +21931,11 @@ System.register('flarum/components/EventPost', ['flarum/components/Post', 'flaru
|
||||
value: function icon() {
|
||||
return '';
|
||||
}
|
||||
}, {
|
||||
key: 'description',
|
||||
value: function description(data) {
|
||||
return app.translator.transChoice(this.descriptionKey(), data.count, data);
|
||||
}
|
||||
}, {
|
||||
key: 'descriptionKey',
|
||||
value: function descriptionKey() {
|
||||
|
Reference in New Issue
Block a user