tkh_admin_panel 0.0.9 → 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.1
6
+
7
+ * Added an update rake task.
8
+ * I18n-ized the title meta tag and H1 header in layout
9
+
10
+
5
11
  ## 0.0.9
6
12
 
7
13
  * Fixed up generation of meta title and h1 title and customize them depending on whether there is a site_name setting.
data/README.md CHANGED
@@ -20,7 +20,22 @@ Install the admin_sidebar partial
20
20
 
21
21
  $ rake tkh_admin_panel:setup
22
22
 
23
- And then of course start or restart your server!
23
+ Start or restart your server!
24
+
25
+ $ rails s
26
+
27
+
28
+ ## Upgrading
29
+
30
+ Update the gem:
31
+
32
+ $ bundle update tkh_admin_panel
33
+
34
+ Update locale files. This is only needed with a new minor version number ( second level from left )
35
+
36
+ $ rake tkh_admin_panel:update
37
+
38
+ Start or restart your server!
24
39
 
25
40
  $ rails s
26
41
 
@@ -3,9 +3,11 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Admin Panel
7
- <% if defined?(SETTINGS) && SETTINGS['site_name'] %>
8
- <%= " for #{link_to(SETTINGS['site_name'], root_path) }".html_safe %>
6
+ <title>
7
+ <% if defined?(APP_SETTINGS) && APP_SETTINGS['site_name'] %>
8
+ <%= t("admin_panel_for") + APP_SETTINGS['site_name'] %>
9
+ <% else %>
10
+ <%= t 'admin_panel' %>
9
11
  <% end %>
10
12
  </title>
11
13
  <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
@@ -28,9 +30,11 @@
28
30
  <div class="row-fluid">
29
31
  <div class="span12">
30
32
  <%= render 'shared/login_info' %>
31
- <h1>Admin Panel
32
- <% if defined?(SETTINGS) && SETTINGS['site_name'] %>
33
- <%= " for #{link_to(SETTINGS['site_name'], root_path) }".html_safe %>
33
+ <h1>
34
+ <% if defined?(APP_SETTINGS) && APP_SETTINGS['site_name'] %>
35
+ <%= (t("admin_panel_for") + link_to(APP_SETTINGS['site_name'], root_path)).html_safe %>
36
+ <% else %>
37
+ <%= t 'admin_panel' %>
34
38
  <% end %>
35
39
  </h1>
36
40
 
@@ -56,9 +60,9 @@
56
60
 
57
61
  <div class="row-fluid">
58
62
  <footer class="span12">
59
- <p><b><%= defined?(SETTINGS) && SETTINGS['web_shop_name'] || "Ten Thousand Hours" %></b><br />
60
- <%= defined?(SETTINGS) && SETTINGS['web_shop_short_url'] && SETTINGS['web_shop_url'] ? link_to(SETTINGS['web_shop_short_url'], SETTINGS['web_shop_url']) : link_to("http://TenThousandHours.eu", 'http://TenThousandHours.eu') %><br />
61
- <%= defined?(SETTINGS) && SETTINGS['web_shop_email'] ? link_to(SETTINGS['web_shop_email'], 'mailto:' + SETTINGS['web_shop_email']) : link_to("swami@TenThousandHours.eu", 'mailto:http://TenThousandHours.eu') %><br /></p>
63
+ <p><b><%= defined?(APP_SETTINGS) && APP_SETTINGS['web_shop_name'] || "Ten Thousand Hours" %></b><br />
64
+ <%= defined?(APP_SETTINGS) && APP_SETTINGS['web_shop_short_url'] && APP_SETTINGS['web_shop_url'] ? link_to(APP_SETTINGS['web_shop_short_url'], APP_SETTINGS['web_shop_url']) : link_to("http://TenThousandHours.eu", 'http://TenThousandHours.eu') %><br />
65
+ <%= defined?(APP_SETTINGS) && APP_SETTINGS['web_shop_email'] ? link_to(APP_SETTINGS['web_shop_email'], 'mailto:' + APP_SETTINGS['web_shop_email']) : link_to("swami@TenThousandHours.eu", 'mailto:http://TenThousandHours.eu') %><br /></p>
62
66
  </footer>
63
67
  </div>
64
68
 
@@ -8,7 +8,7 @@ module TkhAdminPanel
8
8
  def copy_locales
9
9
  puts 'creating locale files'
10
10
  I18n.available_locales.each do |l|
11
- copy_file "#{l.to_s}.yml", "config/locales/tkh_admdn_panel.#{l.to_s}.yml"
11
+ copy_file "#{l.to_s}.yml", "config/locales/tkh_admin_panel.#{l.to_s}.yml"
12
12
  end
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  en:
2
- language_name: English
3
-
2
+ admin_panel: 'Admin Panel'
3
+ admin_panel_for: "Admin Panel for "
@@ -1,3 +1,4 @@
1
1
  es:
2
- language_name: "Español"
2
+ admin_panel: "El panel de administración"
3
+ admin_panel_with_site_name: "El panel de administración: "
3
4
 
@@ -1,3 +1,4 @@
1
1
  fr:
2
- language_name: Français
2
+ admin_panel: "Panneau d'administration"
3
+ admin_panel_for: "Panneau d'administration pour "
3
4
 
@@ -1,7 +1,14 @@
1
1
  namespace :tkh_admin_panel do
2
+
2
3
  desc "Create locale and other files"
3
4
  task :setup do
4
- system 'rails g tkh_admin_panel:copy_files'
5
- # system 'rails g tkh_admin_panel:create_or_update_locales' # there are no translations yet
5
+ system 'rails g tkh_admin_panel:copy_files -f'
6
+ system 'rails g tkh_admin_panel:create_or_update_locales -f'
7
+ end
8
+
9
+ desc "Update locale and other files"
10
+ task :update do
11
+ system 'rails g tkh_admin_panel:copy_files -s'
12
+ system 'rails g tkh_admin_panel:create_or_update_locales -f'
6
13
  end
7
14
  end
@@ -1,3 +1,3 @@
1
1
  module TkhAdminPanel
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_admin_panel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: '0.1'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-04 00:00:00.000000000 Z
12
+ date: 2012-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties