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 +6 -0
- data/app/mailers/admin_mailer.rb +1 -1
- data/app/views/layouts/admin.html.erb +3 -3
- data/app/views/settings/_tab_admin_menu.html.erb +3 -14
- data/app/views/settings/edit.html.erb +5 -5
- data/app/views/settings/show.html.erb +9 -9
- data/app/views/shared/_admin_sidebar.html.erb +1 -1
- data/lib/generators/tkh_admin_panel/create_or_update_locales/templates/de.yml +7 -5
- data/lib/generators/tkh_admin_panel/create_or_update_locales/templates/en.yml +7 -5
- data/lib/generators/tkh_admin_panel/create_or_update_locales/templates/es.yml +7 -7
- data/lib/generators/tkh_admin_panel/create_or_update_locales/templates/fr.yml +7 -6
- data/lib/generators/tkh_admin_panel/create_or_update_locales/templates/it.yml +32 -0
- data/lib/tkh_admin_panel/version.rb +1 -1
- metadata +3 -2
data/CHANGELOG.md
CHANGED
data/app/mailers/admin_mailer.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
|
-
<html lang="<%= I18n.locale.to_s
|
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
|
-
|
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: '
|
11
|
-
<%= f.input :site_name, hint: '
|
12
|
-
<%= f.input :site_tagline, hint: '
|
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: '
|
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: '
|
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.
|
7
|
-
<strong><%= t('activerecord.attributes.
|
8
|
-
<strong><%= t('activerecord.attributes.
|
9
|
-
<strong><%= t('activerecord.attributes.
|
10
|
-
<strong><%= t('activerecord.attributes.
|
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.
|
13
|
-
<strong><%= t('activerecord.attributes.
|
14
|
-
<strong><%= t('activerecord.attributes.
|
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' %>
|
@@ -7,7 +7,7 @@ de:
|
|
7
7
|
settings: 'site settings'
|
8
8
|
|
9
9
|
attributes:
|
10
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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.'
|
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.
|
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-
|
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
|