diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-28 02:10:45 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-28 02:10:45 -0400 |
commit | bff93d5b6a46e6c996e43dc4d669a4514da87cc6 (patch) | |
tree | 981b5a4157643656a1f7cd2d49edae6ad76215c4 /src/views/panes/admin/posts.ecr | |
parent | eaa2aa3cefdf2bc544d000048659968acc1afe2a (diff) | |
download | guff-bff93d5b6a46e6c996e43dc4d669a4514da87cc6.tar.bz2 guff-bff93d5b6a46e6c996e43dc4d669a4514da87cc6.zip |
refactor dialog and pane templates
Diffstat (limited to 'src/views/panes/admin/posts.ecr')
-rw-r--r-- | src/views/panes/admin/posts.ecr | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/src/views/panes/admin/posts.ecr b/src/views/panes/admin/posts.ecr new file mode 100644 index 0000000..5e6571d --- /dev/null +++ b/src/views/panes/admin/posts.ecr @@ -0,0 +1,175 @@ +<div + id='admin-pane-posts' + class='tab-pane' + role='tabpanel' +> + <div class='panel panel-default'> + <div class='panel-heading'> + <div class='btn-toolbar'> + <div class='btn-group btn-group-sm'><%= + new_post_button + %></div><!-- btn-group --> + + <div class='btn-group btn-group-sm'> + <span> </span> + </div><!-- btn-group --> + + <div class='btn-group btn-group-sm'><%= + 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| + # get post type + post_type = Guff::Views::AdminPageView::POST_TYPES[id] + + { + :id => post_type[:id], + :name => post_type[:name], + :icon => post_type[:icon], + :text => "Show #{post_type[:name]}s.", + } + } + ) + %></div><!-- btn-group --> + + <div class='btn-group btn-group-sm'><%= + 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), + ) + %></div><!-- btn-group --> + + <div class='btn-group btn-group-sm'><%= + 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), + ) + %></div><!-- btn-group --> + + <div class='btn-group btn-group-sm'><%= + 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), + ) + %></div><!-- btn-group --> + + <div class='btn-group btn-group-sm pull-right'> + <a + href='#' + class='btn btn-default search-toggle' + title='Toggle search field.' + > + <i class='fa fa-fw fa-search'></i> + </a><!-- btn--> + </div><!-- btn-group --> + + <div class='btn-group btn-group-sm pull-right'> + <a + href='#' + id='posts-reload' + class='btn btn-default' + title='Reload posts' + > + <span class='loading'> + <i class='fa fa-fw fa-refresh'></i> + </span> + + <span class='loading hidden'> + <i class='fa fa-fw fa-spinner fa-spin'></i> + </span> + </a><!-- btn --> + </div><!-- btn-group --> + </div><!-- btn-toolbar --> + </div><!-- panel-heading --> + + <div class='panel-heading hidden search-toggle'> + <div class='input-group input-group-sm'> + <span class='input-group-addon'> + <i class='fa fa-search'></i> + </span> + + <input + type='text' + id='posts-q' + class='form-control' + title='Enter search terms' + /> + </div><!-- input-group --> + </div><!-- panel-heading --> + + <table + id='posts' + class='table table-hover' + > + <thead> + <tr class='small'> + <th> </th> + <th>Name</th> + <th>Site</th> + <th>Slug</th> + <th>Author</th> + <th>Created</th> + <th>Posted</th> + </tr> + </thead> + + <tbody> + </tbody> + </table><!-- table --> + </div><!-- panel --> +</div><!-- tab-pane --> |