From 8828d7189173dfdf8c88082cf69d1eb74d89e9a7 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Thu, 28 Jul 2016 08:27:41 -0400 Subject: refactor settings panes, simplify admin page --- src/views/admin-navbar.ecr | 29 ++++ src/views/admin-page.ecr | 254 ++--------------------------------- src/views/panes/admin/posts.ecr | 2 +- src/views/panes/admin/settings.ecr | 23 ++++ src/views/panes/settings/backups.ecr | 16 +++ src/views/panes/settings/general.ecr | 16 +++ src/views/panes/settings/import.ecr | 16 +++ src/views/panes/settings/sites.ecr | 16 +++ src/views/panes/settings/themes.ecr | 16 +++ src/views/panes/settings/users.ecr | 73 ++++++++++ 10 files changed, 215 insertions(+), 246 deletions(-) create mode 100644 src/views/admin-navbar.ecr create mode 100644 src/views/panes/admin/settings.ecr create mode 100644 src/views/panes/settings/backups.ecr create mode 100644 src/views/panes/settings/general.ecr create mode 100644 src/views/panes/settings/import.ecr create mode 100644 src/views/panes/settings/sites.ecr create mode 100644 src/views/panes/settings/themes.ecr create mode 100644 src/views/panes/settings/users.ecr (limited to 'src/views') 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 @@ + 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 @@ <%= h(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 %> - + <%= navbar %>
-
- <%= admin_panes %> - -
-
-
-
-
- -
- -
-
-
-
-
-
- -
-

- TODO: general settings -

-
-
-
- -
-
-
- -
- - - -
- - - Loading... - -
-
-
- -
-
-
-
- -
-

- TODO: themes -

-
-
-
- -
-
-
-
- -
-

- TODO: sites settings -

-
-
-
- -
-
-
-
- -
-

- TODO: backups -

-
-
-
- -
-
-
-
- -
-

- TODO: import -

-
-
-
-
-
-
-
-
-
-
+
<%= + panes + %>
<%= dialogs %> - - <%= - 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 - } - %> + // --> + + <%= scripts %> 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 @@ +
+
+
+
+
+ +
+ +
+
<%= + panes + %>
+
+
+
+
+
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 @@ +
+
+
+
+ +
+

+ TODO: backups +

+
+
+
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 @@ +
+
+
+
+ +
+

+ TODO: general settings +

+
+
+
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 @@ +
+
+
+
+ +
+

+ TODO: import +

+
+
+
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 @@ +
+
+
+
+ +
+

+ TODO: sites settings +

+
+
+
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 @@ +
+
+
+
+ +
+

+ TODO: themes +

+
+
+
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 @@ +
+
+
+ +
+ + + +
+ + + Loading... + +
+
+
-- cgit v1.2.3