Skip to content

Commit

Permalink
Merge branch 'hotfix/0.3.5_fix.3'
Browse files Browse the repository at this point in the history
* hotfix/0.3.5_fix.3:
  Add views to article admin
  Fix popular articles
  • Loading branch information
kalashnikovisme committed Jul 22, 2015
2 parents 0233aae + 155e834 commit 338c87f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/web/articles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ def show
@strings = @article.tags.string
@not_strings = @article.tags.events + @article.tags.activity_lines + @article.tags.teams
@members = @article.tags.members.map &:target
@popular_articles = ArticleDecorator.decorate_collection Article.popular.first 3
@popular_articles = ArticleDecorator.decorate_collection Article.broadcasted.popular.first 3
end
end
4 changes: 2 additions & 2 deletions app/views/web/admin/articles/_articles_list.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%th= model_class.human_attribute_name(:title)
%th= model_class.human_attribute_name(:body)
%th= model_class.human_attribute_name(:category_id)
%th= model_class.human_attribute_name(:created_at)
%th= model_class.human_attribute_name(:views)
%th= model_class.human_attribute_name(:tags)
%th=t 'helpers.links.actions'
%tbody
Expand All @@ -17,7 +17,7 @@
%td= link_to article.title, edit_admin_article_path(article)
%td= article.short_body
%td= (article.category.present? ? article.category.name : "")
%td=l article.created_at
%td= article.views
%td{ style: 'width: 200px' }
= render 'web/admin/tags/buttons'
= render 'web/admin/tags/list', record: article
Expand Down

0 comments on commit 338c87f

Please sign in to comment.