Skip to content

Commit

Permalink
Merge branch 'release/0.5.4_patch.2'
Browse files Browse the repository at this point in the history
* release/0.5.4_patch.2:
  #FIX bug
  #367 some updates
  • Loading branch information
kalashnikovisme committed Dec 23, 2015
2 parents c5dcd5b + 5850455 commit 9c6bf0d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
6 changes: 5 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module ApplicationHelper
include ActionView::Helpers
include DatesHelper

def title(page_title = t('.title'), area = :default)
def title(page_title = default_title, area = :default)
if area != :default
title_text = "#{page_title} | #{t(area)} | #{t('application.name')}"
elsif page_title == :app_name
Expand All @@ -14,6 +14,10 @@ def title(page_title = t('.title'), area = :default)
content_for(:title) { title_text }
end

def default_title
t('.title')
end

def menu_item(name = nil, path = '#', *args, &block)
path = name || path if block_given?
options = args.extract_options!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- vote ||= false
.confessions_of_the_year{ id: "confession_#{year}" }
.year_text
= year
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
= render 'web/admin/default/index', items: @confessions
= render 'web/admin/default/index', items: @confessions, default_page_title: default_title
6 changes: 4 additions & 2 deletions app/views/web/admin/default/_index.html.haml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
- tabs = items.keys.except(:search)
- title model_class.model_name.human.pluralize(:ru), :admin
- default_page_title ||= nil
- current_title = default_page_title || model_class.model_name.human.pluralize(:ru)
- title current_title, :admin
.page-header
.row
.col-md-6
%h1
= t model_class.model_name.human.pluralize(:ru)
= current_title
= link_to "#{t 'helpers.links.new'}", send("new_admin_#{to_path(model_class)}_path"), class: 'btn btn-primary'
- if searchable_model?(model_class)
.col-md-6
Expand Down
5 changes: 5 additions & 0 deletions config/locales/ru/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ ru:
add_venue: Добавить место
registrations: Участники
add_registration: Добавить участника
activity_lines:
corporative:
confessions:
index:
title: Премия «Признание»
layouts:
web:
admin:
Expand Down
10 changes: 0 additions & 10 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,6 @@
t.datetime "updated_at", null: false
end

create_table "content_videos", force: :cascade do |t|
t.text "title"
t.text "description"
t.integer "author_id"
t.text "link"
t.text "state"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "documents", force: :cascade do |t|
t.text "file"
t.text "title"
Expand Down

0 comments on commit 9c6bf0d

Please sign in to comment.