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

<%= _("Your Drafts") %>

+
+ +
diff --git a/app/views/admin/dashboard/_popular.html.erb b/app/views/admin/dashboard/_popular.html.erb deleted file mode 100644 index dd3303e51e..0000000000 --- a/app/views/admin/dashboard/_popular.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -

<%= _("Most popular") %>

-
- -
diff --git a/app/views/admin/dashboard/_posts.html.erb b/app/views/admin/dashboard/_posts.html.erb deleted file mode 100644 index 4a69f7d087..0000000000 --- a/app/views/admin/dashboard/_posts.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -

<%= _("Latest Posts") %>

-
- -
diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index c307cecc1e..44fc2bdcc4 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -4,12 +4,11 @@
<%= render "welcome" %> <%= render "comments" %> - <%= render "popular" %>
+ <%= render "drafts" %> <%= render "inbound" %> - <%= render "posts" %> <%= render "publify_dev" %>