aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guff/handlers.cr2
-rw-r--r--src/guff/views/admin/dialogs/user.cr2
-rw-r--r--src/guff/views/admin/page.cr (renamed from src/guff/views/admin-page.cr)12
-rw-r--r--src/views/admin/page.ecr (renamed from src/views/admin-page.ecr)0
4 files changed, 8 insertions, 8 deletions
diff --git a/src/guff/handlers.cr b/src/guff/handlers.cr
index 2670f89..a44140a 100644
--- a/src/guff/handlers.cr
+++ b/src/guff/handlers.cr
@@ -215,7 +215,7 @@ module Guff::Handlers
context.response.headers["x-frame-options"] = "SAMEORIGIN"
context.response.content_type = "text/html; charset=utf-8"
context.response.status_code = 200
- Views::AdminPageView.new(@context).to_s(context.response)
+ Views::Admin::PageView.new(@context).to_s(context.response)
else
call_next(context)
end
diff --git a/src/guff/views/admin/dialogs/user.cr b/src/guff/views/admin/dialogs/user.cr
index 4bae8da..98a632e 100644
--- a/src/guff/views/admin/dialogs/user.cr
+++ b/src/guff/views/admin/dialogs/user.cr
@@ -1,6 +1,6 @@
class Guff::Views::Admin::Dialogs::UserDialog < Guff::Views::HTMLView
protected def role_options
- tmpl = Guff::Views::AdminPageView::TEMPLATES[:option]
+ tmpl = Guff::Views::Admin::PageView::TEMPLATES[:option]
@role_options ||= String.build do |io|
@context.models.role.get_roles.each do |row|
diff --git a/src/guff/views/admin-page.cr b/src/guff/views/admin/page.cr
index c51ee1b..a61f52a 100644
--- a/src/guff/views/admin-page.cr
+++ b/src/guff/views/admin/page.cr
@@ -1,7 +1,7 @@
-require "./html"
-require "./admin/dialogs/*"
+require "../html"
+require "./dialogs/*"
-class Guff::Views::AdminPageView < Guff::Views::HTMLView
+class Guff::Views::Admin::PageView < Guff::Views::HTMLView
TITLE = "Guff Admin"
POST_TYPES = {
@@ -217,10 +217,10 @@ class Guff::Views::AdminPageView < Guff::Views::HTMLView
private def dialogs
String.build do |io|
- io << Admin::Dialogs::UserAddDialog.new(@context)
- io << Admin::Dialogs::UserEditDialog.new(@context)
+ io << Dialogs::UserAddDialog.new(@context)
+ io << Dialogs::UserEditDialog.new(@context)
end
end
- ECR.def_to_s("src/views/admin-page.ecr")
+ ECR.def_to_s("src/views/admin/page.ecr")
end
diff --git a/src/views/admin-page.ecr b/src/views/admin/page.ecr
index c06b5f0..c06b5f0 100644
--- a/src/views/admin-page.ecr
+++ b/src/views/admin/page.ecr