From c5da1e620c07697c2b7b5d4b51db73ef0fc143e4 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 24 May 2016 21:14:13 -0400 Subject: add state filter and dropdown.js --- src/views/admin-page.ecr | 41 +++++++++++++++++++++++++++++++++++++++-- src/views/dropdown/menu.ecr | 2 +- 2 files changed, 40 insertions(+), 3 deletions(-) (limited to 'src/views') diff --git a/src/views/admin-page.ecr b/src/views/admin-page.ecr index eedc41c..ad8d429 100644 --- a/src/views/admin-page.ecr +++ b/src/views/admin-page.ecr @@ -87,11 +87,14 @@
<%= dropdown( id: "posts-filter-type", - name: "Type", css: "posts-filter-menu", - text: "Filter by type.", + + name: "Type", + text: "Filter posts by type.", + icon: "", default: "all", + items: [{ id: "all", name: "All", @@ -114,6 +117,39 @@ ) %>
+
<%= + 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", + }, { + id: "draft", + name: "Draft", + text: "Show draft items.", + }, { + id: "posted", + name: "Posted", + text: "Show posted items.", + }, { + id: "deleted", + name: "Deleted", + text: "Show deleted items.", + }], + ) + %>
+
<%= items -- cgit v1.2.3