<%=
new_post_button
%>
<%=
dropdown(
id: "posts-filter-type",
css: "posts-filter-menu",
name: "Type",
text: "Filter posts by type.",
icon: "",
default: "all",
items: [{
:id => "all",
:name => "All",
:text => "Show all types.",
}, {
:type => "divider",
}] + %i{blog page project}.map { |id|
name = POST_TYPES[id][:name]
{
:id => POST_TYPES[id][:id],
:name => name,
:icon => POST_TYPES[id][:icon],
:text => "Show #{name}s.",
}
}
)
%>
<%=
dropdown(
id: "posts-filter-state",
css: "posts-filter-menu",
name: "State",
text: "Filter by post state.",
icon: "",
default: "default",
items: [{
:id => "default",
:name => "Default",
:text => "Show drafts and posted items.",
}, {
:type => "divider",
}].concat(states_menu_items),
)
%>
<%=
dropdown(
id: "posts-filter-site",
css: "posts-filter-menu",
name: "Site",
text: "Filter by site.",
icon: "",
default: "all",
items: [{
:id => "all",
:name => "All",
:text => "Show all sites.",
}, {
:type => "divider",
}].concat(sites_menu_items),
)
%>
<%=
dropdown(
id: "posts-filter-user",
css: "posts-filter-menu",
name: "Author",
text: "Filter by author.",
icon: "",
default: "all",
items: [{
:id => "all",
:name => "All",
:text => "Show all authors.",
}, {
:type => "divider",
}].concat(authors_menu_items),
)
%>