georgia 0.7.8 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +60 -16
- data/Rakefile +17 -10
- data/app/assets/images/georgia/arrow.png +0 -0
- data/app/assets/images/georgia/close.png +0 -0
- data/app/assets/javascripts/georgia/application.js +3 -6
- data/app/assets/javascripts/georgia/bootstrap-vendor.js.coffee +1 -1
- data/app/assets/javascripts/georgia/ckeditor/config.js +1 -1
- data/app/assets/javascripts/georgia/components/flash.js.coffee +1 -1
- data/app/assets/javascripts/georgia/components/media-library.js.coffee +1 -1
- data/app/assets/javascripts/georgia/components/tables.js.coffee +30 -0
- data/app/assets/javascripts/georgia/components/tables/{checkbox.js.coffee → checkboxable.js.coffee} +10 -39
- data/app/assets/javascripts/georgia/components/tables/media.js.coffee +17 -29
- data/app/assets/javascripts/georgia/components/tables/pages.js.coffee +26 -44
- data/app/assets/javascripts/georgia/components/tags.js.coffee +13 -24
- data/app/assets/javascripts/georgia/vendor/ekko-lightbox.min.js +7 -0
- data/app/assets/javascripts/georgia/vendor/textext.core.js +1618 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.ajax.js +354 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.arrow.js +106 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.autocomplete.js +1110 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.clear.js +116 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.filter.js +242 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.focus.js +174 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.prompt.js +309 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.suggestions.js +175 -0
- data/app/assets/javascripts/georgia/vendor/textext.plugin.tags.js +698 -0
- data/app/assets/stylesheets/georgia/application.css.scss +71 -12
- data/app/assets/stylesheets/georgia/components/_button.scss +3 -20
- data/app/assets/stylesheets/georgia/components/_label.scss +36 -1
- data/app/assets/stylesheets/georgia/components/_portlet.scss +4 -1
- data/app/assets/stylesheets/georgia/components/_status.scss +9 -0
- data/app/assets/stylesheets/georgia/components/_table.scss +7 -0
- data/app/assets/stylesheets/georgia/layout/_base.scss +22 -5
- data/app/assets/stylesheets/georgia/layout/_print.scss +8 -0
- data/app/assets/stylesheets/georgia/modules/_activities.scss +3 -0
- data/app/assets/stylesheets/georgia/modules/_footer.scss +3 -1
- data/app/assets/stylesheets/georgia/modules/_form_with_helpers.scss +2 -2
- data/app/assets/stylesheets/georgia/modules/_header.scss +4 -13
- data/app/assets/stylesheets/georgia/modules/_link.scss +6 -1
- data/app/assets/stylesheets/georgia/modules/_login.scss +7 -0
- data/app/assets/stylesheets/georgia/modules/_media.scss +10 -0
- data/app/assets/stylesheets/georgia/modules/_navigation.scss +5 -0
- data/app/assets/stylesheets/georgia/modules/_pages.scss +3 -0
- data/app/assets/stylesheets/georgia/modules/_results.scss +11 -4
- data/app/assets/stylesheets/georgia/modules/_sidebar.scss +6 -21
- data/app/assets/stylesheets/georgia/modules/_users.scss +3 -0
- data/app/assets/stylesheets/georgia/overrides/_flatly.scss +16 -0
- data/app/assets/stylesheets/georgia/overrides/_textext.scss +54 -0
- data/app/assets/stylesheets/georgia/settings/_base.scss +1 -1
- data/app/assets/stylesheets/georgia/settings/_colors.scss +31 -1
- data/app/assets/stylesheets/georgia/settings/_z-index.scss +2 -2
- data/app/assets/stylesheets/georgia/vendor/_bootswatch-flatly-theme.scss +7 -0
- data/app/assets/stylesheets/georgia/vendor/_ekko-lightbox.min.scss +6 -0
- data/app/assets/stylesheets/georgia/vendor/_select2_bootstrap.scss +497 -0
- data/app/assets/stylesheets/georgia/vendor/_textext.core.scss +29 -0
- data/app/assets/stylesheets/georgia/vendor/_textext.plugin.arrow.scss +13 -0
- data/app/assets/stylesheets/georgia/vendor/_textext.plugin.autocomplete.scss +35 -0
- data/app/assets/stylesheets/georgia/vendor/_textext.plugin.clear.scss +13 -0
- data/app/assets/stylesheets/georgia/vendor/_textext.plugin.focus.scss +12 -0
- data/app/assets/stylesheets/georgia/vendor/_textext.plugin.prompt.scss +16 -0
- data/app/assets/stylesheets/georgia/vendor/_textext.plugin.tags.scss +49 -0
- data/app/controllers/georgia/api/media_controller.rb +4 -2
- data/app/controllers/georgia/api/tags_controller.rb +10 -7
- data/app/controllers/georgia/application_controller.rb +17 -2
- data/app/controllers/georgia/concerns/frontendable.rb +2 -3
- data/app/controllers/georgia/dashboard_controller.rb +5 -7
- data/app/controllers/georgia/links_controller.rb +1 -0
- data/app/controllers/georgia/media_controller.rb +50 -41
- data/app/controllers/georgia/menus_controller.rb +16 -6
- data/app/controllers/georgia/pages_controller.rb +98 -58
- data/app/controllers/georgia/revisions_controller.rb +120 -24
- data/app/controllers/georgia/ui_associations_controller.rb +1 -0
- data/app/controllers/georgia/users_controller.rb +31 -11
- data/app/controllers/georgia/widgets_controller.rb +13 -4
- data/app/helpers/georgia/application_helper.rb +4 -0
- data/app/helpers/georgia/forms_helper.rb +2 -2
- data/app/helpers/georgia/ui_helper.rb +78 -12
- data/app/helpers/georgia/users_helper.rb +21 -0
- data/app/mailers/georgia/notifier.rb +4 -4
- data/app/models/ckeditor/asset.rb +16 -4
- data/app/models/ckeditor/asset_search.rb +15 -0
- data/app/models/ckeditor/attachment_file.rb +7 -0
- data/app/models/ckeditor/picture.rb +10 -0
- data/app/models/georgia/clone.rb +3 -1
- data/app/models/georgia/concerns/contentable.rb +2 -3
- data/app/models/georgia/concerns/searchable.rb +32 -0
- data/app/models/georgia/concerns/taggable.rb +2 -2
- data/app/models/georgia/concerns/treeable.rb +0 -1
- data/app/models/georgia/content.rb +1 -3
- data/app/models/georgia/dashboard.rb +7 -0
- data/app/models/georgia/link.rb +10 -3
- data/app/models/georgia/menu.rb +4 -4
- data/app/models/georgia/page.rb +75 -10
- data/app/models/georgia/revision.rb +10 -5
- data/app/models/georgia/role.rb +5 -5
- data/app/models/georgia/role_assignment.rb +8 -0
- data/app/models/georgia/slide.rb +4 -4
- data/app/models/georgia/status.rb +3 -5
- data/app/models/georgia/ui_association.rb +3 -5
- data/app/models/georgia/ui_section.rb +1 -1
- data/app/models/georgia/user.rb +5 -14
- data/app/models/georgia/widget.rb +3 -3
- data/app/policies/georgia/api_policy.rb +13 -0
- data/app/policies/georgia/application_policy.rb +30 -0
- data/app/policies/georgia/concerns/content_policy.rb +56 -0
- data/app/policies/georgia/concerns/publishing_policy.rb +52 -0
- data/app/policies/georgia/dashboard_policy.rb +19 -0
- data/app/policies/georgia/media_policy.rb +56 -0
- data/app/policies/georgia/navigation_policy.rb +42 -0
- data/app/policies/georgia/page_policy.rb +26 -0
- data/app/policies/georgia/revision_policy.rb +7 -44
- data/app/policies/georgia/ui_association_policy.rb +4 -0
- data/app/policies/georgia/user_policy.rb +46 -0
- data/app/policies/georgia/widget_policy.rb +42 -0
- data/app/presenters/georgia/active_facet_presenter.rb +2 -1
- data/app/presenters/georgia/link_portlet.rb +2 -2
- data/app/presenters/georgia/pagination_presenter.rb +45 -7
- data/app/presenters/georgia/permission_table_presenter.rb +80 -0
- data/app/presenters/georgia/revision_status_message.rb +73 -0
- data/app/presenters/georgia/sidebar_link_presenter.rb +1 -1
- data/app/presenters/georgia/slide_portlet.rb +5 -1
- data/app/routes/georgia/pageable_route_concern.rb +35 -0
- data/app/searches/georgia/media_search.rb +39 -0
- data/app/searches/georgia/page_search.rb +47 -0
- data/app/searches/georgia/search_definition.rb +72 -0
- data/app/searches/georgia/tag_search.rb +32 -0
- data/app/services/georgia/clone_revision.rb +71 -0
- data/app/services/georgia/compress_files.rb +49 -0
- data/app/services/georgia/copy_page.rb +100 -0
- data/app/services/georgia/create_activity.rb +16 -0
- data/app/services/georgia/create_media_asset.rb +53 -0
- data/app/services/georgia/parse_json_tags.rb +21 -0
- data/app/services/georgia/update_revision.rb +52 -0
- data/app/views/georgia/api/media/pictures.html.erb +1 -1
- data/app/views/georgia/ckeditor/assets/_asset.html.erb +2 -4
- data/app/views/georgia/ckeditor/pictures/_picture.html.erb +1 -6
- data/app/views/georgia/dashboard/panels/_messages.html.erb +26 -28
- data/app/views/georgia/dashboard/panels/_reviews.html.erb +23 -22
- data/app/views/georgia/dashboard/show.html.erb +9 -3
- data/app/views/georgia/header/_media.html.erb +2 -2
- data/app/views/georgia/header/_navigation.html.erb +3 -3
- data/app/views/georgia/header/_pages.html.erb +3 -3
- data/app/views/georgia/header/_users.html.erb +2 -2
- data/app/views/georgia/header/_widgets.html.erb +1 -1
- data/app/views/georgia/media/_header.html.erb +4 -2
- data/app/views/georgia/media/create.js.erb +1 -0
- data/app/views/georgia/media/destroy.js.erb +3 -0
- data/app/views/georgia/media/edit.html.erb +35 -30
- data/app/views/georgia/media/search.html.erb +2 -2
- data/app/views/georgia/menus/index.html.erb +1 -1
- data/app/views/georgia/pages/_header.html.erb +4 -4
- data/app/views/georgia/pages/_page.html.erb +1 -1
- data/app/views/georgia/pages/search.html.erb +4 -5
- data/app/views/georgia/pages/settings.html.erb +72 -61
- data/app/views/georgia/revisions/_revision.html.erb +12 -7
- data/app/views/georgia/revisions/edit.html.erb +17 -11
- data/app/views/georgia/revisions/fields/_content.html.erb +1 -2
- data/app/views/georgia/revisions/fields/_message.html.erb +11 -0
- data/app/views/georgia/revisions/fields/_ui_section.html.erb +1 -1
- data/app/views/georgia/revisions/fields/_widgets.html.erb +1 -1
- data/app/views/georgia/revisions/index.html.erb +2 -2
- data/app/views/georgia/revisions/messages/_awaiting_review.html.erb +15 -0
- data/app/views/georgia/revisions/messages/_continue_draft.html.erb +8 -0
- data/app/views/georgia/revisions/messages/_edit_current_revision.html.erb +12 -0
- data/app/views/georgia/revisions/messages/_insufficient_rights.html.erb +6 -0
- data/app/views/georgia/revisions/messages/_request_review.html.erb +7 -0
- data/app/views/georgia/revisions/messages/_review.html.erb +7 -0
- data/app/views/georgia/revisions/messages/_start_draft.html.erb +4 -0
- data/app/views/georgia/revisions/panels/_actions.html.erb +7 -0
- data/app/views/georgia/revisions/panels/_activities.html.erb +6 -0
- data/app/views/georgia/revisions/panels/_drafts.html.erb +28 -0
- data/app/views/georgia/revisions/panels/_info.html.erb +39 -0
- data/app/views/georgia/shared/modals/_media_library.html.erb +3 -1
- data/app/views/georgia/shared/search/_messages.html.erb +1 -1
- data/app/views/georgia/users/_form.html.erb +17 -2
- data/app/views/georgia/users/_user.html.erb +1 -1
- data/app/views/georgia/users/edit.html.erb +0 -1
- data/app/views/georgia/users/index.html.erb +1 -1
- data/app/views/georgia/users/permissions.html.erb +15 -0
- data/app/views/georgia/users/sessions/new.html.erb +3 -3
- data/app/views/layouts/georgia/_footer.html.erb +1 -3
- data/app/views/layouts/georgia/_head.html.erb +3 -4
- data/app/views/layouts/georgia/_header.html.erb +8 -10
- data/app/views/public_activity/_default.html.erb +15 -0
- data/app/views/public_activity/georgia_page/_copy.html.erb +15 -0
- data/app/views/public_activity/georgia_page/_create.html.erb +15 -0
- data/app/views/public_activity/georgia_page/_decline.html.erb +15 -0
- data/app/views/public_activity/georgia_page/_publish.html.erb +15 -0
- data/app/views/public_activity/georgia_page/_unpublish.html.erb +15 -0
- data/app/views/public_activity/georgia_page/_update.html.erb +15 -0
- data/app/views/public_activity/georgia_revision/_approve.html.erb +15 -0
- data/app/views/public_activity/georgia_revision/_decline.html.erb +15 -0
- data/app/views/public_activity/georgia_revision/_draft.html.erb +15 -0
- data/app/views/public_activity/georgia_revision/_restore.html.erb +15 -0
- data/app/views/public_activity/georgia_revision/_review.html.erb +15 -0
- data/app/views/public_activity/georgia_revision/_update.html.erb +15 -0
- data/config/initializers/acts_as_taggable_on.rb +13 -12
- data/config/initializers/ckeditor.rb +36 -16
- data/config/initializers/devise.rb +17 -15
- data/config/initializers/elasticsearch.rb +44 -0
- data/config/initializers/inflections.rb +1 -1
- data/config/routes.rb +13 -36
- data/db/migrate/001_create_ckeditor_assets.rb +6 -5
- data/db/migrate/002_create_georgia_contents.rb +2 -4
- data/db/migrate/008_create_georgia_roles.rb +0 -2
- data/db/migrate/015_add_receives_notifications_to_users.rb +7 -0
- data/db/migrate/016_add_role_id_to_users.rb +7 -0
- data/db/migrate/017_add_status_to_revisions.rb +7 -0
- data/db/migrate/018_create_georgia_role_assignments.rb +11 -0
- data/db/migrate/019_create_activities.rb +23 -0
- data/db/migrate/020_remove_georgia_revisions_state.rb +11 -0
- data/db/migrate/021_add_revised_by_id_to_georgia_revisions.rb +13 -0
- data/lib/generators/georgia/install/install_generator.rb +3 -29
- data/lib/generators/georgia/install/templates/app/controllers/pages_controller.rb +1 -1
- data/lib/generators/georgia/install/templates/config/initializers/georgia.rb +3 -7
- data/lib/generators/georgia/setup/setup_generator.rb +29 -0
- data/lib/georgia.rb +26 -9
- data/lib/georgia/engine.rb +6 -25
- data/lib/georgia/permissions.rb +57 -0
- data/lib/georgia/uploader/adapter.rb +4 -1
- data/lib/georgia/uploader/storage/file.rb +23 -0
- data/lib/georgia/version.rb +1 -1
- data/lib/tasks/georgia_tasks.rake +99 -0
- metadata +463 -461
- data/app/assets/fonts/georgia/signika-bold-webfont.eot +0 -0
- data/app/assets/fonts/georgia/signika-bold-webfont.svg +0 -1711
- 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 +0 -1680
- 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 +0 -1746
- 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/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/jpeg.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/logo.png +0 -0
- data/app/assets/images/georgia/up_arrow.gif +0 -0
- data/app/assets/javascripts/georgia/keybindings.js.coffee +0 -42
- data/app/assets/stylesheets/georgia/components/_state.scss +0 -17
- data/app/assets/stylesheets/georgia/settings/_fonts.scss +0 -3
- data/app/decorators/georgia/link_decorator.rb +0 -9
- data/app/decorators/georgia/links_decorator.rb +0 -4
- data/app/helpers/georgia/internationalization_helper.rb +0 -45
- data/app/helpers/georgia/menus_helper.rb +0 -20
- data/app/helpers/georgia/meta_tags_helper.rb +0 -22
- data/app/helpers/georgia/pages_helper.rb +0 -30
- data/app/helpers/georgia/routes_helper.rb +0 -25
- data/app/helpers/georgia/twitter_helper.rb +0 -24
- data/app/models/ability.rb +0 -19
- data/app/models/acts_as_taggable_on/tag.rb +0 -5
- data/app/models/georgia/concerns/cacheable.rb +0 -18
- data/app/models/georgia/concerns/orderable.rb +0 -21
- data/app/models/georgia/concerns/publishable.rb +0 -35
- data/app/models/georgia/concerns/revisionable.rb +0 -38
- data/app/models/georgia/concerns/slugable.rb +0 -48
- data/app/models/georgia/concerns/statable.rb +0 -64
- data/app/models/georgia/concerns/templatable.rb +0 -20
- data/app/policies/georgia/policy.rb +0 -17
- data/app/presenters/georgia/page_actions_presenter.rb +0 -92
- data/app/presenters/georgia/warning_message.rb +0 -55
- data/app/services/create_media_asset.rb +0 -51
- data/app/sweepers/navigation_sweeper.rb +0 -12
- data/app/views/georgia/media/sidebar/_facets.html.erb +0 -12
- data/app/views/menus/_dropdown_group.html.erb +0 -10
- data/app/views/menus/_dropdown_link.html.erb +0 -3
- data/app/views/menus/_dropdown_menu.html.erb +0 -11
- data/app/views/menus/_link.html.erb +0 -1
- data/app/views/menus/_menu.html.erb +0 -7
- data/config/initializers/simple_form.rb +0 -79
- data/config/locales/georgia.en.yml +0 -4
- data/lib/georgia/indexer.rb +0 -33
- data/lib/georgia/indexer/adapter.rb +0 -44
- data/lib/georgia/indexer/extensions/solr_adapter/acts_as_taggable_on/tag.rb +0 -30
- data/lib/georgia/indexer/extensions/solr_adapter/ckeditor/asset.rb +0 -46
- data/lib/georgia/indexer/extensions/solr_adapter/georgia/page.rb +0 -75
- data/lib/georgia/indexer/extensions/tire_adapter/acts_as_taggable_on/tag.rb +0 -34
- data/lib/georgia/indexer/extensions/tire_adapter/ckeditor/asset.rb +0 -57
- data/lib/georgia/indexer/extensions/tire_adapter/georgia/page.rb +0 -55
- data/lib/georgia/indexer/solr_adapter.rb +0 -20
- data/lib/georgia/indexer/tire_adapter.rb +0 -18
- data/lib/tasks/assets.rake +0 -20
- data/lib/tasks/georgia.rake +0 -65
- data/lib/tasks/sidekiq.rake +0 -8
- data/lib/tasks/solr.rake +0 -21
- data/lib/tasks/upgrade.rake +0 -39
- data/lib/templates/erb/scaffold/_form.html.erb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bc0ff8368285a4875868905f0c0cdb55f7a8130
|
4
|
+
data.tar.gz: d7d972a6b622ef2bac9370379ce2b362f303377a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c811e67834fb6fc723d24049f4c921c2bb222d9748358fbc8bc5d8a310c5de8b3d0a0eb71d51c2826483f2c8b95169c93d64ecfb8e8d655f36cde62569e5025b
|
7
|
+
data.tar.gz: c1c7bd108ae6b0b1e74b99b7179b8c18eb9d3a22d41bff3ae0e2ed71de30dabaea702f4357053241429dd92a3562d5e6e191f02a22528e890b1668e17e05d379
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -5,22 +5,26 @@
|
|
5
5
|
[![Code Climate](https://codeclimate.com/github/georgia-cms/georgia.png)](https://codeclimate.com/github/georgia-cms/georgia)
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/georgia-cms/georgia/badge.png)](https://coveralls.io/r/georgia-cms/georgia)
|
7
7
|
|
8
|
-
Rails. Engine. CMS. Plug-and-play content management system for Ruby on Rails. Have a
|
8
|
+
Rails. Engine. CMS. Plug-and-play content management system for Ruby on Rails. Have a go at the [demo](http://demo.georgiacms.org/admin) (demo@georgiacms.org // georgiacms).
|
9
9
|
|
10
10
|
### Features
|
11
11
|
|
12
|
-
* Media library on the cloud
|
13
|
-
*
|
12
|
+
* Media library on the cloud (or on files)
|
13
|
+
* Messages Inbox with [georgia_mailer](https://github.com/georgia-cms/georgia_mailer)
|
14
|
+
* Spam filter
|
14
15
|
* Multilingual from the get-go
|
16
|
+
* Heroku-ready with georgia_heroku
|
15
17
|
* Review you pairs and draft new pages
|
16
18
|
* Preview before publishing
|
19
|
+
* Add a blog with [georgia_blog](https://github.com/georgia-cms/georgia_blog)
|
17
20
|
* Rollback to previous revisions when it hits the fan
|
18
|
-
* Great UI, nice search, gravatars
|
21
|
+
* Great UI, nice search, gravatars, etc.
|
19
22
|
* Editable menus
|
20
|
-
* Extendable
|
21
23
|
* Widgets
|
22
24
|
* Slides
|
23
25
|
* Permission levels
|
26
|
+
* Sitemaps
|
27
|
+
* Extendable (georgia_mailer, georgia_blog & more coming)
|
24
28
|
|
25
29
|
### Why? aka Comparison with refinerycms
|
26
30
|
|
@@ -44,9 +48,10 @@ config.i18n.default_locale = :en
|
|
44
48
|
config.i18n.available_locales = [:en]
|
45
49
|
```
|
46
50
|
|
47
|
-
Then run the
|
51
|
+
Then run the generators to mount routes, run migrations & setup initial instances.
|
48
52
|
|
49
53
|
rails generate georgia:install
|
54
|
+
rails generate georgia:setup
|
50
55
|
|
51
56
|
We built Georgia to help you quickly develop an application with a CMS (Content Management System). However, we don't want to be in your way when you need to customize it.
|
52
57
|
|
@@ -87,17 +92,54 @@ The `georgia:install` generator added a `carrierwave.example.rb` file to your in
|
|
87
92
|
|
88
93
|
### Heroku
|
89
94
|
|
90
|
-
Georgia will run smoothly and cheaply (read free) on Heroku but you will need certain addons to make it work
|
95
|
+
Georgia will run smoothly and cheaply (read free) on Heroku but you will need certain addons to make it work.
|
96
|
+
|
97
|
+
#### Get Started
|
98
|
+
|
99
|
+
To get started, add `georgia_heroku` gem to your Gemfile in development.
|
100
|
+
|
101
|
+
```
|
102
|
+
group :development do
|
103
|
+
gem 'georgia_heroku'
|
104
|
+
end
|
105
|
+
```
|
106
|
+
|
107
|
+
##### Run the generator
|
108
|
+
|
109
|
+
Prepare your app to be hosted on Heroku by adding necessary gems, cache config, unicorn web server, tools such as Bonsai, Sendgrid & Memcachier.
|
110
|
+
|
111
|
+
```
|
112
|
+
$ rails g georgia:heroku:install
|
113
|
+
```
|
114
|
+
|
115
|
+
Follow the post-install instructions in the README.
|
116
|
+
|
117
|
+
##### Add the buildpack from TurboSprockets
|
118
|
+
|
119
|
+
```
|
120
|
+
$ heroku config:add BUILDPACK_URL=https://github.com/ndbroadbent/heroku-buildpack-turbo-sprockets.git
|
121
|
+
```
|
122
|
+
|
123
|
+
#### Deployment
|
124
|
+
|
125
|
+
Use the `georgia:heroku:deploy` rake task to deploy. It will compile your assets locally before pushing to Heroku. Otherwise it is likely you will exceed the time limit allowed to deploy your app. It is also faster.
|
126
|
+
|
127
|
+
To deploy:
|
128
|
+
```
|
129
|
+
$ bundle exec rake georgia:heroku:deploy
|
130
|
+
```
|
91
131
|
|
92
132
|
#### Sengrid
|
93
133
|
|
94
|
-
Add sendgrid addon to handle emails
|
134
|
+
Add sendgrid addon to handle emails.
|
95
135
|
|
96
136
|
heroku addons:add sendgrid
|
97
137
|
|
98
|
-
|
138
|
+
The generator should have taken care of this but if you want to do it manually, here's the Sendgrid config to add to your production environment file.
|
99
139
|
|
100
140
|
``` ruby
|
141
|
+
# config/environments/production.rb
|
142
|
+
|
101
143
|
# Send emails via sendgrid
|
102
144
|
config.action_mailer.smtp_settings = {
|
103
145
|
:address => 'smtp.sendgrid.net',
|
@@ -120,14 +162,13 @@ Add `config/initializers/bonsai.rb` with:
|
|
120
162
|
|
121
163
|
ENV['ELASTICSEARCH_URL'] = ENV['BONSAI_URL']
|
122
164
|
|
123
|
-
Create your elasticsearch indices with
|
165
|
+
Create your elasticsearch indices with this command:
|
124
166
|
|
125
|
-
*** After your first deploy ***
|
167
|
+
*** After your first deploy ***
|
126
168
|
|
127
|
-
heroku run rake environment
|
128
|
-
|
129
|
-
|
130
|
-
heroku run rake environment tire:import CLASS=ActsAsTaggableOn::Tag FORCE=true
|
169
|
+
heroku run rake environment georgia:create_indices
|
170
|
+
|
171
|
+
For more information, you can also follow these [instructions](https://gist.github.com/nz/2041121) to setup bonsai.io. More [here](https://devcenter.heroku.com/articles/bonsai) on heroku.com
|
131
172
|
|
132
173
|
#### Cloudinary
|
133
174
|
|
@@ -141,4 +182,7 @@ Finally, create your first admin user to access to web panel:
|
|
141
182
|
|
142
183
|
heroku run rake georgia:seed
|
143
184
|
|
144
|
-
|
185
|
+
|
186
|
+
### Rails 3
|
187
|
+
|
188
|
+
Look at branch `rails3` for support on Rails 3.2
|
data/Rakefile
CHANGED
@@ -1,16 +1,10 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
1
|
begin
|
3
2
|
require 'bundler/setup'
|
4
3
|
rescue LoadError
|
5
4
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
5
|
end
|
7
|
-
|
8
|
-
|
9
|
-
rescue LoadError
|
10
|
-
require 'rdoc/rdoc'
|
11
|
-
require 'rake/rdoctask'
|
12
|
-
RDoc::Task = Rake::RDocTask
|
13
|
-
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
14
8
|
|
15
9
|
RDoc::Task.new(:rdoc) do |rdoc|
|
16
10
|
rdoc.rdoc_dir = 'rdoc'
|
@@ -20,6 +14,19 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
20
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
15
|
end
|
22
16
|
|
23
|
-
Bundler::GemHelper.install_tasks
|
24
17
|
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
25
|
-
load 'rails/tasks/engine.rake'
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
Bundler::GemHelper.install_tasks
|
21
|
+
|
22
|
+
require 'rake/testtask'
|
23
|
+
|
24
|
+
Rake::TestTask.new(:test) do |t|
|
25
|
+
t.libs << 'lib'
|
26
|
+
t.libs << 'test'
|
27
|
+
t.pattern = 'test/**/*_test.rb'
|
28
|
+
t.verbose = false
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
task default: :test
|
Binary file
|
Binary file
|
@@ -1,12 +1,10 @@
|
|
1
1
|
//= require jquery
|
2
|
-
//= require jquery
|
3
|
-
//= require jquery
|
4
|
-
//= require jquery
|
2
|
+
//= require jquery-ui/core
|
3
|
+
//= require jquery-ui/sortable
|
4
|
+
//= require jquery-ui/tooltip
|
5
5
|
//= require jquery_ujs
|
6
6
|
//= require jquery-fileupload/basic
|
7
7
|
//= require select2
|
8
|
-
//= require shadowbox
|
9
|
-
//= require mousetrap
|
10
8
|
|
11
9
|
//= require ckeditor/init
|
12
10
|
//= require_tree ./ckeditor
|
@@ -16,5 +14,4 @@
|
|
16
14
|
//= require_tree ./components
|
17
15
|
//= require ./bootstrap-vendor
|
18
16
|
//= require ./featured-image
|
19
|
-
//= require ./keybindings
|
20
17
|
//= require ./toggle
|
@@ -1,7 +1,7 @@
|
|
1
1
|
CKEDITOR.config.ignoreEmptyParagraph = false;
|
2
2
|
CKEDITOR.config.allowedContent = true;
|
3
3
|
CKEDITOR.config.height = 400;
|
4
|
-
CKEDITOR.config.width = '
|
4
|
+
CKEDITOR.config.width = '100%';
|
5
5
|
CKEDITOR.config.toolbarStartupExpanded = false;
|
6
6
|
CKEDITOR.config.toolbarGroups = [
|
7
7
|
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
|
@@ -44,7 +44,7 @@ class @MediaLibrary
|
|
44
44
|
event.preventDefault()
|
45
45
|
|
46
46
|
query: => @search.val()
|
47
|
-
spinnerTag: -> "<div class='spinner'><i class='fa fa-spinner fa-4x'></i></div>"
|
47
|
+
spinnerTag: -> "<div class='spinner'><i class='fa fa-spin fa-spinner fa-4x'></i></div>"
|
48
48
|
|
49
49
|
jQuery ->
|
50
50
|
# If the media library modal is loaded,
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class @Table
|
2
|
+
|
3
|
+
constructor: (element, checkboxable) ->
|
4
|
+
@element = $(element)
|
5
|
+
@actions = @element.find('th.actions > a')
|
6
|
+
@checkboxable = checkboxable
|
7
|
+
@element.on('click', @checkboxes(), @update)
|
8
|
+
|
9
|
+
checkboxes: () -> @element.find("input:checkbox")
|
10
|
+
|
11
|
+
update: () =>
|
12
|
+
if @getChecked().length then @enableActions() else @disableActions()
|
13
|
+
|
14
|
+
notify: (data) =>
|
15
|
+
new Flash(data['message'], data['status'])
|
16
|
+
@checkboxable.updateSelectAll()
|
17
|
+
|
18
|
+
enableActions: () =>
|
19
|
+
@actions.removeClass('disabled').addClass('btn-info')
|
20
|
+
|
21
|
+
disableActions: () =>
|
22
|
+
@actions.addClass('disabled').removeClass('btn-info')
|
23
|
+
|
24
|
+
stopEvent: (event) ->
|
25
|
+
event.stopPropagation()
|
26
|
+
event.preventDefault()
|
27
|
+
|
28
|
+
getChecked: () => @element.find("input:checkbox:checked")
|
29
|
+
getId: (c) => $(c).data('id')
|
30
|
+
getIds: () => $.map(@getChecked(), (c) => @getId(c))
|
data/app/assets/javascripts/georgia/components/tables/{checkbox.js.coffee → checkboxable.js.coffee}
RENAMED
@@ -3,55 +3,33 @@ class @Checkboxable
|
|
3
3
|
constructor: (element) ->
|
4
4
|
@element = $(element)
|
5
5
|
@selectAllCheckbox = @element.find("[data-checkbox='all']")
|
6
|
-
@checkboxes = @element.find("[data-checkbox='child']")
|
7
|
-
@selectAllLink = @element.find('.js-select-all')
|
8
|
-
@selectNoneLink = @element.find('.js-select-none')
|
9
|
-
@selectSpamLink = @element.find('.js-select-spam')
|
10
6
|
@setBindings()
|
11
7
|
|
8
|
+
checkboxes: () => @element.find("[data-checkbox='child']")
|
9
|
+
|
12
10
|
setBindings: () =>
|
13
11
|
@selectAllCheckbox.bind('click', @updateCheckboxes)
|
14
|
-
@
|
15
|
-
@selectAllLink.on('click', @selectAll)
|
16
|
-
@selectNoneLink.on('click', @selectNone)
|
17
|
-
@selectSpamLink.on('click', @selectSpam)
|
18
|
-
|
19
|
-
selectAll: () =>
|
20
|
-
@check(@selectAllCheckbox)
|
21
|
-
@check(@checkboxes)
|
22
|
-
@checkboxes.trigger('change')
|
23
|
-
|
24
|
-
selectNone: () =>
|
25
|
-
@uncheck(@selectAllCheckbox)
|
26
|
-
@uncheck(@checkboxes)
|
27
|
-
@checkboxes.trigger('change')
|
28
|
-
|
29
|
-
selectSpam: () =>
|
30
|
-
@uncheck(@checkboxes)
|
31
|
-
@check(@element.find("tr[data-status='spam'] input:checkbox"))
|
32
|
-
@updateSelectAll()
|
33
|
-
@checkboxes.trigger('change')
|
12
|
+
@element.on('click', @checkboxes(), @update)
|
34
13
|
|
35
14
|
update: (event) =>
|
36
|
-
checkbox = $(event.
|
15
|
+
checkbox = $(event.target)
|
37
16
|
@updateCheckbox(checkbox)
|
38
17
|
@updateSelectAll()
|
39
18
|
|
40
19
|
updateCheckboxes: (event) =>
|
41
|
-
event.stopPropagation()
|
42
20
|
switch @getState(@selectAllCheckbox)
|
43
21
|
# uncheck, going checked
|
44
22
|
when 'unchecked'
|
45
23
|
@check(@selectAllCheckbox)
|
46
|
-
@check(@checkboxes) if @checkboxes.length
|
24
|
+
@check(@checkboxes()) if @checkboxes().length
|
47
25
|
# indeterminate, going unchecked
|
48
26
|
when 'indeterminate'
|
49
27
|
@uncheck(@selectAllCheckbox)
|
50
|
-
@uncheck(@checkboxes) if @checkboxes.length
|
28
|
+
@uncheck(@checkboxes()) if @checkboxes().length
|
51
29
|
# checked, going unchecked
|
52
30
|
else
|
53
31
|
@uncheck(@selectAllCheckbox)
|
54
|
-
@uncheck(@checkboxes) if @checkboxes.length
|
32
|
+
@uncheck(@checkboxes()) if @checkboxes().length
|
55
33
|
|
56
34
|
updateCheckbox: (el) =>
|
57
35
|
switch @getState(el)
|
@@ -65,7 +43,7 @@ class @Checkboxable
|
|
65
43
|
|
66
44
|
updateSelectAll: () =>
|
67
45
|
# gather all siblings states
|
68
|
-
states = @checkboxes.map (i, c) => @getState(c)
|
46
|
+
states = @checkboxes().map (i, c) => @getState(c)
|
69
47
|
# get unique values
|
70
48
|
states = @distinct(states)
|
71
49
|
# if not all siblings share the same state, go indeterminate
|
@@ -78,6 +56,7 @@ class @Checkboxable
|
|
78
56
|
when 'unchecked' then @uncheck(@selectAllCheckbox)
|
79
57
|
# if all checked, set parent as checked
|
80
58
|
when 'checked' then @check(@selectAllCheckbox)
|
59
|
+
else @uncheck(@selectAllCheckbox)
|
81
60
|
|
82
61
|
check: (el) =>
|
83
62
|
$(el).each (index, e) =>
|
@@ -112,12 +91,4 @@ class @Checkboxable
|
|
112
91
|
|
113
92
|
stopEvent: (event) ->
|
114
93
|
event.stopPropagation()
|
115
|
-
event.preventDefault()
|
116
|
-
|
117
|
-
$.fn.actsAsCheckboxable = () ->
|
118
|
-
@each ->
|
119
|
-
new Checkboxable($(this))
|
120
|
-
|
121
|
-
jQuery ->
|
122
|
-
$("table.js-checkboxable").each ->
|
123
|
-
$(this).actsAsCheckboxable()
|
94
|
+
event.preventDefault()
|
@@ -1,16 +1,21 @@
|
|
1
|
-
class @MediaTable
|
1
|
+
class @MediaTable extends @Table
|
2
2
|
|
3
|
-
constructor: (element) ->
|
4
|
-
|
5
|
-
@checkboxes = @element.find("input:checkbox")
|
3
|
+
constructor: (element, checkboxable) ->
|
4
|
+
super(element, checkboxable)
|
6
5
|
@downloadBtn = $('.js-download')
|
7
6
|
@deleteBtn = $('.js-delete')
|
8
|
-
@setBindings()
|
9
|
-
|
10
|
-
setBindings: () =>
|
11
|
-
@checkboxes.on('click', @update)
|
12
7
|
@deleteBtn.on('click', @destroy)
|
13
8
|
|
9
|
+
# TODO: Should mark item while request is sent. Should sent one request per selected asset for faster feedback
|
10
|
+
destroy: (event) =>
|
11
|
+
@stopEvent(event)
|
12
|
+
$.ajax(
|
13
|
+
url: "/admin/media/#{@getIds()}"
|
14
|
+
type: 'DELETE'
|
15
|
+
dataType: 'JSON'
|
16
|
+
success: @removeAssets
|
17
|
+
).always(@notify)
|
18
|
+
|
14
19
|
update: () =>
|
15
20
|
@updateDownloadableIds()
|
16
21
|
if @getChecked().length
|
@@ -18,18 +23,8 @@ class @MediaTable
|
|
18
23
|
else
|
19
24
|
@disableActions()
|
20
25
|
|
21
|
-
|
22
|
-
|
23
|
-
@stopEvent(event)
|
24
|
-
$.ajax(
|
25
|
-
type: 'DELETE'
|
26
|
-
url: '/admin/media'
|
27
|
-
data:
|
28
|
-
id: @getIds()
|
29
|
-
dataType: 'JSON'
|
30
|
-
).always(() =>
|
31
|
-
$.each @getIds(), (index, id) -> $("#asset_#{id}").remove()
|
32
|
-
)
|
26
|
+
removeAssets: () =>
|
27
|
+
$.each @getIds(), (index, id) -> $("#asset_#{id}").remove()
|
33
28
|
|
34
29
|
updateDownloadableIds: () =>
|
35
30
|
$('.downloadable-ids').val(@getIds())
|
@@ -42,17 +37,10 @@ class @MediaTable
|
|
42
37
|
@downloadBtn.addClass('disabled').removeClass('btn-info')
|
43
38
|
@deleteBtn.addClass('disabled').removeClass('btn-danger')
|
44
39
|
|
45
|
-
stopEvent: (event) ->
|
46
|
-
event.stopPropagation()
|
47
|
-
event.preventDefault()
|
48
|
-
|
49
|
-
getChecked: () => @element.find("input:checkbox:checked[data-checkbox='child']")
|
50
|
-
getId: (c) => $(c).data('id')
|
51
|
-
getIds: () => $.map(@getChecked(), (c) => @getId(c))
|
52
|
-
|
53
40
|
$.fn.actsAsMediaTable = () ->
|
54
41
|
@each ->
|
55
|
-
new
|
42
|
+
checkboxable = new Checkboxable($(this))
|
43
|
+
new MediaTable($(this), checkboxable)
|
56
44
|
|
57
45
|
jQuery ->
|
58
46
|
$("table.assets.js-checkboxable").each ->
|
@@ -1,92 +1,74 @@
|
|
1
|
-
class @PagesTable
|
1
|
+
class @PagesTable extends @Table
|
2
2
|
|
3
|
-
constructor: (element) ->
|
4
|
-
|
5
|
-
@
|
6
|
-
@
|
7
|
-
@
|
8
|
-
@unpublishBtn = $('.js-unpublish')
|
9
|
-
@flushCacheBtn = $('.js-flush-cache')
|
3
|
+
constructor: (element, checkboxable) ->
|
4
|
+
super(element, checkboxable)
|
5
|
+
@deleteBtn = @element.find('.js-delete')
|
6
|
+
@publishBtn = @element.find('.js-publish')
|
7
|
+
@unpublishBtn = @element.find('.js-unpublish')
|
10
8
|
@setBindings()
|
11
9
|
|
12
10
|
setBindings: () =>
|
13
|
-
@checkboxes.on('click', @update)
|
14
11
|
@deleteBtn.on('click', @destroy)
|
15
12
|
@publishBtn.on('click', @publish)
|
16
13
|
@unpublishBtn.on('click', @unpublish)
|
17
|
-
@flushCacheBtn.on('click', @flushCache)
|
18
|
-
|
19
|
-
update: () =>
|
20
|
-
if @getChecked().length
|
21
|
-
@enableActions()
|
22
|
-
else
|
23
|
-
@disableActions()
|
24
14
|
|
25
15
|
destroy: (event) =>
|
26
16
|
@stopEvent(event)
|
27
17
|
$.ajax(
|
28
18
|
type: 'DELETE'
|
29
|
-
url: "/admin/pages"
|
30
|
-
data: {id: @getIds()}
|
31
19
|
dataType: 'JSON'
|
32
|
-
|
33
|
-
$.each @getIds(), (index, id) -> $("#page_#{id}").remove()
|
34
|
-
)
|
35
|
-
|
36
|
-
flushCache: (event) =>
|
37
|
-
@stopEvent(event)
|
38
|
-
$.ajax(
|
39
|
-
type: "POST"
|
40
|
-
url: "/admin/pages/flush-cache"
|
20
|
+
url: "/admin/pages"
|
41
21
|
data: {id: @getIds()}
|
42
|
-
|
43
|
-
)
|
22
|
+
success: @removePages
|
23
|
+
).always(@notify)
|
44
24
|
|
45
25
|
publish: (event) =>
|
46
26
|
@stopEvent(event)
|
47
27
|
$.ajax(
|
48
28
|
type: "POST"
|
29
|
+
dataType: 'JSON'
|
49
30
|
url: "/admin/pages/publish"
|
50
31
|
data: {id: @getIds()}
|
51
|
-
|
52
|
-
).always(
|
53
|
-
$.each @getIds(), (index, id) -> $("#page_#{id}").removeClass('private').addClass('public')
|
54
|
-
)
|
32
|
+
success: @markAsPublic
|
33
|
+
).always(@notify)
|
55
34
|
|
56
35
|
unpublish: (event) =>
|
57
36
|
@stopEvent(event)
|
58
37
|
$.ajax(
|
59
38
|
type: "POST"
|
39
|
+
dataType: 'JSON'
|
60
40
|
url: "/admin/pages/unpublish"
|
61
41
|
data: {id: @getIds()}
|
62
|
-
|
63
|
-
).always(
|
64
|
-
|
65
|
-
|
42
|
+
success: @markAsPrivate
|
43
|
+
).always(@notify)
|
44
|
+
|
45
|
+
removePages: () =>
|
46
|
+
$.each @getIds(), (index, id) -> $("#page_#{id}").remove()
|
47
|
+
|
48
|
+
markAsPublic: () =>
|
49
|
+
$.each @getIds(), (index, id) -> $("#page_#{id}").removeClass('private').addClass('public')
|
50
|
+
|
51
|
+
markAsPrivate: () =>
|
52
|
+
$.each @getIds(), (index, id) -> $("#page_#{id}").removeClass('public').addClass('private')
|
66
53
|
|
67
54
|
enableActions: () =>
|
68
55
|
@deleteBtn.removeClass('disabled').addClass('btn-danger')
|
69
56
|
@publishBtn.removeClass('disabled').addClass('btn-warning')
|
70
57
|
@unpublishBtn.removeClass('disabled').addClass('btn-warning')
|
71
|
-
@flushCacheBtn.removeClass('disabled').addClass('btn-warning')
|
72
58
|
|
73
59
|
disableActions: () =>
|
74
60
|
@deleteBtn.addClass('disabled').removeClass('btn-danger')
|
75
61
|
@publishBtn.addClass('disabled').removeClass('btn-warning')
|
76
62
|
@unpublishBtn.addClass('disabled').removeClass('btn-warning')
|
77
|
-
@flushCacheBtn.addClass('disabled').removeClass('btn-warning')
|
78
63
|
|
79
64
|
stopEvent: (event) ->
|
80
65
|
event.stopPropagation()
|
81
66
|
event.preventDefault()
|
82
67
|
|
83
|
-
getChecked: () => @element.find("input:checkbox:checked[data-checkbox='child']")
|
84
|
-
getId: (c) => $(c).data('id')
|
85
|
-
getIds: () => $.map(@getChecked(), (c) => @getId(c))
|
86
|
-
|
87
68
|
$.fn.actsAsPagesTable = () ->
|
88
69
|
@each ->
|
89
|
-
new
|
70
|
+
checkboxable = new Checkboxable($(this))
|
71
|
+
new PagesTable($(this), checkboxable)
|
90
72
|
|
91
73
|
jQuery ->
|
92
74
|
$("table.pages.js-checkboxable").each ->
|