tusur_header 0.2.11 → 0.2.12

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: 4b8eb82e3fb0d465519d5f5922acc3639af75056
4
- data.tar.gz: 88ab369cca7a95d994ad3af2669647c481032f2e
3
+ metadata.gz: 5af34bb4965438c94cc96bbfb6d371b4f93c5f06
4
+ data.tar.gz: 276d3b0ad6646df97e2720c673b24c27cb8f8b4c
5
5
  SHA512:
6
- metadata.gz: c339401053cf572ba55e6ed9d093133cf2d919de207b84c4c3d8680238cf1c5aec6305a3f2286b3c98efdb3fcfcf602225ea2c00956ac0f213f690f77aae8079
7
- data.tar.gz: d4824a9b47b8ab856554553b0e90a71c7b00c4c6ebef18611ed8b066efc13f03cb8fb21839c31bd90aed52e055f032bb9d309bb8c30d26724f6aed0c35d33dfd
6
+ metadata.gz: 7d370be982361995bcfae9fe673f0364e1d1825bdd1616ef323ca9fcb51e994fcebc366d91d688bf1ab1c66d2660e043baeb3ad8dae03043bb6c4f392f66c82a
7
+ data.tar.gz: e84fdc49c481ba90b99556e10b7ac44b2440ff6a9aaea8e14fc0aa1e82003247426916552ed18b122d4f38c976393780ef3f87c11c29e85e0e86fc93443b01e0
@@ -0,0 +1,5 @@
1
+ en:
2
+ menu_links:
3
+ profile: 'Profile TUSUR'
4
+ edit_profile: 'Edit profile'
5
+ sign_out: 'Sign out'
@@ -7,3 +7,8 @@ ru:
7
7
  gpo: Групповое проектное обучение
8
8
  timetable: Расписание занятий
9
9
  work_program: Генератор рабочих программ
10
+
11
+ menu_links:
12
+ profile: 'Кабинет ТУСУР'
13
+ edit_profile: 'Редактировать профиль'
14
+ sign_out: 'Выход'
@@ -58,7 +58,7 @@ module TusurHeader
58
58
  end
59
59
 
60
60
  def edit_user_url
61
- edit_user_link + '/users/edit'
61
+ I18n.locale != :ru ? %(#{edit_user_link}/#{I18n.locale}/users/edit) : %(#{edit_user_link}/users/edit)
62
62
  end
63
63
 
64
64
  def sign_out_link
@@ -66,7 +66,7 @@ module TusurHeader
66
66
  end
67
67
 
68
68
  def sign_out_url
69
- "#{sign_out_link}/users/sign_out?redirect_url=#{Settings['app.url']}"
69
+ "#{sign_out_link}/#{I18n.locale}/users/sign_out?redirect_url=#{Settings['app.url']}"
70
70
  end
71
71
 
72
72
  def links_from_system_infos(key)
@@ -89,7 +89,7 @@ module TusurHeader
89
89
  end
90
90
 
91
91
  urls = []
92
- urls << { title: 'Кабинет ТУСУР', url: "#{profile_url}/" }
92
+ urls << { title: I18n.t('menu_links.profile'), url: "#{profile_url}/#{I18n.locale}/dashboard" }
93
93
  if links_from_system_infos('url').any?
94
94
  links_from_system_infos('url').reject{ |elem| elem['link'].blank? }.each do |elem|
95
95
  urls << { title: elem['title'], url: elem['link'] }
@@ -100,8 +100,8 @@ module TusurHeader
100
100
  urls << { separator: true }
101
101
 
102
102
  array = my_urls + urls
103
- array << { title: 'Редактировать профиль', url: edit_user_url }
104
- array << { title: 'Выход', url: sign_out_url, options: { method: :delete } }
103
+ array << { title: I18n.t('menu_links.edit_profile'), url: edit_user_url }
104
+ array << { title: I18n.t('menu_links.sign_out'), url: sign_out_url, options: { method: :delete } }
105
105
 
106
106
  array
107
107
 
@@ -1,3 +1,3 @@
1
1
  module TusurHeader
2
- VERSION = '0.2.11'
2
+ VERSION = '0.2.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tusur_header
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Lapin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-06 00:00:00.000000000 Z
11
+ date: 2018-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -99,6 +99,7 @@ files:
99
99
  - README.rdoc
100
100
  - Rakefile
101
101
  - app/views/tusur_header/_tusur_header.html.erb
102
+ - config/locales/en.yml
102
103
  - config/locales/ru.yml
103
104
  - config/sites.yml
104
105
  - lib/generators/tusur_header/error_pages_generator.rb