web_admin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (264) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +32 -0
  6. data/Gemfile.lock +335 -0
  7. data/MIT-LICENSE +20 -0
  8. data/README.rdoc +3 -0
  9. data/Rakefile +22 -0
  10. data/app/assets/images/web_admin/.keep +0 -0
  11. data/app/assets/images/web_admin/avatar.jpg +0 -0
  12. data/app/assets/images/web_admin/first_icon.png +0 -0
  13. data/app/assets/images/web_admin/render-1-thumb.jpg +0 -0
  14. data/app/assets/images/web_admin/render-1.jpg +0 -0
  15. data/app/assets/images/web_admin/render-2-thumb.jpg +0 -0
  16. data/app/assets/images/web_admin/render-2.jpg +0 -0
  17. data/app/assets/images/web_admin/render-3-thumb.jpg +0 -0
  18. data/app/assets/images/web_admin/render-3.jpg +0 -0
  19. data/app/assets/images/web_admin/render-4-thumb.jpg +0 -0
  20. data/app/assets/images/web_admin/render-4.jpg +0 -0
  21. data/app/assets/images/web_admin/responsive.png +0 -0
  22. data/app/assets/javascripts/web_admin/app.data.js +336 -0
  23. data/app/assets/javascripts/web_admin/app.js +172 -0
  24. data/app/assets/javascripts/web_admin/app.plugin.js +220 -0
  25. data/app/assets/javascripts/web_admin/application.js +20 -0
  26. data/app/assets/javascripts/web_admin/bootstrap-filestyle.min.js +1 -0
  27. data/app/assets/javascripts/web_admin/bootstrap.js +1951 -0
  28. data/app/assets/javascripts/web_admin/charts/easypiechart/jquery.easy-pie-chart.js +184 -0
  29. data/app/assets/javascripts/web_admin/charts/sparkline/jquery.sparkline.min.js +5 -0
  30. data/app/assets/javascripts/web_admin/combodate/combodate.js +453 -0
  31. data/app/assets/javascripts/web_admin/combodate/moment.min.js +6 -0
  32. data/app/assets/javascripts/web_admin/data/datagrid.json +1900 -0
  33. data/app/assets/javascripts/web_admin/data/datatable.json +401 -0
  34. data/app/assets/javascripts/web_admin/datatables/jquery.dataTables.min.js +155 -0
  35. data/app/assets/javascripts/web_admin/datepicker/bootstrap-datepicker.js +474 -0
  36. data/app/assets/javascripts/web_admin/datepicker.js +3 -0
  37. data/app/assets/javascripts/web_admin/fuelux/fuelux.js +1645 -0
  38. data/app/assets/javascripts/web_admin/fullcalendar/fullcalendar.min.js +7 -0
  39. data/app/assets/javascripts/web_admin/grid/gallery.js +14 -0
  40. data/app/assets/javascripts/web_admin/grid/jquery.grid-a-licious.min.js +15 -0
  41. data/app/assets/javascripts/web_admin/grid/masonry.pkgd.min.js +9 -0
  42. data/app/assets/javascripts/web_admin/ie/excanvas.js +924 -0
  43. data/app/assets/javascripts/web_admin/ie/html5.js +9 -0
  44. data/app/assets/javascripts/web_admin/ie/respond.min.js +6 -0
  45. data/app/assets/javascripts/web_admin/jquery-ui-1.10.3.custom.min.js +6 -0
  46. data/app/assets/javascripts/web_admin/jquery.datetimepicker.js +1851 -0
  47. data/app/assets/javascripts/web_admin/jquery.ui.touch-punch.min.js +11 -0
  48. data/app/assets/javascripts/web_admin/parsley/parsley.min.js +35 -0
  49. data/app/assets/javascripts/web_admin/prettyphoto/default/default_thumb.png +0 -0
  50. data/app/assets/javascripts/web_admin/prettyphoto/default/loader.gif +0 -0
  51. data/app/assets/javascripts/web_admin/prettyphoto/default/sprite.png +0 -0
  52. data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_next.png +0 -0
  53. data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_prev.png +0 -0
  54. data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_x.png +0 -0
  55. data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_y.png +0 -0
  56. data/app/assets/javascripts/web_admin/prettyphoto/jquery.prettyPhoto.js +7 -0
  57. data/app/assets/javascripts/web_admin/prettyphoto/prettyPhoto.css +170 -0
  58. data/app/assets/javascripts/web_admin/select2/select2.css +652 -0
  59. data/app/assets/javascripts/web_admin/select2/select2.min.js +22 -0
  60. data/app/assets/javascripts/web_admin/slider/bootstrap-slider.js +388 -0
  61. data/app/assets/javascripts/web_admin/underscore-min.js +7 -0
  62. data/app/assets/javascripts/web_admin/underscore-min.map +1 -0
  63. data/app/assets/javascripts/web_admin/upload_image.js +39 -0
  64. data/app/assets/stylesheets/web_admin/application.css +15 -0
  65. data/app/assets/stylesheets/web_admin/bootstrap.css +5784 -0
  66. data/app/assets/stylesheets/web_admin/font-awesome.min.css +4 -0
  67. data/app/assets/stylesheets/web_admin/font.css +18 -0
  68. data/app/assets/stylesheets/web_admin/fonts/FontAwesome.otf +0 -0
  69. data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.eot +0 -0
  70. data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.svg +414 -0
  71. data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.ttf +0 -0
  72. data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.woff +0 -0
  73. data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.eot +0 -0
  74. data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.svg +229 -0
  75. data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.ttf +0 -0
  76. data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.woff +0 -0
  77. data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-bold-webfont.woff +0 -0
  78. data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-light-webfont.woff +0 -0
  79. data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-webfont.woff +0 -0
  80. data/app/assets/stylesheets/web_admin/landing.css +272 -0
  81. data/app/assets/stylesheets/web_admin/plugin.css +1132 -0
  82. data/app/assets/stylesheets/web_admin/style.css +613 -0
  83. data/app/assets/stylesheets/web_admin/style2.css +21 -0
  84. data/app/controllers/web_admin/albums_controller.rb +8 -0
  85. data/app/controllers/web_admin/application_controller.rb +10 -0
  86. data/app/controllers/web_admin/crud_controller.rb +61 -0
  87. data/app/controllers/web_admin/events_controller.rb +9 -0
  88. data/app/controllers/web_admin/images_controller.rb +8 -0
  89. data/app/controllers/web_admin/institutionals_controller.rb +8 -0
  90. data/app/controllers/web_admin/main_controller.rb +7 -0
  91. data/app/controllers/web_admin/posts_controller.rb +19 -0
  92. data/app/controllers/web_admin/users_controller.rb +15 -0
  93. data/app/controllers/web_admin/videos_controller.rb +8 -0
  94. data/app/enumerations/web_admin/permission_type.rb +5 -0
  95. data/app/enumerations/web_admin/user_type.rb +6 -0
  96. data/app/helpers/web_admin/application_helper.rb +20 -0
  97. data/app/models/ability.rb +14 -0
  98. data/app/models/ckeditor/asset.rb +7 -0
  99. data/app/models/ckeditor/attachment_file.rb +7 -0
  100. data/app/models/ckeditor/picture.rb +7 -0
  101. data/app/models/web_admin/album.rb +13 -0
  102. data/app/models/web_admin/event.rb +20 -0
  103. data/app/models/web_admin/image.rb +10 -0
  104. data/app/models/web_admin/institutional.rb +11 -0
  105. data/app/models/web_admin/permission.rb +9 -0
  106. data/app/models/web_admin/post.rb +14 -0
  107. data/app/models/web_admin/user.rb +25 -0
  108. data/app/models/web_admin/video.rb +17 -0
  109. data/app/uploaders/ckeditor_attachment_file_uploader.rb +36 -0
  110. data/app/uploaders/ckeditor_picture_uploader.rb +47 -0
  111. data/app/uploaders/web_admin/image_post_uploader.rb +55 -0
  112. data/app/uploaders/web_admin/image_uploader.rb +52 -0
  113. data/app/views/devise/confirmations/new.html.erb +12 -0
  114. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  115. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  116. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  117. data/app/views/devise/passwords/edit.html.erb +16 -0
  118. data/app/views/devise/passwords/new.html.erb +12 -0
  119. data/app/views/devise/registrations/edit.html.erb +29 -0
  120. data/app/views/devise/registrations/new.html.erb +18 -0
  121. data/app/views/devise/sessions/new.html.erb +16 -0
  122. data/app/views/devise/shared/_links.html.erb +25 -0
  123. data/app/views/devise/unlocks/new.html.erb +12 -0
  124. data/app/views/layouts/web_admin/devise.html.erb +42 -0
  125. data/app/views/shared/403.html +57 -0
  126. data/app/views/shared/_header.html.erb +16 -0
  127. data/app/views/shared/_navbar.html.erb +23 -0
  128. data/app/views/shared/_notice.html.erb +12 -0
  129. data/app/views/web_admin/albums/_form.html.erb +23 -0
  130. data/app/views/web_admin/albums/edit.html.erb +4 -0
  131. data/app/views/web_admin/albums/index.html.erb +39 -0
  132. data/app/views/web_admin/albums/new.html.erb +4 -0
  133. data/app/views/web_admin/albums/show.html.erb +4 -0
  134. data/app/views/web_admin/events/_form.html.erb +37 -0
  135. data/app/views/web_admin/events/edit.html.erb +4 -0
  136. data/app/views/web_admin/events/index.html.erb +39 -0
  137. data/app/views/web_admin/events/new.html.erb +4 -0
  138. data/app/views/web_admin/images/_form.html.erb +23 -0
  139. data/app/views/web_admin/images/_images.html.erb +10 -0
  140. data/app/views/web_admin/images/create.js.erb +2 -0
  141. data/app/views/web_admin/images/update.js.erb +2 -0
  142. data/app/views/web_admin/institutionals/_form.html.erb +22 -0
  143. data/app/views/web_admin/institutionals/edit.html.erb +4 -0
  144. data/app/views/web_admin/institutionals/index.html.erb +35 -0
  145. data/app/views/web_admin/institutionals/new.html.erb +4 -0
  146. data/app/views/web_admin/layouts/application.html.erb +77 -0
  147. data/app/views/web_admin/main/index.html.erb +1 -0
  148. data/app/views/web_admin/posts/_form.html.erb +27 -0
  149. data/app/views/web_admin/posts/edit.html.erb +4 -0
  150. data/app/views/web_admin/posts/index.html.erb +37 -0
  151. data/app/views/web_admin/posts/new.html.erb +4 -0
  152. data/app/views/web_admin/users/_form.html.erb +49 -0
  153. data/app/views/web_admin/users/edit.html.erb +4 -0
  154. data/app/views/web_admin/users/index.html.erb +35 -0
  155. data/app/views/web_admin/users/new.html.erb +4 -0
  156. data/app/views/web_admin/videos/_form.html.erb +22 -0
  157. data/app/views/web_admin/videos/edit.html.erb +4 -0
  158. data/app/views/web_admin/videos/index.html.erb +37 -0
  159. data/app/views/web_admin/videos/new.html.erb +4 -0
  160. data/bin/rails +12 -0
  161. data/config/initializers/ckeditor.rb +39 -0
  162. data/config/initializers/devise.rb +261 -0
  163. data/config/initializers/enumerate_it.rb +1 -0
  164. data/config/initializers/simple_form.rb +145 -0
  165. data/config/initializers/simple_form_bootstrap.rb +46 -0
  166. data/config/locales/buttons.yml +3 -0
  167. data/config/locales/controllers.yml +9 -0
  168. data/config/locales/devise.en.yml +62 -0
  169. data/config/locales/devise.pt.yml +62 -0
  170. data/config/locales/models.yml +54 -0
  171. data/config/locales/rails.yml +219 -0
  172. data/config/locales/responders.yml +10 -0
  173. data/config/locales/simple_form.en.yml +26 -0
  174. data/config/routes.rb +13 -0
  175. data/db/migrate/20141023223026_devise_create_admin_web_users.rb +42 -0
  176. data/db/migrate/20141023223656_create_admin_web_posts.rb +15 -0
  177. data/db/migrate/20141026181117_create_ckeditor_assets.rb +26 -0
  178. data/db/migrate/20141028020102_create_admin_web_institutionals.rb +10 -0
  179. data/db/migrate/20141028135201_create_admin_web_videos.rb +10 -0
  180. data/db/migrate/20141114020551_create_admin_web_albums.rb +12 -0
  181. data/db/migrate/20141117183405_create_admin_web_images.rb +11 -0
  182. data/db/migrate/20141130203155_add_user_type_to_users.rb +5 -0
  183. data/db/migrate/20141224221959_create_admin_web_events.rb +18 -0
  184. data/db/migrate/20150130140502_create_admin_web_permissions.rb +13 -0
  185. data/db/migrate/20150510191213_rename_tables.rb +12 -0
  186. data/lib/application_responder.rb +12 -0
  187. data/lib/tasks/web_admin_tasks.rake +4 -0
  188. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  189. data/lib/web_admin/engine.rb +15 -0
  190. data/lib/web_admin/version.rb +3 -0
  191. data/lib/web_admin.rb +18 -0
  192. data/spec/factories/admin_web_users.rb +24 -0
  193. data/spec/features/admin_web/albums_spec.rb +74 -0
  194. data/spec/features/admin_web/event_spec.rb +85 -0
  195. data/spec/features/admin_web/institutionals_spec.rb +47 -0
  196. data/spec/features/admin_web/login_spec.rb +18 -0
  197. data/spec/features/admin_web/permissions_spec.rb +40 -0
  198. data/spec/features/admin_web/posts_spec.rb +55 -0
  199. data/spec/features/admin_web/users_spec.rb +73 -0
  200. data/spec/features/admin_web/videos_spec.rb +51 -0
  201. data/spec/fixtures/p3-single.jpg +0 -0
  202. data/spec/models/admin_web/album_spec.rb +20 -0
  203. data/spec/models/admin_web/event_spec.rb +42 -0
  204. data/spec/models/admin_web/image_spec.rb +14 -0
  205. data/spec/models/admin_web/institutional_spec.rb +19 -0
  206. data/spec/models/admin_web/permission_spec.rb +14 -0
  207. data/spec/models/admin_web/post_spec.rb +25 -0
  208. data/spec/models/admin_web/user_spec.rb +18 -0
  209. data/spec/models/admin_web/video_spec.rb +26 -0
  210. data/spec/rails_helper.rb +52 -0
  211. data/spec/spec_helper.rb +85 -0
  212. data/spec/support/capybara.rb +53 -0
  213. data/spec/support/database_cleaner.rb +25 -0
  214. data/spec/support/devise.rb +5 -0
  215. data/spec/support/factory_girl.rb +4 -0
  216. data/spec/support/helpers.rb +82 -0
  217. data/spec/support/shared_connection.rb +10 -0
  218. data/spec/test_app/README.rdoc +28 -0
  219. data/spec/test_app/Rakefile +6 -0
  220. data/spec/test_app/app/assets/images/.keep +0 -0
  221. data/spec/test_app/app/assets/javascripts/application.js +13 -0
  222. data/spec/test_app/app/assets/stylesheets/application.css +15 -0
  223. data/spec/test_app/app/controllers/application_controller.rb +5 -0
  224. data/spec/test_app/app/controllers/concerns/.keep +0 -0
  225. data/spec/test_app/app/helpers/application_helper.rb +2 -0
  226. data/spec/test_app/app/mailers/.keep +0 -0
  227. data/spec/test_app/app/models/.keep +0 -0
  228. data/spec/test_app/app/models/concerns/.keep +0 -0
  229. data/spec/test_app/app/views/layouts/application.html.erb +14 -0
  230. data/spec/test_app/bin/bundle +3 -0
  231. data/spec/test_app/bin/rails +4 -0
  232. data/spec/test_app/bin/rake +4 -0
  233. data/spec/test_app/config/application.rb +29 -0
  234. data/spec/test_app/config/boot.rb +5 -0
  235. data/spec/test_app/config/database.yml +85 -0
  236. data/spec/test_app/config/environment.rb +5 -0
  237. data/spec/test_app/config/environments/development.rb +37 -0
  238. data/spec/test_app/config/environments/production.rb +78 -0
  239. data/spec/test_app/config/environments/test.rb +39 -0
  240. data/spec/test_app/config/initializers/assets.rb +8 -0
  241. data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  242. data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
  243. data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  244. data/spec/test_app/config/initializers/inflections.rb +16 -0
  245. data/spec/test_app/config/initializers/mime_types.rb +4 -0
  246. data/spec/test_app/config/initializers/session_store.rb +3 -0
  247. data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
  248. data/spec/test_app/config/locales/en.yml +23 -0
  249. data/spec/test_app/config/routes.rb +4 -0
  250. data/spec/test_app/config/secrets.yml +22 -0
  251. data/spec/test_app/config.ru +4 -0
  252. data/spec/test_app/db/schema.rb +121 -0
  253. data/spec/test_app/lib/assets/.keep +0 -0
  254. data/spec/test_app/log/.keep +0 -0
  255. data/spec/test_app/public/404.html +67 -0
  256. data/spec/test_app/public/422.html +67 -0
  257. data/spec/test_app/public/500.html +66 -0
  258. data/spec/test_app/public/favicon.ico +0 -0
  259. data/spec/test_app/spec/factories/admin_web_albums.rb +7 -0
  260. data/spec/test_app/spec/factories/admin_web_users.rb +24 -0
  261. data/spec/test_app/spec/factories/permissions.rb +36 -0
  262. data/web_admin.gemspec +38 -0
  263. data/wercker.yml +16 -0
  264. metadata +530 -0
@@ -0,0 +1,46 @@
1
+
2
+ # Use this setup block to configure all options available in SimpleForm.
3
+ SimpleForm.setup do |config|
4
+ config.wrappers :bootstrap, tag: 'div', class: 'form-group', error_class: 'error' do |b|
5
+ b.use :html5
6
+ b.use :placeholder
7
+ b.use :label, class: 'col-lg-2'
8
+ b.wrapper tag: 'div', class: 'col-lg-10' do |ba|
9
+ ba.use :input, class: 'form-control'
10
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
11
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
12
+ end
13
+ end
14
+
15
+ config.wrappers :prepend, tag: 'div', class: "control-group", error_class: 'error' do |b|
16
+ b.use :html5
17
+ b.use :placeholder
18
+ b.use :label
19
+ b.wrapper tag: 'div', class: 'controls' do |input|
20
+ input.wrapper tag: 'div', class: 'input-prepend' do |prepend|
21
+ prepend.use :input
22
+ end
23
+ input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
24
+ input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
25
+ end
26
+ end
27
+
28
+ config.wrappers :append, tag: 'div', class: "control-group", error_class: 'error' do |b|
29
+ b.use :html5
30
+ b.use :placeholder
31
+ b.use :label
32
+ b.wrapper tag: 'div', class: 'controls' do |input|
33
+ input.wrapper tag: 'div', class: 'input-append' do |append|
34
+ append.use :input
35
+ end
36
+ input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
37
+ input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
38
+ end
39
+ end
40
+
41
+ # Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
42
+ # Check the Bootstrap docs (http://twitter.github.com/bootstrap)
43
+ # to learn about the different styles for forms and inputs,
44
+ # buttons and other elements.
45
+ config.default_wrapper = :bootstrap
46
+ end
@@ -0,0 +1,3 @@
1
+ pt-BR:
2
+ buttons:
3
+ signin: "Entrar"
@@ -0,0 +1,9 @@
1
+ pt-BR:
2
+ controllers:
3
+ web_admin/albums: "Álbuns"
4
+ web_admin/events: "Eventos"
5
+ web_admin/images: "Imagens"
6
+ web_admin/institutionals: "Institucionais"
7
+ web_admin/posts: "Notícias"
8
+ web_admin/users: "Usuários"
9
+ web_admin/videos: "Vídeos"
@@ -0,0 +1,62 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid %{authentication_keys} or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid %{authentication_keys} or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your email address before continuing."
19
+ links:
20
+ forgot_password: "Forgot your password?"
21
+ mailer:
22
+ confirmation_instructions:
23
+ subject: "Confirmation instructions"
24
+ reset_password_instructions:
25
+ subject: "Reset password instructions"
26
+ unlock_instructions:
27
+ subject: "Unlock instructions"
28
+ omniauth_callbacks:
29
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
30
+ success: "Successfully authenticated from %{kind} account."
31
+ passwords:
32
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
33
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
34
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
35
+ updated: "Your password has been changed successfully. You are now signed in."
36
+ updated_not_active: "Your password has been changed successfully."
37
+ registrations:
38
+ destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
39
+ signed_up: "Welcome! You have signed up successfully."
40
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
41
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
42
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
43
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
44
+ updated: "Your account has been updated successfully."
45
+ sessions:
46
+ signed_in: "Signed in successfully."
47
+ signed_out: "Signed out successfully."
48
+ already_signed_out: "Signed out successfully."
49
+ unlocks:
50
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
51
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
52
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
53
+ errors:
54
+ messages:
55
+ already_confirmed: "was already confirmed, please try signing in"
56
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
57
+ expired: "has expired, please request a new one"
58
+ not_found: "not found"
59
+ not_locked: "was not locked"
60
+ not_saved:
61
+ one: "1 error prohibited this %{resource} from being saved:"
62
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -0,0 +1,62 @@
1
+ # encoding: UTF-8
2
+ # pt-BR translations for Devise
3
+ pt-BR:
4
+ devise:
5
+ confirmations:
6
+ confirmed: 'Sua conta foi confirmada com sucesso. Você está logado.'
7
+ send_instructions: 'Dentro de minutos, você receberá um e-mail com instruções para a confirmação da sua conta.'
8
+ send_paranoid_instructions: 'Se o seu endereço de e-mail estiver cadastrado, você receberá uma mensagem com instruções para confirmação da sua conta.'
9
+ failure:
10
+ already_authenticated: 'Você já está logado.'
11
+ inactive: 'Sua conta ainda não foi ativada.'
12
+ invalid: 'E-mail ou senha inválidos.'
13
+ invalid_token: 'O token de autenticação não é válido.'
14
+ locked: 'Sua conta está bloqueada.'
15
+ not_found_in_database: 'E-mail ou senha inválidos.'
16
+ timeout: 'Sua sessão expirou, por favor, efetue login novamente para continuar.'
17
+ unauthenticated: 'Para continuar, efetue login ou registre-se.'
18
+ unconfirmed: 'Antes de continuar, confirme a sua conta.'
19
+ links:
20
+ forgot_password: "Esqueceu a senha?"
21
+ mailer:
22
+ confirmation_instructions:
23
+ subject: 'Instruções de confirmação'
24
+ reset_password_instructions:
25
+ subject: 'Instruções de troca de senha'
26
+ unlock_instructions:
27
+ subject: 'Instruções de desbloqueio'
28
+ omniauth_callbacks:
29
+ failure: 'Não foi possível autenticá-lo como %{kind} porque "%{reason}".'
30
+ success: 'Autenticado com sucesso com uma conta de %{kind}.'
31
+ passwords:
32
+ no_token: "Você só pode acessar essa página através de um e-mail de troca de senha. Se já estiver acessando por um e-mail, verifique se a URL fornecida está completa."
33
+ send_instructions: 'Dentro de minutos, você receberá um e-mail com instruções para a troca da sua senha.'
34
+ send_paranoid_instructions: 'Se o seu endereço de e-mail estiver cadastrado, você receberá um link de recuperação da senha via e-mail.'
35
+ updated: 'Sua senha foi alterada com sucesso. Você está logado.'
36
+ updated_not_active: 'Sua senha foi alterada com sucesso.'
37
+ registrations:
38
+ destroyed: 'Tchau! Sua conta foi cancelada com sucesso. Esperamos vê-lo novamente em breve.'
39
+ signed_up: 'Login efetuado com sucesso. Se não foi autorizado, a confirmação será enviada por e-mail.'
40
+ signed_up_but_inactive: 'Você foi cadastrado com sucesso. No entanto, não foi possível efetuar login, pois sua conta não foi ativada.'
41
+ signed_up_but_locked: 'Você foi cadastrado com sucesso. No entanto, não foi possível efetuar login, pois sua conta está bloqueada.'
42
+ signed_up_but_unconfirmed: 'Uma mensagem com um link de confirmação foi enviada para o seu endereço de e-mail. Por favor, abra o link para confirmar a sua conta.'
43
+ update_needs_confirmation: 'Você atualizou a sua conta com sucesso, mas o seu novo endereço de e-mail precisa ser confirmado. Por favor, acesse-o e clique no link de confirmação que enviamos.'
44
+ updated: 'Sua conta foi atualizada com sucesso.'
45
+ sessions:
46
+ signed_in: 'Login efetuado com sucesso!'
47
+ signed_out: 'Saiu com sucesso.'
48
+ unlocks:
49
+ send_instructions: 'Dentro de minutos, você receberá um email com instruções para o desbloqueio da sua conta.'
50
+ send_paranoid_instructions: 'Se sua conta existir, você receberá um e-mail com instruções para desbloqueá-la em alguns minutos.'
51
+ unlocked: 'Sua conta foi desbloqueada com sucesso. Efetue login para continuar.'
52
+
53
+ errors:
54
+ messages:
55
+ already_confirmed: "já foi confirmado"
56
+ confirmation_period_expired: "precisa ser confirmada em até %{period}, por favor, solicite uma nova"
57
+ expired: "expirou, por favor, solicite uma nova"
58
+ not_found: "não encontrado"
59
+ not_locked: "não foi bloqueado"
60
+ not_saved:
61
+ one: "Não foi possível salvar %{resource}: 1 erro"
62
+ other: "Não foi possível salvar %{resource}: %{count} erros."
@@ -0,0 +1,54 @@
1
+ pt-BR:
2
+ activerecord:
3
+ models:
4
+ album: "Álbum"
5
+ event: "Evento"
6
+ image: "Imagem"
7
+ institutional: "Institucional"
8
+ post: "Notícia"
9
+ user: "Usuário"
10
+ video: "Vídeo"
11
+
12
+ attributes:
13
+ web_admin/user:
14
+ email: "Email"
15
+ password: "Senha"
16
+ password_confirmation: "Confirmação de senha"
17
+
18
+ web_admin/post:
19
+ title: "Título"
20
+ abstract: "Resumo"
21
+ image: "Imagem"
22
+ body: "Notícia"
23
+
24
+ web_admin/institutional:
25
+ name: "Título"
26
+ body: "Conteúdo"
27
+
28
+ web_admin/video:
29
+ description: "Descrição"
30
+ link: "Link do Youtube"
31
+
32
+ web_admin/album:
33
+ title: "Título"
34
+ local: "Local"
35
+ date: "Data"
36
+
37
+ web_admin/event:
38
+ title: "Título"
39
+ start_date: "Início às"
40
+ end_date: "Término às"
41
+ description: "Descrição"
42
+ zipcode: "CEP"
43
+ street: "Logradouro"
44
+ number: "Número"
45
+ neighborhood: "Bairro"
46
+ city: "Cidade"
47
+ state: "Estado"
48
+
49
+ enumerations:
50
+ web_admin/permission_type:
51
+ read: "Apenas leitura"
52
+ modify: "Atualizar"
53
+ access: "Acesso total"
54
+ deny: "Bloqueado"
@@ -0,0 +1,219 @@
1
+ pt-BR:
2
+ # formatos de data e hora
3
+ date:
4
+ formats:
5
+ default: "%d/%m/%Y"
6
+ short: "%d de %B"
7
+ long: "%d de %B de %Y"
8
+ report: "Aos %d do mês de %B do ano de %Y"
9
+ sefip: "%Y%m%d"
10
+ competence: "%m/%Y"
11
+
12
+ day_names: [Domingo, Segunda, Terça, Quarta, Quinta, Sexta, Sábado]
13
+ abbr_day_names: [Dom, Seg, Ter, Qua, Qui, Sex, Sáb]
14
+ month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]
15
+ abbr_month_names: [~, Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez]
16
+ order:
17
+ - :day
18
+ - :month
19
+ - :year
20
+
21
+ time:
22
+ formats:
23
+ default: "%d/%m/%Y %H:%M"
24
+ short: "%d/%m, %H:%M h"
25
+ long: "%A, %d de %B de %Y, %H:%M h"
26
+ hour: "%H:%M"
27
+ only_date: "%d/%m/%Y"
28
+ am: ""
29
+ pm: ""
30
+
31
+ # distancia do tempo em palavras
32
+ datetime:
33
+ distance_in_words:
34
+ half_a_minute: "meio minuto"
35
+ less_than_x_seconds:
36
+ one: "menos de 1 segundo"
37
+ other: "menos de %{count} segundos"
38
+
39
+ x_seconds:
40
+ one: "1 segundo"
41
+ other: "%{count} segundos"
42
+
43
+ less_than_x_minutes:
44
+ one: "menos de um minuto"
45
+ other: "menos de %{count} minutos"
46
+
47
+ x_minutes:
48
+ one: "1 minuto"
49
+ other: "%{count} minutos"
50
+
51
+ about_x_hours:
52
+ one: "aproximadamente 1 hora"
53
+ other: "aproximadamente %{count} horas"
54
+
55
+ x_days:
56
+ one: "1 dia"
57
+ other: "%{count} dias"
58
+
59
+ about_x_months:
60
+ one: "aproximadamente 1 mês"
61
+ other: "aproximadamente %{count} meses"
62
+
63
+ x_months:
64
+ one: "1 mês"
65
+ other: "%{count} meses"
66
+
67
+ about_x_years:
68
+ one: "aproximadamente 1 ano"
69
+ other: "aproximadamente %{count} anos"
70
+
71
+ over_x_years:
72
+ one: "mais de 1 ano"
73
+ other: "mais de %{count} anos"
74
+
75
+ almost_x_years:
76
+ one: "quase 1 ano"
77
+ other: "quase %{count} anos"
78
+
79
+ prompts:
80
+ year: "Ano"
81
+ month: "Mês"
82
+ day: "Dia"
83
+ hour: "Hora"
84
+ minute: "Minuto"
85
+ second: "Segundo"
86
+
87
+ number:
88
+ format:
89
+ precision: 2
90
+ separator: ","
91
+ delimiter: "."
92
+ significant: false
93
+ strip_insignificant_zeros: false
94
+
95
+ currency:
96
+ format:
97
+ unit: "R$"
98
+ precision: 2
99
+ format: "%u %n"
100
+ separator: ","
101
+ delimiter: "."
102
+ significant: false
103
+ strip_insignificant_zeros: false
104
+
105
+ percentage:
106
+ format:
107
+ delimiter: "."
108
+
109
+ precision:
110
+ format:
111
+ delimiter: "."
112
+
113
+ human:
114
+ format:
115
+ precision: 2
116
+ delimiter: "."
117
+ significant: true
118
+ strip_insignificant_zeros: true
119
+
120
+ storage_units:
121
+ format: "%n %u"
122
+ units:
123
+ byte:
124
+ one: "Byte"
125
+ other: "Bytes"
126
+ kb: "KB"
127
+ mb: "MB"
128
+ gb: "GB"
129
+ tb: "TB"
130
+ # number_to_human()
131
+ # new in rails 3: please add to other locales
132
+ decimal_units:
133
+ format: "%n %u"
134
+ units:
135
+ unit: ""
136
+ thousand: "mil"
137
+ million:
138
+ one: milhão
139
+ other: milhões
140
+ billion:
141
+ one: bilhão
142
+ other: bilhões
143
+ trillion:
144
+ one: trilhão
145
+ other: trilhões
146
+ quadrillion:
147
+ one: quatrilhão
148
+ other: quatrilhões
149
+
150
+ # Usado no Array.to_sentence
151
+ support:
152
+ array:
153
+ words_connector: ", "
154
+ two_words_connector: " e "
155
+ last_word_connector: " e "
156
+
157
+ select:
158
+ prompt: "Por favor selecione"
159
+
160
+ helpers:
161
+ select:
162
+ prompt: "Por favor selecione"
163
+
164
+ submit:
165
+ create: "Salvar"
166
+ update: "Salvar"
167
+ submit: "Salvar"
168
+
169
+ errors:
170
+ format: "%{attribute} %{message}"
171
+
172
+ template:
173
+ header:
174
+ one: "Não foi possível gravar %{model}: 1 erro"
175
+ other: "Não foi possível gravar %{model}: %{count} erros."
176
+ body: "Por favor, verifique o(s) seguinte(s) campo(s):"
177
+
178
+ messages: &errors_messages
179
+ already_write_off: 'já está baixado'
180
+
181
+ activerecord:
182
+ errors:
183
+ template:
184
+ header:
185
+ one: "Não foi possível gravar %{model}: 1 erro"
186
+ other: "Não foi possível gravar %{model}: %{count} erros."
187
+ body: "Por favor, verifique o(s) seguinte(s) campo(s):"
188
+
189
+ messages:
190
+ taken: "já está em uso"
191
+ record_invalid: "A validação falhou: %{errors}"
192
+ cant_be_destroyed: "devem ser apagados(as) manualmente"
193
+ already_write_off: 'já está baixado'
194
+ inclusion: "não está incluído na lista"
195
+ exclusion: "não está disponível"
196
+ invalid: "não é válido"
197
+ confirmation: "não está de acordo com a confirmação"
198
+ accepted: "deve ser aceito"
199
+ empty: "não pode ficar vazio"
200
+ blank: "não pode ficar em branco"
201
+ too_long: "é muito longo (máximo: %{count} caracteres)"
202
+ too_short: "é muito curto (mínimo: %{count} caracteres)"
203
+ wrong_length: "não possui o tamanho esperado (%{count} caracteres)"
204
+ not_a_number: "não é um número"
205
+ not_an_integer: "não é um número inteiro"
206
+ not_write_off: "não está baixado"
207
+ greater_than: "deve ser maior que %{count}"
208
+ greater_than_or_equal_to: "deve ser maior ou igual a %{count}"
209
+ equal_to: "deve ser igual a %{count}"
210
+ less_than: "deve ser menor que %{count}"
211
+ less_than_or_equal_to: "deve ser menor ou igual a %{count}"
212
+ odd: "deve ser ímpar"
213
+ even: "deve ser par"
214
+ end_date_is_greater_than_start_date: "deve ser maior que o início"
215
+
216
+ <<: *errors_messages
217
+
218
+ full_messages:
219
+ format: "%{attribute}%{message}"
@@ -0,0 +1,10 @@
1
+ pt-BR:
2
+ flash:
3
+ actions:
4
+ create:
5
+ notice: "%{resource_name} criado(a) com sucesso."
6
+ update:
7
+ notice: "%{resource_name} editado(a) com sucesso."
8
+ destroy:
9
+ notice: "%{resource_name} apagado(a) com sucesso."
10
+ alert: "%{resource_name} não pode ser apagado."
@@ -0,0 +1,26 @@
1
+ en:
2
+ simple_form:
3
+ "yes": 'Yes'
4
+ "no": 'No'
5
+ required:
6
+ text: 'required'
7
+ mark: '*'
8
+ # You can uncomment the line below if you need to overwrite the whole required html.
9
+ # When using html, text and mark won't be used.
10
+ # html: '<abbr title="required">*</abbr>'
11
+ error_notification:
12
+ default_message: "Please review the problems below:"
13
+ # Labels and hints examples
14
+ # labels:
15
+ # defaults:
16
+ # password: 'Password'
17
+ # user:
18
+ # new:
19
+ # email: 'E-mail to sign in.'
20
+ # edit:
21
+ # email: 'E-mail.'
22
+ # hints:
23
+ # defaults:
24
+ # username: 'User name to sign in.'
25
+ # password: 'No special characters, please.'
26
+
data/config/routes.rb ADDED
@@ -0,0 +1,13 @@
1
+ WebAdmin::Engine.routes.draw do
2
+ mount Ckeditor::Engine => '/ckeditor'
3
+ devise_for :users, class_name: "WebAdmin::User", module: :devise
4
+ root "main#index"
5
+
6
+ resources :posts
7
+ resources :institutionals
8
+ resources :albums
9
+ resources :videos
10
+ resources :images
11
+ resources :events
12
+ resources :users
13
+ end
@@ -0,0 +1,42 @@
1
+ class DeviseCreateAdminWebUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table(:admin_web_users) do |t|
4
+ ## Database authenticatable
5
+ t.string :email, null: false, default: ""
6
+ t.string :encrypted_password, null: false, default: ""
7
+
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
11
+
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
+
15
+ ## Trackable
16
+ t.integer :sign_in_count, default: 0, null: false
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Confirmable
23
+ # t.string :confirmation_token
24
+ # t.datetime :confirmed_at
25
+ # t.datetime :confirmation_sent_at
26
+ # t.string :unconfirmed_email # Only if using reconfirmable
27
+
28
+ ## Lockable
29
+ # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
30
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ # t.datetime :locked_at
32
+
33
+
34
+ t.timestamps
35
+ end
36
+
37
+ add_index :admin_web_users, :email, unique: true
38
+ add_index :admin_web_users, :reset_password_token, unique: true
39
+ # add_index :admin_web_users, :confirmation_token, unique: true
40
+ # add_index :admin_web_users, :unlock_token, unique: true
41
+ end
42
+ end
@@ -0,0 +1,15 @@
1
+ class CreateAdminWebPosts < ActiveRecord::Migration
2
+ def change
3
+ create_table :admin_web_posts do |t|
4
+ t.references :user, null: false
5
+ t.string :title, null: false
6
+ t.string :abstract
7
+ t.text :body, null: false
8
+ t.string :image
9
+
10
+ t.timestamps
11
+ end
12
+
13
+ add_index :admin_web_posts, :user_id
14
+ end
15
+ end
@@ -0,0 +1,26 @@
1
+ class CreateCkeditorAssets < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :ckeditor_assets do |t|
4
+ t.string :data_file_name, :null => false
5
+ t.string :data_content_type
6
+ t.integer :data_file_size
7
+
8
+ t.integer :assetable_id
9
+ t.string :assetable_type, :limit => 30
10
+ t.string :type, :limit => 30
11
+
12
+ # Uncomment it to save images dimensions, if your need it
13
+ t.integer :width
14
+ t.integer :height
15
+
16
+ t.timestamps
17
+ end
18
+
19
+ add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"
20
+ add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
21
+ end
22
+
23
+ def self.down
24
+ drop_table :ckeditor_assets
25
+ end
26
+ end
@@ -0,0 +1,10 @@
1
+ class CreateAdminWebInstitutionals < ActiveRecord::Migration
2
+ def change
3
+ create_table :admin_web_institutionals do |t|
4
+ t.string :name
5
+ t.text :body
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ class CreateAdminWebVideos < ActiveRecord::Migration
2
+ def change
3
+ create_table :admin_web_videos do |t|
4
+ t.string :description
5
+ t.string :link
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,12 @@
1
+ class CreateAdminWebAlbums < ActiveRecord::Migration
2
+ def change
3
+ create_table :admin_web_albums do |t|
4
+ t.string :title, null: false
5
+ t.date :date, null: false
6
+ t.string :local
7
+
8
+ t.timestamps
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ class CreateAdminWebImages < ActiveRecord::Migration
2
+ def change
3
+ create_table :admin_web_images do |t|
4
+ t.references :album, null: false
5
+ t.string :file, null: false
6
+ t.boolean :cover
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class AddUserTypeToUsers < ActiveRecord::Migration
2
+ def change
3
+ add_column :admin_web_users, :user_type, :integer
4
+ end
5
+ end
@@ -0,0 +1,18 @@
1
+ class CreateAdminWebEvents < ActiveRecord::Migration
2
+ def change
3
+ create_table :admin_web_events do |t|
4
+ t.string :title, :null => false
5
+ t.datetime :start_date
6
+ t.datetime :end_date
7
+ t.text :description, :null => false
8
+ t.string :street, :null => false
9
+ t.string :number
10
+ t.string :zipcode, :null => false
11
+ t.string :neighborhood, :null => false
12
+ t.string :city, :null => false
13
+ t.string :state, :null => false
14
+
15
+ t.timestamps
16
+ end
17
+ end
18
+ end