rails_modular_admin 0.4.0 → 1.0.0

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -1
  3. data/Rakefile +3 -2
  4. data/app/assets/javascripts/rails_modular_admin.js +3 -0
  5. data/app/assets/stylesheets/custom-theme.scss +14 -0
  6. data/app/assets/stylesheets/rails_modular_admin.scss +1 -0
  7. data/app/assets/stylesheets/rails_modular_admin/_main.scss +1 -1
  8. data/app/helpers/rails_modular_admin_helpers.rb +5 -0
  9. data/app/views/layouts/partials/_footer.html.erb +8 -0
  10. data/lib/generators/rails_modular_admin/{USAGE → install/USAGE} +0 -0
  11. data/lib/generators/rails_modular_admin/install/install_generator.rb +19 -0
  12. data/lib/generators/rails_modular_admin/install/templates/auth.html.erb +35 -0
  13. data/lib/generators/rails_modular_admin/install/templates/custom-theme.scss +14 -0
  14. data/lib/generators/rails_modular_admin/install/templates/dashboard.html.erb +117 -0
  15. data/lib/generators/rails_modular_admin/install/templates/devise/confirmations/new.html.erb +16 -0
  16. data/lib/generators/rails_modular_admin/install/templates/devise/passwords/edit.html.erb +25 -0
  17. data/lib/generators/rails_modular_admin/install/templates/devise/passwords/new.html.erb +39 -0
  18. data/lib/generators/rails_modular_admin/install/templates/devise/registrations/edit.html.erb +43 -0
  19. data/lib/generators/rails_modular_admin/install/templates/devise/registrations/new.html.erb +29 -0
  20. data/lib/generators/rails_modular_admin/install/templates/devise/sessions/new.html.erb +73 -0
  21. data/lib/generators/rails_modular_admin/install/templates/devise/shared/_links.html.erb +25 -0
  22. data/lib/generators/rails_modular_admin/install/templates/devise/unlocks/new.html.erb +16 -0
  23. data/lib/generators/rails_modular_admin/install/templates/login.html.erb +85 -0
  24. data/lib/generators/rails_modular_admin/install/templates/partials/_footer.html.erb +8 -0
  25. data/lib/generators/rails_modular_admin/install/templates/recover.html.erb +77 -0
  26. data/lib/generators/rails_modular_admin/{templates/signup.html.erb → install/templates/register.html.erb} +0 -0
  27. data/lib/generators/rails_modular_admin/install_generator.rb +15 -8
  28. data/lib/generators/rails_modular_admin/templates/{application.html.erb → auth.html.erb} +35 -27
  29. data/lib/generators/rails_modular_admin/templates/dashboard.html.erb +99 -1432
  30. data/lib/generators/rails_modular_admin/templates/login.html.erb +1 -1
  31. data/lib/generators/rails_modular_admin/templates/partials/_footer.html.erb +8 -0
  32. data/lib/generators/rails_modular_admin/templates/recover.html.erb +1 -1
  33. data/lib/generators/rails_modular_admin/templates/register.html.erb +101 -0
  34. data/lib/generators/rails_modular_admin/views_generator.rb +21 -9
  35. data/lib/rails_modular_admin.rb +2 -1
  36. data/lib/rails_modular_admin/engine.rb +7 -4
  37. data/lib/rails_modular_admin/version.rb +1 -1
  38. metadata +40 -34
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta http-equiv="x-ua-compatible" content="ie=edge">
6
- <title> ModularAdmin - Free Dashboard Theme | HTML Version </title>
6
+ <title> Rails Modular Admin </title>
7
7
  <meta name="description" content="">
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1">
9
9
  <link rel="apple-touch-icon" href="apple-touch-icon.png">
@@ -0,0 +1,8 @@
1
+ <footer class="footer">
2
+ <div class="footer-block buttons"></div>
3
+ <div class="footer-block author">
4
+ <ul>
5
+ <li>Copyright &copy; <%= Date.today.year %> <a href="https://example.com", target="_blank">Example Company</a></li>
6
+ </ul>
7
+ </div>
8
+ </footer>
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta http-equiv="x-ua-compatible" content="ie=edge">
6
- <title> ModularAdmin - Free Dashboard Theme | HTML Version </title>
6
+ <title> Rails Modular Admin </title>
7
7
  <meta name="description" content="">
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1">
9
9
  <link rel="apple-touch-icon" href="apple-touch-icon.png">
@@ -0,0 +1,101 @@
1
+ <!doctype html>
2
+ <html class="no-js" lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
6
+ <title> ModularAdmin - Free Dashboard Theme | HTML Version </title>
7
+ <meta name="description" content="">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+ <link rel="apple-touch-icon" href="apple-touch-icon.png">
10
+ <!-- Place favicon.ico in the root directory -->
11
+ <link rel="stylesheet" href="css/vendor.css">
12
+ <!-- Theme initialization -->
13
+ <script>
14
+ var themeSettings = (localStorage.getItem('themeSettings')) ? JSON.parse(localStorage.getItem('themeSettings')) :
15
+ {};
16
+ var themeName = themeSettings.themeName || '';
17
+ if (themeName)
18
+ {
19
+ document.write('<link rel="stylesheet" id="theme-style" href="css/app-' + themeName + '.css">');
20
+ }
21
+ else
22
+ {
23
+ document.write('<link rel="stylesheet" id="theme-style" href="css/app.css">');
24
+ }
25
+ </script>
26
+ </head>
27
+ <body>
28
+ <div class="auth">
29
+ <div class="auth-container">
30
+ <div class="card">
31
+ <header class="auth-header">
32
+ <h1 class="auth-title">
33
+ <div class="logo">
34
+ <span class="l l1"></span>
35
+ <span class="l l2"></span>
36
+ <span class="l l3"></span>
37
+ <span class="l l4"></span>
38
+ <span class="l l5"></span>
39
+ </div> ModularAdmin </h1>
40
+ </header>
41
+ <div class="auth-content">
42
+ <p class="text-center">SIGNUP TO GET INSTANT ACCESS</p>
43
+ <form id="signup-form" action="/index.html" method="GET" novalidate="">
44
+ <div class="form-group">
45
+ <label for="firstname">Name</label>
46
+ <div class="row">
47
+ <div class="col-sm-6">
48
+ <input type="text" class="form-control underlined" name="firstname" id="firstname" placeholder="Enter firstname" required=""> </div>
49
+ <div class="col-sm-6">
50
+ <input type="text" class="form-control underlined" name="lastname" id="lastname" placeholder="Enter lastname" required=""> </div>
51
+ </div>
52
+ </div>
53
+ <div class="form-group">
54
+ <label for="email">Email</label>
55
+ <input type="email" class="form-control underlined" name="email" id="email" placeholder="Enter email address" required=""> </div>
56
+ <div class="form-group">
57
+ <label for="password">Password</label>
58
+ <div class="row">
59
+ <div class="col-sm-6">
60
+ <input type="password" class="form-control underlined" name="password" id="password" placeholder="Enter password" required=""> </div>
61
+ <div class="col-sm-6">
62
+ <input type="password" class="form-control underlined" name="retype_password" id="retype_password" placeholder="Re-type password" required=""> </div>
63
+ </div>
64
+ </div>
65
+ <div class="form-group">
66
+ <label for="agree">
67
+ <input class="checkbox" name="agree" id="agree" type="checkbox" required="">
68
+ <span>Agree the terms and
69
+ <a href="#">policy</a>
70
+ </span>
71
+ </label>
72
+ </div>
73
+ <div class="form-group">
74
+ <button type="submit" class="btn btn-block btn-primary">Sign Up</button>
75
+ </div>
76
+ <div class="form-group">
77
+ <p class="text-muted text-center">Already have an account?
78
+ <a href="login.html">Login!</a>
79
+ </p>
80
+ </div>
81
+ </form>
82
+ </div>
83
+ </div>
84
+ <div class="text-center">
85
+ <a href="index.html" class="btn btn-secondary btn-sm">
86
+ <i class="fa fa-arrow-left"></i> Back to dashboard </a>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <!-- Reference block for JS -->
91
+ <div class="ref" id="ref">
92
+ <div class="color-primary"></div>
93
+ <div class="chart">
94
+ <div class="color-primary"></div>
95
+ <div class="color-secondary"></div>
96
+ </div>
97
+ </div>
98
+ <script src="js/vendor.js"></script>
99
+ <script src="js/app.js"></script>
100
+ </body>
101
+ </html>
@@ -1,15 +1,27 @@
1
1
  require 'rails/generators/base'
2
2
  module RailsModularAdmin
3
- module Generators
4
- class ViewsGenerator < Rails::Generators::NamedBase
5
- source_root File.expand_path('templates', __dir__)
3
+ module Generators
4
+ class ViewsGenerator < Rails::Generators::NamedBase
5
+ desc "This generator copies over default templates for Modular Admin into your application."
6
+ source_root File.expand_path('templates', __dir__)
6
7
 
7
- def copy_dashboard_view
8
- end
8
+
9
+
10
+ def copy_auth_layout
11
+ copy_file "auth.html.erb", "app/views/layouts/auth.html.erb"
12
+ end
13
+
14
+ def copy_login_view
15
+ copy_file "login.html.erb", "app/views/devise/sessions/new.html.erb"
16
+ end
17
+
18
+ def copy_register_view
19
+ copy_file "register.html.erb", "app/views/devise/registrations/new.html.erb"
20
+ end
9
21
 
10
- def copy_layout
11
- copy_file "application.html.erb", "app/views/layouts/application.html.erb"
22
+ def copy_recover_view
23
+ copy_file "recover.html.erb", "app/views/devise/registrations/new.html.erb"
24
+ end
25
+ end
12
26
  end
13
- end
14
- end
15
27
  end
@@ -1,5 +1,6 @@
1
1
  require "rails_modular_admin/engine"
2
+ require_relative "../app/helpers/rails_modular_admin_helpers"
2
3
 
3
4
  module RailsModularAdmin
4
-
5
+ ActionView::Base.send :include, RailsModularAdminHelpers
5
6
  end
@@ -1,14 +1,17 @@
1
1
  module RailsModularAdmin
2
+ require 'rails'
2
3
  class Engine < ::Rails::Engine
3
4
  isolate_namespace RailsModularAdmin
4
- require "sass-rails"
5
+ require "sassc-rails"
5
6
  require "font-awesome-rails"
6
7
  initializer "RailsModularAdmin.precompile" do |app|
7
8
  app.config.assets.precompile += %w(rails_modular_admin.js)
8
- app.config.assets.precompile += %w( animate.css/animate.css )
9
+ app.config.assets.precompile += %w( animate.css/animate.css )
10
+ app.config.assets.precompile += %w( animate.css/animate.css )
11
+ app.config.assets.precompile += %w( animate.css/animate.css )
9
12
 
10
13
  [
11
- 'animate.css','/jquery/dist/',
14
+ '/animate.css','/jquery/dist/',
12
15
  '/jquery-flot/',
13
16
  '/jquery-flot/',
14
17
  '/jquery-flot/',
@@ -18,7 +21,7 @@ module RailsModularAdmin
18
21
  '/jquery-sparkline/',
19
22
  '/jqvmap/dist/',
20
23
  '/jqvmap/dist/maps/',
21
- 'metismenu/dist/',
24
+ '/metismenu/dist/',
22
25
  '/nprogress/',
23
26
  '/quill/dist/',
24
27
  '/responsive-toolkit/dist/',
@@ -1,3 +1,3 @@
1
1
  module RailsModularAdmin
2
- VERSION = '0.4.0'
2
+ VERSION = '1.0.0'
3
3
  end
metadata CHANGED
@@ -1,31 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_modular_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Payne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-04 00:00:00.000000000 Z
11
+ date: 2018-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '5.1'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '5.1'
27
- - !ruby/object:Gem::Dependency
28
- name: sprockets-rails
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - ">="
@@ -53,7 +39,7 @@ dependencies:
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
- name: sass-rails
42
+ name: sassc-rails
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - ">="
@@ -80,20 +66,6 @@ dependencies:
80
66
  - - ">="
81
67
  - !ruby/object:Gem::Version
82
68
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: coffee-rails
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
69
  - !ruby/object:Gem::Dependency
98
70
  name: jquery-rails
99
71
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +122,20 @@ dependencies:
150
122
  - - ">="
151
123
  - !ruby/object:Gem::Version
152
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: guard
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -1583,6 +1569,7 @@ files:
1583
1569
  - app/assets/node_modules/tinycolor2/test/qunit.js
1584
1570
  - app/assets/node_modules/tinycolor2/test/test.js
1585
1571
  - app/assets/node_modules/tinycolor2/tinycolor.js
1572
+ - app/assets/stylesheets/custom-theme.scss
1586
1573
  - app/assets/stylesheets/rails_modular_admin.scss
1587
1574
  - app/assets/stylesheets/rails_modular_admin/_common/_styles/_mixins.scss
1588
1575
  - app/assets/stylesheets/rails_modular_admin/_common/_styles/layout.scss
@@ -1639,12 +1626,30 @@ files:
1639
1626
  - app/assets/stylesheets/rails_modular_admin/app/tables/responsive-tables/responsive-tables.scss
1640
1627
  - app/assets/stylesheets/rails_modular_admin/application.scss
1641
1628
  - app/assets/stylesheets/rails_modular_admin/auth/auth.scss
1629
+ - app/helpers/rails_modular_admin_helpers.rb
1630
+ - app/views/layouts/partials/_footer.html.erb
1642
1631
  - app/views/layouts/rails_modular_admin/application.html.erb
1643
1632
  - config/initializers/assets.rb
1644
1633
  - config/routes.rb
1645
- - lib/generators/rails_modular_admin/USAGE
1634
+ - lib/generators/rails_modular_admin/install/USAGE
1635
+ - lib/generators/rails_modular_admin/install/install_generator.rb
1636
+ - lib/generators/rails_modular_admin/install/templates/auth.html.erb
1637
+ - lib/generators/rails_modular_admin/install/templates/custom-theme.scss
1638
+ - lib/generators/rails_modular_admin/install/templates/dashboard.html.erb
1639
+ - lib/generators/rails_modular_admin/install/templates/devise/confirmations/new.html.erb
1640
+ - lib/generators/rails_modular_admin/install/templates/devise/passwords/edit.html.erb
1641
+ - lib/generators/rails_modular_admin/install/templates/devise/passwords/new.html.erb
1642
+ - lib/generators/rails_modular_admin/install/templates/devise/registrations/edit.html.erb
1643
+ - lib/generators/rails_modular_admin/install/templates/devise/registrations/new.html.erb
1644
+ - lib/generators/rails_modular_admin/install/templates/devise/sessions/new.html.erb
1645
+ - lib/generators/rails_modular_admin/install/templates/devise/shared/_links.html.erb
1646
+ - lib/generators/rails_modular_admin/install/templates/devise/unlocks/new.html.erb
1647
+ - lib/generators/rails_modular_admin/install/templates/login.html.erb
1648
+ - lib/generators/rails_modular_admin/install/templates/partials/_footer.html.erb
1649
+ - lib/generators/rails_modular_admin/install/templates/recover.html.erb
1650
+ - lib/generators/rails_modular_admin/install/templates/register.html.erb
1646
1651
  - lib/generators/rails_modular_admin/install_generator.rb
1647
- - lib/generators/rails_modular_admin/templates/application.html.erb
1652
+ - lib/generators/rails_modular_admin/templates/auth.html.erb
1648
1653
  - lib/generators/rails_modular_admin/templates/custom-theme.scss
1649
1654
  - lib/generators/rails_modular_admin/templates/dashboard.html.erb
1650
1655
  - lib/generators/rails_modular_admin/templates/devise/confirmations/new.html.erb
@@ -1656,8 +1661,9 @@ files:
1656
1661
  - lib/generators/rails_modular_admin/templates/devise/shared/_links.html.erb
1657
1662
  - lib/generators/rails_modular_admin/templates/devise/unlocks/new.html.erb
1658
1663
  - lib/generators/rails_modular_admin/templates/login.html.erb
1664
+ - lib/generators/rails_modular_admin/templates/partials/_footer.html.erb
1659
1665
  - lib/generators/rails_modular_admin/templates/recover.html.erb
1660
- - lib/generators/rails_modular_admin/templates/signup.html.erb
1666
+ - lib/generators/rails_modular_admin/templates/register.html.erb
1661
1667
  - lib/generators/rails_modular_admin/views_generator.rb
1662
1668
  - lib/rails_modular_admin.rb
1663
1669
  - lib/rails_modular_admin/engine.rb