mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-03-02 23:59:08 +00:00
Allows creating ads within Discourse admin at Plugins > House Ads. Write the ads in html and style them with CSS in themes.
16 lines
358 B
JavaScript
16 lines
358 B
JavaScript
export default Discourse.Route.extend({
|
|
model(params) {
|
|
if (params.ad_id === "new") {
|
|
return Ember.Object.create({
|
|
name: I18n.t("admin.adplugin.house_ads.new_name"),
|
|
html: ""
|
|
});
|
|
} else {
|
|
return this.modelFor("adminPlugins.houseAds").findBy(
|
|
"id",
|
|
parseInt(params.ad_id, 10)
|
|
);
|
|
}
|
|
}
|
|
});
|