aboutsummaryrefslogtreecommitdiff
path: root/src/views/panes/admin
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-07-28 02:10:45 -0400
committerPaul Duncan <pabs@pablotron.org>2016-07-28 02:10:45 -0400
commitbff93d5b6a46e6c996e43dc4d669a4514da87cc6 (patch)
tree981b5a4157643656a1f7cd2d49edae6ad76215c4 /src/views/panes/admin
parenteaa2aa3cefdf2bc544d000048659968acc1afe2a (diff)
downloadguff-bff93d5b6a46e6c996e43dc4d669a4514da87cc6.tar.bz2
guff-bff93d5b6a46e6c996e43dc4d669a4514da87cc6.zip
refactor dialog and pane templates
Diffstat (limited to 'src/views/panes/admin')
-rw-r--r--src/views/panes/admin/files.ecr124
-rw-r--r--src/views/panes/admin/home.ecr21
-rw-r--r--src/views/panes/admin/posts.ecr175
3 files changed, 320 insertions, 0 deletions
diff --git a/src/views/panes/admin/files.ecr b/src/views/panes/admin/files.ecr
new file mode 100644
index 0000000..d5c4f0d
--- /dev/null
+++ b/src/views/panes/admin/files.ecr
@@ -0,0 +1,124 @@
+<div
+ id='admin-pane-files'
+ 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'>
+ <a
+ href='#'
+ id='files-upload'
+ class='btn btn-primary'
+ title='Upload file to current directory.'
+ >
+ <i class='fa fa-upload'></i>
+ Upload File...
+ </a><!-- btn -->
+ </div><!-- btn-group -->
+
+ <div class='btn-group btn-group-sm'>
+ <a
+ href='#'
+ id='files-mkdir'
+ class='btn btn-default'
+ title='Create folder in current directory.'
+ >
+ <span class='loading'>
+ <i class='fa fa-folder'></i>
+ </span><!-- loading -->
+
+ <span class='loading hidden'>
+ <i class='fa fa-spinner fa-spin'></i>
+ </span><!-- loading -->
+
+ New Folder...
+ </a><!-- btn -->
+ </div><!-- btn-group -->
+
+ <div class='btn-group btn-group-sm'>
+ <a
+ href='#'
+ class='btn btn-default'
+ title='View actions.'
+ data-toggle='dropdown'
+ >
+ <i class='fa fa-clone'></i>
+ File Actions
+ <i class='fa fa-caret-down'></i>
+ </a><!-- btn -->
+
+ <ul id='file-actions' class='dropdown-menu'>
+ <li>
+ <a
+ href='#'
+ title='Download selected file.'
+ data-id='download'
+ >
+ <i class='fa fa-download'></i>
+ Download File
+ </a><!-- btn -->
+ </li>
+
+ <li>
+ <a
+ href='#'
+ title='Move selected file or folder.'
+ data-id='move'
+ >
+ <i class='fa fa-folder-open-o'></i>
+ Move
+ </a><!-- btn -->
+ </li>
+
+ <li>
+ <a
+ href='#'
+ title='Delete selected file or folder.'
+ data-id='delete'
+ >
+ <i class='fa fa-trash-o'></i>
+ Delete
+ </a><!-- btn -->
+ </li>
+ </ul><!-- dropdown-menu -->
+ </div><!-- btn-group -->
+
+ <div class='btn-group btn-group-sm pull-right'>
+ <a
+ href='#'
+ id='files-reload'
+ class='btn btn-default'
+ title='Reload files.'
+ >
+ <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 class='btn-group btn-group-sm pull-right'>
+ <span
+ class='btn'
+ title='Number of files in current directory.'
+ >
+ <span id='files-count'>0</span> Files
+ </span><!-- btn -->
+ </div><!-- btn-group -->
+ </div><!-- btn-toolbar -->
+ </div><!-- panel-heading -->
+
+ <div class='panel-heading'>
+ <div id='files-crumbs' class='btn-toolbar'>
+ </div><!-- btn-toolbar -->
+ </div><!-- panel-heading -->
+
+ <div id='files' class='list-group'>
+ </div><!-- panel-body -->
+ </div><!-- panel -->
+</div><!-- tab-pane -->
diff --git a/src/views/panes/admin/home.ecr b/src/views/panes/admin/home.ecr
new file mode 100644
index 0000000..af19b78
--- /dev/null
+++ b/src/views/panes/admin/home.ecr
@@ -0,0 +1,21 @@
+<div
+ id='admin-pane-home'
+ class='tab-pane active'
+ 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><!-- btn-toolbar -->
+ </div><!-- panel-heading -->
+
+ <div class='panel-body'>
+ <p>
+ TODO: home
+ </p>
+ </div><!-- panel-body -->
+ </div><!-- panel -->
+</div><!-- tab-pane -->
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>&nbsp;&nbsp;</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>&nbsp;</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 -->