bhf 0.7.3 → 0.7.4

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: 4d8936098b54f85786ebe73f7845dbbf32599f91
4
- data.tar.gz: a832898bc53668d2ef8436935216d718922c8599
3
+ metadata.gz: 5e0475a112da2bc9c100d4cc1b0a1f9b527fdf0c
4
+ data.tar.gz: 21ca51559e2e6ac049cd724cb9cfc62a63ca4f8c
5
5
  SHA512:
6
- metadata.gz: 438ca47d909e1eadaa7d04db9cf69fac50791fbda2c04f0a136545772899704b532c5d9e353637c27e3b69f201c1913c71b75125aac49413164459a4e45c4fbb
7
- data.tar.gz: 38f24801dddb881ab71c14d8e4f5630675e645f3917ead4e3f0cb27f64578bf541f50d985da4fbee66a280f8057ec6e63d75171112d2ec72ce088469297b943e
6
+ metadata.gz: 26b56084f35c1bfae5d652327605e68d7e510e437d6579023a47a4d496e4f879cf177fc37ea7dfe50a09373b17a7458181b9d3eb10827774997b18a89d8e755c
7
+ data.tar.gz: 13d9ae98339dbe368d419457da568c45fcb549b5bb269ca96513410618f90c59da224d9b69d567b77de42b2921d7f17d2feb02ba04ce414744a9b97e34544f53
@@ -40,14 +40,14 @@ class Bhf::ApplicationController < ActionController::Base
40
40
  if current_account.respond_to?(:area_role)
41
41
  return current_account.area_role(area)
42
42
  elsif current_account.respond_to?(:area_roles)
43
- return current_account.area_roles(area).collect(&:to_bhf_s)
43
+ return current_account.area_roles(area).collect(&:identifier)
44
44
  end
45
45
  end
46
46
 
47
47
  if current_account.respond_to?(:role)
48
- current_account.role.is_a?(String) ? current_account.role : current_account.role.to_bhf_s
48
+ current_account.role.is_a?(String) ? current_account.role : current_account.role.identifier
49
49
  elsif current_account.respond_to?(:roles)
50
- current_account.roles.collect(&:to_bhf_s)
50
+ current_account.roles.collect(&:identifier)
51
51
  end
52
52
  end
53
53
 
@@ -80,11 +80,13 @@ class Bhf::ApplicationController < ActionController::Base
80
80
  @areas = []
81
81
  if current_account and current_account.respond_to?(:bhf_areas)
82
82
  current_account.bhf_areas.each do |area|
83
+ selected = params[:bhf_area] == area.identifier
83
84
  @areas << OpenStruct.new(
84
- name: t("bhf.areas.links.#{area.to_bhf_s}", default: area.to_bhf_s),
85
- selected: params[:bhf_area] == area.to_bhf_s,
86
- path: main_app.bhf_path(area.to_bhf_s)
85
+ name: area.to_bhf_s,
86
+ selected: selected,
87
+ path: main_app.bhf_path(area.identifier)
87
88
  )
89
+ @root_link = area.link if selected
88
90
  end
89
91
  end
90
92
  end
@@ -15,7 +15,7 @@
15
15
  - else
16
16
  - Rails.application.assets.find_asset('logo_bhf.png') ? 'logo_bhf.png' : 'logo_bhf.svg'
17
17
 
18
- = link_to image_tag(logo), main_app.root_url, :'data-no-turbolink' => true
18
+ = link_to image_tag(logo), @root_link ? @root_link : main_app.root_url, :'data-no-turbolink' => true
19
19
 
20
20
  - if @areas and @areas.length > 1
21
21
  = select_tag :area_select, options_from_collection_for_select(@areas, 'path', 'name', main_app.bhf_path(params[:bhf_area])), class: 'icon'
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.3
4
+ version: 0.7.4
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-05-15 00:00:00.000000000 Z
11
+ date: 2014-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails