tkh_admin_panel 0.0.7 → 0.0.8
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 +8 -0
- data/LICENSE +1 -1
- data/README.md +1 -2
- data/app/views/layouts/admin.html.erb +1 -1
- data/app/views/shared/_admin_sidebar.html.erb +1 -1
- data/app/views/shared/_language_switcher.html.erb +5 -1
- data/lib/generators/tkh_admin_panel/{full_install/full_install_generator.rb → copy_files/copy_files_generator.rb} +1 -1
- data/lib/generators/tkh_admin_panel/copy_files/templates/_admin_sidebar.html.erb +8 -0
- data/lib/generators/tkh_admin_panel/create_or_update_locales/create_or_update_locales_generator.rb +16 -0
- data/lib/generators/tkh_admin_panel/create_or_update_locales/templates/en.yml +3 -0
- data/lib/generators/tkh_admin_panel/create_or_update_locales/templates/es.yml +3 -0
- data/lib/generators/tkh_admin_panel/create_or_update_locales/templates/fr.yml +3 -0
- data/lib/tasks/tkh_admin_panel_tasks.rake +7 -0
- data/lib/tkh_admin_panel/version.rb +1 -1
- metadata +9 -6
- data/lib/generators/tkh_admin_panel/full_install/templates/_admin_sidebar.html.erb +0 -7
- data/lib/generators/tkh_admin_panel/install/install_generator.rb +0 -17
- data/lib/generators/tkh_admin_panel/install/templates/_admin_sidebar.html.erb +0 -6
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
|
6
|
+
|
7
|
+
## 0.0.8
|
8
|
+
|
9
|
+
* Added a link to public web site in admin panel header
|
10
|
+
* Refactored the setup rake task and generators. Although there are no needed translations now. The generator is ready to accommodate any which would be needed in the future.
|
11
|
+
* There is now a 'rake tkh_admin_panel task
|
12
|
+
|
13
|
+
|
6
14
|
## 0.0.7
|
7
15
|
|
8
16
|
* Added a switch_to_admin_layout controller extended instance method
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -18,14 +18,13 @@ And then execute:
|
|
18
18
|
|
19
19
|
Install the admin_sidebar partial
|
20
20
|
|
21
|
-
$
|
21
|
+
$ rake tkh_admin_panel:setup
|
22
22
|
|
23
23
|
And then of course start or restart your server!
|
24
24
|
|
25
25
|
$ rails s
|
26
26
|
|
27
27
|
|
28
|
-
|
29
28
|
## Pre-requisite
|
30
29
|
|
31
30
|
You need an authentication system with the current_user helper method
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<div class="row-fluid">
|
25
25
|
<div class="span12">
|
26
26
|
<%= render 'shared/login_info' %>
|
27
|
-
<h1>Admin Panel<%= " for #{SETTINGS['site_name']
|
27
|
+
<h1>Admin Panel<%= " for #{link_to(SETTINGS['site_name'], root_path) if defined?(SETTINGS) && SETTINGS['site_name']}".html_safe %></h1>
|
28
28
|
|
29
29
|
<% flash.each do |name, msg| %>
|
30
30
|
<div class="alert alert-<%= name == :notice ? "success" : "error" %>">
|
data/lib/generators/tkh_admin_panel/create_or_update_locales/create_or_update_locales_generator.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rails/generators/migration'
|
2
|
+
|
3
|
+
module TkhAdminPanel
|
4
|
+
module Generators
|
5
|
+
class CreateOrUpdateLocalesGenerator < ::Rails::Generators::Base
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
desc "copying latest version of locale files"
|
8
|
+
def copy_locales
|
9
|
+
puts 'creating locale files'
|
10
|
+
I18n.available_locales.each do |l|
|
11
|
+
copy_file "#{l.to_s}.yml", "config/locales/tkh_admdn_panel.#{l.to_s}.yml"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
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.
|
4
|
+
version: 0.0.8
|
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-
|
12
|
+
date: 2012-08-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -80,10 +80,13 @@ files:
|
|
80
80
|
- app/views/layouts/admin.html.erb
|
81
81
|
- app/views/shared/_admin_sidebar.html.erb
|
82
82
|
- app/views/shared/_language_switcher.html.erb
|
83
|
-
- lib/generators/tkh_admin_panel/
|
84
|
-
- lib/generators/tkh_admin_panel/
|
85
|
-
- lib/generators/tkh_admin_panel/
|
86
|
-
- lib/generators/tkh_admin_panel/
|
83
|
+
- lib/generators/tkh_admin_panel/copy_files/copy_files_generator.rb
|
84
|
+
- lib/generators/tkh_admin_panel/copy_files/templates/_admin_sidebar.html.erb
|
85
|
+
- lib/generators/tkh_admin_panel/create_or_update_locales/create_or_update_locales_generator.rb
|
86
|
+
- lib/generators/tkh_admin_panel/create_or_update_locales/templates/en.yml
|
87
|
+
- lib/generators/tkh_admin_panel/create_or_update_locales/templates/es.yml
|
88
|
+
- lib/generators/tkh_admin_panel/create_or_update_locales/templates/fr.yml
|
89
|
+
- lib/tasks/tkh_admin_panel_tasks.rake
|
87
90
|
- lib/tkh_admin_panel.rb
|
88
91
|
- lib/tkh_admin_panel/tkh_admin_panel_action_controller_extension.rb
|
89
92
|
- lib/tkh_admin_panel/version.rb
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'rails/generators/migration'
|
2
|
-
|
3
|
-
module TkhAdminPanel
|
4
|
-
module Generators
|
5
|
-
class InstallGenerator < ::Rails::Generators::Base
|
6
|
-
|
7
|
-
source_root File.expand_path('../templates', __FILE__)
|
8
|
-
|
9
|
-
desc "add a sample admin_sidebar partial"
|
10
|
-
def copy_view_partial
|
11
|
-
puts 'creating an admin_sidebar partial'
|
12
|
-
copy_file "_admin_sidebar.html.erb", "app/views/shared/_admin_sidebar.html.erb"
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|