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,55 @@
1
+ #quadro-toolbar.navbar.navbar-fixed-bottom
2
+ #quadro-gallery.well.well-sm.collapsed
3
+ #quadro-uploader.asset-dropper(data-assetable-type='Quadro::Page' data-assetable-id="#{page.id}" data-type='Quadro::Asset::Image' data-path="#{page_assets_path(page_id: page.id)}")
4
+ #quadro-images.asset-list.clearfix(data-assetable-type='Quadro::Page' data-assetable-id="#{page.id}")
5
+ - page.images.each do |image|
6
+ = render 'quadro/assets/image/image', asset: image, page: page
7
+ #quadro-controls.well.well-sm.clearfix
8
+ .pull-left
9
+ = link_to root_path, class: "quadro-brand" do
10
+ = image_tag 'quadro/quadro-logo-mini.png'
11
+ = link_to new_page_path(parent_id: page.id), remote: true, class: "btn btn-default btn-sm hidden-xs" do
12
+ %i.fa.fa-plus
13
+ New sub page
14
+ = link_to edit_page_path(page.slug), remote: true, class: "btn btn-default btn-sm hidden-xs" do
15
+ %i.fa.fa-cog
16
+ Edit current page
17
+ = link_to page_path(page.slug), remote: true, method: "delete", confirm: "Are you sure of delete this page?", class: "btn btn-default btn-sm hidden-xs" do
18
+ %i.fa.fa-trash-o
19
+ Delete current page
20
+ .btn-group.visible-xs-inline-block(role='group')
21
+ = link_to new_page_path(parent_id: page.id), remote: true, class: "btn btn-default btn-sm" do
22
+ %i.fa.fa-plus
23
+ = link_to edit_page_path(page.slug), remote: true, class: "btn btn-default btn-sm" do
24
+ %i.fa.fa-cog
25
+ = link_to page_path(page.slug), remote: true, method: "delete", confirm: "Are you sure of delete this page?", class: "btn btn-default btn-sm" do
26
+ %i.fa.fa-trash-o
27
+ .pull-right
28
+ %a#quadro-save.btn.btn-default.btn-sm.hide
29
+ %i.fa.fa-floppy-o
30
+ Save changes
31
+ %a#quadro-gallery-toggle.btn.btn-default.btn-sm.hidden-xs.hidden-sm
32
+ %i.fa.fa-picture-o
33
+ Image gallery
34
+ %span.hidden-xs.hidden-sm Editor advanced:
35
+ .btn-group.hidden-xs.hidden-sm(role='group')
36
+ %button#quadro-airmode-off.btn.btn-default.btn-sm(type='button')
37
+ %i.fa.fa-eye
38
+ %button#quadro-airmode-on.btn.btn-default.btn-sm(type='button')
39
+ %i.fa.fa-eye-slash
40
+ .btn-group.dropup.hidden-xs
41
+ %button.btn.btn-default.btn-sm.dropdown-toggle(type='button' data-toggle='dropdown')
42
+ = gravatar_image_tag(current_user.email, alt: current_user.email, title: current_user.email, gravatar: { size: 16 }, class: 'img-rounded')
43
+ = current_user.email
44
+ %b.caret
45
+ %ul.dropdown-menu
46
+ %li
47
+ = link_to edit_user_path, remote: true do
48
+ %i.fa.fa-user
49
+ Edit user
50
+ %li
51
+ = link_to destroy_user_session_path, method: :delete do
52
+ %i.fa.fa-sign-out
53
+ Sign Out
54
+ = link_to destroy_user_session_url, method: :delete, class: "btn btn-default btn-sm visible-xs-inline-block hidden-sm" do
55
+ Sign Out
@@ -0,0 +1,11 @@
1
+ = render 'quadro/shared/navigation'
2
+
3
+ .container
4
+ = render_crumbs
5
+
6
+ .page-header
7
+ %h1= page.title
8
+
9
+ %p.lead= page.summary
10
+
11
+ = widget_for :content
@@ -0,0 +1,22 @@
1
+ = render 'quadro/shared/navigation'
2
+
3
+ .container
4
+ = render_crumbs
5
+
6
+ .page-header
7
+ %h1= page.title
8
+
9
+ %p.lead= page.summary
10
+
11
+ = widget_for :content
12
+
13
+ = widget_for :slider, type: :slider
14
+
15
+ = widget_for :gallery, type: :gallery
16
+
17
+ = widget_for :map, type: :map
18
+
19
+ = widget_for :form, type: :form
20
+
21
+ .row
22
+ = render subpages
@@ -0,0 +1,10 @@
1
+ = render 'quadro/shared/navigation'
2
+
3
+ .container
4
+ .jumbotron(style="background-image: url(#{page.cover.url(:large)})")
5
+ %h1= page.title
6
+ %p= page.summary
7
+
8
+ = render_crumbs
9
+
10
+ = widget_for :content
@@ -0,0 +1,15 @@
1
+ = render 'quadro/shared/navigation'
2
+
3
+ .container
4
+ = render_crumbs
5
+
6
+ .row
7
+ .col-md-3
8
+ = navigation_for page, class: "nav nav-pills nav-stacked"
9
+ .col-md-9
10
+ .page-header
11
+ %h1= page.title
12
+
13
+ %p.lead= page.summary
14
+
15
+ = widget_for :content
@@ -0,0 +1,9 @@
1
+ .media
2
+ .media-left
3
+ = link_to page_path(page), class: "media-object img-thumbnail" do
4
+ = image_tag page.cover.url(:thumb), alt: page.title
5
+ .media-body
6
+ %h4.media-heading
7
+ = link_to page.title, page_path(page)
8
+ %small.text-muted= l(page.created_at, format: :short)
9
+ %p= page.summary
@@ -0,0 +1,9 @@
1
+ .col-sm-6.col-md-4.col-lg-3
2
+ .thumbnail
3
+ = link_to page_path(page) do
4
+ = image_tag page.cover.url(:small), alt: page.title
5
+ .caption
6
+ %h2
7
+ = link_to page.title, page_path(page)
8
+ %small.text-muted= l(page.created_at, format: :short)
9
+ %p= page.summary
@@ -0,0 +1,15 @@
1
+ .modal-header
2
+ %button.close(data-dismiss="modal" type="button")
3
+ %span(aria-hidden="true") ×
4
+ %span.sr-only Close
5
+ %h4.modal-title Edit user
6
+ .modal-body
7
+ = simple_form_for user, multipart: true, remote: true do |form|
8
+ .row
9
+ .col-md-12
10
+ = form.input :name, input_html: { class: 'form-control' }
11
+ = form.input :password, input_html: { class: 'form-control' }
12
+ = form.input :password_confirmation, input_html: { class: 'form-control' }
13
+ = form.input :current_password, input_html: { class: 'form-control' }
14
+ .text-right
15
+ = form.submit class: 'btn btn-primary'
@@ -0,0 +1,2 @@
1
+ $("#quadro-modal .modal-content").html("<%= escape_javascript(render('quadro/users/edit', user: user)) %>");
2
+ $("#quadro-modal").modal("show");
@@ -0,0 +1,7 @@
1
+ <% if user.errors.size > 0 %>
2
+ $("#quadro-modal .modal-content").html("<%= escape_javascript(render('quadro/users/edit', user: user)) %>");
3
+ new Message('User not updated');
4
+ <% else %>
5
+ $("#quadro-modal").modal('hide');
6
+ new Message('User updated');
7
+ <% end %>
File without changes
@@ -0,0 +1,4 @@
1
+ = form.input :name
2
+ = form.input :email
3
+ = form.input :message, as: :text, input_html: { rows: 3 }
4
+ = form.button :submit
@@ -0,0 +1 @@
1
+ = hidden_field_tag :widget_id, widget.id
File without changes
@@ -0,0 +1,6 @@
1
+ = render("quadro/widgets/form/fields", widget: widget, options: options, content: content, form: form)
2
+
3
+ - if content.blank?
4
+ = render("quadro/widgets/form/empty", widget: widget, options: options, content: content, form: form)
5
+ - else
6
+ = render("quadro/widgets/form/widget", widget: widget, options: options, content: content, form: form)
@@ -0,0 +1,14 @@
1
+ =# render("quadro/widgets/form/toolbar", widget: widget)
2
+ = render("quadro/widgets/form/fields", widget: widget, options: options, content: content, form: form)
3
+
4
+ - if content.blank?
5
+ = render("quadro/widgets/form/empty", widget: widget, options: options, content: content, form: form)
6
+ - else
7
+ = render("quadro/widgets/form/widget", widget: widget, options: options, content: content, form: form)
8
+
9
+ - unless widget.interactions.blank?
10
+ .page-header
11
+ %h3 Interactions
12
+
13
+ %ul
14
+ = render widget.interactions
@@ -0,0 +1,7 @@
1
+ .well.well-sm.clearfix
2
+ .pull-left
3
+ .btn.btn-link.btn-xs
4
+ .text-muted.text-uppercase Form
5
+ .pull-right
6
+ %button.btn.btn-link.btn-xs
7
+ %i.fa.fa-cog.text-muted
@@ -0,0 +1 @@
1
+ = content
@@ -0,0 +1,20 @@
1
+ .widget.widget-gallery
2
+ .row
3
+ .col-xs-6.col-sm-3.col-md-2
4
+ = link_to "http://placehold.it/800x600", class: "thumbnail", data: { lightbox: "example" } do
5
+ = image_tag "http://placehold.it/200x200"
6
+ .col-xs-6.col-sm-3.col-md-2
7
+ = link_to "http://placehold.it/800x600", class: "thumbnail", data: { lightbox: "example" } do
8
+ = image_tag "http://placehold.it/200x200"
9
+ .col-xs-6.col-sm-3.col-md-2
10
+ = link_to "http://placehold.it/800x600", class: "thumbnail", data: { lightbox: "example" } do
11
+ = image_tag "http://placehold.it/200x200"
12
+ .col-xs-6.col-sm-3.col-md-2
13
+ = link_to "http://placehold.it/800x600", class: "thumbnail", data: { lightbox: "example" } do
14
+ = image_tag "http://placehold.it/200x200"
15
+ .col-xs-6.col-sm-3.col-md-2
16
+ = link_to "http://placehold.it/800x600", class: "thumbnail", data: { lightbox: "example" } do
17
+ = image_tag "http://placehold.it/200x200"
18
+ .col-xs-6.col-sm-3.col-md-2
19
+ = link_to "http://placehold.it/800x600", class: "thumbnail", data: { lightbox: "example" } do
20
+ = image_tag "http://placehold.it/200x200"
File without changes
@@ -0,0 +1,6 @@
1
+ - if content.blank? && widget.images.blank?
2
+ = render "quadro/widgets/gallery/empty"
3
+ - elsif widget.images.blank?
4
+ = content.html_safe
5
+ - else
6
+ = render "quadro/widgets/gallery/widget", widget: widget
@@ -0,0 +1,10 @@
1
+ =# render("quadro/widgets/gallery/toolbar", widget: widget)
2
+
3
+ - if content.blank? && widget.images.blank?
4
+ = render("quadro/widgets/gallery/empty")
5
+ - elsif widget.images.blank?
6
+ = content.html_safe
7
+ - else
8
+ = render("quadro/widgets/gallery/widget", widget: widget)
9
+
10
+ = render("quadro/widgets/gallery/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 Gallery
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::Gallery' data-assetable-id="#{widget.id}" data-type='Quadro::Asset::Image' data-path="#{page_widget_assets_path(page_id: widget.page.id, widget_id: widget.id)}")
3
+ .asset-list.clearfix(data-assetable-type='Quadro::Widget::Gallery' data-assetable-id="#{widget.id}")
4
+ - widget.images.each do |image|
5
+ = render 'quadro/assets/image/image', asset: image, widget: widget, page: page
@@ -0,0 +1,6 @@
1
+ .widget.widget-gallery
2
+ .row
3
+ - widget.images.each do |image|
4
+ .col-xs-6.col-sm-3.col-md-2
5
+ = link_to image.url(:large), class: "thumbnail", data: { lightbox: widget.name } do
6
+ = image_tag image.url(:thumb), alt: image.alt
@@ -0,0 +1,2 @@
1
+ %h2 Lorem ipsum dolor sit amet
2
+ %p Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
File without changes
@@ -0,0 +1,6 @@
1
+ - if content.blank? && widget.content.blank?
2
+ = render "quadro/widgets/html/empty"
3
+ - elsif widget.content.blank?
4
+ = content.html_safe
5
+ - else
6
+ = render "quadro/widgets/html/widget", widget: widget
@@ -0,0 +1,9 @@
1
+ =# render("quadro/widgets/html/toolbar", widget: widget)
2
+
3
+ = content_tag :div, class: 'widget widget-html', data: options do
4
+ - if content.blank? && widget.content.blank?
5
+ = render("quadro/widgets/html/empty")
6
+ - elsif widget.content.blank?
7
+ = content.html_safe
8
+ - else
9
+ = render "quadro/widgets/html/widget", 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 Html
5
+ .pull-right
6
+ %button.btn.btn-link.btn-xs
7
+ %i.fa.fa-cog.text-muted
@@ -0,0 +1 @@
1
+ = widget.content.html_safe
@@ -0,0 +1,18 @@
1
+ #mapempty.widget.widget-map.thumbnail
2
+
3
+ = content_for :javascript do
4
+ :coffee
5
+ $ ->
6
+ imageUrl = GMaps.staticMapURL(
7
+ size: [640, 640]
8
+ scale: 2
9
+ format: 'jpg-baseline'
10
+ lat: 13.701291
11
+ lng: -89.224423
12
+ markers: [
13
+ lat: 13.701291
14
+ lng: -89.224423
15
+ ]
16
+ )
17
+
18
+ $("#mapempty").css('background-image', 'url(' + imageUrl + ')') if imageUrl
File without changes
@@ -0,0 +1,4 @@
1
+ - if options[:latitude].blank? || options[:longitude].blank?
2
+ = render("quadro/widgets/map/empty")
3
+ - else
4
+ = render "quadro/widgets/map/widget", widget: widget, options: options, content: content
@@ -0,0 +1,6 @@
1
+ =# render("quadro/widgets/map/toolbar", widget: widget)
2
+
3
+ - if options[:latitude].blank? || options[:longitude].blank?
4
+ = render("quadro/widgets/map/empty")
5
+ - else
6
+ = render "quadro/widgets/map/widget", widget: widget, options: options, content: content
@@ -0,0 +1,7 @@
1
+ .well.well-sm.clearfix
2
+ .pull-left
3
+ .btn.btn-link.btn-xs
4
+ .text-muted.text-uppercase Map
5
+ .pull-right
6
+ %button.btn.btn-link.btn-xs
7
+ %i.fa.fa-cog.text-muted
@@ -0,0 +1,45 @@
1
+ .widget.widget-map.thumbnail(id="map#{widget.id}")
2
+
3
+ = content_for :javascript do
4
+ - unless options.key?(:static)
5
+ :coffee
6
+ $ ->
7
+ maps = []
8
+
9
+ maps["map#{widget.id}"] = new GMaps(
10
+ div: "#map#{widget.id}"
11
+ lat: "#{options[:latitude]}"
12
+ lng: "#{options[:longitude]}"
13
+ )
14
+
15
+ maps["map#{widget.id}"].addMarker(
16
+ lat: "#{options[:latitude]}"
17
+ lng: "#{options[:longitude]}"
18
+ title: "#{options[:title]}"
19
+ infoWindow:
20
+ content: "#{content.html_safe}"
21
+ )
22
+ - else
23
+ :coffee
24
+ $ ->
25
+ imageUrl = GMaps.staticMapURL(
26
+ size: [640, 640]
27
+ scale: 2
28
+ format: 'jpg-baseline'
29
+ lat: "#{options[:latitude]}"
30
+ lng: "#{options[:longitude]}"
31
+ markers: [
32
+ lat: "#{options[:latitude]}"
33
+ lng: "#{options[:longitude]}"
34
+ ]
35
+ )
36
+
37
+ $("#map#{widget.id}").css('background-image', 'url(' + imageUrl + ')') if imageUrl
38
+
39
+ - if options.key?(:width)
40
+ :coffee
41
+ $("#map#{widget.id}").css('width', "#{options[:width]}")
42
+
43
+ - if options.key?(:height)
44
+ :coffee
45
+ $("#map#{widget.id}").css('width', "#{options[:height]}")
@@ -0,0 +1,7 @@
1
+ .widget.widget-slider
2
+ .slide
3
+ = image_tag "http://placehold.it/800x600"
4
+ .slide
5
+ = image_tag "http://placehold.it/800x600"
6
+ .slide
7
+ = image_tag "http://placehold.it/800x600"
File without changes
@@ -0,0 +1,6 @@
1
+ - if content.blank? && widget.slides.blank?
2
+ = render "quadro/widgets/slider/empty"
3
+ - elsif widget.slides.blank?
4
+ = content.html_safe
5
+ - else
6
+ = render "quadro/widgets/slider/widget", widget: widget