From 70c4630320d9c91f5fda4bb0358db91e8b768898 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 28 Mar 2018 13:06:57 +0530 Subject: [PATCH] FEATURE: show sub navigation for selected PM tag --- .../routes/user-private-messages-tags-show.js.es6 | 1 + .../discourse/templates/user/messages.hbs | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/routes/user-private-messages-tags-show.js.es6 b/app/assets/javascripts/discourse/routes/user-private-messages-tags-show.js.es6 index 6b2fa60e297..3ab2439e86e 100644 --- a/app/assets/javascripts/discourse/routes/user-private-messages-tags-show.js.es6 +++ b/app/assets/javascripts/discourse/routes/user-private-messages-tags-show.js.es6 @@ -2,6 +2,7 @@ import createPMRoute from "discourse/routes/build-private-messages-route"; export default createPMRoute('tags', 'private-messages-tags').extend({ model(params) { + this.controllerFor('user-private-messages').set('tagId', params.id); const username = this.modelFor("user").get("username_lower"); return this.store.findFiltered("topicList", { filter: `topics/private-messages-tags/${username}/${params.id}` diff --git a/app/assets/javascripts/discourse/templates/user/messages.hbs b/app/assets/javascripts/discourse/templates/user/messages.hbs index 1a8982ae741..0e53780129c 100644 --- a/app/assets/javascripts/discourse/templates/user/messages.hbs +++ b/app/assets/javascripts/discourse/templates/user/messages.hbs @@ -40,10 +40,17 @@ {{#if pmTaggingEnabled}}
  • - {{#link-to 'userPrivateMessages.tags' model}} - {{i18n 'user.messages.tags'}} - {{/link-to}} -
  • + {{#link-to 'userPrivateMessages.tags' model}} + {{i18n 'user.messages.tags'}} + {{/link-to}} + + {{#if tagId}} +
  • + {{#link-to 'userPrivateMessages.tagsShow' tagId}} + {{tagId}} + {{/link-to}} +
  • + {{/if}} {{/if}} {{/mobile-nav}} {{/d-section}}