Skip to content

Commit

Permalink
Merge branch 'release/0.3.10'
Browse files Browse the repository at this point in the history
* release/0.3.10:
  some updates in admin
  some fixes
  fix tests
  #229 fix changelog
  Fix auth via VK
  fix navbar categories
  • Loading branch information
kalashnikovisme committed Aug 2, 2015
2 parents df4dfc1 + b175912 commit eec5d6e
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
1 change: 1 addition & 0 deletions app/assets/javascripts/web/admin/application.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ $ ->
$('input[type=hidden]').addClass('form-control')
$('input[type=text]').addClass('form-control')
$('input[type=submit]').addClass('btn')
$('textarea').addClass('form-control')

init_select2_inputs = ->
$('select.select2').each ->
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/web/admin/application.sass
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ table
a
span
top: 0
textarea
height: 100px
&:focus
height: 300px
2 changes: 1 addition & 1 deletion app/assets/stylesheets/web/foundation/main_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
display: block !important;
z-index: 5;
top: -10px;
width: 270px;
width: 515px;
background: $topbar-bg-color;
padding: 0 rem-calc(30) rem-calc(30);
.menu-title {
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/web/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def load_categories_tree
end
@feedback = FeedbackForm.new_with_model
@rss_article_id = 19
@month_article = Article.find 21
@month_article = Article.where(id: 21).first
end

def notification_count
Expand Down
2 changes: 1 addition & 1 deletion app/views/web/admin/news/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- if current_user.role.author?
= f.input :state, as: :hidden, input_html: { value: :unviewed }
- elsif !@news_form.model.main?
= f.input :state, as: :hidden, input_html: { value: :confirmed }
= f.input :state_event, as: :state_event
= f.association :attachments
= f.button :submit, class: 'btn-success', value: t('helpers.links.save')

Expand Down
3 changes: 3 additions & 0 deletions config/initializers/github.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Github.configure do |config|
config.auto_pagination = true
end
7 changes: 7 additions & 0 deletions config/locales/ru/models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ ru:
photo: Фотография
tags: Тэги
state: Статус
state_event: Статус
attachments: Приложения
views: Просмотры
article:
Expand Down Expand Up @@ -147,6 +148,12 @@ ru:
declined: Отклонённый
removed: Удалённый
unavailable: Недоступный
news:
state:
events:
confirm: Подтвердить
remove: Удалить
to_main: Сделать главной новостью
state_machines:
user:
state:
Expand Down
4 changes: 2 additions & 2 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# Create month article
month_article_id = 21
about_site_category = Category.find_by_name 'Сайт МИЦ'
article = Article.where id: month_article_id
article = Article.create title: 'Статья месяца', category_id: about_site_category.id, user_id: 1 unless article.any?
article = Article.where(id: month_article_id).first
article ||= Article.create title: 'Статья месяца', category_id: about_site_category.id, user_id: 1
Article.update article.id, id: month_article_id
11 changes: 0 additions & 11 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,4 @@ def load_fixture(filename)
template = ERB.new(File.read(File.dirname(__FILE__) + "/fixtures/#{filename}"), nil, "%")
template.result
end

Category.create name: 'Контакты'
Category.first.articles.build(title: 'Контакты', user_id: 1).save

month_article_id = 21
a = Article.find month_article_id
unless a
a = Article.create title: 'Статья месяца'
a.id = month_article_id
a.save
end
end

0 comments on commit eec5d6e

Please sign in to comment.