mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 12:03:35 +08:00
FIX: Display tags topic list correctly when none is selected for subcategories
This commit is contained in:
parent
ca14e3d83c
commit
59241df251
|
@ -95,6 +95,7 @@ export default {
|
|||
});
|
||||
|
||||
app["TagsShowCategoryRoute"] = TagsShowRoute.extend();
|
||||
app["TagsShowCategoryNoneRoute"] = TagsShowRoute.extend({ noSubcategories: true });
|
||||
app["TagsShowParentCategoryRoute"] = TagsShowRoute.extend();
|
||||
|
||||
site.get("filters").forEach(function(filter) {
|
||||
|
@ -104,6 +105,9 @@ export default {
|
|||
app[
|
||||
"TagsShowCategory" + filter.capitalize() + "Route"
|
||||
] = TagsShowRoute.extend({ navMode: filter });
|
||||
app[
|
||||
"TagsShowNoneCategory" + filter.capitalize() + "Route"
|
||||
] = TagsShowRoute.extend({ navMode: filter, noSubcategories: true });
|
||||
app[
|
||||
"TagsShowParentCategory" + filter.capitalize() + "Route"
|
||||
] = TagsShowRoute.extend({ navMode: filter });
|
||||
|
|
|
@ -199,6 +199,7 @@ export default function() {
|
|||
this.route("tags", { resetNamespace: true }, function() {
|
||||
this.route("show", { path: "/:tag_id" });
|
||||
this.route("showCategory", { path: "/c/:category/:tag_id" });
|
||||
this.route("showCategoryNone", { path: "/c/:category/none/:tag_id" });
|
||||
this.route("showParentCategory", {
|
||||
path: "/c/:parent_category/:category/:tag_id"
|
||||
});
|
||||
|
@ -210,6 +211,9 @@ export default function() {
|
|||
this.route("showCategory" + filter.capitalize(), {
|
||||
path: "/c/:category/:tag_id/l/" + filter
|
||||
});
|
||||
this.route("showCategoryNone" + filter.capitalize(), {
|
||||
path: "/c/:category/:tag_id/l/" + filter
|
||||
});
|
||||
this.route("showParentCategory" + filter.capitalize(), {
|
||||
path: "/c/:parent_category/:category/:tag_id/l/" + filter
|
||||
});
|
||||
|
|
|
@ -85,6 +85,8 @@ export default DiscourseRoute.extend({
|
|||
);
|
||||
if (parentCategorySlug) {
|
||||
filter = `tags/c/${parentCategorySlug}/${categorySlug}/${tagId}/l/${topicFilter}`;
|
||||
} else if (this.noSubcategories) {
|
||||
filter = `tags/c/${categorySlug}/none/${tagId}/l/${topicFilter}`;
|
||||
} else {
|
||||
filter = `tags/c/${categorySlug}/${tagId}/l/${topicFilter}`;
|
||||
}
|
||||
|
@ -162,7 +164,8 @@ export default DiscourseRoute.extend({
|
|||
category: this.category,
|
||||
filterMode: this.filterMode,
|
||||
navMode: this.navMode,
|
||||
tagNotification: this.tagNotification
|
||||
tagNotification: this.tagNotification,
|
||||
noSubcategories: this.noSubcategories
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user