aboutsummaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/views')
-rw-r--r--src/views/admin-navbar.ecr29
-rw-r--r--src/views/admin-page.ecr254
-rw-r--r--src/views/panes/admin/posts.ecr2
-rw-r--r--src/views/panes/admin/settings.ecr23
-rw-r--r--src/views/panes/settings/backups.ecr16
-rw-r--r--src/views/panes/settings/general.ecr16
-rw-r--r--src/views/panes/settings/import.ecr16
-rw-r--r--src/views/panes/settings/sites.ecr16
-rw-r--r--src/views/panes/settings/themes.ecr16
-rw-r--r--src/views/panes/settings/users.ecr73
10 files changed, 215 insertions, 246 deletions
diff --git a/src/views/admin-navbar.ecr b/src/views/admin-navbar.ecr
new file mode 100644
index 0000000..4a06b15
--- /dev/null
+++ b/src/views/admin-navbar.ecr
@@ -0,0 +1,29 @@
+<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'
+ title='Reload admin page.'
+ >
+ <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 -->
diff --git a/src/views/admin-page.ecr b/src/views/admin-page.ecr
index 5b9f352..1eb030a 100644
--- a/src/views/admin-page.ecr
+++ b/src/views/admin-page.ecr
@@ -3,266 +3,30 @@
<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
- }
- %>
+ <%= styles %>
</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 -->
+ <%= navbar %>
<div class='container'>
<div class='col-md-12'>
<ul class='nav nav-tabs nav-justified' role='tablist'><%=
- tabs("admin")
+ tabs
%></ul><!-- nav -->
- <div class='tab-content'>
- <%= admin_panes %>
-
- <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 class='tab-content'><%=
+ panes
+ %></div><!-- tab-content -->
</div><!-- col-md-12 -->
</div><!-- container -->
<%= dialogs %>
</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
- }
- %>
+ // --></script>
+
+ <%= scripts %>
</html>
diff --git a/src/views/panes/admin/posts.ecr b/src/views/panes/admin/posts.ecr
index 5e6571d..5b8e669 100644
--- a/src/views/panes/admin/posts.ecr
+++ b/src/views/panes/admin/posts.ecr
@@ -33,7 +33,7 @@
:type => "divider",
}] + %i{blog page project}.map { |id|
# get post type
- post_type = Guff::Views::AdminPageView::POST_TYPES[id]
+ post_type = Guff::POST_TYPES[id]
{
:id => post_type[:id],
diff --git a/src/views/panes/admin/settings.ecr b/src/views/panes/admin/settings.ecr
new file mode 100644
index 0000000..0824ce8
--- /dev/null
+++ b/src/views/panes/admin/settings.ecr
@@ -0,0 +1,23 @@
+<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
+ %></ul><!-- nav -->
+ </div><!-- col-md-3 -->
+
+ <div class='col-md-9'>
+ <div class='tab-content'><%=
+ panes
+ %></div><!-- tab-content -->
+ </div><!-- col-md-9 -->
+ </div><!-- row -->
+ </div><!-- panel-body -->
+ </div><!-- panel -->
+</div><!-- tab-pane -->
diff --git a/src/views/panes/settings/backups.ecr b/src/views/panes/settings/backups.ecr
new file mode 100644
index 0000000..a9f4fc9
--- /dev/null
+++ b/src/views/panes/settings/backups.ecr
@@ -0,0 +1,16 @@
+<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 -->
diff --git a/src/views/panes/settings/general.ecr b/src/views/panes/settings/general.ecr
new file mode 100644
index 0000000..65fba81
--- /dev/null
+++ b/src/views/panes/settings/general.ecr
@@ -0,0 +1,16 @@
+<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 -->
diff --git a/src/views/panes/settings/import.ecr b/src/views/panes/settings/import.ecr
new file mode 100644
index 0000000..fe8e94f
--- /dev/null
+++ b/src/views/panes/settings/import.ecr
@@ -0,0 +1,16 @@
+<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 -->
diff --git a/src/views/panes/settings/sites.ecr b/src/views/panes/settings/sites.ecr
new file mode 100644
index 0000000..774a023
--- /dev/null
+++ b/src/views/panes/settings/sites.ecr
@@ -0,0 +1,16 @@
+<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 -->
diff --git a/src/views/panes/settings/themes.ecr b/src/views/panes/settings/themes.ecr
new file mode 100644
index 0000000..a88f24e
--- /dev/null
+++ b/src/views/panes/settings/themes.ecr
@@ -0,0 +1,16 @@
+<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 -->
diff --git a/src/views/panes/settings/users.ecr b/src/views/panes/settings/users.ecr
new file mode 100644
index 0000000..87ca397
--- /dev/null
+++ b/src/views/panes/settings/users.ecr
@@ -0,0 +1,73 @@
+<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 -->