diff options
Diffstat (limited to 'src/views/admin')
-rw-r--r-- | src/views/admin/page.ecr | 1111 |
1 files changed, 1111 insertions, 0 deletions
diff --git a/src/views/admin/page.ecr b/src/views/admin/page.ecr new file mode 100644 index 0000000..c06b5f0 --- /dev/null +++ b/src/views/admin/page.ecr @@ -0,0 +1,1111 @@ +<!DOCTYPE html> +<html lang='en-US'> + <head> + <meta charset="utf-8"/> + <title><%= h(TITLE) %></title> + + <%= + styles %w{ + assets/font-awesome-4.5.0/css/font-awesome.min.css + assets/bootstrap-3.3.6/css/bootstrap.min.css + assets/bootstrap-3.3.6/css/bootstrap-theme.min.css + assets/css/admin.css + } + %> + </head> + + <body> + <div + class='navbar navbar-inverse navbar-static-top' + role='navigation' + > + <div class='container-fluid'> + <div class='navbar-header'> + <a + href='admin.html' + class='navbar-brand' + > + <i class='fa fa-bomb'></i> + <%= h(TITLE) %> + </a><!-- navbar-brand --> + </div><!-- navbar-default --> + + <ul class='nav navbar-nav navbar-right'> + <li> + <a + href='logout.html' + title='Log out.' + > + <i class='fa fa-power-off'></i> + Log Out + </a> + </li> + </ul><!-- nav --> + </div><!-- container-fluid --> + </div><!-- navbar --> + + <div class='container'> + <div class='col-md-12'> + <ul class='nav nav-tabs nav-justified' role='tablist'><%= + tabs("admin") + %></ul><!-- nav --> + + <div class='tab-content'> + <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 --> + + <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| + name = POST_TYPES[id][:name] + + { + :id => POST_TYPES[id][:id], + :name => name, + :icon => POST_TYPES[id][:icon], + :text => "Show #{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>URL / Slug</th> + <th>Author</th> + <th>Created</th> + <th>Posted</th> + </tr> + </thead> + + <tbody> + </tbody> + </table><!-- table --> + </div><!-- panel --> + </div><!-- tab-pane --> + + <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 --> + + <div + id='admin-pane-settings' + class='tab-pane' + role='tabpanel' + > + <div class='panel panel-default'> + <div class='panel-body'> + <div class='row'> + <div class='col-md-3'> + <ul class='nav nav-pills nav-stacked' role='tablist'><%= + tabs("settings") + %></ul><!-- nav --> + </div><!-- col-md-3 --> + + <div class='col-md-9'> + <div class='tab-content'> + <div + id='settings-pane-general' + class='tab-pane active' + role='tabpanel' + > + <div class='panel panel-default'> + <div class='panel-heading'> + </div><!-- panel-heading --> + + <div class='panel-body'> + <p> + TODO: general settings + </p> + </div><!-- panel-body --> + </div><!-- panel --> + </div><!-- tab-pane --> + + <div + id='settings-pane-users' + 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='#' + class='btn btn-primary' + title='Create new user.' + data-toggle='modal' + data-target='#user-add-dialog' + > + <i class='fa fa-user-plus'></i> + New User + </a><!-- btn --> + </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='users-reload' + class='btn btn-default' + title='Reload users.' + > + <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><!-- #reload --> + </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='users-q' + class='form-control' + title='Enter search terms' + /> + </div><!-- input-group --> + </div><!-- panel-heading --> + + <div id='users' class='list-group'> + <span class='list-group-item disabled'> + <i class='fa fa-spinner fa-spin'></i> + Loading... + </span><!-- list-group-item --> + </div><!-- list-group --> + </div><!-- panel --> + </div><!-- tab-pane --> + + <div + id='settings-pane-themes' + class='tab-pane' + role='tabpanel' + > + <div class='panel panel-default'> + <div class='panel-heading'> + </div><!-- panel-heading --> + + <div id='themes' class='panel-body'> + <p> + TODO: themes + </p> + </div><!-- panel-body --> + </div><!-- panel --> + </div><!-- tab-pane --> + + <div + id='settings-pane-sites' + class='tab-pane' + role='tabpanel' + > + <div class='panel panel-default'> + <div class='panel-heading'> + </div><!-- panel-heading --> + + <div id='sites' class='panel-body'> + <p> + TODO: sites settings + </p> + </div><!-- panel-body --> + </div><!-- panel --> + </div><!-- tab-pane --> + + <div + id='settings-pane-backups' + class='tab-pane' + role='tabpanel' + > + <div class='panel panel-default'> + <div class='panel-heading'> + </div><!-- panel-heading --> + + <div class='panel-body'> + <p> + TODO: backups + </p> + </div><!-- panel-body --> + </div><!-- panel --> + </div><!-- tab-pane --> + + <div + id='settings-pane-import' + class='tab-pane' + role='tabpanel' + > + <div class='panel panel-default'> + <div class='panel-heading'> + </div><!-- panel-heading --> + + <div class='panel-body'> + <p> + TODO: import + </p> + </div><!-- panel-body --> + </div><!-- panel --> + </div><!-- tab-pane --> + </div><!-- tab-content --> + </div><!-- col-md-9 --> + </div><!-- row --> + </div><!-- panel-body --> + </div><!-- panel --> + </div><!-- tab-pane --> + </div><!-- tab-content --> + </div><!-- col-md-12 --> + </div><!-- container --> + + <%= dialogs %> + + <div id='blog-edit-dialog' class='modal fade' role='dialog'> + <div class='modal-dialog modal-lg' role='document'> + <div class='modal-content'> + <div class='modal-header'> + <button + type='button' + class='close' + data-dismiss='modal' + aria-label='Close' + > + <span aria-hidden='true'> + × + </span> + </button><!-- close --> + + <h4 class='modal-title'> + <i class='fa fa-edit'></i> + Edit Blog Entry + </h4><!-- modal-title --> + </div><!-- modal-header --> + + <div class='modal-body loading-done'> + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='blog-edit-name'> + Title + </label> + + <input + type='text' + id='blog-edit-name' + class='form-control post-name' + title='Enter title for blog entry.' + placeholder='Blog Entry Title' + aria-describedby='blog-edit-name-help' + /> + + <p id='blog-edit-name-help' class='help-block'> + Title of blog entry. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <div class='form-group'> + <label for='blog-edit-slug'> + Slug + </label> + + <div class='input-group'> + <input + type='text' + id='blog-edit-slug' + class='form-control post-slug' + disabled='disabled' + title='Enter slug for blog entry.' + placeholder='blog-post-title' + aria-describedby='blog-edit-slug-help' + /> + + <a + href='#' + id='blog-edit-slug-lock' + class='btn input-group-addon btn-default post-slug-lock' + title='Toggle slug lock.' + aria-describedby='page-edit-slug-help' + > + <i class='fa fa-lock'></i> + </a><!-- slog-lock --> + </div><!-- input-group --> + + <p id='blog-edit-slug-help' class='help-block'> + Slug of blog entry. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + </div><!-- row --> + + <div class='form-group'> + <label for='blog-edit-body'> + Body + </label> + + <textarea + id='blog-edit-body' + class='form-control' + rows='15' + aria-describedby='blog-edit-body-help' + ></textarea> + + <p id='blog-edit-body-help' class='help-block'> + Body of this blog entry. + </p> + </div><!-- form-group --> + + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='blog-edit-tags'> + Tags + </label> + + <input + type='text' + id='blog-edit-tags' + class='form-control' + title='Enter tags for this blog entry.' + placeholder='Blog Entry Tags' + aria-describedby='blog-edit-tags-help' + /> + + <p id='blog-edit-tags-help' class='help-block'> + Space-delimited list of tags. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <label> + State + </label> + + <div + id='blog-edit-state' + class='btn-group btn-group-justified state-buttons' + ><%= + state_buttons + %></div><!-- btn-group --> + + <p class='help-block'> + Visibility of this blog post. + </p> + </div><!-- col-md-6 --> + </div><!-- row --> + + </div><!-- modal-body --> + + <div class='modal-footer'> + <button + id='blog-edit-confirm' + class='btn btn-primary' + title='Create post.' + > + <span class='hidden loading'> + <i class='fa fa-spinner fa-spin'></i> + Please Wait... + </span> + + <span class='loading'> + <i class='fa fa-save'></i> + Save Changes + </span> + </button> + + <button + class='btn btn-default' + data-dismiss='modal' + title='Close dialog.' + > + × Close + </button> + </div><!-- modal-footer --> + </div><!-- modal-content --> + </div><!-- modal-dialog --> + </div><!-- modal --> + + <div id='page-edit-dialog' class='modal fade' role='dialog'> + <div class='modal-dialog modal-lg' role='document'> + <div class='modal-content'> + <div class='modal-header'> + <button + type='button' + class='close' + data-dismiss='modal' + aria-label='Close' + > + <span aria-hidden='true'> + × + </span> + </button><!-- close --> + + <h4 class='modal-title'> + <i class='fa fa-edit'></i> + Edit Page + </h4><!-- modal-title --> + </div><!-- modal-header --> + + <div class='modal-body loading-text'> + <p> + <i class='fa fa-spinner fa-spin'></i> + Loading... + </p> + </div><!-- modal-body --> + + <div class='modal-body loading-error'> + <div class='well'> + <i class='fa fa-exclamation-triangle'></i> + Error: <span class='error-text'></span> + </div><!-- well --> + </div><!-- modal-body --> + + <div class='modal-body loading-done'> + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='page-edit-name'> + Title + </label> + + <input + type='text' + id='page-edit-name' + class='form-control post-name' + title='Enter title for page.' + placeholder='Page Title' + aria-describedby='page-edit-name-help' + /> + + <p id='page-edit-name-help' class='help-block'> + Title of page. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <div class='form-group'> + <label for='page-edit-slug'> + Path + </label> + + <div class='input-group'> + <input + type='text' + id='page-edit-slug' + class='form-control post-slug' + disabled='disabled' + title='Enter path for this page.' + placeholder='page-title' + /> + + <a + href='#' + id='page-edit-slug-lock' + class='btn input-group-addon btn-default post-slug-lock' + title='Toggle path lock.' + aria-describedby='page-edit-slug-help' + > + <i class='fa fa-lock'></i> + </a><!-- slog-lock --> + </div><!-- input-group --> + + <p id='page-edit-slug-help' class='help-block'> + URL path of page. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + </div><!-- row --> + + <div class='form-group'> + <label for='page-edit-body'> + Body + </label> + + <textarea + id='page-edit-body' + class='form-control' + rows='15' + aria-describedby='page-edit-body-help' + ></textarea> + + <p id='page-edit-body-help' class='help-block'> + Body of this page. + </p> + </div><!-- form-group --> + + <div class='row'> + <div class='col-md-6'> + <label for='page-edit-theme'> + Theme + </label> + + <select + id='page-edit-theme' + class='form-control' + title='Choose theme for this page.' + ><%= + theme_options + %></select> + + <p class='help-block'> + Theme for this page. + </p> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <label> + State + </label> + + <div + id='page-edit-state' + class='btn-group btn-group-justified state-buttons' + ><%= + state_buttons + %></div><!-- btn-group --> + + <p class='help-block'> + Visibility state of this page. + </p> + </div><!-- col-md-6 --> + </div><!-- row --> + </div><!-- modal-body --> + + <div class='modal-footer'> + <button + id='page-edit-confirm' + class='btn btn-primary' + title='Save changes.' + > + <span class='hidden loading'> + <i class='fa fa-spinner fa-spin'></i> + Please Wait... + </span> + + <span class='loading'> + <i class='fa fa-save'></i> + Save Changes + </span> + </button> + + <button + class='btn btn-default' + data-dismiss='modal' + title='Close dialog.' + > + × Close + </button> + </div><!-- modal-footer --> + </div><!-- modal-content --> + </div><!-- modal-dialog --> + </div><!-- modal --> + + <div id='project-edit-dialog' class='modal fade' role='dialog'> + <div class='modal-dialog modal-lg' role='document'> + <div class='modal-content'> + <div class='modal-header'> + <button + type='button' + class='close' + data-dismiss='modal' + aria-label='Close' + > + <span aria-hidden='true'> + × + </span> + </button><!-- close --> + + <h4 class='modal-title'> + <i class='fa fa-edit'></i> + Edit Project + </h4><!-- modal-title --> + </div><!-- modal-header --> + + <div class='modal-body loading-text'> + <p> + <i class='fa fa-spinner fa-spin'></i> + Loading... + </p> + </div><!-- modal-body --> + + <div class='modal-body loading-error'> + <div class='well well'> + <i class='fa fa-exclamation-triangle'></i> + Error: <span class='error-text'></span> + </div><!-- well --> + </div><!-- modal-body --> + + <div class='modal-body loading-done'> + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='project-edit-name'> + Name + </label> + + <input + type='text' + id='project-edit-name' + class='form-control post-name' + title='Enter project name.' + placeholder='Project Name' + aria-describedby='project-edit-name-help' + /> + + <p id='project-edit-name-help' class='help-block'> + Name of project. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <div class='form-group'> + <label for='project-edit-slug'> + Slug + </label> + + <div class='input-group'> + <input + type='text' + id='project-edit-slug' + class='form-control post-slug' + title='Enter project slug.' + disabled='disabled' + placeholder='project-name' + aria-describedby='project-edit-slug-help' + /> + + <a + href='#' + id='project-edit-slug-lock' + class='btn input-group-addon btn-default post-slug-lock' + title='Toggle slug lock.' + > + <i class='fa fa-lock'></i> + </a><!-- slog-lock --> + </div><!-- input-group --> + + <p id='project-edit-slug-help' class='help-block'> + URL path component of project. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + </div><!-- row --> + + <div class='form-group'> + <label for='project-edit-body'> + Description + </label> + + <textarea + id='project-edit-body' + class='form-control' + title='Description of this project.' + rows='15' + aria-describedby='project-edit-body-help' + ></textarea> + + <p id='project-edit-body-help' class='help-block'> + Description of this project. + </p> + </div><!-- form-group --> + + <div class='row'> + <div class='col-md-6'> + <div class='form-group'> + <label for='project-edit-repo'> + Git Repository + </label> + + <input + type='text' + id='project-edit-repo' + class='form-control' + title='Enter project Git repository URL.' + placeholder='https://example.com/git/example-project.git' + aria-describedby='project-edit-repo-help' + /> + + <p id='project-edit-repo-help' class='help-block'> + URL of Git repository for this project. + </p> + </div><!-- form-group --> + </div><!-- col-md-6 --> + + <div class='col-md-6'> + <label> + State + </label> + + <div + id='project-edit-state' + class='btn-group btn-group-justified state-buttons' + ><%= + state_buttons + %></div><!-- btn-group --> + + <p class='help-block'> + Visibility state of this project. + </p> + </div><!-- col-md-6 --> + </div><!-- row --> + </div><!-- modal-body --> + + <div class='modal-footer'> + <button + id='project-edit-confirm' + class='btn btn-primary' + title='Save changes.' + > + <span class='hidden loading'> + <i class='fa fa-spinner fa-spin'></i> + Please Wait... + </span> + + <span class='loading'> + <i class='fa fa-save'></i> + Save Changes + </span> + </button> + + <button + class='btn btn-default' + data-dismiss='modal' + title='Close dialog.' + > + × Close + </button> + </div><!-- modal-footer --> + </div><!-- modal-content --> + </div><!-- modal-dialog --> + </div><!-- modal --> + </body> + + + <script type='text/javascript'><!-- + var DATA = <%= page_data %>; + // --> + </script> + <%= + scripts %w{ + assets/jquery-2.2.1.min.js + assets/luigi-template-0.4.1.min.js + assets/js/util.js + assets/bootstrap-3.3.6/js/bootstrap.min.js + assets/ckeditor-4.5.8-custom/ckeditor.js + assets/js/search-field.js + assets/js/dropdown.js + assets/js/admin/tabs/users.js + assets/js/admin/tabs/posts.js + assets/js/admin/tabs/files.js + assets/js/admin/dialogs/user-add.js + assets/js/admin/dialogs/user-edit.js + assets/js/admin/dialogs/post-edit.js + assets/js/admin/dialogs/blog-edit.js + assets/js/admin/dialogs/page-edit.js + assets/js/admin/dialogs/project-edit.js + } + %> +</html> |