From 184d521fc9be512ddb0cca5358bae91809324be5 Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Thu, 22 Feb 2018 23:58:53 +0200 Subject: [PATCH] Added the required hooks for discourse-favorites plugin. --- .../discourse/components/category-title-before.js.es6 | 3 +++ .../templates/components/categories-boxes-with-topics.hbs | 1 + .../discourse/templates/components/categories-only.hbs | 1 + .../discourse/templates/components/category-title-before.hbs | 1 + .../discourse/templates/components/category-title-link.hbs | 1 + 5 files changed, 7 insertions(+) create mode 100644 app/assets/javascripts/discourse/components/category-title-before.js.es6 create mode 100644 app/assets/javascripts/discourse/templates/components/category-title-before.hbs diff --git a/app/assets/javascripts/discourse/components/category-title-before.js.es6 b/app/assets/javascripts/discourse/components/category-title-before.js.es6 new file mode 100644 index 00000000000..9250c1ae73b --- /dev/null +++ b/app/assets/javascripts/discourse/components/category-title-before.js.es6 @@ -0,0 +1,3 @@ +export default Ember.Component.extend({ + tagName: '' +}); diff --git a/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs b/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs index 434e18fe629..aae157c5213 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs @@ -11,6 +11,7 @@ {{#if c.read_restricted}} {{d-icon 'lock'}} {{/if}} + {{category-title-before category=c}} {{c.name}} diff --git a/app/assets/javascripts/discourse/templates/components/categories-only.hbs b/app/assets/javascripts/discourse/templates/components/categories-only.hbs index 2fa528e3a92..282e5d520cc 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-only.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-only.hbs @@ -24,6 +24,7 @@
{{#each c.subcategories as |s|}} + {{category-title-before category=s}} {{category-link s hideParent="true"}} {{category-unread category=s}} diff --git a/app/assets/javascripts/discourse/templates/components/category-title-before.hbs b/app/assets/javascripts/discourse/templates/components/category-title-before.hbs new file mode 100644 index 00000000000..af92a5ecd6f --- /dev/null +++ b/app/assets/javascripts/discourse/templates/components/category-title-before.hbs @@ -0,0 +1 @@ +{{plugin-outlet name="category-title-before" noTags=true args=(hash category=category)}} diff --git a/app/assets/javascripts/discourse/templates/components/category-title-link.hbs b/app/assets/javascripts/discourse/templates/components/category-title-link.hbs index 49dd92606d4..51db0e5f775 100644 --- a/app/assets/javascripts/discourse/templates/components/category-title-link.hbs +++ b/app/assets/javascripts/discourse/templates/components/category-title-link.hbs @@ -1,3 +1,4 @@ +{{category-title-before category=category}} {{#if category.read_restricted}} {{d-icon 'lock'}}