# 在一个页面中显示下拉菜单中的所有标签？

**URL:** <https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012>\
**Category:** Development\
**Created:** [2019年二月25日 09:29 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012 "2019-02-25T09:29:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)\
**Post date:** [2019年二月25日 09:29 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/1 "2019-02-25T09:29:33Z")

</div>

![Выделение_002](https://global.discourse-cdn.com/meta/original/3X/2/b/2b0a23cfa5b25765945b67e0c72abf5e89d7cc68.png)

---

<div class="post-metadata">

**Author:** ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)\
**Post date:** [2019年二月25日 11:01 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/2 "2019-02-25T11:01:30Z")

</div>

How to make the router /support available only administrator

```plaintext
Discourse.filters.push(:support)
after_initialize do
 require_dependency 'topic_query'
 class ::TopicQuery
   def list_support(excluded_topic_ids = [])
     excluded_topic_ids += Category.topic_ids.to_a
     create_list(:support, unordered: true, status: 'listed') do |topics|
       topics = topics.where("topics.id NOT IN (?)", excluded_topic_ids)
     end
   end
 end

 require_dependency 'list_controller'
 class ::ListController
   def support_feed
     list = generate_list_for("support", target_user, list_opts)
     respond_with_list(list)
   end
 end

 Discourse::Application.routes.append do
   get "support" => "list#support_feed"
 end

end

```

---

<div class="post-metadata">

**Author:** ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)\
**Post date:** [2019年二月26日 12:45 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/3 "2019-02-26T12:45:07Z")

</div>

```
  class User < ActiveRecord::Base
authenticate :user, lambda { |u| u.admin? } do
  Discourse::Application.routes.append do
    get "support" => "list#support_feed"
  end
end

```

why? undefined method `authenticate’

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2019年二月26日 14:50 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/4 "2019-02-26T14:50:05Z")

</div>

Not sure I understand what’s going on here? Are you having any issues? Can you elaborate?

---

<div class="post-metadata">

**Author:** ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)\
**Post date:** [2019年二月26日 19:12 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/5 "2019-02-26T19:12:55Z")

</div>

Thank you for your interest in the issue.

I want to make route /support available only administrator.

---

<div class="post-metadata">

**Author:** ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)\
**Post date:** [2019年二月26日 19:17 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/6 "2019-02-26T19:17:27Z")

</div>

And [Search results for 'status:noreplies' - Discourse Meta](https://meta.discourse.org/search?expanded=true&q=status%3Anoreplies)  
how to request status:noreplies to create\_list(:support, {}, latest\_results)

---

<div class="post-metadata">

**Author:** ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)\
**Post date:** [2019年二月26日 19:44 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/7 "2019-02-26T19:44:20Z")

</div>

Like this?

> <https://github.com/discourse/discourse/blob/main/config/routes.rb#L30>

---

<div class="post-metadata">

**Author:** ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)\
**Post date:** [2019年二月26日 20:00 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/8 "2019-02-26T20:00:23Z")

</div>

Yes, only administrator, moderator

like that on js  
if (currentUser.admin || currentUser.moderator)

---

<div class="post-metadata">

**Author:** ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)\
**Post date:** [2019年二月26日 20:05 UTC](https://meta.discourse.org/t/show-all-tags-in-drop-down-on-one-page/110012/9 "2019-02-26T20:05:50Z")

</div>

There’s `AdminConstraint` and `StaffConstraint`. Those should get you there.
