georgia 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +27 -0
- data/Rakefile +27 -0
- data/app/assets/fonts/georgia/signika-bold-webfont.eot +0 -0
- data/app/assets/fonts/georgia/signika-bold-webfont.svg +1711 -0
- data/app/assets/fonts/georgia/signika-bold-webfont.ttf +0 -0
- data/app/assets/fonts/georgia/signika-bold-webfont.woff +0 -0
- data/app/assets/fonts/georgia/signika-light-webfont.eot +0 -0
- data/app/assets/fonts/georgia/signika-light-webfont.svg +1680 -0
- data/app/assets/fonts/georgia/signika-light-webfont.ttf +0 -0
- data/app/assets/fonts/georgia/signika-light-webfont.woff +0 -0
- data/app/assets/fonts/georgia/signika-regular-webfont.eot +0 -0
- data/app/assets/fonts/georgia/signika-regular-webfont.svg +1746 -0
- data/app/assets/fonts/georgia/signika-regular-webfont.ttf +0 -0
- data/app/assets/fonts/georgia/signika-regular-webfont.woff +0 -0
- data/app/assets/images/georgia/bg-body-bar.jpg +0 -0
- data/app/assets/images/georgia/checkmark.png +0 -0
- data/app/assets/images/georgia/content-types/avi.jpg +0 -0
- data/app/assets/images/georgia/content-types/css.jpg +0 -0
- data/app/assets/images/georgia/content-types/csv.jpg +0 -0
- data/app/assets/images/georgia/content-types/doc.jpg +0 -0
- data/app/assets/images/georgia/content-types/docx.jpg +0 -0
- data/app/assets/images/georgia/content-types/eps.jpg +0 -0
- data/app/assets/images/georgia/content-types/gif.jpg +0 -0
- data/app/assets/images/georgia/content-types/gz.jpg +0 -0
- data/app/assets/images/georgia/content-types/html.jpg +0 -0
- data/app/assets/images/georgia/content-types/jpg.jpg +0 -0
- data/app/assets/images/georgia/content-types/mp3.jpg +0 -0
- data/app/assets/images/georgia/content-types/ods.jpg +0 -0
- data/app/assets/images/georgia/content-types/odt.jpg +0 -0
- data/app/assets/images/georgia/content-types/pdf.jpg +0 -0
- data/app/assets/images/georgia/content-types/png.jpg +0 -0
- data/app/assets/images/georgia/content-types/ppt.jpg +0 -0
- data/app/assets/images/georgia/content-types/pptx.jpg +0 -0
- data/app/assets/images/georgia/content-types/rar.jpg +0 -0
- data/app/assets/images/georgia/content-types/tar.jpg +0 -0
- data/app/assets/images/georgia/content-types/txt.jpg +0 -0
- data/app/assets/images/georgia/content-types/wav.jpg +0 -0
- data/app/assets/images/georgia/content-types/xls.jpg +0 -0
- data/app/assets/images/georgia/content-types/zip.jpg +0 -0
- data/app/assets/images/georgia/down_arrow.gif +0 -0
- data/app/assets/images/georgia/grippy_large.png +0 -0
- data/app/assets/images/georgia/indeterminate.png +0 -0
- data/app/assets/images/georgia/logo.png +0 -0
- data/app/assets/images/georgia/select2-spinner.gif +0 -0
- data/app/assets/images/georgia/select2.png +0 -0
- data/app/assets/images/georgia/select2x2.png +0 -0
- data/app/assets/images/georgia/transparent.jpg +0 -0
- data/app/assets/images/georgia/up_arrow.gif +0 -0
- data/app/assets/images/ui-bg_glass_75_ffffff_1x400.png +0 -0
- data/app/assets/javascripts/georgia/application.js +20 -0
- data/app/assets/javascripts/georgia/bootstrap-vendor.js.coffee +13 -0
- data/app/assets/javascripts/georgia/ckeditor/config.js +22 -0
- data/app/assets/javascripts/georgia/components/asset-replacer.js.coffee +25 -0
- data/app/assets/javascripts/georgia/components/asset-uploader.js.coffee +44 -0
- data/app/assets/javascripts/georgia/components/flash.js.coffee +15 -0
- data/app/assets/javascripts/georgia/components/forms/menu.js.coffee +66 -0
- data/app/assets/javascripts/georgia/components/forms/revision.js.coffee +22 -0
- data/app/assets/javascripts/georgia/components/forms/spinning.js.coffee +51 -0
- data/app/assets/javascripts/georgia/components/media-library.js.coffee +57 -0
- data/app/assets/javascripts/georgia/components/portlets/link.js.coffee +14 -0
- data/app/assets/javascripts/georgia/components/portlets/slide.js.coffee +38 -0
- data/app/assets/javascripts/georgia/components/portlets/widget.js.coffee +47 -0
- data/app/assets/javascripts/georgia/components/position_sort.js.coffee +20 -0
- data/app/assets/javascripts/georgia/components/tables/checkbox.js.coffee +123 -0
- data/app/assets/javascripts/georgia/components/tables/media.js.coffee +59 -0
- data/app/assets/javascripts/georgia/components/tables/messages.js.coffee +59 -0
- data/app/assets/javascripts/georgia/components/tables/pages.js.coffee +93 -0
- data/app/assets/javascripts/georgia/components/tags.js.coffee +36 -0
- data/app/assets/javascripts/georgia/components/widget.js.coffee +32 -0
- data/app/assets/javascripts/georgia/featured-image.js.coffee +8 -0
- data/app/assets/javascripts/georgia/keybindings.js.coffee +42 -0
- data/app/assets/javascripts/georgia/toggle.js.coffee +4 -0
- data/app/assets/javascripts/georgia/vendor/bootstrap-datetimepicker.js +28 -0
- data/app/assets/javascripts/georgia/vendor/jquery.mjs.nestedSortable.js +608 -0
- data/app/assets/javascripts/georgia/vendor/jquery.ui.touch-punch.js +160 -0
- data/app/assets/javascripts/georgia/vendor/moment.js +6 -0
- data/app/assets/stylesheets/georgia/application.css.scss +16 -0
- data/app/assets/stylesheets/georgia/components/_box.scss +29 -0
- data/app/assets/stylesheets/georgia/components/_button.scss +60 -0
- data/app/assets/stylesheets/georgia/components/_checkbox.scss +48 -0
- data/app/assets/stylesheets/georgia/components/_form.scss +8 -0
- data/app/assets/stylesheets/georgia/components/_help.scss +4 -0
- data/app/assets/stylesheets/georgia/components/_icon.scss +7 -0
- data/app/assets/stylesheets/georgia/components/_input.scss +48 -0
- data/app/assets/stylesheets/georgia/components/_label.scss +4 -0
- data/app/assets/stylesheets/georgia/components/_modal.scss +14 -0
- data/app/assets/stylesheets/georgia/components/_nav-list.scss +13 -0
- data/app/assets/stylesheets/georgia/components/_note.scss +31 -0
- data/app/assets/stylesheets/georgia/components/_portlet.scss +57 -0
- data/app/assets/stylesheets/georgia/components/_progress.scss +4 -0
- data/app/assets/stylesheets/georgia/components/_state.scss +17 -0
- data/app/assets/stylesheets/georgia/components/_table.scss +8 -0
- data/app/assets/stylesheets/georgia/components/_transparent.scss +3 -0
- data/app/assets/stylesheets/georgia/layout/_base.scss +94 -0
- data/app/assets/stylesheets/georgia/layout/_devise.scss +5 -0
- data/app/assets/stylesheets/georgia/mixins/_clearfix.scss +12 -0
- data/app/assets/stylesheets/georgia/mixins/_ellipsis.scss +8 -0
- data/app/assets/stylesheets/georgia/mixins/_inflectors.scss +1 -0
- data/app/assets/stylesheets/georgia/mixins/_opacity.scss +6 -0
- data/app/assets/stylesheets/georgia/mixins/_utilities.scss +13 -0
- data/app/assets/stylesheets/georgia/modules/_facets.scss +4 -0
- data/app/assets/stylesheets/georgia/modules/_footer.scss +9 -0
- data/app/assets/stylesheets/georgia/modules/_form_with_helpers.scss +17 -0
- data/app/assets/stylesheets/georgia/modules/_header.scss +66 -0
- data/app/assets/stylesheets/georgia/modules/_link.scss +51 -0
- data/app/assets/stylesheets/georgia/modules/_login.scss +7 -0
- data/app/assets/stylesheets/georgia/modules/_media.scss +55 -0
- data/app/assets/stylesheets/georgia/modules/_menu.scss +7 -0
- data/app/assets/stylesheets/georgia/modules/_message.scss +53 -0
- data/app/assets/stylesheets/georgia/modules/_notifications.scss +26 -0
- data/app/assets/stylesheets/georgia/modules/_pages.scss +7 -0
- data/app/assets/stylesheets/georgia/modules/_pagination.scss +41 -0
- data/app/assets/stylesheets/georgia/modules/_results.scss +46 -0
- data/app/assets/stylesheets/georgia/modules/_revision.scss +18 -0
- data/app/assets/stylesheets/georgia/modules/_sidebar.scss +71 -0
- data/app/assets/stylesheets/georgia/modules/_slide.scss +11 -0
- data/app/assets/stylesheets/georgia/modules/_subpage.scss +25 -0
- data/app/assets/stylesheets/georgia/modules/_users.scss +3 -0
- data/app/assets/stylesheets/georgia/modules/_widget.scss +45 -0
- data/app/assets/stylesheets/georgia/overrides/_select2.scss +5 -0
- data/app/assets/stylesheets/georgia/settings/_base.scss +6 -0
- data/app/assets/stylesheets/georgia/settings/_colors.scss +41 -0
- data/app/assets/stylesheets/georgia/settings/_fonts.scss +3 -0
- data/app/assets/stylesheets/georgia/settings/_z-index.scss +7 -0
- data/app/assets/stylesheets/georgia/vendor/_autocomplete.scss +50 -0
- data/app/assets/stylesheets/georgia/vendor/_bootstrap-datetimepicker.scss +174 -0
- data/app/assets/stylesheets/georgia/vendor/_select2.scss +18 -0
- data/app/assets/stylesheets/georgia/vendor/_tooltip.scss +98 -0
- data/app/controllers/georgia/api/media_controller.rb +18 -0
- data/app/controllers/georgia/api/tags_controller.rb +22 -0
- data/app/controllers/georgia/application_controller.rb +25 -0
- data/app/controllers/georgia/concerns/frontendable.rb +45 -0
- data/app/controllers/georgia/concerns/helpers.rb +28 -0
- data/app/controllers/georgia/dashboard_controller.rb +14 -0
- data/app/controllers/georgia/links_controller.rb +13 -0
- data/app/controllers/georgia/media_controller.rb +101 -0
- data/app/controllers/georgia/menus_controller.rb +80 -0
- data/app/controllers/georgia/messages_controller.rb +74 -0
- data/app/controllers/georgia/pages_controller.rb +180 -0
- data/app/controllers/georgia/revisions_controller.rb +89 -0
- data/app/controllers/georgia/slides_controller.rb +13 -0
- data/app/controllers/georgia/ui_associations_controller.rb +12 -0
- data/app/controllers/georgia/users/sessions_controller.rb +7 -0
- data/app/controllers/georgia/users_controller.rb +51 -0
- data/app/controllers/georgia/widgets_controller.rb +67 -0
- data/app/controllers/messages_controller.rb +29 -0
- data/app/decorators/ckeditor/asset_decorator.rb +13 -0
- data/app/decorators/ckeditor/assets_decorator.rb +4 -0
- data/app/decorators/ckeditor/picture_decorator.rb +9 -0
- data/app/decorators/ckeditor/pictures_decorator.rb +4 -0
- data/app/decorators/georgia/application_decorator.rb +6 -0
- data/app/decorators/georgia/link_decorator.rb +9 -0
- data/app/decorators/georgia/links_decorator.rb +4 -0
- data/app/decorators/georgia/message_decorator.rb +21 -0
- data/app/decorators/georgia/messages_decorator.rb +4 -0
- data/app/decorators/georgia/page_decorator.rb +31 -0
- data/app/decorators/georgia/pages_decorator.rb +4 -0
- data/app/decorators/georgia/revision_decorator.rb +28 -0
- data/app/decorators/georgia/slide_decorator.rb +4 -0
- data/app/decorators/georgia/widget_decorator.rb +4 -0
- data/app/decorators/pagination_decorator.rb +3 -0
- data/app/decorators/sunspot/highlighted_hit_decorator.rb +29 -0
- data/app/helpers/georgia/checkboxes_helper.rb +13 -0
- data/app/helpers/georgia/devise_helper.rb +15 -0
- data/app/helpers/georgia/facets_helper.rb +35 -0
- data/app/helpers/georgia/forms_helper.rb +68 -0
- data/app/helpers/georgia/header_helper.rb +10 -0
- data/app/helpers/georgia/internationalization_helper.rb +32 -0
- data/app/helpers/georgia/menus_helper.rb +20 -0
- data/app/helpers/georgia/messages_helper.rb +9 -0
- data/app/helpers/georgia/meta_tags_helper.rb +22 -0
- data/app/helpers/georgia/modals_helper.rb +7 -0
- data/app/helpers/georgia/pages_helper.rb +22 -0
- data/app/helpers/georgia/pagination_helper.rb +10 -0
- data/app/helpers/georgia/routes_helper.rb +25 -0
- data/app/helpers/georgia/sidebar_helper.rb +13 -0
- data/app/helpers/georgia/states_helper.rb +17 -0
- data/app/helpers/georgia/twitter_helper.rb +24 -0
- data/app/helpers/georgia/ui_helper.rb +51 -0
- data/app/mailers/georgia/notifier.rb +33 -0
- data/app/models/ability.rb +19 -0
- data/app/models/ckeditor/asset.rb +61 -0
- data/app/models/ckeditor/attachment_file.rb +7 -0
- data/app/models/ckeditor/picture.rb +15 -0
- data/app/models/georgia/clone.rb +101 -0
- data/app/models/georgia/concerns/cacheable.rb +18 -0
- data/app/models/georgia/concerns/contentable.rb +22 -0
- data/app/models/georgia/concerns/indexable.rb +67 -0
- data/app/models/georgia/concerns/orderable.rb +21 -0
- data/app/models/georgia/concerns/publishable.rb +35 -0
- data/app/models/georgia/concerns/revisionable.rb +38 -0
- data/app/models/georgia/concerns/slugable.rb +46 -0
- data/app/models/georgia/concerns/statable.rb +64 -0
- data/app/models/georgia/concerns/taggable.rb +19 -0
- data/app/models/georgia/concerns/templatable.rb +20 -0
- data/app/models/georgia/concerns/treeable.rb +26 -0
- data/app/models/georgia/content.rb +15 -0
- data/app/models/georgia/link.rb +27 -0
- data/app/models/georgia/menu.rb +13 -0
- data/app/models/georgia/message.rb +47 -0
- data/app/models/georgia/page.rb +20 -0
- data/app/models/georgia/revision.rb +22 -0
- data/app/models/georgia/role.rb +10 -0
- data/app/models/georgia/slide.rb +13 -0
- data/app/models/georgia/status.rb +29 -0
- data/app/models/georgia/ui_association.rb +27 -0
- data/app/models/georgia/ui_section.rb +12 -0
- data/app/models/georgia/user.rb +27 -0
- data/app/models/georgia/widget.rb +32 -0
- data/app/parsers/georgia/menu_ancestry_parser.rb +41 -0
- data/app/policies/georgia/policy.rb +17 -0
- data/app/policies/georgia/revision_policy.rb +53 -0
- data/app/presenters/georgia/active_facet_presenter.rb +25 -0
- data/app/presenters/georgia/facet_presenter.rb +26 -0
- data/app/presenters/georgia/link_portlet.rb +101 -0
- data/app/presenters/georgia/list_facet_presenter.rb +32 -0
- data/app/presenters/georgia/media_library_presenter.rb +44 -0
- data/app/presenters/georgia/message_actions_presenter.rb +51 -0
- data/app/presenters/georgia/page_actions_presenter.rb +94 -0
- data/app/presenters/georgia/pagination_presenter.rb +58 -0
- data/app/presenters/georgia/portlet.rb +30 -0
- data/app/presenters/georgia/presenter.rb +17 -0
- data/app/presenters/georgia/sidebar_link_presenter.rb +55 -0
- data/app/presenters/georgia/single_active_facet_presenter.rb +10 -0
- data/app/presenters/georgia/slide_portlet.rb +79 -0
- data/app/presenters/georgia/subpage_portlet.rb +36 -0
- data/app/presenters/georgia/warning_message.rb +55 -0
- data/app/presenters/georgia/widget_portlet.rb +75 -0
- data/app/sweepers/navigation_sweeper.rb +12 -0
- data/app/uploaders/ckeditor_attachment_file_uploader.rb +16 -0
- data/app/uploaders/ckeditor_picture_uploader.rb +36 -0
- data/app/uploaders/georgia/attachment_uploader.rb +16 -0
- data/app/views/georgia/api/media/pictures.html.erb +17 -0
- data/app/views/georgia/ckeditor/assets/_asset.html.erb +23 -0
- data/app/views/georgia/ckeditor/attachment_files/_attachment_file.html.erb +1 -0
- data/app/views/georgia/ckeditor/pictures/_picture.html.erb +26 -0
- data/app/views/georgia/dashboard/panels/_messages.html.erb +30 -0
- data/app/views/georgia/dashboard/panels/_reviews.html.erb +24 -0
- data/app/views/georgia/dashboard/show.html.erb +18 -0
- data/app/views/georgia/header/_dashboard.html.erb +1 -0
- data/app/views/georgia/header/_media.html.erb +3 -0
- data/app/views/georgia/header/_messages.html.erb +3 -0
- data/app/views/georgia/header/_navigation.html.erb +3 -0
- data/app/views/georgia/header/_pages.html.erb +3 -0
- data/app/views/georgia/header/_users.html.erb +3 -0
- data/app/views/georgia/header/_widgets.html.erb +3 -0
- data/app/views/georgia/links/show.html.erb +1 -0
- data/app/views/georgia/media/_header.html.erb +27 -0
- data/app/views/georgia/media/create.js.erb +1 -0
- data/app/views/georgia/media/edit.html.erb +74 -0
- data/app/views/georgia/media/search.html.erb +36 -0
- data/app/views/georgia/media/sidebar/_facets.html.erb +12 -0
- data/app/views/georgia/menus/_menu.html.erb +7 -0
- data/app/views/georgia/menus/create.js.erb +5 -0
- data/app/views/georgia/menus/edit.html.erb +37 -0
- data/app/views/georgia/menus/index.html.erb +36 -0
- data/app/views/georgia/messages/_message.html.erb +26 -0
- data/app/views/georgia/messages/destroy.js.erb +3 -0
- data/app/views/georgia/messages/search.html.erb +58 -0
- data/app/views/georgia/messages/show.html.erb +46 -0
- data/app/views/georgia/notifier/notify_admins.html.erb +10 -0
- data/app/views/georgia/notifier/notify_editors.html.erb +10 -0
- data/app/views/georgia/notifier/notify_support.html.erb +9 -0
- data/app/views/georgia/pages/_header.html.erb +22 -0
- data/app/views/georgia/pages/_page.html.erb +19 -0
- data/app/views/georgia/pages/_subpage.html.erb +1 -0
- data/app/views/georgia/pages/create.js.erb +6 -0
- data/app/views/georgia/pages/search.html.erb +32 -0
- data/app/views/georgia/pages/settings.html.erb +79 -0
- data/app/views/georgia/pages/templates/_custom.html.erb +7 -0
- data/app/views/georgia/pages/templates/_default.html.erb +7 -0
- data/app/views/georgia/pages/templates/_one-column.html.erb +7 -0
- data/app/views/georgia/pages/templates/_sidebar-left.html.erb +10 -0
- data/app/views/georgia/pages/templates/_sidebar-right.html.erb +10 -0
- data/app/views/georgia/revisions/_revision.html.erb +11 -0
- data/app/views/georgia/revisions/edit.html.erb +36 -0
- data/app/views/georgia/revisions/fields/_content.html.erb +43 -0
- data/app/views/georgia/revisions/fields/_slides.html.erb +19 -0
- data/app/views/georgia/revisions/fields/_template.html.erb +8 -0
- data/app/views/georgia/revisions/fields/_ui_section.html.erb +14 -0
- data/app/views/georgia/revisions/fields/_widgets.html.erb +11 -0
- data/app/views/georgia/revisions/index.html.erb +25 -0
- data/app/views/georgia/shared/_messages.html.erb +11 -0
- data/app/views/georgia/shared/modals/_media_library.html.erb +35 -0
- data/app/views/georgia/shared/modals/_menu.html.erb +20 -0
- data/app/views/georgia/shared/modals/_page.html.erb +20 -0
- data/app/views/georgia/shared/modals/_progress.html.erb +15 -0
- data/app/views/georgia/shared/modals/_widget.html.erb +24 -0
- data/app/views/georgia/shared/search/_messages.html.erb +4 -0
- data/app/views/georgia/slides/new.html.erb +1 -0
- data/app/views/georgia/ui_associations/new.html.erb +1 -0
- data/app/views/georgia/users/_form.html.erb +27 -0
- data/app/views/georgia/users/_user.html.erb +9 -0
- data/app/views/georgia/users/edit.html.erb +22 -0
- data/app/views/georgia/users/index.html.erb +25 -0
- data/app/views/georgia/users/new.html.erb +19 -0
- data/app/views/georgia/users/registrations/new.html.erb +20 -0
- data/app/views/georgia/users/sessions/new.html.erb +17 -0
- data/app/views/georgia/widgets/_widget.html.erb +35 -0
- data/app/views/georgia/widgets/create.js.erb +5 -0
- data/app/views/georgia/widgets/index.html.erb +31 -0
- data/app/views/layouts/georgia/_footer.html.erb +7 -0
- data/app/views/layouts/georgia/_head.html.erb +15 -0
- data/app/views/layouts/georgia/_header.html.erb +40 -0
- data/app/views/layouts/georgia/_messages.html.erb +7 -0
- data/app/views/layouts/georgia/_sidebar.html.erb +9 -0
- data/app/views/layouts/georgia/application.html.erb +16 -0
- data/app/views/layouts/georgia/devise.html.erb +11 -0
- data/app/views/menus/_dropdown_group.html.erb +10 -0
- data/app/views/menus/_dropdown_link.html.erb +3 -0
- data/app/views/menus/_dropdown_menu.html.erb +11 -0
- data/app/views/menus/_link.html.erb +1 -0
- data/app/views/menus/_menu.html.erb +7 -0
- data/app/views/messages/create.js.erb +0 -0
- data/app/workers/spam_worker.rb +12 -0
- data/config/initializers/acts_as_taggable_on.rb +19 -0
- data/config/initializers/ckeditor.rb +18 -0
- data/config/initializers/devise.rb +254 -0
- data/config/initializers/inflections.rb +3 -0
- data/config/initializers/revisions.rb +5 -0
- data/config/initializers/simple_form.rb +79 -0
- data/config/locales/georgia.en.yml +4 -0
- data/config/routes.rb +79 -0
- data/db/migrate/001_create_ckeditor_assets.rb +25 -0
- data/db/migrate/002_create_georgia_contents.rb +18 -0
- data/db/migrate/003_create_georgia_links.rb +12 -0
- data/db/migrate/004_create_georgia_menus.rb +10 -0
- data/db/migrate/005_create_georgia_messages.rb +21 -0
- data/db/migrate/006_create_georgia_pages.rb +21 -0
- data/db/migrate/007_create_georgia_revisions.rb +12 -0
- data/db/migrate/008_create_georgia_roles.rb +10 -0
- data/db/migrate/009_create_georgia_slides.rb +11 -0
- data/db/migrate/010_create_georgia_ui_associations.rb +13 -0
- data/db/migrate/011_create_georgia_ui_sections.rb +9 -0
- data/db/migrate/012_create_georgia_users.rb +24 -0
- data/db/migrate/013_create_georgia_widgets.rb +9 -0
- data/db/migrate/014_create_roles_users.rb +11 -0
- data/db/migrate/015_create_tags.rb +20 -0
- data/lib/generators/georgia/install/install_generator.rb +60 -0
- data/lib/generators/georgia/install/templates/Procfile +1 -0
- data/lib/generators/georgia/install/templates/README +14 -0
- data/lib/generators/georgia/install/templates/app/controllers/pages_controller.rb +13 -0
- data/lib/generators/georgia/install/templates/config/initializers/georgia.rb +15 -0
- data/lib/generators/georgia/upgrade/templates/add_anti_spam_to_messages.rb +12 -0
- data/lib/generators/georgia/upgrade/templates/add_contents_counter_cache_to_images.rb +15 -0
- data/lib/generators/georgia/upgrade/templates/add_public_to_georgia_pages.rb +8 -0
- data/lib/generators/georgia/upgrade/templates/add_state_to_georgia_pages.rb +13 -0
- data/lib/generators/georgia/upgrade/templates/create_georgia_revisions.rb +12 -0
- data/lib/generators/georgia/upgrade/upgrade_generator.rb +34 -0
- data/lib/georgia.rb +23 -0
- data/lib/georgia/assets.rb +8 -0
- data/lib/georgia/assets/cloud_files_connection.rb +22 -0
- data/lib/georgia/assets/transferable_picture.rb +51 -0
- data/lib/georgia/engine.rb +58 -0
- data/lib/georgia/paths.rb +22 -0
- data/lib/georgia/version.rb +3 -0
- data/lib/tasks/assets.rake +106 -0
- data/lib/tasks/georgia.rake +61 -0
- data/lib/tasks/install.rake +19 -0
- data/lib/tasks/sidekiq.rake +8 -0
- data/lib/tasks/solr.rake +30 -0
- data/lib/tasks/upgrade.rake +39 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- metadata +857 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
module Georgia
|
2
|
+
class PaginationPresenter
|
3
|
+
|
4
|
+
attr_accessor :view_context
|
5
|
+
|
6
|
+
delegate :content_tag, :icon_tag, :link_to_previous_page, :link_to_next_page, :link_to, to: :view_context
|
7
|
+
|
8
|
+
def initialize view_context, search
|
9
|
+
@view_context = view_context
|
10
|
+
@search = search
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_s
|
14
|
+
content_tag(:div, class: 'header-pagination') do
|
15
|
+
search_count_tag + navigation_tags
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def search_count_tag
|
22
|
+
content_tag(:span, search_count, class: 'pagination-count')
|
23
|
+
end
|
24
|
+
|
25
|
+
def navigation_tags
|
26
|
+
output = ActiveSupport::SafeBuffer.new
|
27
|
+
output << previous_page
|
28
|
+
output << next_page
|
29
|
+
content_tag :div, output, class: 'btn-group'
|
30
|
+
end
|
31
|
+
|
32
|
+
def search_count
|
33
|
+
page = @search.results.offset+1
|
34
|
+
count = @search.results.last_page? ? @search.total : @search.results.offset+@search.results.per_page
|
35
|
+
total = @search.total
|
36
|
+
"#{page} - #{count} of #{total}"
|
37
|
+
end
|
38
|
+
|
39
|
+
def previous_page
|
40
|
+
text = icon_tag('chevron-left')
|
41
|
+
link_to_previous_page(@search.hits, text, class: btn_class) || link_to_disabled(text)
|
42
|
+
end
|
43
|
+
|
44
|
+
def next_page
|
45
|
+
text = icon_tag('chevron-right')
|
46
|
+
link_to_next_page(@search.hits, text, class: btn_class, role: 'button') || link_to_disabled(text)
|
47
|
+
end
|
48
|
+
|
49
|
+
def btn_class
|
50
|
+
'btn btn-default'
|
51
|
+
end
|
52
|
+
|
53
|
+
def link_to_disabled text
|
54
|
+
link_to(text, '#', class: "#{btn_class} disabled", role: 'button')
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Georgia
|
2
|
+
class Portlet < Presenter
|
3
|
+
|
4
|
+
attr_reader :portlet
|
5
|
+
|
6
|
+
def initialize view_context, portlet, args={}
|
7
|
+
@portlet = portlet
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def id
|
12
|
+
@id ||= @portlet.persisted? ? @portlet.id : rand(10 ** 8)
|
13
|
+
end
|
14
|
+
|
15
|
+
def portlet_tag content, options={}
|
16
|
+
content_tag :li, content, options.reverse_merge(class: 'portlet', id: dom_id(portlet), data: {portlet: id})
|
17
|
+
end
|
18
|
+
|
19
|
+
def handle_tag
|
20
|
+
content_tag(:span, icon_tag('ellipsis-v'), class: 'handle')
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def persisted?
|
26
|
+
@portlet.persisted?
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Georgia
|
2
|
+
class SidebarLinkPresenter < Presenter
|
3
|
+
|
4
|
+
attr_reader :text, :url, :icon, :options, :active, :sublink
|
5
|
+
alias :active? :active
|
6
|
+
alias :sublink? :sublink
|
7
|
+
|
8
|
+
def initialize view_context, text, url, options={}
|
9
|
+
@view_context = view_context
|
10
|
+
@text = text
|
11
|
+
@url = url
|
12
|
+
@options = options
|
13
|
+
@icon = options.fetch(:icon, 'bookmark-o')
|
14
|
+
@active = options.fetch(:active, get_active_state_from_controller)
|
15
|
+
@sublink = options.fetch(:sublink, false)
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_s
|
20
|
+
!sublink? ? render_link : render_sublink
|
21
|
+
end
|
22
|
+
|
23
|
+
def render_link
|
24
|
+
content_tag :li, link_to(sidebar_link_bundle, url), class: "#{'active' if active?}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def render_sublink
|
28
|
+
content_tag :li, link_to(sidebar_title_tag, url), class: "#{'active' if active?}"
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def sidebar_link_bundle
|
34
|
+
sidebar_title_icon + sidebar_title_tag + sidebar_arrow_icon
|
35
|
+
end
|
36
|
+
|
37
|
+
def sidebar_title_icon
|
38
|
+
content_tag(:span, icon_tag(icon), class: 'icon')
|
39
|
+
end
|
40
|
+
|
41
|
+
def sidebar_arrow_icon
|
42
|
+
content_tag(:span, icon_tag("angle-#{active? ? 'right' : 'left'}"), class: 'arrow')
|
43
|
+
end
|
44
|
+
|
45
|
+
def sidebar_title_tag
|
46
|
+
content_tag(:h5, text, class: 'sidebar-link-name')
|
47
|
+
end
|
48
|
+
|
49
|
+
def get_active_state_from_controller
|
50
|
+
controller = options.fetch(:controller)
|
51
|
+
controller.is_a?(Array) ? controller.include?(controller_name) : (controller_name == controller)
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module Georgia
|
2
|
+
class SlidePortlet < Portlet
|
3
|
+
|
4
|
+
delegate :title, :position, to: :portlet
|
5
|
+
|
6
|
+
def initialize view_context, slide, args={}
|
7
|
+
@content = args.fetch(:content, slide.content)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_s
|
12
|
+
output = ActiveSupport::SafeBuffer.new
|
13
|
+
output << handle_tag
|
14
|
+
output << destroy_input_tag
|
15
|
+
output << position_input_tag
|
16
|
+
output << id_input_tag if persisted?
|
17
|
+
output << actions_tag
|
18
|
+
output << slide_tag
|
19
|
+
portlet_tag(output)
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def slide_tag
|
25
|
+
content_tag(:span, class: 'slide') do
|
26
|
+
media_library_trigger_tag + slide_content_tag
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def media_library_trigger_tag
|
31
|
+
content_tag :div, choose_image_tag(@portlet.content, input: image_input_tag, target: image_dom_id), class: 'slide-image'
|
32
|
+
end
|
33
|
+
|
34
|
+
def image_input_tag
|
35
|
+
hidden_field_tag("revision[slides_attributes][#{id}][contents_attributes][#{content_id}][image_id]", @content.image_id)
|
36
|
+
end
|
37
|
+
|
38
|
+
def slide_content_tag
|
39
|
+
content_tag(:div, title_input_tag + text_input_tag + locale_input_tag, class: 'slide-text')
|
40
|
+
end
|
41
|
+
|
42
|
+
def id_input_tag
|
43
|
+
hidden_field_tag("revision[slides_attributes][#{id}][id]", id)
|
44
|
+
end
|
45
|
+
|
46
|
+
def position_input_tag
|
47
|
+
hidden_field_tag("revision[slides_attributes][#{id}][position]", position, class: 'js-position')
|
48
|
+
end
|
49
|
+
|
50
|
+
def title_input_tag
|
51
|
+
text_field_tag("revision[slides_attributes][#{id}][contents_attributes][#{content_id}][title]", @content.title, class: 'form-control', placeholder: 'Title')
|
52
|
+
end
|
53
|
+
|
54
|
+
def text_input_tag
|
55
|
+
text_area_tag("revision[slides_attributes][#{id}][contents_attributes][#{content_id}][text]", @content.text, rows: 6, placeholder: 'Content', class: 'form-control')
|
56
|
+
end
|
57
|
+
|
58
|
+
def locale_input_tag
|
59
|
+
hidden_field_tag("revision[slides_attributes][#{id}][contents_attributes][#{content_id}][locale]", @content.locale)
|
60
|
+
end
|
61
|
+
|
62
|
+
def destroy_input_tag
|
63
|
+
hidden_field_tag("revision[slides_attributes][#{id}][_destroy]", 0, class: 'js-destroy')
|
64
|
+
end
|
65
|
+
|
66
|
+
def actions_tag
|
67
|
+
content_tag(:div, link_to(icon_tag('trash-o'), '#', class: 'btn btn-danger js-remove-slide'), class: 'actions')
|
68
|
+
end
|
69
|
+
|
70
|
+
def content_id
|
71
|
+
@content.persisted? ? @content.id : 0
|
72
|
+
end
|
73
|
+
|
74
|
+
def image_dom_id
|
75
|
+
@portlet.persisted? ? dom_id(@portlet, :image) : "image_slide_#{Time.now.to_i}"
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Georgia
|
2
|
+
class SubpagePortlet < Portlet
|
3
|
+
|
4
|
+
delegate :position, :title, :url, to: :portlet
|
5
|
+
|
6
|
+
def to_s
|
7
|
+
output = ActiveSupport::SafeBuffer.new
|
8
|
+
output << handle_tag
|
9
|
+
output << position_input_tag
|
10
|
+
output << title_tag
|
11
|
+
output << actions_tag
|
12
|
+
portlet_tag(output)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def position_input_tag
|
18
|
+
hidden_field_tag("page_tree[#{id}][position]", position, class: 'js-position')
|
19
|
+
end
|
20
|
+
|
21
|
+
def title_tag
|
22
|
+
content_tag(:h4, (title + url_tag).html_safe, class: 'title')
|
23
|
+
end
|
24
|
+
|
25
|
+
def url_tag
|
26
|
+
content_tag(:small, url)
|
27
|
+
end
|
28
|
+
|
29
|
+
def actions_tag
|
30
|
+
content_tag(:div, class: 'actions') do
|
31
|
+
link_to(icon_tag('pencil'), [:edit, portlet])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Georgia
|
2
|
+
class WarningMessage < Presenter
|
3
|
+
|
4
|
+
attr_reader :page, :revision, :options
|
5
|
+
|
6
|
+
def initialize view_context, page, revision, options={}
|
7
|
+
@page = page
|
8
|
+
@revision = revision
|
9
|
+
@options = options
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_s
|
14
|
+
return nil unless message
|
15
|
+
html = ActiveSupport::SafeBuffer.new
|
16
|
+
html << warning_icon_tag
|
17
|
+
html << message
|
18
|
+
content_tag(:div, content_tag(:p, html), class: 'warning-message')
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def warning_icon_tag
|
24
|
+
content_tag(:span, icon_tag('warning'), class: 'label label-warning')
|
25
|
+
end
|
26
|
+
|
27
|
+
def message
|
28
|
+
case revision.state
|
29
|
+
when 'review' then review_message
|
30
|
+
when 'revision' then revision_message
|
31
|
+
else nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def review_message
|
36
|
+
review_message = "This revision is awaiting review from an Editor."
|
37
|
+
if can? :approve, revision
|
38
|
+
review_message << " #{link_to 'Approve Changes', [:approve, page, revision], class: 'btn btn-primary btn-xs'}"
|
39
|
+
elsif can? :review, revision
|
40
|
+
review_message << " #{link_to 'Request Review', [:review, page, revision], class: 'btn btn-primary btn-xs'}"
|
41
|
+
end
|
42
|
+
review_message.html_safe
|
43
|
+
end
|
44
|
+
|
45
|
+
def revision_message
|
46
|
+
return nil if current_revision?
|
47
|
+
revision_message ||= "You are looking at a past revision. Updating this content will not change anything on your website. Click #{link_to 'here', [:edit, @page, @page.current_revision], class: 'text-primary'} to edit the current revision.".html_safe
|
48
|
+
end
|
49
|
+
|
50
|
+
def current_revision?
|
51
|
+
@is_current_revision ||= page.current_revision == revision
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module Georgia
|
2
|
+
class WidgetPortlet < Portlet
|
3
|
+
|
4
|
+
delegate :position, to: :portlet
|
5
|
+
delegate :title, to: :widget
|
6
|
+
|
7
|
+
attr_reader :widget, :ui_section, :revision
|
8
|
+
|
9
|
+
def initialize view_context, ui_association, args={}
|
10
|
+
@widget = args.fetch(:widget, ui_association.widget)
|
11
|
+
@ui_section = args.fetch(:ui_section, ui_association.ui_section)
|
12
|
+
@revision = args.fetch(:revision, ui_association.revision)
|
13
|
+
super
|
14
|
+
end
|
15
|
+
|
16
|
+
def to_s
|
17
|
+
output = ActiveSupport::SafeBuffer.new
|
18
|
+
output << handle_tag
|
19
|
+
output << destroy_input_tag
|
20
|
+
output << position_input_tag
|
21
|
+
output << id_input_tag if persisted?
|
22
|
+
output << ui_section_id_input_tag
|
23
|
+
output << widget_id_input_tag
|
24
|
+
output << page_id_input_tag
|
25
|
+
output << content_tag(:div, title_tag, class: 'pull-left')
|
26
|
+
output << actions_tag
|
27
|
+
portlet_tag(output)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def text
|
33
|
+
truncate(@widget.text, length: 70)
|
34
|
+
end
|
35
|
+
|
36
|
+
def destroy_input_tag
|
37
|
+
hidden_field_tag("revision[ui_associations_attributes][#{id}][_destroy]", 0, class: 'js-destroy')
|
38
|
+
end
|
39
|
+
|
40
|
+
def id_input_tag
|
41
|
+
hidden_field_tag("revision[ui_associations_attributes][#{id}][id]", id)
|
42
|
+
end
|
43
|
+
|
44
|
+
def position_input_tag
|
45
|
+
hidden_field_tag("revision[ui_associations_attributes][#{id}][position]", position, class: 'js-position')
|
46
|
+
end
|
47
|
+
|
48
|
+
def ui_section_id_input_tag
|
49
|
+
hidden_field_tag("revision[ui_associations_attributes][#{id}][ui_section_id]", ui_section.id)
|
50
|
+
end
|
51
|
+
|
52
|
+
def widget_id_input_tag
|
53
|
+
hidden_field_tag("revision[ui_associations_attributes][#{id}][widget_id]", widget.id)
|
54
|
+
end
|
55
|
+
|
56
|
+
def page_id_input_tag
|
57
|
+
hidden_field_tag("revision[ui_associations_attributes][#{id}][page_id]", revision.id)
|
58
|
+
end
|
59
|
+
|
60
|
+
def title_tag
|
61
|
+
content_tag(:h4, (title + text_tag).html_safe, class: 'title')
|
62
|
+
end
|
63
|
+
|
64
|
+
def text_tag
|
65
|
+
content_tag(:small, text)
|
66
|
+
end
|
67
|
+
|
68
|
+
def actions_tag
|
69
|
+
content_tag(:div, class: 'actions') do
|
70
|
+
link_to(icon_tag('times'), '#', class: 'js-remove-widget')
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class NavigationSweeper < ActionController::Caching::Sweeper
|
2
|
+
observe Georgia::Menu
|
3
|
+
|
4
|
+
# Clear all cache when updating the menu.
|
5
|
+
# Menu is present on all pages. It also changes for each page because of the 'active' link.
|
6
|
+
def sweep(menu)
|
7
|
+
Rails.cache.clear
|
8
|
+
end
|
9
|
+
alias_method :after_save, :sweep
|
10
|
+
alias_method :after_touch, :sweep
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
class CkeditorAttachmentFileUploader < CarrierWave::Uploader::Base
|
3
|
+
include Ckeditor::Backend::CarrierWave
|
4
|
+
|
5
|
+
storage :fog
|
6
|
+
|
7
|
+
def store_dir
|
8
|
+
"assets/#{model.id}"
|
9
|
+
end
|
10
|
+
|
11
|
+
def extension_white_list
|
12
|
+
%w(doc docx odt xls ods csv pdf rar zip tar tar.gz ppt pptx)
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
end
|