tkh_admin_panel 0.0.5 → 0.0.6
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 +9 -0
- data/README.md +11 -1
- data/app/assets/stylesheets/admin.css.scss +5 -0
- data/app/views/layouts/admin.html.erb +1 -0
- data/app/views/shared/_admin_sidebar.html.erb +8 -0
- data/app/views/shared/_language_switcher.html.erb +1 -1
- data/lib/generators/tkh_admin_panel/full_install/full_install_generator.rb +17 -0
- data/lib/generators/tkh_admin_panel/full_install/templates/_admin_sidebar.html.erb +7 -0
- data/lib/generators/tkh_admin_panel/install/install_generator.rb +17 -0
- data/lib/generators/tkh_admin_panel/install/templates/_admin_sidebar.html.erb +6 -0
- data/lib/tkh_admin_panel/version.rb +1 -1
- metadata +7 -2
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# TKH Admin Panel
|
2
2
|
|
3
3
|
|
4
|
+
|
5
|
+
## 0.0.6
|
6
|
+
|
7
|
+
* Removed _admin_sidebar.html.erb dependency by having a placeholder template in this gem
|
8
|
+
* Create installer to create an admin_sidebar template in host app
|
9
|
+
* Included login_info partial to the layout
|
10
|
+
* Polished language switcher to not show link of current language
|
11
|
+
|
12
|
+
|
4
13
|
## 0.0.5
|
5
14
|
|
6
15
|
* Added language switcher
|
data/README.md
CHANGED
@@ -16,11 +16,21 @@ And then execute:
|
|
16
16
|
|
17
17
|
$ bundle
|
18
18
|
|
19
|
-
|
19
|
+
Install the admin_sidebar partial
|
20
|
+
|
21
|
+
$ rails g tkh_admin_panel:install
|
22
|
+
|
23
|
+
And then of course start or restart your server!
|
20
24
|
|
21
25
|
$ rails s
|
22
26
|
|
23
27
|
|
28
|
+
|
29
|
+
## Pre-requisite
|
30
|
+
|
31
|
+
You need an authentication system with the current_user helper method
|
32
|
+
|
33
|
+
|
24
34
|
## Usage
|
25
35
|
|
26
36
|
In your controller(s):
|
@@ -23,6 +23,7 @@
|
|
23
23
|
<div class="container-fluid">
|
24
24
|
<div class="row-fluid">
|
25
25
|
<div class="span12">
|
26
|
+
<%= render 'shared/login_info' %>
|
26
27
|
<h1>Admin Panel<%= " for #{SETTINGS['site_name']}" if defined?(SETTINGS) && SETTINGS['site_name'] %></h1>
|
27
28
|
|
28
29
|
<% flash.each do |name, msg| %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</a>
|
13
13
|
<ul class="dropdown-menu">
|
14
14
|
<% for loc in I18n.available_locales %>
|
15
|
-
<%= link_to full_language_name(loc), :locale => loc %>
|
15
|
+
<%= link_to full_language_name(loc), :locale => loc unless loc.to_s == I18n.locale.to_s %>
|
16
16
|
<% end %>
|
17
17
|
</ul>
|
18
18
|
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rails/generators/migration'
|
2
|
+
|
3
|
+
module TkhAdminPanel
|
4
|
+
module Generators
|
5
|
+
class FullInstallGenerator < ::Rails::Generators::Base
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
desc "add a fully populated 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
|
@@ -0,0 +1,17 @@
|
|
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
|
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.6
|
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-07-
|
12
|
+
date: 2012-07-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -78,7 +78,12 @@ files:
|
|
78
78
|
- app/assets/stylesheets/admin.css.scss
|
79
79
|
- app/assets/stylesheets/bootstrap_and_overrides.css.scss
|
80
80
|
- app/views/layouts/admin.html.erb
|
81
|
+
- app/views/shared/_admin_sidebar.html.erb
|
81
82
|
- app/views/shared/_language_switcher.html.erb
|
83
|
+
- lib/generators/tkh_admin_panel/full_install/full_install_generator.rb
|
84
|
+
- lib/generators/tkh_admin_panel/full_install/templates/_admin_sidebar.html.erb
|
85
|
+
- lib/generators/tkh_admin_panel/install/install_generator.rb
|
86
|
+
- lib/generators/tkh_admin_panel/install/templates/_admin_sidebar.html.erb
|
82
87
|
- lib/tkh_admin_panel.rb
|
83
88
|
- lib/tkh_admin_panel/version.rb
|
84
89
|
- public/.DS_Store
|