Skip to content

Commit a12eabf

Browse files
author
joeltaylor
committed
Admin dashboard improvements
1 parent 99bc8bd commit a12eabf

2 files changed

Lines changed: 34 additions & 18 deletions

File tree

server/services/articles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var Articles = {
99

1010
// Returns Flow stories that haven't been moderated.
1111
pending(cb) {
12-
db.query('SELECT * FROM articles where approved IS NULL ORDER BY created_at ASC', [], cb)
12+
db.query('SELECT a.id, a,url, a.title, a.slug, a.body, u.name, u.avatar_url FROM articles as a JOIN users as u on a.user_id = u.id WHERE approved IS NULL ORDER BY a.created_at ASC', [], cb)
1313
},
1414

1515
// Return 25 of the most recent Flow and News articles that are published

server/views/admin/index.jade

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,39 @@ block content
2121

2222
- for story in stories
2323
li.list-item(data-article=story.id)
24-
article.bucket
25-
.bucket-content
26-
h2.h.h--3
27-
h3 #{story.title}
28-
a.tct.twb(href='/news/' + story.slug)=story.url
29-
p.mbf= story.body
30-
a.tct.twb.approve(href='#') approve
31-
||
32-
select(name="moderate" id="moderate")
33-
option(value=0) Select reason...
34-
option(value=1) Duplicate
35-
option(value=2) Hard to understand
36-
option(value=3) Directly advertising
37-
option(value=4) Job Posting
38-
option(value=5) Disrespectful language
39-
option(value=6) Not within community interests
40-
a.tct.twb.deny(href='#') deny
24+
section.row
25+
.cell.cell--s.well
26+
27+
article.bdrbl.pbl.mbm(role='article')
28+
29+
h1.h.h--1
30+
a.externalLink.tct.twb(href=story.url)
31+
= story.title
32+
- iconPartial = { name: 'external', className: 'externalLink-icon', size: 20 }
33+
include /views/partials/_icon
34+
35+
.bucket.bucket--flag.mbm
36+
.bucket-media
37+
img.thumb(src=story.avatar_url width=50)
38+
.bucket-content.h.h--3.tcs
39+
ul.list.list--inline.list--inline--divided.tfh
40+
li.list-item
41+
span.twn via
42+
| #{story.name}
43+
44+
p.well.well--l.tsl= story.body
45+
46+
a.tct.twb.approve(href='#') approve
47+
||
48+
select(name="moderate" id="moderate")
49+
option(value=0) Select reason...
50+
option(value=1) Duplicate
51+
option(value=2) Hard to understand
52+
option(value=3) Directly advertising
53+
option(value=4) Job Posting
54+
option(value=5) Disrespectful language
55+
option(value=6) Not within community interests
56+
a.tct.twb.deny(href='#') deny
4157

4258
block inline_javascript
4359
script.

0 commit comments

Comments
 (0)