json_voorhees 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/json_voorhees/app_make_admin/app_make_admin_generator.rb +6 -1
- data/lib/generators/json_voorhees/app_make_admin/templates/fb_dashboard.rb +69 -0
- data/lib/generators/json_voorhees/setup_app/setup_app_generator.rb +5 -1
- data/lib/json_voorhees/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 603192b4fe8aa21892159a4e72b2aacb9cd9aa8c
|
4
|
+
data.tar.gz: c79b6b8ccf9fc8acc22d0fe42f45e371f5e7822f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ce4c588efd0acde009e6b09984f496571152bb765ea4561706e0ed76062d7a21a90380daae6fbb5ec22839c55d8c203aec1fc6ef1d3e34de4ee1ab4cc394629
|
7
|
+
data.tar.gz: 97697e505ab8e34a4cbbdd50def3420125bdfbcf54c7abce66779396d7f8c8e064da03a1c9525eb58ffff84822103e7367df2769488462f2ff5ab1cd457e92c9
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module JsonVoorhees
|
2
2
|
class AppMakeAdminGenerator < Rails::Generators::Base
|
3
3
|
source_root File.expand_path('../templates', __FILE__)
|
4
|
+
class_option :fbonly, :type => :boolean, :default => false, :description => "Use facebook login?"
|
4
5
|
|
5
6
|
def sprint
|
6
7
|
clone_engine
|
@@ -28,7 +29,11 @@ module JsonVoorhees
|
|
28
29
|
|
29
30
|
def make_dashboard
|
30
31
|
run "rm -f app/admin/dashboard.rb"
|
31
|
-
|
32
|
+
if options.fbonly?
|
33
|
+
copy_file "fb_dashboard.rb", "app/admin/dashboard.rb"
|
34
|
+
else
|
35
|
+
copy_file "dashboard.rb.erb", "app/admin/dashboard.rb"
|
36
|
+
end
|
32
37
|
end
|
33
38
|
|
34
39
|
def make_active_admin
|
@@ -0,0 +1,69 @@
|
|
1
|
+
ActiveAdmin.register_page "Dashboard" do
|
2
|
+
|
3
|
+
menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") }
|
4
|
+
|
5
|
+
content title: proc{ I18n.t("active_admin.dashboard") } do
|
6
|
+
|
7
|
+
columns do
|
8
|
+
|
9
|
+
column do
|
10
|
+
panel "Recent Signups" do
|
11
|
+
table_for ::Fbuser::User.order("created_at desc").limit(30) do
|
12
|
+
column :username do |user|
|
13
|
+
link_to user.username, admin_fbuser_user_path(user)
|
14
|
+
end
|
15
|
+
column :fb_user_id
|
16
|
+
column :created_at
|
17
|
+
end
|
18
|
+
strong { link_to "View All Users", admin_fbuser_users_path }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
=begin
|
28
|
+
columns do
|
29
|
+
column do
|
30
|
+
panel "Recent Signups" do
|
31
|
+
ul do
|
32
|
+
::People::User.recent(30).map do |user|
|
33
|
+
li link_to(user.username, resource_path(user))
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
=end
|
40
|
+
|
41
|
+
=begin
|
42
|
+
|
43
|
+
div class: "blank_slate_container", id: "dashboard_default_message" do
|
44
|
+
span class: "blank_slate" do
|
45
|
+
span I18n.t("active_admin.dashboard_welcome.welcome")
|
46
|
+
small I18n.t("active_admin.dashboard_welcome.call_to_action")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
=end
|
50
|
+
# Here is an example of a simple dashboard with columns and panels.
|
51
|
+
#
|
52
|
+
# columns do
|
53
|
+
# column do
|
54
|
+
# panel "Recent Posts" do
|
55
|
+
# ul do
|
56
|
+
# Post.recent(5).map do |post|
|
57
|
+
# li link_to(post.title, admin_post_path(post))
|
58
|
+
# end
|
59
|
+
# end
|
60
|
+
# end
|
61
|
+
# end
|
62
|
+
|
63
|
+
# column do
|
64
|
+
# panel "Info" do
|
65
|
+
# para "Welcome to ActiveAdmin."
|
66
|
+
# end
|
67
|
+
# end
|
68
|
+
# end
|
69
|
+
# content
|
@@ -54,7 +54,11 @@ module JsonVoorhees
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def make_admin
|
57
|
-
|
57
|
+
if options.fbonly?
|
58
|
+
run "rails g json_voorhees:app_make_admin --fbonly"
|
59
|
+
else
|
60
|
+
run "rails g json_voorhees:app_make_admin"
|
61
|
+
end
|
58
62
|
end
|
59
63
|
|
60
64
|
def make_user
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_voorhees
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cleophus Robinson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- lib/generators/json_voorhees/app_make_admin/app_make_admin_generator.rb
|
68
68
|
- lib/generators/json_voorhees/app_make_admin/templates/dashboard.rb.erb
|
69
69
|
- lib/generators/json_voorhees/app_make_admin/templates/defcon_admin_register.rb.erb
|
70
|
+
- lib/generators/json_voorhees/app_make_admin/templates/fb_dashboard.rb
|
70
71
|
- lib/generators/json_voorhees/app_make_admin/templates/views/_footer.html.erb
|
71
72
|
- lib/generators/json_voorhees/app_make_admin/templates/views/_header.html.erb
|
72
73
|
- lib/generators/json_voorhees/app_make_admin/templates/views/admin_home_with_user
|