tkh_admin_panel 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.3.2
6
+
7
+ * Refactored tab admin context navigation of site settings section
8
+ * Lots of work on translations
9
+
10
+
5
11
  ## 0.3.1
6
12
 
7
13
  * Added context tab menu in site settings section
@@ -1,5 +1,5 @@
1
1
  class AdminMailer < ActionMailer::Base
2
- default from: "Exception Notifier <deploy@ohlalaweb.com>"
2
+ default from: "Exception Notifier <deploy@ohlalaweb.pragmaticyoga.org>"
3
3
 
4
4
  def rescued_exceptions(exception, message)
5
5
  @exception, @message = exception, message
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="<%= I18n.locale.to_s || 'en' %>">
2
+ <html lang="<%= I18n.locale.to_s %>">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -27,11 +27,11 @@
27
27
  <div class="container">
28
28
  <ul class="nav">
29
29
  <%= content_tag :li, link_to(Setting.first.try(:site_name), root_path) %>
30
- <%= content_tag :li, link_to('blog', blog_path) %>
30
+ <%= content_tag :li, link_to(t('blog'), blog_path) %>
31
31
  <li class='dropdown'>
32
32
  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= current_user.email %> <b class="caret"></b></a>
33
33
  <ul class="dropdown-menu">
34
- <%= content_tag :li, link_to('logout', logout_path) %>
34
+ <%= content_tag :li, link_to(t('logout'), logout_path) %>
35
35
  </ul>
36
36
  </li>
37
37
  </ul>
@@ -1,15 +1,4 @@
1
- <ul class="nav nav-tabs" id="admin-menu-tab">
2
-
3
- <% if controller.action_name.to_s == 'show' %>
4
- <%= content_tag :li, link_to(t('view'), Setting.first), class: 'active' %>
5
- <% else %>
6
- <%= content_tag :li, link_to(t('view'), Setting.first) %>
7
- <% end -%>
8
-
9
- <% if controller.action_name.to_s == 'edit' %>
10
- <%= content_tag :li, link_to(t('edit'), Setting.first), class: 'active' %>
11
- <% else %>
12
- <%= content_tag :li, link_to(t('edit'), edit_setting_path(Setting.first)) %>
13
- <% end -%>
14
-
1
+ <ul class="nav nav-tabs" id="admin-menu-tab">
2
+ <%= content_tag :li, link_to(t('view'), Setting.first), ({ class: 'active' } if controller.action_name.to_s == 'show' ) %>
3
+ <%= content_tag :li, link_to(t('edit'), edit_setting_path(Setting.first)), ({ class: 'active' } if controller.action_name.to_s == 'edit') %>
15
4
  </ul>
@@ -7,13 +7,13 @@
7
7
 
8
8
  <div class="form-inputs">
9
9
  <%= f.input :company_name %><br />
10
- <%= f.input :contact_email, hint: 'this is used to get the messages from the contact form and for other things as well.' %><br />
11
- <%= f.input :site_name, hint: 'this is often the same as the company name' %><br />
12
- <%= f.input :site_tagline, hint: 'a small descriptive sentence' %><br />
10
+ <%= f.input :contact_email, hint: t('settings.hint.contact_email') %><br />
11
+ <%= f.input :site_name, hint: t('settings.hint.site_name') %><br />
12
+ <%= f.input :site_tagline, hint: t('settings.hint.site_tagline') %><br />
13
13
  <%= f.input :enable_comments_in_pages, as: :boolean, inline_label: true, label: false %><br />
14
- <%= f.input :disable_blog, as: :boolean, inline_label: true, label: false, hint: 'should be checked if you do NOT want a blog' %><br />
14
+ <%= f.input :disable_blog, as: :boolean, inline_label: true, label: false, hint: t('settings.hint.disable_blog') %><br />
15
15
  <%= f.input :blog_name %><br />
16
- <%= f.input :blog_tagline, hint: 'a small descriptive sentence' %><br />
16
+ <%= f.input :blog_tagline, hint: t('settings.hint.blog_tagline') %><br />
17
17
  <%= f.input :enable_comments_in_blog, as: :boolean, inline_label: true, label: false %>
18
18
  </div>
19
19
 
@@ -3,15 +3,15 @@
3
3
  <%= render 'tab_admin_menu' %>
4
4
 
5
5
  <p>
6
- <strong><%= t('activerecord.attributes.settings.company_name') + t('colon') %></strong> <%= @setting.company_name %><br />
7
- <strong><%= t('activerecord.attributes.settings.contact_email') + t('colon') %></strong> <%= @setting.contact_email %><br />
8
- <strong><%= t('activerecord.attributes.settings.site_name') + t('colon') %></strong> <%= @setting.site_name %><br />
9
- <strong><%= t('activerecord.attributes.settings.site_tagline') + t('colon') %></strong> <%= @setting.site_tagline %><br />
10
- <strong><%= t('activerecord.attributes.settings.enable_comments_in_pages') + t('questionmark') %></strong> <%= @setting.enable_comments_in_pages? ? "<span class=\"label label-success\">✓</span>".html_safe : "<span class=\"label label-important\">X</span>".html_safe %><br />
11
- <strong><%= t('settings.blog_enabled') %></strong> <%= @setting.disable_blog? ? "<span class=\"label label-important\">X</span>".html_safe : "<span class=\"label label-success\">✓</span>".html_safe %><br />
12
- <strong><%= t('activerecord.attributes.settings.blog_name') + t('colon') %></strong> <%= @setting.blog_name %><br />
13
- <strong><%= t('activerecord.attributes.settings.blog_tagline') + t('colon') %></strong> <%= @setting.blog_tagline %><br />
14
- <strong><%= t('activerecord.attributes.settings.enable_comments_in_blog') + t('questionmark') %></strong> <%= @setting.enable_comments_in_blog? ? "<span class=\"label label-success\">✓</span>".html_safe : "<span class=\"label label-important\">X</span>".html_safe %>
6
+ <strong><%= t('activerecord.attributes.setting.company_name') + t('colon') %></strong> <%= @setting.company_name %><br />
7
+ <strong><%= t('activerecord.attributes.setting.contact_email') + t('colon') %></strong> <%= @setting.contact_email %><br />
8
+ <strong><%= t('activerecord.attributes.setting.site_name') + t('colon') %></strong> <%= @setting.site_name %><br />
9
+ <strong><%= t('activerecord.attributes.setting.site_tagline') + t('colon') %></strong> <%= @setting.site_tagline %><br />
10
+ <strong><%= t('question_mark_inverted') + t('activerecord.attributes.setting.enable_comments_in_pages') + t('question_mark') %></strong> <%= @setting.enable_comments_in_pages? ? "<span class=\"label label-success\">✓</span>".html_safe : "<span class=\"label label-important\">X</span>".html_safe %><br />
11
+ <strong><%= t('question_mark_inverted') + t('settings.blog_enabled') %></strong> <%= @setting.disable_blog? ? "<span class=\"label label-important\">X</span>".html_safe : "<span class=\"label label-success\">✓</span>".html_safe %><br />
12
+ <strong><%= t('activerecord.attributes.setting.blog_name') + t('colon') %></strong> <%= @setting.blog_name %><br />
13
+ <strong><%= t('activerecord.attributes.setting.blog_tagline') + t('colon') %></strong> <%= @setting.blog_tagline %><br />
14
+ <strong><%= t('question_mark_inverted') + t('activerecord.attributes.setting.enable_comments_in_blog') + t('question_mark') %></strong> <%= @setting.enable_comments_in_blog? ? "<span class=\"label label-success\">✓</span>".html_safe : "<span class=\"label label-important\">X</span>".html_safe %>
15
15
  </p>
16
16
 
17
17
  <%= link_to t('edit'), edit_setting_path(@setting), class: 'btn btn-primary' %>
@@ -5,5 +5,5 @@
5
5
  <li>other links go here</li>
6
6
  </ul>
7
7
 
8
- <p>To override this, run "rake tkh_admin_panel:setup" and customize the new partial to your liking.</p>
8
+ <p>Make your own if don't use the tkh_cms gem which has a fully populated, and localized, example</p>
9
9
  <% end %>
@@ -7,7 +7,7 @@ de:
7
7
  settings: 'site settings'
8
8
 
9
9
  attributes:
10
- settings:
10
+ setting:
11
11
  site_name: 'site name'
12
12
  site_tagline: 'site tagline'
13
13
  enable_comments_in_pages: 'enable comments in pages'
@@ -20,11 +20,13 @@ de:
20
20
 
21
21
  settings:
22
22
  blog_enabled: 'blog enabled?'
23
+ hint:
24
+ contact_email: 'this is used to get the messages from the contact form and for other things as well.'
25
+ site_name: 'this is often the same as the company name'
26
+ site_tagline: 'a small descriptive sentence'
27
+ disable_blog: 'should be checked if you do NOT want a blog'
28
+ blog_tagline: 'a small descriptive sentence'
23
29
 
24
30
  update:
25
31
  notice: 'Site Settings were successfully updated.'
26
32
  warning: 'There was a problem saving your changes.'
27
-
28
- colon: ':'
29
- questionmark: '?'
30
- view: 'view'
@@ -7,7 +7,7 @@ en:
7
7
  settings: 'site settings'
8
8
 
9
9
  attributes:
10
- settings:
10
+ setting:
11
11
  site_name: 'site name'
12
12
  site_tagline: 'site tagline'
13
13
  enable_comments_in_pages: 'enable comments in pages'
@@ -20,11 +20,13 @@ en:
20
20
 
21
21
  settings:
22
22
  blog_enabled: 'blog enabled?'
23
+ hint:
24
+ contact_email: 'this is used to get the messages from the contact form and for other things as well.'
25
+ site_name: 'this is often the same as the company name'
26
+ site_tagline: 'a small descriptive sentence'
27
+ disable_blog: 'should be checked if you do NOT want a blog'
28
+ blog_tagline: 'a small descriptive sentence'
23
29
 
24
30
  update:
25
31
  notice: 'Site Settings were successfully updated.'
26
32
  warning: 'There was a problem saving your changes.'
27
-
28
- colon: ':'
29
- questionmark: '?'
30
- view: 'view'
@@ -7,7 +7,7 @@ es:
7
7
  settings: 'configuración del sitio'
8
8
 
9
9
  attributes:
10
- settings:
10
+ setting:
11
11
  site_name: 'nombre del sitio'
12
12
  site_tagline: 'lema sitio'
13
13
  enable_comments_in_pages: 'habilitar los comentarios en las páginas'
@@ -20,13 +20,13 @@ es:
20
20
 
21
21
  settings:
22
22
  blog_enabled: '¿blogs habilitado?'
23
+ hint:
24
+ contact_email: 'this is used to get the messages from the contact form and for other things as well.'
25
+ site_name: 'this is often the same as the company name'
26
+ site_tagline: 'a small descriptive sentence'
27
+ disable_blog: 'should be checked if you do NOT want a blog'
28
+ blog_tagline: 'a small descriptive sentence'
23
29
 
24
30
  update:
25
31
  notice: 'Configuración del sitio se han actualizado con éxito.'
26
32
  warning: 'Hubo un problema al guardar los cambios.'
27
-
28
- colon: ':'
29
- questionmark: '?'
30
- view: 'ver'
31
-
32
-
@@ -7,7 +7,7 @@ fr:
7
7
  settings: 'options du site'
8
8
 
9
9
  attributes:
10
- settings:
10
+ setting:
11
11
  site_name: 'nom du site'
12
12
  site_tagline: 'slogan du site'
13
13
  enable_comments_in_pages: 'commentaires dans les pages'
@@ -20,12 +20,13 @@ fr:
20
20
 
21
21
  settings:
22
22
  blog_enabled: 'activer le blog ?'
23
+ hint:
24
+ contact_email: 'nous utilisons celle-ci pour les messages envoyés depuis le formulaire de contact'
25
+ site_name: "c'est souvent le même que la raison sociale. Pas toujours"
26
+ site_tagline: 'une phrase courte et bien pensée'
27
+ disable_blog: 'cochez si vous ne voulez PAS un blog'
28
+ blog_tagline: 'une phrase courte et bien pensée'
23
29
 
24
30
  update:
25
31
  notice: 'Succes: les options du site ont été mises à jour.'
26
32
  warning: "Il y'a eu un problem et vos modifications n'ont pas été sauvegardées."
27
-
28
- colon: ' :'
29
- questionmark: ' ?'
30
- view: 'voir'
31
-
@@ -0,0 +1,32 @@
1
+ it:
2
+ admin_panel: 'Admin Panel'
3
+ admin_panel_for: "Admin Panel for "
4
+
5
+ activerecord:
6
+ models:
7
+ settings: 'site settings'
8
+
9
+ attributes:
10
+ setting:
11
+ site_name: 'site name'
12
+ site_tagline: 'site tagline'
13
+ enable_comments_in_pages: 'enable comments in pages'
14
+ disable_blog: 'disable blog'
15
+ blog_name: 'blog name'
16
+ blog_tagline: 'blog tagline'
17
+ enable_comments_in_blog: 'enable comments in blog'
18
+ contact_email: 'contact email'
19
+ company_name: 'company name'
20
+
21
+ settings:
22
+ blog_enabled: 'blog enabled?'
23
+ hint:
24
+ contact_email: 'this is used to get the messages from the contact form and for other things as well.'
25
+ site_name: 'this is often the same as the company name'
26
+ site_tagline: 'a small descriptive sentence'
27
+ disable_blog: 'should be checked if you do NOT want a blog'
28
+ blog_tagline: 'a small descriptive sentence'
29
+
30
+ update:
31
+ notice: 'Site Settings were successfully updated.'
32
+ warning: 'There was a problem saving your changes.'
@@ -1,3 +1,3 @@
1
1
  module TkhAdminPanel
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
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.3.1
4
+ version: 0.3.2
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: 2013-01-28 00:00:00.000000000 Z
12
+ date: 2013-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -97,6 +97,7 @@ files:
97
97
  - lib/generators/tkh_admin_panel/create_or_update_locales/templates/en.yml
98
98
  - lib/generators/tkh_admin_panel/create_or_update_locales/templates/es.yml
99
99
  - lib/generators/tkh_admin_panel/create_or_update_locales/templates/fr.yml
100
+ - lib/generators/tkh_admin_panel/create_or_update_locales/templates/it.yml
100
101
  - lib/generators/tkh_admin_panel/create_or_update_migrations/create_or_update_migrations_generator.rb
101
102
  - lib/generators/tkh_admin_panel/create_or_update_migrations/templates/add_contact_email_to_settings.rb
102
103
  - lib/generators/tkh_admin_panel/create_or_update_migrations/templates/create_settings.rb