mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add category banner for why a user cannot post (#9576)
* FEATURE: add category banner for why a user cannot post Adds a category banner for why a user is unable to post in a category. Also adds an extra alert for the user when a user is unable to create a topic in a category and they still try and click on the disabled-looking new topic button.
This commit is contained in:
@@ -6120,5 +6120,107 @@ export default {
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/latest_can_create_topic.json": {
|
||||
users: [
|
||||
{
|
||||
id: 1,
|
||||
username: "tt1",
|
||||
name: null,
|
||||
avatar_template: "/letter_avatar_proxy/v4/letter/t/6de8d8/{size}.png"
|
||||
}
|
||||
],
|
||||
primary_groups: [],
|
||||
topic_list: {
|
||||
can_create_topic: true,
|
||||
draft: null,
|
||||
draft_key: "new_topic",
|
||||
draft_sequence: 0,
|
||||
per_page: 30,
|
||||
topics: [
|
||||
{
|
||||
id: 30,
|
||||
title: "I am also creating a new topic here new topic",
|
||||
fancy_title: "I am also creating a new topic here new topic",
|
||||
slug: "i-am-also-creating-a-new-topic-here-new-topic",
|
||||
posts_count: 6,
|
||||
reply_count: 0,
|
||||
highest_post_number: 6,
|
||||
image_url: null,
|
||||
created_at: "2020-04-27T23:47:44.218Z",
|
||||
last_posted_at: "2020-04-28T22:45:47.529Z",
|
||||
bumped: true,
|
||||
bumped_at: "2020-04-28T22:02:20.215Z",
|
||||
archetype: "regular",
|
||||
unseen: false,
|
||||
last_read_post_number: 5,
|
||||
unread: 0,
|
||||
new_posts: 0,
|
||||
pinned: false,
|
||||
unpinned: null,
|
||||
visible: true,
|
||||
closed: false,
|
||||
archived: false,
|
||||
notification_level: 1,
|
||||
bookmarked: false,
|
||||
liked: false,
|
||||
tags: ["test", "test-tag"],
|
||||
views: 6,
|
||||
like_count: 0,
|
||||
has_summary: false,
|
||||
last_poster_username: "tt1",
|
||||
category_id: 5,
|
||||
pinned_globally: false,
|
||||
featured_link: null,
|
||||
posters: [
|
||||
{
|
||||
extras: "latest single",
|
||||
description: "Original Poster, Most Recent Poster",
|
||||
user_id: 1,
|
||||
primary_group_id: null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 29,
|
||||
title: "About the test category category",
|
||||
fancy_title: "About the test category category",
|
||||
slug: "about-the-test-category-category",
|
||||
posts_count: 5,
|
||||
reply_count: 0,
|
||||
highest_post_number: 5,
|
||||
image_url: null,
|
||||
created_at: "2020-04-27T22:15:49.424Z",
|
||||
last_posted_at: "2020-04-27T23:51:06.249Z",
|
||||
bumped: true,
|
||||
bumped_at: "2020-04-27T22:15:49.424Z",
|
||||
archetype: "regular",
|
||||
unseen: false,
|
||||
pinned: false,
|
||||
unpinned: null,
|
||||
visible: true,
|
||||
closed: false,
|
||||
archived: false,
|
||||
bookmarked: null,
|
||||
liked: null,
|
||||
tags: [],
|
||||
views: 1,
|
||||
like_count: 0,
|
||||
has_summary: false,
|
||||
last_poster_username: "tt1",
|
||||
category_id: 5,
|
||||
pinned_globally: false,
|
||||
featured_link: null,
|
||||
posters: [
|
||||
{
|
||||
extras: "latest single",
|
||||
description: "Original Poster, Most Recent Poster",
|
||||
user_id: 1,
|
||||
primary_group_id: null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user