bhf 0.7.0.rc3 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36b6cbfef7e6bd75713e819daa01085e321f93bf
4
- data.tar.gz: 60e9cda045dca7d4dc80b1479a8564ee380e94fc
3
+ metadata.gz: aeb67ca0285c67ab14c38924a9155bb202501b5b
4
+ data.tar.gz: cdaabaadf3e5efcd91d5a4064e76895fa2db1f64
5
5
  SHA512:
6
- metadata.gz: f1a94e9739d4e96c20111bc5b6176f515b9b59850aa78fe8398f1ecdde3a7a56a5dd4efddd6864116eed3076557ddd6ee84e2b28ce6a3609723932a2725fb568
7
- data.tar.gz: 040cfc96340a581e5d234a2509b0396ac10b3987f6f144894ccbaef430aad9dd95b9149a4132b64f675f50c8f8dc782e758c5ff2832ac86fbf0b2aa6a289bbfb
6
+ metadata.gz: 3881d098482897fd0d275067eff3820e4365516c3563e1cda9215a4e0874d6e6fe40d6ffe91e1cd284acbdd09f0eba66eb98f4b3e85bae11b2a1fe3bbda4ea57
7
+ data.tar.gz: 9ba56eea1635a5655f812ca33c9882a6a888a935aef98303f7bae1602831e8969f74a7e1cfca0841708fd078f016f054eb97339f4bd4bd28c54d9249277a9764
Binary file
Binary file
@@ -57,7 +57,23 @@ class Bhf::ApplicationController < ActionController::Base
57
57
 
58
58
  def set_title
59
59
  @app_title = Rails.application.class.to_s.split('::').first
60
- @title = Bhf::Engine.config.page_title || ("#{@app_title} &ndash; Admin").html_safe
60
+ # TODO: add area i18ned title
61
+ @title = if Bhf::Engine.config.page_title
62
+ Bhf::Engine.config.page_title
63
+ else
64
+ if params[:bhf_area]
65
+ t("bhf.areas.page_title.#{params[:bhf_area]}",
66
+ area: params[:bhf_area],
67
+ title: @app_title,
68
+ default: t('bhf.areas.default_page_title',
69
+ title: @app_title,
70
+ area: t("bhf.areas.links.#{params[:bhf_area]}", default: params[:bhf_area])
71
+ )
72
+ )
73
+ else
74
+ t('bhf.default_page_title', title: @app_title)
75
+ end
76
+ end.html_safe
61
77
  end
62
78
 
63
79
  def set_areas
@@ -10,8 +10,12 @@
10
10
  %header
11
11
 
12
12
  %h1
13
- - logo = Rails.application.assets.find_asset('logo_bhf.png') ? 'logo_bhf.png' : 'logo_bhf.svg'
14
- = link_to image_tag(asset_path(logo)), main_app.root_url, :'data-no-turbolink' => true
13
+ - logo = if params[:bhf_area] && Rails.application.assets.find_asset("logo_#{params[:bhf_area]}_bhf.svg")
14
+ - "logo_#{params[:bhf_area]}_bhf.svg"
15
+ - else
16
+ - Rails.application.assets.find_asset('logo_bhf.png') ? 'logo_bhf.png' : 'logo_bhf.svg'
17
+
18
+ = link_to image_tag(logo), main_app.root_url, :'data-no-turbolink' => true
15
19
 
16
20
  - if @areas and @areas.length > 1
17
21
  = select_tag :area_select, options_from_collection_for_select(@areas, 'path', 'name', main_app.bhf_path(params[:bhf_area])), class: 'icon'
@@ -1,5 +1,8 @@
1
1
  en:
2
2
  bhf:
3
+ default_page_title: "%{title} &ndash; Admin"
4
+ areas:
5
+ default_page_title: "%{area} &ndash; %{title} &ndash; Admin"
3
6
  helpers:
4
7
  boolean:
5
8
  a: yes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bhf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.rc3
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Pawlik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-12 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -228,9 +228,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
228
  version: '0'
229
229
  required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  requirements:
231
- - - ">"
231
+ - - ">="
232
232
  - !ruby/object:Gem::Version
233
- version: 1.3.1
233
+ version: '0'
234
234
  requirements: []
235
235
  rubyforge_project: nowarning
236
236
  rubygems_version: 2.2.1