Skip to content

Commit

Permalink
Merge branch 'release/0.3.4'
Browse files Browse the repository at this point in the history
* release/0.3.4:
  Add articles to unviewed and some fixes
  Feedback #2377 add RSS feed icon to footer
  • Loading branch information
kalashnikovisme committed Jul 19, 2015
2 parents d151ac9 + 4c3695c commit 15dc7a6
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
5 changes: 4 additions & 1 deletion app/assets/stylesheets/web/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
color: #db4437;
}
}
.icon-rss {
@include fa-rounded-icon(".fa-rss-square");
}

.min-icon {
vertical-align: middle;
Expand All @@ -60,7 +63,7 @@
font-size: 28px;
line-height: 32px;
}
&.icon-facebook, &.icon-twitter, &.icon-google {
&.icon-facebook, &.icon-twitter, &.icon-google, &.icon-rss {
width: 28px;
height: 32px;
font-size: 32px;
Expand Down
1 change: 1 addition & 0 deletions app/controllers/web/admin/unviewed_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def index
@unviewed[:events] = Kaminari.paginate_array(Event.unviewed.decorate).page params[:page]
@unviewed[:feedback] = Kaminari.paginate_array(Feedback.unviewed.decorate).page params[:page]
@unviewed[:comments] = Kaminari.paginate_array(Comment.unviewed.decorate).page params[:page]
@unviewed[:articles] = Kaminari.paginate_array(Article.unviewed.decorate).page params[:page]
@tag = Tag.new
end
end
2 changes: 2 additions & 0 deletions app/views/layouts/web/shared/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
.min-icon.icon-facebook
%a.blank{ href: configus.social_networks_pages.google_plus }
.min-icon.icon-google
%a.blank{ href: rss_content_index_path }
.min-icon.icon-rss
.contacts.row
.small-6.columns.email
%a.mail{ href: "#" }
Expand Down
2 changes: 2 additions & 0 deletions app/views/web/admin/categories/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
- model_class = Category
- current_title = page_title(action, model_class.model_name.human)
- title current_title, :admin
.page-header
%h1=t model_class.model_name.human
.row
Expand Down
1 change: 1 addition & 0 deletions lib/yaml/russian_cases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ cases:
'документ': документы
'обратная связь': обратную связь
'комментарий': комментарий
'категория': категорию
13 changes: 11 additions & 2 deletions test/controllers/web/admin/unviewed_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@ class Web::Admin::UnviewedControllerTest < ActionController::TestCase
admin = create :admin
sign_in admin
@member = create :member
@types = [ :user, :member, :questionary, :news, :article, :event, :feedback, :comment ]
@instances = {}
@types.each do |type|
@instances[type] = create type
@instances[type].state = :unviewed
@instances[type].save
end
end

test 'should get index' do
get :index
assert_response :success, @response.body
@types.each do |type|
get :index
assert_response :success, @response.body
end
end
end
6 changes: 3 additions & 3 deletions test/factories/feedbacks.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FactoryGirl.define do
factory :feedback do
user_id 1
url "MyText"
text "MyText"
user_id { User.last ? User.last.id : 1 }
url { generate :url }
text { generate :string }
end
end

0 comments on commit 15dc7a6

Please sign in to comment.