aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guff.cr20
-rw-r--r--src/views/admin-page.ecr25
2 files changed, 42 insertions, 3 deletions
diff --git a/src/guff.cr b/src/guff.cr
index d3817d0..dc04fbe 100644
--- a/src/guff.cr
+++ b/src/guff.cr
@@ -276,6 +276,8 @@ module Guff
ON (b.state_id = a.state_id)
JOIN sites c
ON (c.site_id = a.site_id)
+ JOIN users d
+ ON (d.user_id = a.created_by)
LEFT JOIN blogs x
ON (x.post_id = a.post_id)
LEFT JOIN pages y
@@ -291,8 +293,22 @@ module Guff
a.site_id,
c.name AS site_name,
b.state,
+ d.user_id,
+ d.name AS user_name,
+ d.email AS user_email,
+
+ a.created_at,
+ date(a.created_at) AS created_at_text,
+ datetime(a.created_at) AS created_at_text_full,
+
a.posted_at,
+ date(a.posted_at) AS posted_at_text,
+ datetime(a.posted_at) AS posted_at_text_full,
+
a.expires_at,
+ date(a.expires_at) AS expires_at_text,
+ datetime(a.expires_at) AS expires_at_text_full,
+
a.slug,
a.slug_lock,
a.name,
@@ -310,7 +326,7 @@ module Guff
strftime('/%%Y/%%m/%%d/', a.posted_at) || a.slug || '.html'
WHEN y.post_id IS NOT NULL THEN
'/' || a.slug || '.html'
- WHEN x.post_id IS NOT NULL THEN
+ WHEN z.post_id IS NOT NULL THEN
'/' || a.slug || '/'
END
ELSE
@@ -322,6 +338,8 @@ module Guff
ON (b.state_id = a.state_id)
JOIN sites c
ON (c.site_id = a.site_id)
+ JOIN users d
+ ON (d.user_id = a.created_by)
LEFT JOIN blogs x
ON (x.post_id = a.post_id)
diff --git a/src/views/admin-page.ecr b/src/views/admin-page.ecr
index ad8d429..f2b44f0 100644
--- a/src/views/admin-page.ecr
+++ b/src/views/admin-page.ecr
@@ -9,6 +9,7 @@
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>
@@ -84,6 +85,9 @@
new_post_button
%></div><!-- btn-group -->
+ <div class='btn-group btn-group-sm'>
+ </div><!-- btn-group -->
+
<div class='btn-group btn-group-sm'><%=
dropdown(
id: "posts-filter-type",
@@ -194,8 +198,25 @@
</div><!-- input-group -->
</div><!-- panel-heading -->
- <div id='posts' class='list-group'>
- </div><!-- panel-body -->
+ <table
+ id='posts'
+ class='table table-hover'
+ >
+ <thead>
+ <tr class='small'>
+ <th>&nbsp;</th>
+ <th>Name</th>
+ <th>Author</th>
+ <th>Site</th>
+ <th>URL / Slug</th>
+ <th>Created</th>
+ <th>Posted</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ </tbody>
+ </table><!-- table -->
</div><!-- panel -->
</div><!-- tab-pane -->