quadro 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +194 -0
  4. data/Rakefile +39 -0
  5. data/app/assets/images/quadro/close.png +0 -0
  6. data/app/assets/images/quadro/favicon.ico +0 -0
  7. data/app/assets/images/quadro/loading.gif +0 -0
  8. data/app/assets/images/quadro/missing/cover/large.png +0 -0
  9. data/app/assets/images/quadro/missing/cover/medium.png +0 -0
  10. data/app/assets/images/quadro/missing/cover/small.png +0 -0
  11. data/app/assets/images/quadro/missing/cover/thumb.png +0 -0
  12. data/app/assets/images/quadro/missing/image/large.png +0 -0
  13. data/app/assets/images/quadro/missing/image/medium.png +0 -0
  14. data/app/assets/images/quadro/missing/image/small.png +0 -0
  15. data/app/assets/images/quadro/missing/image/thumb.png +0 -0
  16. data/app/assets/images/quadro/missing/slide/large.png +0 -0
  17. data/app/assets/images/quadro/missing/slide/medium.png +0 -0
  18. data/app/assets/images/quadro/missing/slide/small.png +0 -0
  19. data/app/assets/images/quadro/missing/slide/thumb.png +0 -0
  20. data/app/assets/images/quadro/next.png +0 -0
  21. data/app/assets/images/quadro/prev.png +0 -0
  22. data/app/assets/images/quadro/quadro-logo-mini.png +0 -0
  23. data/app/assets/images/quadro/quadro-logo.png +0 -0
  24. data/app/assets/javascripts/quadro/application.js.coffee +27 -0
  25. data/app/assets/javascripts/quadro/message.js.coffee +6 -0
  26. data/app/assets/javascripts/quadro/plugins/gmaps.min.js +1 -0
  27. data/app/assets/javascripts/quadro/plugins/humane.min.js +11 -0
  28. data/app/assets/javascripts/quadro/plugins/jasny-bootstrap.min.js +6 -0
  29. data/app/assets/javascripts/quadro/plugins/jquery.fs.dropper.min.js +9 -0
  30. data/app/assets/javascripts/quadro/plugins/jquery.show_char_limit.min.js +1 -0
  31. data/app/assets/javascripts/quadro/plugins/jquery.smartmenus.bootstrap.min.js +3 -0
  32. data/app/assets/javascripts/quadro/plugins/jquery.smartmenus.min.js +3 -0
  33. data/app/assets/javascripts/quadro/plugins/lightbox.min.js +13 -0
  34. data/app/assets/javascripts/quadro/plugins/pace.min.js +2 -0
  35. data/app/assets/javascripts/quadro/quadro.js.coffee +43 -0
  36. data/app/assets/javascripts/quadro/site.js.coffee +0 -0
  37. data/app/assets/javascripts/quadro/uploader.js.coffee +17 -0
  38. data/app/assets/javascripts/quadro/widget.js.coffee +80 -0
  39. data/app/assets/stylesheets/bootstrap/_mixins.scss +40 -0
  40. data/app/assets/stylesheets/quadro/application.css.sass +19 -0
  41. data/app/assets/stylesheets/quadro/plugins/humane-libnotify.min.css +1 -0
  42. data/app/assets/stylesheets/quadro/plugins/jasny-bootstrap.min.css +7 -0
  43. data/app/assets/stylesheets/quadro/plugins/jquery.fs.dropper.min.css +9 -0
  44. data/app/assets/stylesheets/quadro/plugins/jquery.smartmenus.bootstrap.min.css +1 -0
  45. data/app/assets/stylesheets/quadro/plugins/lightbox.min.css +1 -0
  46. data/app/assets/stylesheets/quadro/plugins/pace.min.css +1 -0
  47. data/app/assets/stylesheets/quadro/quadro.css.sass +99 -0
  48. data/app/assets/stylesheets/quadro/site.css.sass +0 -0
  49. data/app/controllers/quadro/application_controller.rb +122 -0
  50. data/app/controllers/quadro/assets_controller.rb +21 -0
  51. data/app/controllers/quadro/feeds_controller.rb +6 -0
  52. data/app/controllers/quadro/pages_controller.rb +42 -0
  53. data/app/controllers/quadro/robots_controller.rb +6 -0
  54. data/app/controllers/quadro/users_controller.rb +15 -0
  55. data/app/controllers/quadro/widgets_controller.rb +14 -0
  56. data/app/helpers/quadro/application_helper.rb +4 -0
  57. data/app/helpers/quadro/asset_helper.rb +7 -0
  58. data/app/helpers/quadro/navigation_helper.rb +43 -0
  59. data/app/helpers/quadro/widget_helper.rb +54 -0
  60. data/app/models/quadro/asset.rb +11 -0
  61. data/app/models/quadro/asset/cover.rb +18 -0
  62. data/app/models/quadro/asset/image.rb +18 -0
  63. data/app/models/quadro/asset/slide.rb +18 -0
  64. data/app/models/quadro/interaction.rb +13 -0
  65. data/app/models/quadro/page.rb +88 -0
  66. data/app/models/quadro/user.rb +19 -0
  67. data/app/models/quadro/widget.rb +21 -0
  68. data/app/models/quadro/widget/form.rb +13 -0
  69. data/app/models/quadro/widget/gallery.rb +17 -0
  70. data/app/models/quadro/widget/html.rb +14 -0
  71. data/app/models/quadro/widget/map.rb +13 -0
  72. data/app/models/quadro/widget/slider.rb +17 -0
  73. data/app/views/layouts/quadro/application.html.haml +33 -0
  74. data/app/views/layouts/quadro/devise.html.haml +11 -0
  75. data/app/views/quadro/assets/create.js.erb +11 -0
  76. data/app/views/quadro/assets/destroy.js.erb +11 -0
  77. data/app/views/quadro/assets/edit.js.erb +9 -0
  78. data/app/views/quadro/assets/image/_form.html.haml +25 -0
  79. data/app/views/quadro/assets/image/_image.html.haml +10 -0
  80. data/app/views/quadro/assets/slide/_form.html.haml +26 -0
  81. data/app/views/quadro/assets/slide/_slide.html.haml +9 -0
  82. data/app/views/quadro/assets/update.js.erb +18 -0
  83. data/app/views/quadro/feeds/atom.xml.builder +27 -0
  84. data/app/views/quadro/feeds/rss.xml.builder +25 -0
  85. data/app/views/quadro/interactions/_interaction.html.haml +22 -0
  86. data/app/views/quadro/pages/_edit.html.haml +35 -0
  87. data/app/views/quadro/pages/_new.html.haml +11 -0
  88. data/app/views/quadro/pages/_page.html.haml +1 -0
  89. data/app/views/quadro/pages/create.js.erb +7 -0
  90. data/app/views/quadro/pages/destroy.js.erb +5 -0
  91. data/app/views/quadro/pages/edit.js.erb +4 -0
  92. data/app/views/quadro/pages/form.js.erb +6 -0
  93. data/app/views/quadro/pages/index.html.haml +1 -0
  94. data/app/views/quadro/pages/new.js.erb +2 -0
  95. data/app/views/quadro/pages/show.html.haml +1 -0
  96. data/app/views/quadro/pages/update.js.erb +7 -0
  97. data/app/views/quadro/robots/index.text.erb +4 -0
  98. data/app/views/quadro/shared/_modal.html.haml +3 -0
  99. data/app/views/quadro/shared/_navigation.html.haml +17 -0
  100. data/app/views/quadro/shared/_toolbar.html.haml +55 -0
  101. data/app/views/quadro/shared/templates/_blank.html.haml +11 -0
  102. data/app/views/quadro/shared/templates/_demo.html.haml +22 -0
  103. data/app/views/quadro/shared/templates/_jumbotron.html.haml +10 -0
  104. data/app/views/quadro/shared/templates/_sidebar.html.haml +15 -0
  105. data/app/views/quadro/shared/templates/page/_list.html.haml +9 -0
  106. data/app/views/quadro/shared/templates/page/_thumbnail.html.haml +9 -0
  107. data/app/views/quadro/users/_edit.html.haml +15 -0
  108. data/app/views/quadro/users/edit.js.erb +2 -0
  109. data/app/views/quadro/users/update.js.erb +7 -0
  110. data/app/views/quadro/widgets/edit.js.erb +0 -0
  111. data/app/views/quadro/widgets/form/_empty.html.haml +4 -0
  112. data/app/views/quadro/widgets/form/_fields.html.haml +1 -0
  113. data/app/views/quadro/widgets/form/_form.html.haml +0 -0
  114. data/app/views/quadro/widgets/form/_signed_off.html.haml +6 -0
  115. data/app/views/quadro/widgets/form/_signed_on.html.haml +14 -0
  116. data/app/views/quadro/widgets/form/_toolbar.html.haml +7 -0
  117. data/app/views/quadro/widgets/form/_widget.html.haml +1 -0
  118. data/app/views/quadro/widgets/gallery/_empty.html.haml +20 -0
  119. data/app/views/quadro/widgets/gallery/_form.html.haml +0 -0
  120. data/app/views/quadro/widgets/gallery/_signed_off.html.haml +6 -0
  121. data/app/views/quadro/widgets/gallery/_signed_on.html.haml +10 -0
  122. data/app/views/quadro/widgets/gallery/_toolbar.html.haml +7 -0
  123. data/app/views/quadro/widgets/gallery/_uploader.html.haml +5 -0
  124. data/app/views/quadro/widgets/gallery/_widget.html.haml +6 -0
  125. data/app/views/quadro/widgets/html/_empty.html.haml +2 -0
  126. data/app/views/quadro/widgets/html/_form.html.haml +0 -0
  127. data/app/views/quadro/widgets/html/_signed_off.html.haml +6 -0
  128. data/app/views/quadro/widgets/html/_signed_on.html.haml +9 -0
  129. data/app/views/quadro/widgets/html/_toolbar.html.haml +7 -0
  130. data/app/views/quadro/widgets/html/_widget.html.haml +1 -0
  131. data/app/views/quadro/widgets/map/_empty.html.haml +18 -0
  132. data/app/views/quadro/widgets/map/_form.html.haml +0 -0
  133. data/app/views/quadro/widgets/map/_signed_off.html.haml +4 -0
  134. data/app/views/quadro/widgets/map/_signed_on.html.haml +6 -0
  135. data/app/views/quadro/widgets/map/_toolbar.html.haml +7 -0
  136. data/app/views/quadro/widgets/map/_widget.html.haml +45 -0
  137. data/app/views/quadro/widgets/slider/_empty.html.haml +7 -0
  138. data/app/views/quadro/widgets/slider/_form.html.haml +0 -0
  139. data/app/views/quadro/widgets/slider/_signed_off.html.haml +6 -0
  140. data/app/views/quadro/widgets/slider/_signed_on.html.haml +10 -0
  141. data/app/views/quadro/widgets/slider/_toolbar.html.haml +7 -0
  142. data/app/views/quadro/widgets/slider/_uploader.html.haml +5 -0
  143. data/app/views/quadro/widgets/slider/_widget.html.haml +4 -0
  144. data/app/views/quadro/widgets/update.js.erb +0 -0
  145. data/app/views/users/mailer/reset_password_instructions.html.haml +6 -0
  146. data/app/views/users/mailer/unlock_instructions.html.haml +5 -0
  147. data/app/views/users/passwords/edit.html.haml +15 -0
  148. data/app/views/users/passwords/new.html.haml +13 -0
  149. data/app/views/users/sessions/new.html.haml +15 -0
  150. data/app/views/users/shared/_links.html.haml +19 -0
  151. data/app/views/users/unlocks/new.html.haml +13 -0
  152. data/config/initializers/crummy.rb +5 -0
  153. data/config/initializers/devise.rb +261 -0
  154. data/config/initializers/gravatar_image_tag.rb +7 -0
  155. data/config/initializers/kaminari_config.rb +10 -0
  156. data/config/initializers/simple_form.rb +142 -0
  157. data/config/initializers/simple_form_bootstrap.rb +79 -0
  158. data/config/initializers/sitemap.rb +9 -0
  159. data/config/locales/devise.en.yml +60 -0
  160. data/config/locales/kaminari.en.yml +17 -0
  161. data/config/locales/quadro.en.yml +5 -0
  162. data/config/locales/simple_form.en.yml +26 -0
  163. data/config/routes.rb +25 -0
  164. data/db/migrate/20141122163450_create_quadro_widgets.rb +19 -0
  165. data/db/migrate/20141129022344_create_quadro_pages.rb +20 -0
  166. data/db/migrate/20141206085127_create_quadro_assets.rb +16 -0
  167. data/db/migrate/20141207202401_devise_create_quadro_users.rb +28 -0
  168. data/db/migrate/20160606213156_create_quadro_interactions.rb +11 -0
  169. data/lib/generators/quadro/install/USAGE +8 -0
  170. data/lib/generators/quadro/install/install_generator.rb +35 -0
  171. data/lib/generators/quadro/install/templates/app/assets/images/quadro/favicon.ico +0 -0
  172. data/lib/generators/quadro/install/templates/app/assets/images/quadro/quadro-logo-mini.png +0 -0
  173. data/lib/generators/quadro/install/templates/app/assets/images/quadro/quadro-logo.png +0 -0
  174. data/lib/generators/quadro/install/templates/app/assets/javascripts/quadro/site.js.coffee +0 -0
  175. data/lib/generators/quadro/install/templates/app/assets/stylesheets/quadro/site.css.sass +0 -0
  176. data/lib/generators/quadro/install/templates/app/views/quadro/shared/_navigation.html.haml +17 -0
  177. data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_blank.html.haml +11 -0
  178. data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_demo.html.haml +22 -0
  179. data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_jumbotron.html.haml +10 -0
  180. data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_sidebar.html.haml +15 -0
  181. data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/page/_list.html.haml +9 -0
  182. data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/page/_thumbnail.html.haml +9 -0
  183. data/lib/generators/quadro/install/templates/config/initializers/quadro.rb +12 -0
  184. data/lib/generators/quadro/install/templates/db/GeoLite2-Country.mmdb +0 -0
  185. data/lib/generators/quadro/install/templates/public/404.html +37 -0
  186. data/lib/generators/quadro/install/templates/public/422.html +37 -0
  187. data/lib/generators/quadro/install/templates/public/500.html +37 -0
  188. data/lib/generators/quadro/install/templates/public/maintenance.html +37 -0
  189. data/lib/quadro.rb +16 -0
  190. data/lib/quadro/engine.rb +44 -0
  191. data/lib/quadro/loader.rb +30 -0
  192. data/lib/quadro/signature.rb +3 -0
  193. data/lib/quadro/version.rb +3 -0
  194. data/lib/tasks/quadro_tasks.rake +15 -0
  195. data/test/dummy/README.rdoc +261 -0
  196. data/test/dummy/Rakefile +7 -0
  197. data/test/dummy/app/assets/images/quadro/favicon.ico +0 -0
  198. data/test/dummy/app/assets/images/quadro/quadro-logo-mini.png +0 -0
  199. data/test/dummy/app/assets/images/quadro/quadro-logo.png +0 -0
  200. data/test/dummy/app/assets/javascripts/application.js +15 -0
  201. data/test/dummy/app/assets/javascripts/quadro/site.js.coffee +0 -0
  202. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  203. data/test/dummy/app/assets/stylesheets/quadro/site.css.sass +0 -0
  204. data/test/dummy/app/controllers/application_controller.rb +3 -0
  205. data/test/dummy/app/helpers/application_helper.rb +2 -0
  206. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  207. data/test/dummy/app/views/quadro/shared/_navigation.html.haml +17 -0
  208. data/test/dummy/app/views/quadro/shared/templates/_blank.html.haml +11 -0
  209. data/test/dummy/app/views/quadro/shared/templates/_demo.html.haml +22 -0
  210. data/test/dummy/app/views/quadro/shared/templates/_jumbotron.html.haml +10 -0
  211. data/test/dummy/app/views/quadro/shared/templates/_sidebar.html.haml +15 -0
  212. data/test/dummy/app/views/quadro/shared/templates/page/_list.html.haml +9 -0
  213. data/test/dummy/app/views/quadro/shared/templates/page/_thumbnail.html.haml +9 -0
  214. data/test/dummy/config.ru +4 -0
  215. data/test/dummy/config/application.rb +59 -0
  216. data/test/dummy/config/boot.rb +10 -0
  217. data/test/dummy/config/database.yml +25 -0
  218. data/test/dummy/config/environment.rb +5 -0
  219. data/test/dummy/config/environments/development.rb +37 -0
  220. data/test/dummy/config/environments/production.rb +67 -0
  221. data/test/dummy/config/environments/test.rb +37 -0
  222. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  223. data/test/dummy/config/initializers/inflections.rb +15 -0
  224. data/test/dummy/config/initializers/mime_types.rb +5 -0
  225. data/test/dummy/config/initializers/quadro.rb +12 -0
  226. data/test/dummy/config/initializers/secret_token.rb +7 -0
  227. data/test/dummy/config/initializers/session_store.rb +8 -0
  228. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  229. data/test/dummy/config/locales/en.yml +5 -0
  230. data/test/dummy/config/routes.rb +3 -0
  231. data/test/dummy/db/GeoLite2-Country.mmdb +0 -0
  232. data/test/dummy/db/migrate/20160615055717_create_quadro_widgets.quadro.rb +20 -0
  233. data/test/dummy/db/migrate/20160615055718_create_quadro_pages.quadro.rb +21 -0
  234. data/test/dummy/db/migrate/20160615055719_create_quadro_assets.quadro.rb +17 -0
  235. data/test/dummy/db/migrate/20160615055720_devise_create_quadro_users.quadro.rb +29 -0
  236. data/test/dummy/db/migrate/20160615055721_create_quadro_interactions.quadro.rb +12 -0
  237. data/test/dummy/db/schema.rb +105 -0
  238. data/test/dummy/db/test.sqlite3 +0 -0
  239. data/test/dummy/log/development.log +0 -0
  240. data/test/dummy/log/test.log +3 -0
  241. data/test/dummy/public/404.html +37 -0
  242. data/test/dummy/public/422.html +37 -0
  243. data/test/dummy/public/500.html +37 -0
  244. data/test/dummy/public/maintenance.html +37 -0
  245. data/test/dummy/script/rails +6 -0
  246. data/test/integration/navigation_test.rb +10 -0
  247. data/test/quadro_test.rb +7 -0
  248. data/test/test_helper.rb +18 -0
  249. metadata +806 -0
@@ -0,0 +1,10 @@
1
+ =# render("quadro/widgets/slider/toolbar", widget: widget)
2
+
3
+ - if content.blank? && widget.slides.blank?
4
+ = render("quadro/widgets/slider/empty")
5
+ - elsif widget.slides.blank?
6
+ = content.html_safe
7
+ - else
8
+ = render("quadro/widgets/slider/widget", widget: widget)
9
+
10
+ = render("quadro/widgets/slider/uploader", widget: widget)
@@ -0,0 +1,7 @@
1
+ .well.well-sm.clearfix
2
+ .pull-left
3
+ .btn.btn-link.btn-xs
4
+ .text-muted.text-uppercase Slider
5
+ .pull-right
6
+ %button.btn.btn-link.btn-xs
7
+ %i.fa.fa-cog.text-muted
@@ -0,0 +1,5 @@
1
+ .asset-uploader
2
+ .asset-dropper(data-assetable-type='Quadro::Widget::Slider' data-assetable-id="#{widget.id}" data-type='Quadro::Asset::Slide' data-path="#{page_widget_assets_path(page_id: widget.page.id, widget_id: widget.id)}")
3
+ .asset-list.clearfix(data-assetable-type='Quadro::Widget::Slider' data-assetable-id="#{widget.id}")
4
+ - widget.slides.each do |slide|
5
+ = render 'quadro/assets/slide/slide', asset: slide, widget: widget, page: page
@@ -0,0 +1,4 @@
1
+ .widget.widget-slider
2
+ - widget.slides.each do |slide|
3
+ .slide
4
+ = image_tag slide.url(:medium), alt: slide.alt
File without changes
@@ -0,0 +1,6 @@
1
+ %p
2
+ Hello #{@resource.email}!
3
+ %p Someone has requested a link to change your password. You can do this through the link below.
4
+ %p= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token)
5
+ %p If you didn't request this, please ignore this email.
6
+ %p Your password won't change until you access the link above and create a new one.
@@ -0,0 +1,5 @@
1
+ %p
2
+ Hello #{@resource.email}!
3
+ %p Your account has been locked due to an excessive number of unsuccessful sign in attempts.
4
+ %p Click the link below to unlock your account:
5
+ %p= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token)
@@ -0,0 +1,15 @@
1
+ .container
2
+ .row
3
+ .col-md-4.col-md-offset-4
4
+ .panel.panel-default
5
+ .panel-heading.text-center
6
+ = image_tag 'quadro/quadro-logo.png'
7
+ .panel-body
8
+ = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |form|
9
+ = devise_error_messages!
10
+ = form.hidden_field :reset_password_token
11
+ = form.input :password
12
+ = form.input :password_confirmation, input_html: { class: 'form-control' }
13
+ = form.submit 'Change my password', class: 'btn btn-primary btn-block'
14
+ %br
15
+ = render 'users/shared/links'
@@ -0,0 +1,13 @@
1
+ .container
2
+ .row
3
+ .col-md-4.col-md-offset-4
4
+ .panel.panel-default
5
+ .panel-heading.text-center
6
+ = image_tag 'quadro/quadro-logo.png'
7
+ .panel-body
8
+ = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |form|
9
+ = devise_error_messages!
10
+ = form.input :email, input_html: { class: 'form-control' }
11
+ = form.submit 'Send me reset password instructions', class: 'btn btn-primary btn-block'
12
+ %br
13
+ = render 'users/shared/links'
@@ -0,0 +1,15 @@
1
+ .container
2
+ .row
3
+ .col-md-4.col-md-offset-4
4
+ .panel.panel-default
5
+ .panel-heading.text-center
6
+ = image_tag 'quadro/quadro-logo.png'
7
+ .panel-body
8
+ = simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |form|
9
+ = form.input :email, input_html: { class: 'form-control' }
10
+ = form.input :password, input_html: { class: 'form-control' }
11
+ - if devise_mapping.rememberable?
12
+ = form.input :remember_me, as: :boolean, wrapper_html: { class: 'checkbox' }
13
+ = form.submit 'Sign In', class: 'btn btn-primary btn-block'
14
+ %br
15
+ = render 'users/shared/links'
@@ -0,0 +1,19 @@
1
+ - if controller_name != 'sessions'
2
+ = link_to 'Log in', new_session_path(resource_name)
3
+ %br/
4
+ - if devise_mapping.registerable? && controller_name != 'registrations'
5
+ = link_to 'Sign up', new_registration_path(resource_name)
6
+ %br/
7
+ - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
8
+ = link_to 'Forgot your password?', new_password_path(resource_name)
9
+ %br/
10
+ - if devise_mapping.confirmable? && controller_name != 'confirmations'
11
+ = link_to 'Didn\'t receive confirmation instructions?', new_confirmation_path(resource_name)
12
+ %br/
13
+ - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
14
+ = link_to 'Didn\'t receive unlock instructions?', new_unlock_path(resource_name)
15
+ %br/
16
+ - if devise_mapping.omniauthable?
17
+ - resource_class.omniauth_providers.each do |provider|
18
+ = link_to 'Sign in with #{provider.to_s.titleize}', omniauth_authorize_path(resource_name, provider)
19
+ %br/
@@ -0,0 +1,13 @@
1
+ .container
2
+ .row
3
+ .col-md-4.col-md-offset-4
4
+ .panel.panel-default
5
+ .panel-heading.text-center
6
+ = image_tag 'quadro/quadro-logo.png'
7
+ .panel-body
8
+ = simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |form|
9
+ = devise_error_messages!
10
+ = form.input :email, input_html: { class: 'form-control' }
11
+ = form.submit 'Resend unlock instructions', class: 'btn btn-primary btn-block'
12
+ %br
13
+ = render 'users/shared/links'
@@ -0,0 +1,5 @@
1
+ Crummy.configure do |config|
2
+ config.format = :html_list
3
+ config.html_separator = ' \ '
4
+ config.ul_class = 'breadcrumb'
5
+ end
@@ -0,0 +1,261 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # The secret key used by Devise. Devise uses this key to generate
5
+ # random tokens. Changing this key will render invalid all existing
6
+ # confirmation, reset password and unlock tokens in the database.
7
+ config.secret_key = '6a31a11a2b4013801c756dd8f9db1926e59afea3265770400340d7e7ba95339b1cfefa1906460488dd4995d38f9c012312704ce5e0f53331aceb083f256a5d31'
8
+
9
+ # ==> Mailer Configuration
10
+ # Configure the e-mail address which will be shown in Devise::Mailer,
11
+ # note that it will be overwritten if you use your own mailer class
12
+ # with default "from" parameter.
13
+ config.mailer_sender = Quadro.config.email
14
+
15
+ # Configure the class responsible to send e-mails.
16
+ # config.mailer = 'Devise::Mailer'
17
+
18
+ # ==> ORM configuration
19
+ # Load and configure the ORM. Supports :active_record (default) and
20
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
21
+ # available as additional gems.
22
+ require 'devise/orm/active_record'
23
+
24
+ # ==> Configuration for any authentication mechanism
25
+ # Configure which keys are used when authenticating a user. The default is
26
+ # just :email. You can configure it to use [:username, :subdomain], so for
27
+ # authenticating a user, both parameters are required. Remember that those
28
+ # parameters are used only when authenticating and not when retrieving from
29
+ # session. If you need permissions, you should implement that in a before filter.
30
+ # You can also supply a hash where the value is a boolean determining whether
31
+ # or not authentication should be aborted when the value is not present.
32
+ # config.authentication_keys = [ :email ]
33
+
34
+ # Configure parameters from the request object used for authentication. Each entry
35
+ # given should be a request method and it will automatically be passed to the
36
+ # find_for_authentication method and considered in your model lookup. For instance,
37
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
38
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
39
+ # config.request_keys = []
40
+
41
+ # Configure which authentication keys should be case-insensitive.
42
+ # These keys will be downcased upon creating or modifying a user and when used
43
+ # to authenticate or find a user. Default is :email.
44
+ config.case_insensitive_keys = [ :email ]
45
+
46
+ # Configure which authentication keys should have whitespace stripped.
47
+ # These keys will have whitespace before and after removed upon creating or
48
+ # modifying a user and when used to authenticate or find a user. Default is :email.
49
+ config.strip_whitespace_keys = [ :email ]
50
+
51
+ # Tell if authentication through request.params is enabled. True by default.
52
+ # It can be set to an array that will enable params authentication only for the
53
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
54
+ # enable it only for database (email + password) authentication.
55
+ # config.params_authenticatable = true
56
+
57
+ # Tell if authentication through HTTP Auth is enabled. False by default.
58
+ # It can be set to an array that will enable http authentication only for the
59
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
60
+ # enable it only for database authentication. The supported strategies are:
61
+ # :database = Support basic authentication with authentication key + password
62
+ # config.http_authenticatable = false
63
+
64
+ # If 401 status code should be returned for AJAX requests. True by default.
65
+ # config.http_authenticatable_on_xhr = true
66
+
67
+ # The realm used in Http Basic Authentication. 'Application' by default.
68
+ # config.http_authentication_realm = 'Application'
69
+
70
+ # It will change confirmation, password recovery and other workflows
71
+ # to behave the same regardless if the e-mail provided was right or wrong.
72
+ # Does not affect registerable.
73
+ # config.paranoid = true
74
+
75
+ # By default Devise will store the user in session. You can skip storage for
76
+ # particular strategies by setting this option.
77
+ # Notice that if you are skipping storage for all authentication paths, you
78
+ # may want to disable generating routes to Devise's sessions controller by
79
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
80
+ config.skip_session_storage = [:http_auth]
81
+
82
+ # By default, Devise cleans up the CSRF token on authentication to
83
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
84
+ # requests for sign in and sign up, you need to get a new CSRF token
85
+ # from the server. You can disable this option at your own risk.
86
+ # config.clean_up_csrf_token_on_authentication = true
87
+
88
+ # ==> Configuration for :database_authenticatable
89
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
90
+ # using other encryptors, it sets how many times you want the password re-encrypted.
91
+ #
92
+ # Limiting the stretches to just one in testing will increase the performance of
93
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
94
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
95
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
96
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
97
+ config.stretches = Rails.env.test? ? 1 : 10
98
+
99
+ # Setup a pepper to generate the encrypted password.
100
+ # config.pepper = '159e78eb6823ab57484f5ea478a2e0f1ccf41a2fbae3102a0d5e84dfa46a55dd81bd1d1ecdac93d2667895b899c77aad14211440651a04a607e2e9329718d035'
101
+
102
+ # ==> Configuration for :confirmable
103
+ # A period that the user is allowed to access the website even without
104
+ # confirming their account. For instance, if set to 2.days, the user will be
105
+ # able to access the website for two days without confirming their account,
106
+ # access will be blocked just in the third day. Default is 0.days, meaning
107
+ # the user cannot access the website without confirming their account.
108
+ # config.allow_unconfirmed_access_for = 2.days
109
+
110
+ # A period that the user is allowed to confirm their account before their
111
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
112
+ # their account within 3 days after the mail was sent, but on the fourth day
113
+ # their account can't be confirmed with the token any more.
114
+ # Default is nil, meaning there is no restriction on how long a user can take
115
+ # before confirming their account.
116
+ # config.confirm_within = 3.days
117
+
118
+ # If true, requires any email changes to be confirmed (exactly the same way as
119
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
120
+ # db field (see migrations). Until confirmed, new email is stored in
121
+ # unconfirmed_email column, and copied to email column on successful confirmation.
122
+ config.reconfirmable = true
123
+
124
+ # Defines which key will be used when confirming an account
125
+ # config.confirmation_keys = [ :email ]
126
+
127
+ # ==> Configuration for :rememberable
128
+ # The time the user will be remembered without asking for credentials again.
129
+ # config.remember_for = 2.weeks
130
+
131
+ # Invalidates all the remember me tokens when the user signs out.
132
+ config.expire_all_remember_me_on_sign_out = true
133
+
134
+ # If true, extends the user's remember period when remembered via cookie.
135
+ # config.extend_remember_period = false
136
+
137
+ # Options to be passed to the created cookie. For instance, you can set
138
+ # secure: true in order to force SSL only cookies.
139
+ # config.rememberable_options = {}
140
+
141
+ # ==> Configuration for :validatable
142
+ # Range for password length.
143
+ config.password_length = 8..128
144
+
145
+ # Email regex used to validate email formats. It simply asserts that
146
+ # one (and only one) @ exists in the given string. This is mainly
147
+ # to give user feedback and not to assert the e-mail validity.
148
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
149
+
150
+ # ==> Configuration for :timeoutable
151
+ # The time you want to timeout the user session without activity. After this
152
+ # time the user will be asked for credentials again. Default is 30 minutes.
153
+ # config.timeout_in = 30.minutes
154
+
155
+ # If true, expires auth token on session timeout.
156
+ # config.expire_auth_token_on_timeout = false
157
+
158
+ # ==> Configuration for :lockable
159
+ # Defines which strategy will be used to lock an account.
160
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
161
+ # :none = No lock strategy. You should handle locking by yourself.
162
+ # config.lock_strategy = :failed_attempts
163
+
164
+ # Defines which key will be used when locking and unlocking an account
165
+ # config.unlock_keys = [ :email ]
166
+
167
+ # Defines which strategy will be used to unlock an account.
168
+ # :email = Sends an unlock link to the user email
169
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
170
+ # :both = Enables both strategies
171
+ # :none = No unlock strategy. You should handle unlocking by yourself.
172
+ # config.unlock_strategy = :both
173
+
174
+ # Number of authentication tries before locking an account if lock_strategy
175
+ # is failed attempts.
176
+ # config.maximum_attempts = 20
177
+
178
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
179
+ # config.unlock_in = 1.hour
180
+
181
+ # Warn on the last attempt before the account is locked.
182
+ # config.last_attempt_warning = true
183
+
184
+ # ==> Configuration for :recoverable
185
+ #
186
+ # Defines which key will be used when recovering the password for an account
187
+ # config.reset_password_keys = [ :email ]
188
+
189
+ # Time interval you can reset your password with a reset password key.
190
+ # Don't put a too small interval or your users won't have the time to
191
+ # change their passwords.
192
+ config.reset_password_within = 6.hours
193
+
194
+ # ==> Configuration for :encryptable
195
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
196
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
197
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
198
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
199
+ # REST_AUTH_SITE_KEY to pepper).
200
+ #
201
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
202
+ # config.encryptor = :sha512
203
+
204
+ # ==> Scopes configuration
205
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
206
+ # "users/sessions/new". It's turned off by default because it's slower if you
207
+ # are using only default views.
208
+ config.scoped_views = true
209
+
210
+ # Configure the default scope given to Warden. By default it's the first
211
+ # devise role declared in your routes (usually :user).
212
+ config.default_scope = :user
213
+
214
+ # Set this configuration to false if you want /users/sign_out to sign out
215
+ # only the current scope. By default, Devise signs out all scopes.
216
+ config.sign_out_all_scopes = true
217
+
218
+ # ==> Navigation configuration
219
+ # Lists the formats that should be treated as navigational. Formats like
220
+ # :html, should redirect to the sign in page when the user does not have
221
+ # access, but formats like :xml or :json, should return 401.
222
+ #
223
+ # If you have any extra navigational formats, like :iphone or :mobile, you
224
+ # should add them to the navigational formats lists.
225
+ #
226
+ # The "*/*" below is required to match Internet Explorer requests.
227
+ # config.navigational_formats = ['*/*', :html]
228
+
229
+ # The default HTTP method used to sign out a resource. Default is :delete.
230
+ config.sign_out_via = :delete
231
+
232
+ # ==> OmniAuth
233
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
234
+ # up on your models and hooks.
235
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
236
+
237
+ # ==> Warden configuration
238
+ # If you want to use other strategies, that are not supported by Devise, or
239
+ # change the failure app, you can configure them inside the config.warden block.
240
+ #
241
+ # config.warden do |manager|
242
+ # manager.intercept_401 = false
243
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
244
+ # end
245
+
246
+ # ==> Mountable engine configurations
247
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
248
+ # is mountable, there are some extra configurations to be taken into account.
249
+ # The following options are available, assuming the engine is mounted as:
250
+ #
251
+ # mount MyEngine, at: '/my_engine'
252
+ #
253
+ # The router that invoked `devise_for`, in the example above, would be:
254
+ config.router_name = :quadro
255
+
256
+ # When using omniauth, Devise cannot automatically set Omniauth path,
257
+ # so you need to do it manually. For the users scope, it would be:
258
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
259
+
260
+ config.parent_controller = 'Quadro::ApplicationController'
261
+ end
@@ -0,0 +1,7 @@
1
+ GravatarImageTag.configure do |config|
2
+ config.filetype = nil
3
+ config.include_size_attributes = true
4
+ config.rating = nil
5
+ config.size = 36
6
+ config.secure = true
7
+ end
@@ -0,0 +1,10 @@
1
+ Kaminari.configure do |config|
2
+ config.default_per_page = 10
3
+ # config.max_per_page = nil
4
+ # config.window = 4
5
+ # config.outer_window = 0
6
+ # config.left = 0
7
+ # config.right = 0
8
+ # config.page_method_name = :page
9
+ # config.param_name = :page
10
+ end
@@ -0,0 +1,142 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ # Wrappers are used by the form builder to generate a
4
+ # complete input. You can remove any component from the
5
+ # wrapper, change the order or even add your own to the
6
+ # stack. The options given below are used to wrap the
7
+ # whole input.
8
+ config.wrappers :default, :class => :input,
9
+ :hint_class => :field_with_hint, :error_class => :field_with_errors do |b|
10
+ ## Extensions enabled by default
11
+ # Any of these extensions can be disabled for a
12
+ # given input by passing: `f.input EXTENSION_NAME => false`.
13
+ # You can make any of these extensions optional by
14
+ # renaming `b.use` to `b.optional`.
15
+
16
+ # Determines whether to use HTML5 (:email, :url, ...)
17
+ # and required attributes
18
+ b.use :html5
19
+
20
+ # Calculates placeholders automatically from I18n
21
+ # You can also pass a string as f.input :placeholder => "Placeholder"
22
+ b.use :placeholder
23
+
24
+ ## Optional extensions
25
+ # They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
26
+ # to the input. If so, they will retrieve the values from the model
27
+ # if any exists. If you want to enable the lookup for any of those
28
+ # extensions by default, you can change `b.optional` to `b.use`.
29
+
30
+ # Calculates maxlength from length validations for string inputs
31
+ b.optional :maxlength
32
+
33
+ # Calculates pattern from format validations for string inputs
34
+ b.optional :pattern
35
+
36
+ # Calculates min and max from length validations for numeric inputs
37
+ b.optional :min_max
38
+
39
+ # Calculates readonly automatically from readonly attributes
40
+ b.optional :readonly
41
+
42
+ ## Inputs
43
+ b.use :label_input
44
+ b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
45
+ b.use :error, :wrap_with => { :tag => :span, :class => :error }
46
+ end
47
+
48
+ # The default wrapper to be used by the FormBuilder.
49
+ config.default_wrapper = :default
50
+
51
+ # Define the way to render check boxes / radio buttons with labels.
52
+ # Defaults to :nested for bootstrap config.
53
+ # :inline => input + label
54
+ # :nested => label > input
55
+ config.boolean_style = :nested
56
+
57
+ # Default class for buttons
58
+ config.button_class = 'btn'
59
+
60
+ # Method used to tidy up errors. Specify any Rails Array method.
61
+ # :first lists the first message for each field.
62
+ # Use :to_sentence to list all errors for each field.
63
+ # config.error_method = :first
64
+
65
+ # Default tag used for error notification helper.
66
+ config.error_notification_tag = :div
67
+
68
+ # CSS class to add for error notification helper.
69
+ config.error_notification_class = 'alert alert-error'
70
+
71
+ # ID to add for error notification helper.
72
+ # config.error_notification_id = nil
73
+
74
+ # Series of attempts to detect a default label method for collection.
75
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
76
+
77
+ # Series of attempts to detect a default value method for collection.
78
+ # config.collection_value_methods = [ :id, :to_s ]
79
+
80
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
81
+ # config.collection_wrapper_tag = nil
82
+
83
+ # You can define the class to use on all collection wrappers. Defaulting to none.
84
+ # config.collection_wrapper_class = nil
85
+
86
+ # You can wrap each item in a collection of radio/check boxes with a tag,
87
+ # defaulting to :span. Please note that when using :boolean_style = :nested,
88
+ # SimpleForm will force this option to be a label.
89
+ # config.item_wrapper_tag = :span
90
+
91
+ # You can define a class to use in all item wrappers. Defaulting to none.
92
+ # config.item_wrapper_class = nil
93
+
94
+ # How the label text should be generated altogether with the required text.
95
+ # config.label_text = lambda { |label, required| "#{required} #{label}" }
96
+
97
+ # You can define the class to use on all labels. Default is nil.
98
+ config.label_class = 'control-label'
99
+
100
+ # You can define the class to use on all forms. Default is simple_form.
101
+ # config.form_class = :simple_form
102
+
103
+ # You can define which elements should obtain additional classes
104
+ # config.generate_additional_classes_for = [:wrapper, :label, :input]
105
+
106
+ # Whether attributes are required by default (or not). Default is true.
107
+ # config.required_by_default = true
108
+
109
+ # Tell browsers whether to use default HTML5 validations (novalidate option).
110
+ # Default is enabled.
111
+ config.browser_validations = true
112
+
113
+ # Collection of methods to detect if a file type was given.
114
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
115
+
116
+ # Custom mappings for input types. This should be a hash containing a regexp
117
+ # to match as key, and the input type that will be used when the field name
118
+ # matches the regexp as value.
119
+ # config.input_mappings = { /count/ => :integer }
120
+
121
+ # Custom wrappers for input types. This should be a hash containing an input
122
+ # type as key and the wrapper that will be used for all inputs with specified type.
123
+ # config.wrapper_mappings = { :string => :prepend }
124
+
125
+ # Default priority for time_zone inputs.
126
+ # config.time_zone_priority = nil
127
+
128
+ # Default priority for country inputs.
129
+ # config.country_priority = nil
130
+
131
+ # Default size for text inputs.
132
+ # config.default_input_size = 50
133
+
134
+ # When false, do not use translations for labels.
135
+ # config.translate_labels = true
136
+
137
+ # Automatically discover new inputs in Rails' autoload path.
138
+ # config.inputs_discovery = true
139
+
140
+ # Cache SimpleForm inputs discovery
141
+ # config.cache_discovery = !Rails.env.development?
142
+ end