headmin 0.1.2 → 0.2.3

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 (212) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -15
  3. data/Gemfile +0 -1
  4. data/Gemfile.lock +24 -2
  5. data/README.md +15 -43
  6. data/app/controllers/concerns/headmin/authentication.rb +0 -8
  7. data/app/controllers/concerns/headmin/pagination.rb +1 -1
  8. data/app/helpers/headmin/admin_helper.rb +4 -4
  9. data/app/models/concerns/headmin/block.rb +11 -0
  10. data/app/models/concerns/headmin/blockable.rb +10 -0
  11. data/app/models/concerns/headmin/field.rb +17 -0
  12. data/app/models/concerns/headmin/fieldable.rb +44 -0
  13. data/app/services/block_service.rb +68 -0
  14. data/app/views/{layouts → examples}/admin.html.erb +0 -0
  15. data/app/views/{layouts/admin → examples}/auth.html.erb +0 -0
  16. data/app/views/headmin/_blocks.html.erb +24 -0
  17. data/app/views/headmin/_breadcrumbs.html.erb +9 -5
  18. data/app/views/headmin/_card.html.erb +48 -0
  19. data/app/views/headmin/_dropdown.html.erb +18 -0
  20. data/app/views/headmin/_filters.html.erb +56 -34
  21. data/app/views/headmin/_form.html.erb +60 -6
  22. data/app/views/headmin/_heading.html.erb +8 -4
  23. data/app/views/headmin/_index.html.erb +9 -8
  24. data/app/views/headmin/_notifications.html.erb +8 -0
  25. data/app/views/headmin/_pagination.html.erb +11 -7
  26. data/app/views/headmin/_popup.html.erb +26 -0
  27. data/app/views/headmin/_table.html.erb +11 -4
  28. data/app/views/headmin/dropdown/_button.html.erb +13 -0
  29. data/app/views/headmin/dropdown/_devise.html.erb +21 -0
  30. data/app/views/headmin/{layout/dropdown → dropdown}/_divider.html.erb +1 -1
  31. data/app/views/headmin/dropdown/_item.html.erb +18 -0
  32. data/app/views/headmin/dropdown/_list.html.erb +11 -0
  33. data/app/views/headmin/dropdown/_locale.html.erb +17 -0
  34. data/app/views/headmin/filters/_date.html.erb +21 -16
  35. data/app/views/headmin/filters/_search.html.erb +18 -18
  36. data/app/views/headmin/filters/_select.html.erb +28 -23
  37. data/app/views/headmin/filters/filter/_button.html.erb +15 -6
  38. data/app/views/headmin/filters/filter/_menu_item.html.erb +2 -2
  39. data/app/views/headmin/filters/filter/_template.html.erb +2 -2
  40. data/app/views/headmin/forms/_actions.html.erb +4 -8
  41. data/app/views/headmin/forms/_base.html.erb +60 -0
  42. data/app/views/headmin/forms/_blocks.html.erb +32 -0
  43. data/app/views/headmin/forms/_checkbox.html.erb +39 -0
  44. data/app/views/headmin/forms/_ckeditor.html.erb +42 -0
  45. data/app/views/headmin/forms/_date.html.erb +45 -0
  46. data/app/views/headmin/forms/_email.html.erb +39 -0
  47. data/app/views/headmin/forms/_file.html.erb +40 -0
  48. data/app/views/headmin/forms/_image.html.erb +55 -0
  49. data/app/views/headmin/forms/_label.html.erb +24 -0
  50. data/app/views/headmin/forms/_number.html.erb +50 -0
  51. data/app/views/headmin/forms/_password.html.erb +69 -0
  52. data/app/views/headmin/forms/_redactorx.html.erb +49 -0
  53. data/app/views/headmin/forms/_repeater.html.erb +133 -0
  54. data/app/views/headmin/forms/_select.html.erb +70 -0
  55. data/app/views/headmin/forms/_text.html.erb +62 -0
  56. data/app/views/headmin/forms/_textarea.html.erb +39 -0
  57. data/app/views/headmin/forms/_url.html.erb +39 -0
  58. data/app/views/headmin/forms/_validation.html.erb +21 -0
  59. data/app/views/headmin/forms/actions/_destroy.html.erb +13 -0
  60. data/app/views/headmin/forms/actions/_save.html.erb +12 -0
  61. data/app/views/headmin/forms/actions/_view.html.erb +15 -0
  62. data/app/views/headmin/forms/fields/_base.html.erb +25 -0
  63. data/app/views/headmin/forms/fields/_file.html.erb +15 -22
  64. data/app/views/headmin/forms/fields/_group.html.erb +38 -0
  65. data/app/views/headmin/forms/fields/_image.html.erb +15 -35
  66. data/app/views/headmin/forms/fields/_list.html.erb +26 -0
  67. data/app/views/headmin/forms/fields/_text.html.erb +15 -37
  68. data/app/views/headmin/forms/repeater/_row.html.erb +51 -0
  69. data/app/views/headmin/heading/_title.html.erb +1 -1
  70. data/app/views/headmin/layout/_body.html.erb +1 -1
  71. data/app/views/headmin/layout/_content.html.erb +1 -1
  72. data/app/views/headmin/layout/_footer.html.erb +1 -1
  73. data/app/views/headmin/layout/_header.html.erb +1 -1
  74. data/app/views/headmin/layout/_main.html.erb +2 -2
  75. data/app/views/headmin/layout/_sidebar.html.erb +1 -1
  76. data/app/views/headmin/layout/sidebar/{_menu.html.erb → _nav.html.erb} +1 -1
  77. data/app/views/headmin/nav/_item.html.erb +21 -0
  78. data/app/views/headmin/nav/item/_devise.html.erb +21 -0
  79. data/app/views/headmin/nav/item/_locale.html.erb +17 -0
  80. data/app/views/headmin/pagination/_per_page.html.erb +18 -0
  81. data/app/views/headmin/{kaminari → pagination/kaminari}/_first_page.html.erb +0 -0
  82. data/app/views/headmin/{kaminari → pagination/kaminari}/_gap.html.erb +0 -0
  83. data/app/views/headmin/{kaminari → pagination/kaminari}/_last_page.html.erb +0 -0
  84. data/app/views/headmin/{kaminari → pagination/kaminari}/_next_page.html.erb +0 -0
  85. data/app/views/headmin/{kaminari → pagination/kaminari}/_page.html.erb +1 -1
  86. data/app/views/headmin/{kaminari → pagination/kaminari}/_paginator.html.erb +0 -0
  87. data/app/views/headmin/{kaminari → pagination/kaminari}/_prev_page.html.erb +0 -0
  88. data/app/views/headmin/table/_actions.html.erb +24 -17
  89. data/app/views/headmin/table/_body.html.erb +12 -10
  90. data/app/views/headmin/table/_foot.html.erb +8 -4
  91. data/app/views/headmin/table/_footer.html.erb +3 -7
  92. data/app/views/headmin/table/_head.html.erb +3 -1
  93. data/app/views/headmin/table/_header.html.erb +3 -7
  94. data/app/views/headmin/table/actions/_action.html.erb +26 -9
  95. data/app/views/headmin/table/actions/_delete.html.erb +11 -7
  96. data/app/views/headmin/table/actions/_export.html.erb +11 -7
  97. data/app/views/headmin/table/body/_association.html.erb +1 -1
  98. data/app/views/headmin/table/body/_boolean.erb +1 -1
  99. data/app/views/headmin/table/body/_currency.html.erb +1 -1
  100. data/app/views/headmin/table/body/_date.html.erb +1 -1
  101. data/app/views/headmin/table/body/_id.html.erb +2 -2
  102. data/app/views/headmin/table/body/_row.html.erb +1 -1
  103. data/app/views/headmin/table/body/_string.html.erb +1 -1
  104. data/app/views/headmin/table/body/_text.html.erb +1 -1
  105. data/app/views/headmin/table/foot/_cell.html.erb +1 -1
  106. data/app/views/headmin/table/foot/_id.html.erb +2 -2
  107. data/app/views/headmin/table/head/_cell.html.erb +1 -1
  108. data/app/views/headmin/table/head/_id.html.erb +3 -3
  109. data/app/views/headmin/views/devise/confirmations/_new.html.erb +9 -0
  110. data/app/views/headmin/views/devise/passwords/_edit.html.erb +12 -0
  111. data/app/views/headmin/views/devise/passwords/_new.html.erb +9 -0
  112. data/app/views/{admin/users/registrations/edit.html.erb → headmin/views/devise/registrations/_edit.html.erb} +5 -5
  113. data/app/views/headmin/views/devise/registrations/_new.html.erb +11 -0
  114. data/app/views/headmin/views/devise/sessions/_new.html.erb +13 -0
  115. data/app/views/{admin/users → headmin/views/devise}/shared/_error_messages.html.erb +0 -0
  116. data/app/views/{admin/users → headmin/views/devise}/shared/_links.html.erb +0 -0
  117. data/app/views/headmin/views/devise/unlocks/_new.html.erb +10 -0
  118. data/config/initializers/customize_input_error.rb +9 -0
  119. data/config/locales/devise/en.yml +65 -0
  120. data/config/locales/en.yml +2 -134
  121. data/config/locales/headmin/filters/en.yml +13 -0
  122. data/config/locales/headmin/filters/nl.yml +13 -0
  123. data/config/locales/headmin/forms/en.yml +34 -0
  124. data/config/locales/headmin/forms/nl.yml +33 -0
  125. data/config/locales/headmin/heading/en.yml +5 -0
  126. data/config/locales/headmin/heading/nl.yml +5 -0
  127. data/config/locales/headmin/layout/en.yml +14 -0
  128. data/config/locales/headmin/layout/nl.yml +14 -0
  129. data/config/locales/headmin/pagination/en.yml +21 -0
  130. data/config/locales/headmin/pagination/nl.yml +21 -0
  131. data/config/locales/headmin/table/en.yml +23 -0
  132. data/config/locales/headmin/table/nl.yml +23 -0
  133. data/config/locales/headmin/views/en.yml +58 -0
  134. data/config/locales/headmin/views/nl.yml +58 -0
  135. data/config/locales/nl.yml +2 -135
  136. data/dist/css/headmin.css +3182 -743
  137. data/dist/js/headmin.js +729 -33
  138. data/docs/README.md +2 -1
  139. data/docs/blocks.md +70 -85
  140. data/docs/devise.md +1 -60
  141. data/docs/fields.md +57 -0
  142. data/headmin.gemspec +1 -0
  143. data/lib/generators/headmin/blocks_generator.rb +19 -0
  144. data/lib/generators/headmin/fields_generator.rb +19 -0
  145. data/lib/generators/templates/migrations/create_blocks.rb +10 -0
  146. data/lib/generators/templates/migrations/create_fields.rb +13 -0
  147. data/lib/generators/templates/models/block.rb +3 -0
  148. data/lib/generators/templates/models/field.rb +3 -0
  149. data/lib/headmin/engine.rb +2 -0
  150. data/lib/headmin/version.rb +1 -1
  151. data/package.json +6 -6
  152. data/src/js/headmin/controllers/blocks_controller.js +103 -0
  153. data/src/js/headmin/controllers/filters_controller.js +23 -12
  154. data/src/js/headmin/controllers/popup_controller.js +68 -0
  155. data/src/js/headmin/controllers/repeater_controller.js +117 -11
  156. data/src/js/headmin/controllers/table_actions_controller.js +16 -5
  157. data/src/js/headmin/controllers/table_controller.js +84 -1
  158. data/src/js/headmin/headmin.js +29 -56
  159. data/src/scss/headmin/filters.scss +0 -14
  160. data/src/scss/headmin/form.scss +43 -3
  161. data/src/scss/headmin/popup.scss +17 -0
  162. data/src/scss/headmin/table.scss +9 -6
  163. data/src/scss/headmin.scss +7 -4
  164. data/src/scss/vendor/redactorx/override.css +3 -0
  165. data/src/scss/vendor/redactorx/redactorx.css +1460 -0
  166. data/yarn.lock +105 -2210
  167. metadata +108 -62
  168. data/app/controllers/admin/users/confirmations_controller.rb +0 -31
  169. data/app/controllers/admin/users/omniauth_callbacks_controller.rb +0 -31
  170. data/app/controllers/admin/users/passwords_controller.rb +0 -35
  171. data/app/controllers/admin/users/registrations_controller.rb +0 -63
  172. data/app/controllers/admin/users/sessions_controller.rb +0 -28
  173. data/app/controllers/admin/users/unlocks_controller.rb +0 -31
  174. data/app/views/admin/users/confirmations/new.html.erb +0 -9
  175. data/app/views/admin/users/mailer/confirmation_instructions.html.erb +0 -5
  176. data/app/views/admin/users/mailer/email_changed.html.erb +0 -7
  177. data/app/views/admin/users/mailer/password_change.html.erb +0 -3
  178. data/app/views/admin/users/mailer/reset_password_instructions.html.erb +0 -8
  179. data/app/views/admin/users/mailer/unlock_instructions.html.erb +0 -7
  180. data/app/views/admin/users/passwords/edit.html.erb +0 -12
  181. data/app/views/admin/users/passwords/new.html.erb +0 -9
  182. data/app/views/admin/users/registrations/new.html.erb +0 -11
  183. data/app/views/admin/users/sessions/new.html.erb +0 -13
  184. data/app/views/admin/users/unlocks/new.html.erb +0 -10
  185. data/app/views/headmin/forms/_group.html.erb +0 -36
  186. data/app/views/headmin/forms/fields/_checkbox.html.erb +0 -23
  187. data/app/views/headmin/forms/fields/_ckeditor.html.erb +0 -28
  188. data/app/views/headmin/forms/fields/_currency.html.erb +0 -24
  189. data/app/views/headmin/forms/fields/_date.html.erb +0 -36
  190. data/app/views/headmin/forms/fields/_email.html.erb +0 -39
  191. data/app/views/headmin/forms/fields/_label.html.erb +0 -9
  192. data/app/views/headmin/forms/fields/_multiple_select.html.erb +0 -37
  193. data/app/views/headmin/forms/fields/_password.html.erb +0 -39
  194. data/app/views/headmin/forms/fields/_repeater.html.erb +0 -48
  195. data/app/views/headmin/forms/fields/_select.html.erb +0 -36
  196. data/app/views/headmin/forms/fields/_select_tags.html.erb +0 -32
  197. data/app/views/headmin/forms/fields/_textarea.html.erb +0 -29
  198. data/app/views/headmin/forms/fields/_url.html.erb +0 -38
  199. data/app/views/headmin/forms/fields/_validation.html.erb +0 -12
  200. data/app/views/headmin/forms/fields/repeater/_row.html.erb +0 -16
  201. data/app/views/headmin/layout/dropdown/_item.html.erb +0 -17
  202. data/app/views/headmin/layout/header/_account.html.erb +0 -25
  203. data/app/views/headmin/layout/header/_locale.html.erb +0 -19
  204. data/app/views/headmin/layout/sidebar/menu/_account.html.erb +0 -25
  205. data/app/views/headmin/layout/sidebar/menu/_item.html.erb +0 -16
  206. data/app/views/headmin/layout/sidebar/menu/_locale.html.erb +0 -18
  207. data/src/js/headmin/controllers/index_controller.js +0 -79
  208. data/src/js/headmin/controllers/repeater_row_controller.js +0 -54
  209. data/src/scss/vendor/choices/cross-inverse.svg +0 -6
  210. data/src/scss/vendor/choices/cross.svg +0 -6
  211. data/src/scss/vendor/choices/custom.scss +0 -28
  212. data/src/scss/vendor/choices/variables.scss +0 -16
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: headmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jef Vlamings
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-20 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2021-10-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: closure_tree
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '7.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '7.3'
13
27
  description: A complete library of commonly used components to build an admin interface
14
28
  in your Ruby on Rails project.
15
29
  email:
@@ -30,12 +44,6 @@ files:
30
44
  - README.md
31
45
  - Rakefile
32
46
  - app/assets/images/avatar.jpg
33
- - app/controllers/admin/users/confirmations_controller.rb
34
- - app/controllers/admin/users/omniauth_callbacks_controller.rb
35
- - app/controllers/admin/users/passwords_controller.rb
36
- - app/controllers/admin/users/registrations_controller.rb
37
- - app/controllers/admin/users/sessions_controller.rb
38
- - app/controllers/admin/users/unlocks_controller.rb
39
47
  - app/controllers/concerns/headmin/acts_as_list.rb
40
48
  - app/controllers/concerns/headmin/authentication.rb
41
49
  - app/controllers/concerns/headmin/ckeditor.rb
@@ -46,28 +54,31 @@ files:
46
54
  - app/helpers/headmin/admin_helper.rb
47
55
  - app/helpers/headmin/filter_helper.rb
48
56
  - app/helpers/headmin/notification_helper.rb
49
- - app/views/admin/users/confirmations/new.html.erb
50
- - app/views/admin/users/mailer/confirmation_instructions.html.erb
51
- - app/views/admin/users/mailer/email_changed.html.erb
52
- - app/views/admin/users/mailer/password_change.html.erb
53
- - app/views/admin/users/mailer/reset_password_instructions.html.erb
54
- - app/views/admin/users/mailer/unlock_instructions.html.erb
55
- - app/views/admin/users/passwords/edit.html.erb
56
- - app/views/admin/users/passwords/new.html.erb
57
- - app/views/admin/users/registrations/edit.html.erb
58
- - app/views/admin/users/registrations/new.html.erb
59
- - app/views/admin/users/sessions/new.html.erb
60
- - app/views/admin/users/shared/_error_messages.html.erb
61
- - app/views/admin/users/shared/_links.html.erb
62
- - app/views/admin/users/unlocks/new.html.erb
57
+ - app/models/concerns/headmin/block.rb
58
+ - app/models/concerns/headmin/blockable.rb
59
+ - app/models/concerns/headmin/field.rb
60
+ - app/models/concerns/headmin/fieldable.rb
61
+ - app/services/block_service.rb
62
+ - app/views/examples/admin.html.erb
63
+ - app/views/examples/auth.html.erb
64
+ - app/views/headmin/_blocks.html.erb
63
65
  - app/views/headmin/_breadcrumbs.html.erb
66
+ - app/views/headmin/_card.html.erb
67
+ - app/views/headmin/_dropdown.html.erb
64
68
  - app/views/headmin/_filters.html.erb
65
69
  - app/views/headmin/_form.html.erb
66
70
  - app/views/headmin/_heading.html.erb
67
71
  - app/views/headmin/_index.html.erb
68
72
  - app/views/headmin/_notifications.html.erb
69
73
  - app/views/headmin/_pagination.html.erb
74
+ - app/views/headmin/_popup.html.erb
70
75
  - app/views/headmin/_table.html.erb
76
+ - app/views/headmin/dropdown/_button.html.erb
77
+ - app/views/headmin/dropdown/_devise.html.erb
78
+ - app/views/headmin/dropdown/_divider.html.erb
79
+ - app/views/headmin/dropdown/_item.html.erb
80
+ - app/views/headmin/dropdown/_list.html.erb
81
+ - app/views/headmin/dropdown/_locale.html.erb
71
82
  - app/views/headmin/filters/_date.html.erb
72
83
  - app/views/headmin/filters/_search.html.erb
73
84
  - app/views/headmin/filters/_select.html.erb
@@ -75,49 +86,55 @@ files:
75
86
  - app/views/headmin/filters/filter/_menu_item.html.erb
76
87
  - app/views/headmin/filters/filter/_template.html.erb
77
88
  - app/views/headmin/forms/_actions.html.erb
89
+ - app/views/headmin/forms/_base.html.erb
90
+ - app/views/headmin/forms/_blocks.html.erb
91
+ - app/views/headmin/forms/_checkbox.html.erb
92
+ - app/views/headmin/forms/_ckeditor.html.erb
93
+ - app/views/headmin/forms/_date.html.erb
94
+ - app/views/headmin/forms/_email.html.erb
78
95
  - app/views/headmin/forms/_errors.html.erb
79
- - app/views/headmin/forms/_group.html.erb
80
- - app/views/headmin/forms/fields/_checkbox.html.erb
81
- - app/views/headmin/forms/fields/_ckeditor.html.erb
82
- - app/views/headmin/forms/fields/_currency.html.erb
83
- - app/views/headmin/forms/fields/_date.html.erb
84
- - app/views/headmin/forms/fields/_email.html.erb
96
+ - app/views/headmin/forms/_file.html.erb
97
+ - app/views/headmin/forms/_image.html.erb
98
+ - app/views/headmin/forms/_label.html.erb
99
+ - app/views/headmin/forms/_number.html.erb
100
+ - app/views/headmin/forms/_password.html.erb
101
+ - app/views/headmin/forms/_redactorx.html.erb
102
+ - app/views/headmin/forms/_repeater.html.erb
103
+ - app/views/headmin/forms/_select.html.erb
104
+ - app/views/headmin/forms/_text.html.erb
105
+ - app/views/headmin/forms/_textarea.html.erb
106
+ - app/views/headmin/forms/_url.html.erb
107
+ - app/views/headmin/forms/_validation.html.erb
108
+ - app/views/headmin/forms/actions/_destroy.html.erb
109
+ - app/views/headmin/forms/actions/_save.html.erb
110
+ - app/views/headmin/forms/actions/_view.html.erb
111
+ - app/views/headmin/forms/fields/_base.html.erb
85
112
  - app/views/headmin/forms/fields/_file.html.erb
113
+ - app/views/headmin/forms/fields/_group.html.erb
86
114
  - app/views/headmin/forms/fields/_image.html.erb
87
- - app/views/headmin/forms/fields/_label.html.erb
88
- - app/views/headmin/forms/fields/_multiple_select.html.erb
89
- - app/views/headmin/forms/fields/_password.html.erb
90
- - app/views/headmin/forms/fields/_repeater.html.erb
91
- - app/views/headmin/forms/fields/_select.html.erb
92
- - app/views/headmin/forms/fields/_select_tags.html.erb
115
+ - app/views/headmin/forms/fields/_list.html.erb
93
116
  - app/views/headmin/forms/fields/_text.html.erb
94
- - app/views/headmin/forms/fields/_textarea.html.erb
95
- - app/views/headmin/forms/fields/_url.html.erb
96
- - app/views/headmin/forms/fields/_validation.html.erb
97
- - app/views/headmin/forms/fields/repeater/_row.html.erb
117
+ - app/views/headmin/forms/repeater/_row.html.erb
98
118
  - app/views/headmin/heading/_title.html.erb
99
- - app/views/headmin/kaminari/_first_page.html.erb
100
- - app/views/headmin/kaminari/_gap.html.erb
101
- - app/views/headmin/kaminari/_last_page.html.erb
102
- - app/views/headmin/kaminari/_next_page.html.erb
103
- - app/views/headmin/kaminari/_page.html.erb
104
- - app/views/headmin/kaminari/_paginator.html.erb
105
- - app/views/headmin/kaminari/_prev_page.html.erb
106
119
  - app/views/headmin/layout/_body.html.erb
107
120
  - app/views/headmin/layout/_content.html.erb
108
121
  - app/views/headmin/layout/_footer.html.erb
109
122
  - app/views/headmin/layout/_header.html.erb
110
123
  - app/views/headmin/layout/_main.html.erb
111
124
  - app/views/headmin/layout/_sidebar.html.erb
112
- - app/views/headmin/layout/dropdown/_divider.html.erb
113
- - app/views/headmin/layout/dropdown/_item.html.erb
114
- - app/views/headmin/layout/header/_account.html.erb
115
- - app/views/headmin/layout/header/_locale.html.erb
116
125
  - app/views/headmin/layout/sidebar/_bottom.html.erb
117
- - app/views/headmin/layout/sidebar/_menu.html.erb
118
- - app/views/headmin/layout/sidebar/menu/_account.html.erb
119
- - app/views/headmin/layout/sidebar/menu/_item.html.erb
120
- - app/views/headmin/layout/sidebar/menu/_locale.html.erb
126
+ - app/views/headmin/layout/sidebar/_nav.html.erb
127
+ - app/views/headmin/nav/_item.html.erb
128
+ - app/views/headmin/nav/item/_devise.html.erb
129
+ - app/views/headmin/nav/item/_locale.html.erb
130
+ - app/views/headmin/pagination/_per_page.html.erb
131
+ - app/views/headmin/pagination/kaminari/_first_page.html.erb
132
+ - app/views/headmin/pagination/kaminari/_gap.html.erb
133
+ - app/views/headmin/pagination/kaminari/_last_page.html.erb
134
+ - app/views/headmin/pagination/kaminari/_next_page.html.erb
135
+ - app/views/headmin/pagination/kaminari/_page.html.erb
136
+ - app/views/headmin/pagination/kaminari/_paginator.html.erb
137
+ - app/views/headmin/pagination/kaminari/_prev_page.html.erb
121
138
  - app/views/headmin/table/_actions.html.erb
122
139
  - app/views/headmin/table/_body.html.erb
123
140
  - app/views/headmin/table/_foot.html.erb
@@ -145,31 +162,61 @@ files:
145
162
  - app/views/headmin/table/head/cell/_asc.html.erb
146
163
  - app/views/headmin/table/head/cell/_default.html.erb
147
164
  - app/views/headmin/table/head/cell/_desc.html.erb
148
- - app/views/layouts/admin.html.erb
149
- - app/views/layouts/admin/auth.html.erb
165
+ - app/views/headmin/views/devise/confirmations/_new.html.erb
166
+ - app/views/headmin/views/devise/passwords/_edit.html.erb
167
+ - app/views/headmin/views/devise/passwords/_new.html.erb
168
+ - app/views/headmin/views/devise/registrations/_edit.html.erb
169
+ - app/views/headmin/views/devise/registrations/_new.html.erb
170
+ - app/views/headmin/views/devise/sessions/_new.html.erb
171
+ - app/views/headmin/views/devise/shared/_error_messages.html.erb
172
+ - app/views/headmin/views/devise/shared/_links.html.erb
173
+ - app/views/headmin/views/devise/unlocks/_new.html.erb
150
174
  - bin/console
151
175
  - bin/setup
176
+ - config/initializers/customize_input_error.rb
152
177
  - config/locales/defaults/en.yml
153
178
  - config/locales/defaults/nl.yml
179
+ - config/locales/devise/en.yml
154
180
  - config/locales/devise/nl.yml
155
181
  - config/locales/en.yml
182
+ - config/locales/headmin/filters/en.yml
183
+ - config/locales/headmin/filters/nl.yml
184
+ - config/locales/headmin/forms/en.yml
185
+ - config/locales/headmin/forms/nl.yml
186
+ - config/locales/headmin/heading/en.yml
187
+ - config/locales/headmin/heading/nl.yml
188
+ - config/locales/headmin/layout/en.yml
189
+ - config/locales/headmin/layout/nl.yml
190
+ - config/locales/headmin/pagination/en.yml
191
+ - config/locales/headmin/pagination/nl.yml
192
+ - config/locales/headmin/table/en.yml
193
+ - config/locales/headmin/table/nl.yml
194
+ - config/locales/headmin/views/en.yml
195
+ - config/locales/headmin/views/nl.yml
156
196
  - config/locales/nl.yml
157
197
  - dist/css/headmin.css
158
198
  - dist/js/headmin.js
159
199
  - docs/README.md
160
200
  - docs/blocks.md
161
201
  - docs/devise.md
202
+ - docs/fields.md
162
203
  - headmin.gemspec
204
+ - lib/generators/headmin/blocks_generator.rb
205
+ - lib/generators/headmin/fields_generator.rb
206
+ - lib/generators/templates/migrations/create_blocks.rb
207
+ - lib/generators/templates/migrations/create_fields.rb
208
+ - lib/generators/templates/models/block.rb
209
+ - lib/generators/templates/models/field.rb
163
210
  - lib/headmin.rb
164
211
  - lib/headmin/engine.rb
165
212
  - lib/headmin/version.rb
166
213
  - package.json
167
214
  - src/js/headmin.js
215
+ - src/js/headmin/controllers/blocks_controller.js
168
216
  - src/js/headmin/controllers/filter_controller.js
169
217
  - src/js/headmin/controllers/filters_controller.js
170
- - src/js/headmin/controllers/index_controller.js
218
+ - src/js/headmin/controllers/popup_controller.js
171
219
  - src/js/headmin/controllers/repeater_controller.js
172
- - src/js/headmin/controllers/repeater_row_controller.js
173
220
  - src/js/headmin/controllers/table_actions_controller.js
174
221
  - src/js/headmin/controllers/table_controller.js
175
222
  - src/js/headmin/headmin.js
@@ -182,13 +229,12 @@ files:
182
229
  - src/scss/headmin/layout/body.scss
183
230
  - src/scss/headmin/layout/sidebar.scss
184
231
  - src/scss/headmin/login.scss
232
+ - src/scss/headmin/popup.scss
185
233
  - src/scss/headmin/table.scss
186
234
  - src/scss/headmin/utilities.scss
187
235
  - src/scss/vendor/bootstrap/variables.scss
188
- - src/scss/vendor/choices/cross-inverse.svg
189
- - src/scss/vendor/choices/cross.svg
190
- - src/scss/vendor/choices/custom.scss
191
- - src/scss/vendor/choices/variables.scss
236
+ - src/scss/vendor/redactorx/override.css
237
+ - src/scss/vendor/redactorx/redactorx.css
192
238
  - webpack.config.js
193
239
  - yarn.lock
194
240
  homepage: https://github.com/insiting/headmin
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Admin::Users::ConfirmationsController < Devise::ConfirmationsController
4
- layout 'admin/auth'
5
- # GET /resource/confirmation/new
6
- # def new
7
- # super
8
- # end
9
-
10
- # POST /resource/confirmation
11
- # def create
12
- # super
13
- # end
14
-
15
- # GET /resource/confirmation?confirmation_token=abcdef
16
- # def show
17
- # super
18
- # end
19
-
20
- # protected
21
-
22
- # The path used after resending confirmation instructions.
23
- # def after_resending_confirmation_instructions_path_for(resource_name)
24
- # super(resource_name)
25
- # end
26
-
27
- # The path used after confirmation.
28
- # def after_confirmation_path_for(resource_name, resource)
29
- # super(resource_name, resource)
30
- # end
31
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Admin::Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
4
- layout 'admin/auth'
5
- # You should configure your model like this:
6
- # devise :omniauthable, omniauth_providers: [:twitter]
7
-
8
- # You should also create an action method in this controller like this:
9
- # def twitter
10
- # end
11
-
12
- # More info at:
13
- # https://github.com/heartcombo/devise#omniauth
14
-
15
- # GET|POST /resource/auth/twitter
16
- # def passthru
17
- # super
18
- # end
19
-
20
- # GET|POST /users/auth/twitter/callback
21
- # def failure
22
- # super
23
- # end
24
-
25
- # protected
26
-
27
- # The path used when OmniAuth fails
28
- # def after_omniauth_failure_path_for(scope)
29
- # super(scope)
30
- # end
31
- end
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Admin::Users::PasswordsController < Devise::PasswordsController
4
- layout 'admin/auth'
5
- # GET /resource/password/new
6
- # def new
7
- # super
8
- # end
9
-
10
- # POST /resource/password
11
- # def create
12
- # super
13
- # end
14
-
15
- # GET /resource/password/edit?reset_password_token=abcdef
16
- # def edit
17
- # super
18
- # end
19
-
20
- # PUT /resource/password
21
- # def update
22
- # super
23
- # end
24
-
25
- # protected
26
-
27
- # def after_resetting_password_path_for(resource)
28
- # super(resource)
29
- # end
30
-
31
- # The path used after sending reset password instructions
32
- # def after_sending_reset_password_instructions_path_for(resource_name)
33
- # super(resource_name)
34
- # end
35
- end
@@ -1,63 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Admin::Users::RegistrationsController < Devise::RegistrationsController
4
- layout 'admin/auth'
5
- # before_action :configure_sign_up_params, only: [:create]
6
- # before_action :configure_account_update_params, only: [:update]
7
-
8
- # GET /resource/sign_up
9
- # def new
10
- # super
11
- # end
12
-
13
- # POST /resource
14
- # def create
15
- # super
16
- # end
17
-
18
- # GET /resource/edit
19
- # def edit
20
- # super
21
- # end
22
-
23
- # PUT /resource
24
- # def update
25
- # super
26
- # end
27
-
28
- # DELETE /resource
29
- # def destroy
30
- # super
31
- # end
32
-
33
- # GET /resource/cancel
34
- # Forces the session data which is usually expired after sign
35
- # in to be expired now. This is useful if the user wants to
36
- # cancel oauth signing in/up in the middle of the process,
37
- # removing all OAuth session data.
38
- # def cancel
39
- # super
40
- # end
41
-
42
- # protected
43
-
44
- # If you have extra params to permit, append them to the sanitizer.
45
- # def configure_sign_up_params
46
- # devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute])
47
- # end
48
-
49
- # If you have extra params to permit, append them to the sanitizer.
50
- # def configure_account_update_params
51
- # devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
52
- # end
53
-
54
- # The path used after sign up.
55
- # def after_sign_up_path_for(resource)
56
- # super(resource)
57
- # end
58
-
59
- # The path used after sign up for inactive accounts.
60
- # def after_inactive_sign_up_path_for(resource)
61
- # super(resource)
62
- # end
63
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Admin::Users::SessionsController < Devise::SessionsController
4
- layout 'admin/auth'
5
- # before_action :configure_sign_in_params, only: [:create]
6
-
7
- # GET /resource/sign_in
8
- # def new
9
- # super
10
- # end
11
-
12
- # POST /resource/sign_in
13
- # def create
14
- # super
15
- # end
16
-
17
- # DELETE /resource/sign_out
18
- # def destroy
19
- # super
20
- # end
21
-
22
- # protected
23
-
24
- # If you have extra params to permit, append them to the sanitizer.
25
- # def configure_sign_in_params
26
- # devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute])
27
- # end
28
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Admin::Users::UnlocksController < Devise::UnlocksController
4
- layout 'admin/auth'
5
- # GET /resource/unlock/new
6
- # def new
7
- # super
8
- # end
9
-
10
- # POST /resource/unlock
11
- # def create
12
- # super
13
- # end
14
-
15
- # GET /resource/unlock?unlock_token=abcdef
16
- # def show
17
- # super
18
- # end
19
-
20
- # protected
21
-
22
- # The path used after sending unlock password instructions
23
- # def after_sending_unlock_instructions_path_for(resource)
24
- # super(resource)
25
- # end
26
-
27
- # The path used after unlocking the resource
28
- # def after_unlock_path_for(resource)
29
- # super(resource)
30
- # end
31
- end
@@ -1,9 +0,0 @@
1
- <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: {method: :post}) do |f| %>
2
- <%= render "admin/users/shared/error_messages", resource: resource %>
3
-
4
- <%= render 'headmin/forms/fields/email', form: f, attribute: :email, required: true, label: :float %>
5
-
6
- <%= f.submit t('.resend'), class: 'btn btn-lg btn-primary w-100' %>
7
-
8
- <%= render "admin/users/shared/links" %>
9
- <% end %>
@@ -1,5 +0,0 @@
1
- <p><%= t('.welcome', email: @email) %></p>
2
-
3
- <p><%= t('.confirm_email') %></p>
4
-
5
- <p><%= link_to t('.confirm'), confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -1,7 +0,0 @@
1
- <p><%= t('.greeting', email: @email) %></p>
2
-
3
- <% if @resource.try(:unconfirmed_email?) %>
4
- <p><%= t('.email_is_changing_to', email: @resource.unconfirmed_email) %></p>
5
- <% else %>
6
- <p><%= t('.email_is_changed_to', email: @resource.email) %></p>
7
- <% end %>
@@ -1,3 +0,0 @@
1
- <p><%= t('.greeting', email: @resource.email) %></p>
2
-
3
- <p><%= t('.password_has_changed') %></p>
@@ -1,8 +0,0 @@
1
- <p><%= t('.greeting', email: @resource.email) %></p>
2
-
3
- <p><%= t('.someone_requested') %></p>
4
-
5
- <p><%= link_to t('.change'), edit_password_url(@resource, reset_password_token: @token) %></p>
6
-
7
- <p><%= t('.not_requested')%></p>
8
- <p><%= t('.password_not_changed_until') %></p>
@@ -1,7 +0,0 @@
1
- <p><%= t('.greeting', email: @resource.email) %></p>
2
-
3
- <p><%= t('.account_locked') %></p>
4
-
5
- <p><%= t('.click_link') %></p>
6
-
7
- <p><%= link_to t('.unlock_account'), unlock_url(@resource, unlock_token: @token) %></p>
@@ -1,12 +0,0 @@
1
- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: {method: :put}) do |f| %>
2
- <%= render "admin/users/shared/error_messages", resource: resource %>
3
-
4
- <%= f.hidden_field :reset_password_token %>
5
-
6
- <%= render 'headmin/forms/fields/password', form: f, attribute: :password, required: true, label: :float %>
7
- <%= render 'headmin/forms/fields/password', form: f, attribute: :password_confirmation, required: true, label: :float %>
8
-
9
- <%= f.submit t('.change_password'), class: 'btn btn-lg btn-primary w-100' %>
10
-
11
- <%= render "admin/users/shared/links" %>
12
- <% end %>
@@ -1,9 +0,0 @@
1
- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: {method: :post}) do |f| %>
2
- <%= render "admin/users/shared/error_messages", resource: resource %>
3
-
4
- <%= render 'headmin/forms/fields/email', form: f, attribute: :email, required: true, label: :float %>
5
-
6
- <%= f.submit t('.send_instructions'), class: 'btn btn-lg btn-primary w-100' %>
7
-
8
- <%= render "admin/users/shared/links" %>
9
- <% end %>
@@ -1,11 +0,0 @@
1
- <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
2
- <%= render "admin/users/shared/error_messages", resource: resource %>
3
-
4
- <%= render 'headmin/forms/fields/email', form: f, attribute: :email, required: true, label: :float %>
5
- <%= render 'headmin/forms/fields/password', form: f, attribute: :password, required: true, label: :float %>
6
- <%= render 'headmin/forms/fields/password', form: f, attribute: :password_confirmation, required: true, label: :float %>
7
-
8
- <%= f.submit t('.sign_up'), class: 'btn btn-lg btn-primary w-100' %>
9
-
10
- <%= render "admin/users/shared/links" %>
11
- <% end %>
@@ -1,13 +0,0 @@
1
- <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
2
-
3
- <%= render 'headmin/forms/fields/email', form: f, attribute: :email, required: true, label: :float %>
4
- <%= render 'headmin/forms/fields/password', form: f, attribute: :password, required: true, label: :float %>
5
-
6
- <% if devise_mapping.rememberable? %>
7
- <%= render 'headmin/forms/fields/checkbox', form: f, attribute: :remember_me, label: true %>
8
- <% end %>
9
-
10
- <%= f.submit t('.login'), class: 'btn btn-lg btn-primary w-100' %>
11
-
12
- <%= render "admin/users/shared/links" %>
13
- <% end %>
@@ -1,10 +0,0 @@
1
- <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: {method: :post}) do |f| %>
2
- <%= render "admin/users/shared/error_messages", resource: resource %>
3
-
4
- <%= render 'headmin/forms/fields/email', form: f, attribute: :email, required: true, label: :float %>
5
-
6
- <%= f.submit t('.resend'), class: 'btn btn-lg btn-primary w-100' %>
7
-
8
- <%= render "admin/users/shared/links" %>
9
-
10
- <% end %>
@@ -1,36 +0,0 @@
1
- <%#
2
- name: headmin/forms/group
3
- accepts block: yes
4
- parameters:
5
- title: (string) Title for card
6
- description: (string) Description for card
7
- body: (boolean) If true, block contents will be renderd inside the card body
8
- %>
9
-
10
- <div class="card forms-group mb-3 shadow-sm">
11
- <div class="card-body">
12
- <% if defined?(title) && title.present? %>
13
- <h5 class="card-title"><%= title %></h5>
14
- <% end %>
15
-
16
- <% if defined?(description) && description.present? %>
17
- <p class="card-text text-secondary"><%= description %></p>
18
- <% end %>
19
-
20
- <% # Render inside body %>
21
- <% if !defined?(body) || body %>
22
- <%= yield if block_given? %>
23
- <% end %>
24
- </div>
25
-
26
- <% # Render outside body %>
27
- <% if defined?(body) && !body %>
28
- <%= yield if block_given? %>
29
- <% end %>
30
-
31
- <div class="card-footer">
32
- <div class="d-flex justify-content-end">
33
- <%= form.submit "Opslaan", class: 'btn btn-sm btn-primary' %>
34
- </div>
35
- </div>
36
- </div>
@@ -1,23 +0,0 @@
1
- <%#
2
- name: headmin/fields/checkbox
3
- accepts block: no
4
- parameters:
5
- form: Form object
6
- attribute: Name of the attribute of the form model
7
- label: (bool) Label will not be displayed if value is false
8
- %>
9
-
10
- <% label = local_assigns.has_key?(:label) ? label : true %>
11
- <% required = local_assigns.has_key?(:required) ? required : false %>
12
- <div class="<%= ('mb-3 text-start' if label) %>">
13
- <div class="form-check">
14
- <%= form.check_box(
15
- attribute,
16
- class: "form-check-input #{form_field_validation_class(form, attribute)}",
17
- required: required,
18
- 'aria-describedby': form_field_validation_id(form, attribute))
19
- %>
20
- <%= form.label attribute, class: 'form-check-label', required: required %>
21
- <%= render 'headmin/forms/fields/validation', form: form, attribute: attribute %>
22
- </div>
23
- </div>