Skip to content

Commit 25eb7a1

Browse files
committed
allow admins to click on the 'create post' button even if the category doesn't have any types allowed
1 parent 55a033b commit 25eb7a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/views/layouts/_header.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ $(() => {
283283
<% end %>
284284
<div class="category-header--nav-separator"></div>
285285
<% button_text = current_cat.button_text.present? ? current_cat.button_text : 'Create Post' %>
286-
<% if current_cat&.top_level_post_types.any? %>
286+
<% if current_cat&.top_level_post_types.any? || admin? %>
287287
<%= link_to category_post_types_path(current_cat.id),
288288
class: "category-header--nav-item is-button" do %>
289289
<%= button_text %>

0 commit comments

Comments
 (0)