diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index 4850337815..de41cd1d2e 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -17,15 +17,13 @@ def index @statspages = Page.where("published_at > ?", today).count @statuses = Status.where("published_at > ?", today).count @statuserposts = Article.published.where("published_at > ?", today).count(conditions: {user_id: current_user.id}) - @statcomments = Comment.where("created_at > ?", today).count @presumedspam = Comment.presumed_spam.where("created_at > ?", today).count @confirmed = Comment.ham.where("created_at > ?", today).count @unconfirmed = Comment.unconfirmed.where("created_at > ?", today).count @comments = Comment.last_published - @recent_posts = Article.published.limit(5) - @bestof = Article.bestof + @drafts = Article.drafts.where("user_id = ?", current_user.id).limit(5) @statspam = Comment.spam.count @inbound_links = inbound_links @@ -65,7 +63,7 @@ def inbound_links def publify_dev url = "http://blog.publify.co/articles.rss" - parse(url)[0..4] + parse(url)[0..2] end diff --git a/app/views/admin/dashboard/_drafts.html.erb b/app/views/admin/dashboard/_drafts.html.erb new file mode 100644 index 0000000000..a7a1fe1dbc --- /dev/null +++ b/app/views/admin/dashboard/_drafts.html.erb @@ -0,0 +1,18 @@ +
<%= post.body.strip_html.slice(0,300) if post.body %>
+<%= post.body.strip_html.slice(0,300) if post.body %>
-