quadro 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.md +194 -0
- data/Rakefile +39 -0
- data/app/assets/images/quadro/close.png +0 -0
- data/app/assets/images/quadro/favicon.ico +0 -0
- data/app/assets/images/quadro/loading.gif +0 -0
- data/app/assets/images/quadro/missing/cover/large.png +0 -0
- data/app/assets/images/quadro/missing/cover/medium.png +0 -0
- data/app/assets/images/quadro/missing/cover/small.png +0 -0
- data/app/assets/images/quadro/missing/cover/thumb.png +0 -0
- data/app/assets/images/quadro/missing/image/large.png +0 -0
- data/app/assets/images/quadro/missing/image/medium.png +0 -0
- data/app/assets/images/quadro/missing/image/small.png +0 -0
- data/app/assets/images/quadro/missing/image/thumb.png +0 -0
- data/app/assets/images/quadro/missing/slide/large.png +0 -0
- data/app/assets/images/quadro/missing/slide/medium.png +0 -0
- data/app/assets/images/quadro/missing/slide/small.png +0 -0
- data/app/assets/images/quadro/missing/slide/thumb.png +0 -0
- data/app/assets/images/quadro/next.png +0 -0
- data/app/assets/images/quadro/prev.png +0 -0
- data/app/assets/images/quadro/quadro-logo-mini.png +0 -0
- data/app/assets/images/quadro/quadro-logo.png +0 -0
- data/app/assets/javascripts/quadro/application.js.coffee +27 -0
- data/app/assets/javascripts/quadro/message.js.coffee +6 -0
- data/app/assets/javascripts/quadro/plugins/gmaps.min.js +1 -0
- data/app/assets/javascripts/quadro/plugins/humane.min.js +11 -0
- data/app/assets/javascripts/quadro/plugins/jasny-bootstrap.min.js +6 -0
- data/app/assets/javascripts/quadro/plugins/jquery.fs.dropper.min.js +9 -0
- data/app/assets/javascripts/quadro/plugins/jquery.show_char_limit.min.js +1 -0
- data/app/assets/javascripts/quadro/plugins/jquery.smartmenus.bootstrap.min.js +3 -0
- data/app/assets/javascripts/quadro/plugins/jquery.smartmenus.min.js +3 -0
- data/app/assets/javascripts/quadro/plugins/lightbox.min.js +13 -0
- data/app/assets/javascripts/quadro/plugins/pace.min.js +2 -0
- data/app/assets/javascripts/quadro/quadro.js.coffee +43 -0
- data/app/assets/javascripts/quadro/site.js.coffee +0 -0
- data/app/assets/javascripts/quadro/uploader.js.coffee +17 -0
- data/app/assets/javascripts/quadro/widget.js.coffee +80 -0
- data/app/assets/stylesheets/bootstrap/_mixins.scss +40 -0
- data/app/assets/stylesheets/quadro/application.css.sass +19 -0
- data/app/assets/stylesheets/quadro/plugins/humane-libnotify.min.css +1 -0
- data/app/assets/stylesheets/quadro/plugins/jasny-bootstrap.min.css +7 -0
- data/app/assets/stylesheets/quadro/plugins/jquery.fs.dropper.min.css +9 -0
- data/app/assets/stylesheets/quadro/plugins/jquery.smartmenus.bootstrap.min.css +1 -0
- data/app/assets/stylesheets/quadro/plugins/lightbox.min.css +1 -0
- data/app/assets/stylesheets/quadro/plugins/pace.min.css +1 -0
- data/app/assets/stylesheets/quadro/quadro.css.sass +99 -0
- data/app/assets/stylesheets/quadro/site.css.sass +0 -0
- data/app/controllers/quadro/application_controller.rb +122 -0
- data/app/controllers/quadro/assets_controller.rb +21 -0
- data/app/controllers/quadro/feeds_controller.rb +6 -0
- data/app/controllers/quadro/pages_controller.rb +42 -0
- data/app/controllers/quadro/robots_controller.rb +6 -0
- data/app/controllers/quadro/users_controller.rb +15 -0
- data/app/controllers/quadro/widgets_controller.rb +14 -0
- data/app/helpers/quadro/application_helper.rb +4 -0
- data/app/helpers/quadro/asset_helper.rb +7 -0
- data/app/helpers/quadro/navigation_helper.rb +43 -0
- data/app/helpers/quadro/widget_helper.rb +54 -0
- data/app/models/quadro/asset.rb +11 -0
- data/app/models/quadro/asset/cover.rb +18 -0
- data/app/models/quadro/asset/image.rb +18 -0
- data/app/models/quadro/asset/slide.rb +18 -0
- data/app/models/quadro/interaction.rb +13 -0
- data/app/models/quadro/page.rb +88 -0
- data/app/models/quadro/user.rb +19 -0
- data/app/models/quadro/widget.rb +21 -0
- data/app/models/quadro/widget/form.rb +13 -0
- data/app/models/quadro/widget/gallery.rb +17 -0
- data/app/models/quadro/widget/html.rb +14 -0
- data/app/models/quadro/widget/map.rb +13 -0
- data/app/models/quadro/widget/slider.rb +17 -0
- data/app/views/layouts/quadro/application.html.haml +33 -0
- data/app/views/layouts/quadro/devise.html.haml +11 -0
- data/app/views/quadro/assets/create.js.erb +11 -0
- data/app/views/quadro/assets/destroy.js.erb +11 -0
- data/app/views/quadro/assets/edit.js.erb +9 -0
- data/app/views/quadro/assets/image/_form.html.haml +25 -0
- data/app/views/quadro/assets/image/_image.html.haml +10 -0
- data/app/views/quadro/assets/slide/_form.html.haml +26 -0
- data/app/views/quadro/assets/slide/_slide.html.haml +9 -0
- data/app/views/quadro/assets/update.js.erb +18 -0
- data/app/views/quadro/feeds/atom.xml.builder +27 -0
- data/app/views/quadro/feeds/rss.xml.builder +25 -0
- data/app/views/quadro/interactions/_interaction.html.haml +22 -0
- data/app/views/quadro/pages/_edit.html.haml +35 -0
- data/app/views/quadro/pages/_new.html.haml +11 -0
- data/app/views/quadro/pages/_page.html.haml +1 -0
- data/app/views/quadro/pages/create.js.erb +7 -0
- data/app/views/quadro/pages/destroy.js.erb +5 -0
- data/app/views/quadro/pages/edit.js.erb +4 -0
- data/app/views/quadro/pages/form.js.erb +6 -0
- data/app/views/quadro/pages/index.html.haml +1 -0
- data/app/views/quadro/pages/new.js.erb +2 -0
- data/app/views/quadro/pages/show.html.haml +1 -0
- data/app/views/quadro/pages/update.js.erb +7 -0
- data/app/views/quadro/robots/index.text.erb +4 -0
- data/app/views/quadro/shared/_modal.html.haml +3 -0
- data/app/views/quadro/shared/_navigation.html.haml +17 -0
- data/app/views/quadro/shared/_toolbar.html.haml +55 -0
- data/app/views/quadro/shared/templates/_blank.html.haml +11 -0
- data/app/views/quadro/shared/templates/_demo.html.haml +22 -0
- data/app/views/quadro/shared/templates/_jumbotron.html.haml +10 -0
- data/app/views/quadro/shared/templates/_sidebar.html.haml +15 -0
- data/app/views/quadro/shared/templates/page/_list.html.haml +9 -0
- data/app/views/quadro/shared/templates/page/_thumbnail.html.haml +9 -0
- data/app/views/quadro/users/_edit.html.haml +15 -0
- data/app/views/quadro/users/edit.js.erb +2 -0
- data/app/views/quadro/users/update.js.erb +7 -0
- data/app/views/quadro/widgets/edit.js.erb +0 -0
- data/app/views/quadro/widgets/form/_empty.html.haml +4 -0
- data/app/views/quadro/widgets/form/_fields.html.haml +1 -0
- data/app/views/quadro/widgets/form/_form.html.haml +0 -0
- data/app/views/quadro/widgets/form/_signed_off.html.haml +6 -0
- data/app/views/quadro/widgets/form/_signed_on.html.haml +14 -0
- data/app/views/quadro/widgets/form/_toolbar.html.haml +7 -0
- data/app/views/quadro/widgets/form/_widget.html.haml +1 -0
- data/app/views/quadro/widgets/gallery/_empty.html.haml +20 -0
- data/app/views/quadro/widgets/gallery/_form.html.haml +0 -0
- data/app/views/quadro/widgets/gallery/_signed_off.html.haml +6 -0
- data/app/views/quadro/widgets/gallery/_signed_on.html.haml +10 -0
- data/app/views/quadro/widgets/gallery/_toolbar.html.haml +7 -0
- data/app/views/quadro/widgets/gallery/_uploader.html.haml +5 -0
- data/app/views/quadro/widgets/gallery/_widget.html.haml +6 -0
- data/app/views/quadro/widgets/html/_empty.html.haml +2 -0
- data/app/views/quadro/widgets/html/_form.html.haml +0 -0
- data/app/views/quadro/widgets/html/_signed_off.html.haml +6 -0
- data/app/views/quadro/widgets/html/_signed_on.html.haml +9 -0
- data/app/views/quadro/widgets/html/_toolbar.html.haml +7 -0
- data/app/views/quadro/widgets/html/_widget.html.haml +1 -0
- data/app/views/quadro/widgets/map/_empty.html.haml +18 -0
- data/app/views/quadro/widgets/map/_form.html.haml +0 -0
- data/app/views/quadro/widgets/map/_signed_off.html.haml +4 -0
- data/app/views/quadro/widgets/map/_signed_on.html.haml +6 -0
- data/app/views/quadro/widgets/map/_toolbar.html.haml +7 -0
- data/app/views/quadro/widgets/map/_widget.html.haml +45 -0
- data/app/views/quadro/widgets/slider/_empty.html.haml +7 -0
- data/app/views/quadro/widgets/slider/_form.html.haml +0 -0
- data/app/views/quadro/widgets/slider/_signed_off.html.haml +6 -0
- data/app/views/quadro/widgets/slider/_signed_on.html.haml +10 -0
- data/app/views/quadro/widgets/slider/_toolbar.html.haml +7 -0
- data/app/views/quadro/widgets/slider/_uploader.html.haml +5 -0
- data/app/views/quadro/widgets/slider/_widget.html.haml +4 -0
- data/app/views/quadro/widgets/update.js.erb +0 -0
- data/app/views/users/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/users/mailer/unlock_instructions.html.haml +5 -0
- data/app/views/users/passwords/edit.html.haml +15 -0
- data/app/views/users/passwords/new.html.haml +13 -0
- data/app/views/users/sessions/new.html.haml +15 -0
- data/app/views/users/shared/_links.html.haml +19 -0
- data/app/views/users/unlocks/new.html.haml +13 -0
- data/config/initializers/crummy.rb +5 -0
- data/config/initializers/devise.rb +261 -0
- data/config/initializers/gravatar_image_tag.rb +7 -0
- data/config/initializers/kaminari_config.rb +10 -0
- data/config/initializers/simple_form.rb +142 -0
- data/config/initializers/simple_form_bootstrap.rb +79 -0
- data/config/initializers/sitemap.rb +9 -0
- data/config/locales/devise.en.yml +60 -0
- data/config/locales/kaminari.en.yml +17 -0
- data/config/locales/quadro.en.yml +5 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/routes.rb +25 -0
- data/db/migrate/20141122163450_create_quadro_widgets.rb +19 -0
- data/db/migrate/20141129022344_create_quadro_pages.rb +20 -0
- data/db/migrate/20141206085127_create_quadro_assets.rb +16 -0
- data/db/migrate/20141207202401_devise_create_quadro_users.rb +28 -0
- data/db/migrate/20160606213156_create_quadro_interactions.rb +11 -0
- data/lib/generators/quadro/install/USAGE +8 -0
- data/lib/generators/quadro/install/install_generator.rb +35 -0
- data/lib/generators/quadro/install/templates/app/assets/images/quadro/favicon.ico +0 -0
- data/lib/generators/quadro/install/templates/app/assets/images/quadro/quadro-logo-mini.png +0 -0
- data/lib/generators/quadro/install/templates/app/assets/images/quadro/quadro-logo.png +0 -0
- data/lib/generators/quadro/install/templates/app/assets/javascripts/quadro/site.js.coffee +0 -0
- data/lib/generators/quadro/install/templates/app/assets/stylesheets/quadro/site.css.sass +0 -0
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/_navigation.html.haml +17 -0
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_blank.html.haml +11 -0
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_demo.html.haml +22 -0
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_jumbotron.html.haml +10 -0
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_sidebar.html.haml +15 -0
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/page/_list.html.haml +9 -0
- data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/page/_thumbnail.html.haml +9 -0
- data/lib/generators/quadro/install/templates/config/initializers/quadro.rb +12 -0
- data/lib/generators/quadro/install/templates/db/GeoLite2-Country.mmdb +0 -0
- data/lib/generators/quadro/install/templates/public/404.html +37 -0
- data/lib/generators/quadro/install/templates/public/422.html +37 -0
- data/lib/generators/quadro/install/templates/public/500.html +37 -0
- data/lib/generators/quadro/install/templates/public/maintenance.html +37 -0
- data/lib/quadro.rb +16 -0
- data/lib/quadro/engine.rb +44 -0
- data/lib/quadro/loader.rb +30 -0
- data/lib/quadro/signature.rb +3 -0
- data/lib/quadro/version.rb +3 -0
- data/lib/tasks/quadro_tasks.rake +15 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/images/quadro/favicon.ico +0 -0
- data/test/dummy/app/assets/images/quadro/quadro-logo-mini.png +0 -0
- data/test/dummy/app/assets/images/quadro/quadro-logo.png +0 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/javascripts/quadro/site.js.coffee +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/quadro/site.css.sass +0 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/quadro/shared/_navigation.html.haml +17 -0
- data/test/dummy/app/views/quadro/shared/templates/_blank.html.haml +11 -0
- data/test/dummy/app/views/quadro/shared/templates/_demo.html.haml +22 -0
- data/test/dummy/app/views/quadro/shared/templates/_jumbotron.html.haml +10 -0
- data/test/dummy/app/views/quadro/shared/templates/_sidebar.html.haml +15 -0
- data/test/dummy/app/views/quadro/shared/templates/page/_list.html.haml +9 -0
- data/test/dummy/app/views/quadro/shared/templates/page/_thumbnail.html.haml +9 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/quadro.rb +12 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/db/GeoLite2-Country.mmdb +0 -0
- data/test/dummy/db/migrate/20160615055717_create_quadro_widgets.quadro.rb +20 -0
- data/test/dummy/db/migrate/20160615055718_create_quadro_pages.quadro.rb +21 -0
- data/test/dummy/db/migrate/20160615055719_create_quadro_assets.quadro.rb +17 -0
- data/test/dummy/db/migrate/20160615055720_devise_create_quadro_users.quadro.rb +29 -0
- data/test/dummy/db/migrate/20160615055721_create_quadro_interactions.quadro.rb +12 -0
- data/test/dummy/db/schema.rb +105 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/log/test.log +3 -0
- data/test/dummy/public/404.html +37 -0
- data/test/dummy/public/422.html +37 -0
- data/test/dummy/public/500.html +37 -0
- data/test/dummy/public/maintenance.html +37 -0
- data/test/dummy/script/rails +6 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/quadro_test.rb +7 -0
- data/test/test_helper.rb +18 -0
- 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,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,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,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'
|
File without changes
|
@@ -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 @@
|
|
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,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,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,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,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 @@
|
|
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,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]}")
|
File without changes
|