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
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has published <em><%= link_to activity.trackable.title, activity.trackable rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has unpublished <em><%= link_to activity.trackable.title, activity.trackable rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has updated settings for <em><%= link_to activity.trackable.title, activity.trackable rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has approved a review for <em><%= link_to activity.trackable.title, [activity.trackable.revisionable, activity.trackable] rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has decline a review for <em><%= link_to activity.trackable.title, [activity.trackable.revisionable, activity.trackable] rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has drafted <em><%= link_to activity.trackable.title, activity.trackable rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has restored a past revision for <em><%= link_to activity.trackable.title, [activity.trackable.revisionable, activity.trackable] rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has requested a review for <em><%= link_to activity.trackable.title, [activity.trackable.revisionable, activity.trackable] rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id='activity_<%= activity.id %>' class="activity media">
|
2
|
+
<%= image_tag(avatar_url(activity.owner.try(:email)), alt: '', class: 'media-object pull-left') %>
|
3
|
+
<div class="media-body">
|
4
|
+
<h4 class="media-heading">
|
5
|
+
<%= activity.owner.try(:name) || unknown_user_name %> has updated <em><%= link_to activity.trackable.title, [activity.trackable.revisionable, activity.trackable] rescue '[deleted]' %></em>
|
6
|
+
</h4>
|
7
|
+
<p>
|
8
|
+
<small>
|
9
|
+
<time class='text-muted js-time-ago' datetime="<%= activity.created_at %>">
|
10
|
+
About <%= time_ago_in_words(activity.created_at) %> ago
|
11
|
+
</time>
|
12
|
+
</small>
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -1,13 +1,14 @@
|
|
1
|
-
# If you would like to remove unused tag objects after removing taggings, add
|
2
1
|
ActsAsTaggableOn.remove_unused_tags = true
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
ActsAsTaggableOn::Tag.send(:include, Elasticsearch::Model)
|
3
|
+
ActsAsTaggableOn::Tag.send(:include, Elasticsearch::Model::Callbacks)
|
4
|
+
ActsAsTaggableOn::Tag.class_eval do
|
5
|
+
def self.policy_class
|
6
|
+
Georgia::ApiPolicy
|
7
|
+
end
|
8
|
+
end
|
9
|
+
ActsAsTaggableOn::Tagging.class_eval do
|
10
|
+
after_save :touch_taggable
|
11
|
+
def touch_taggable
|
12
|
+
taggable.touch if taggable.present?
|
13
|
+
end
|
14
|
+
end
|
@@ -1,18 +1,38 @@
|
|
1
1
|
# Use this hook to configure ckeditor
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
2
|
+
Ckeditor.setup do |config|
|
3
|
+
# ==> ORM configuration
|
4
|
+
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
|
5
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
6
|
+
# available as additional gems.
|
7
|
+
require "ckeditor/orm/active_record"
|
8
|
+
|
9
|
+
config.assets_languages = ['en', 'fr']
|
10
|
+
|
11
|
+
# Allowed image file types for upload.
|
12
|
+
# Set to nil or [] (empty array) for all file types
|
13
|
+
# By default: %w(jpg jpeg png gif tiff)
|
14
|
+
# config.image_file_types = ["jpg", "jpeg", "png", "gif", "tiff"]
|
15
|
+
|
16
|
+
# Allowed attachment file types for upload.
|
17
|
+
# Set to nil or [] (empty array) for all file types
|
18
|
+
# By default: %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
|
19
|
+
# config.attachment_file_types = ["doc", "docx", "xls", "odt", "ods", "pdf", "rar", "zip", "tar", "swf"]
|
20
|
+
|
21
|
+
# Setup authorization to be run as a before filter
|
22
|
+
# By default: there is no authorization.
|
23
|
+
# config.authorize_with :cancan
|
24
|
+
|
25
|
+
# Asset model classes
|
26
|
+
# config.picture_model { Ckeditor::Picture }
|
27
|
+
# config.attachment_file_model { Ckeditor::AttachmentFile }
|
28
|
+
|
29
|
+
# Paginate assets
|
30
|
+
# By default: 24
|
31
|
+
# config.default_per_page = 24
|
32
|
+
|
33
|
+
# Customize ckeditor assets path
|
34
|
+
# By default: nil
|
35
|
+
# config.asset_path = "http://www.example.com/assets/ckeditor/"
|
18
36
|
end
|
37
|
+
|
38
|
+
Rails.application.config.assets.precompile += %w( ckeditor/* )
|
@@ -4,13 +4,13 @@ Devise.setup do |config|
|
|
4
4
|
# The secret key used by Devise. Devise uses this key to generate
|
5
5
|
# random tokens. Changing this key will render invalid all existing
|
6
6
|
# confirmation, reset password and unlock tokens in the database.
|
7
|
-
config.secret_key = '
|
7
|
+
# config.secret_key = '46abeebc2b3664faeb421514a3b7c92faee7e571c80e4192bf5365f9e4a6ce349d5273ff9ee3d900a8e861e8dcd909906843a894b67fb8578e547a1a7916deb4'
|
8
8
|
|
9
9
|
# ==> Mailer Configuration
|
10
10
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
11
11
|
# note that it will be overwritten if you use your own mailer class
|
12
12
|
# with default "from" parameter.
|
13
|
-
config.mailer_sender = '
|
13
|
+
config.mailer_sender = 'no-reply@georgiacms.org'
|
14
14
|
|
15
15
|
# Configure the class responsible to send e-mails.
|
16
16
|
# config.mailer = 'Devise::Mailer'
|
@@ -76,7 +76,7 @@ Devise.setup do |config|
|
|
76
76
|
# particular strategies by setting this option.
|
77
77
|
# Notice that if you are skipping storage for all authentication paths, you
|
78
78
|
# may want to disable generating routes to Devise's sessions controller by
|
79
|
-
# passing :
|
79
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
80
80
|
config.skip_session_storage = [:http_auth]
|
81
81
|
|
82
82
|
# By default, Devise cleans up the CSRF token on authentication to
|
@@ -91,18 +91,20 @@ Devise.setup do |config|
|
|
91
91
|
#
|
92
92
|
# Limiting the stretches to just one in testing will increase the performance of
|
93
93
|
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
94
|
-
# a value less than 10 in other environments.
|
94
|
+
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
95
|
+
# encryptor), the cost increases exponentially with the number of stretches (e.g.
|
96
|
+
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
95
97
|
config.stretches = Rails.env.test? ? 1 : 10
|
96
98
|
|
97
99
|
# Setup a pepper to generate the encrypted password.
|
98
|
-
# config.pepper = '
|
100
|
+
# config.pepper = '45253a3ee9b5c7ca3ee0d674bece4cec6c97b4953cd7f2aa860221a79faa2f45a3cb2ac46da3969e1ef34081d5625e9db61d923030e3b421708524c87bd44cb1'
|
99
101
|
|
100
102
|
# ==> Configuration for :confirmable
|
101
103
|
# A period that the user is allowed to access the website even without
|
102
|
-
# confirming
|
103
|
-
# able to access the website for two days without confirming
|
104
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
105
|
+
# able to access the website for two days without confirming their account,
|
104
106
|
# access will be blocked just in the third day. Default is 0.days, meaning
|
105
|
-
# the user cannot access the website without confirming
|
107
|
+
# the user cannot access the website without confirming their account.
|
106
108
|
# config.allow_unconfirmed_access_for = 2.days
|
107
109
|
|
108
110
|
# A period that the user is allowed to confirm their account before their
|
@@ -115,8 +117,8 @@ Devise.setup do |config|
|
|
115
117
|
|
116
118
|
# If true, requires any email changes to be confirmed (exactly the same way as
|
117
119
|
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
118
|
-
# db field (see migrations). Until confirmed new email is stored in
|
119
|
-
#
|
120
|
+
# db field (see migrations). Until confirmed, new email is stored in
|
121
|
+
# unconfirmed_email column, and copied to email column on successful confirmation.
|
120
122
|
config.reconfirmable = true
|
121
123
|
|
122
124
|
# Defines which key will be used when confirming an account
|
@@ -130,11 +132,11 @@ Devise.setup do |config|
|
|
130
132
|
# config.extend_remember_period = false
|
131
133
|
|
132
134
|
# Options to be passed to the created cookie. For instance, you can set
|
133
|
-
# :
|
135
|
+
# secure: true in order to force SSL only cookies.
|
134
136
|
# config.rememberable_options = {}
|
135
137
|
|
136
138
|
# ==> Configuration for :validatable
|
137
|
-
# Range for password length.
|
139
|
+
# Range for password length.
|
138
140
|
config.password_length = 8..128
|
139
141
|
|
140
142
|
# Email regex used to validate email formats. It simply asserts that
|
@@ -227,7 +229,7 @@ Devise.setup do |config|
|
|
227
229
|
# ==> OmniAuth
|
228
230
|
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
229
231
|
# up on your models and hooks.
|
230
|
-
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :
|
232
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
231
233
|
|
232
234
|
# ==> Warden configuration
|
233
235
|
# If you want to use other strategies, that are not supported by Devise, or
|
@@ -235,7 +237,7 @@ Devise.setup do |config|
|
|
235
237
|
#
|
236
238
|
# config.warden do |manager|
|
237
239
|
# manager.intercept_401 = false
|
238
|
-
# manager.default_strategies(:
|
240
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
239
241
|
# end
|
240
242
|
|
241
243
|
# ==> Mountable engine configurations
|
@@ -246,7 +248,7 @@ Devise.setup do |config|
|
|
246
248
|
# mount MyEngine, at: '/my_engine'
|
247
249
|
#
|
248
250
|
# The router that invoked `devise_for`, in the example above, would be:
|
249
|
-
|
251
|
+
config.router_name = :georgia
|
250
252
|
#
|
251
253
|
# When using omniauth, Devise cannot automatically set Omniauth path,
|
252
254
|
# so you need to do it manually. For the users scope, it would be:
|
@@ -0,0 +1,44 @@
|
|
1
|
+
class MultipleModels < Array
|
2
|
+
def client
|
3
|
+
Elasticsearch::Model.client
|
4
|
+
end
|
5
|
+
|
6
|
+
def ancestors
|
7
|
+
[]
|
8
|
+
end
|
9
|
+
|
10
|
+
def default_per_page
|
11
|
+
10
|
12
|
+
end
|
13
|
+
|
14
|
+
def inspect
|
15
|
+
"MultipleModels: #{super}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
module Elasticsearch::Model
|
20
|
+
# Search multiple models
|
21
|
+
#
|
22
|
+
def search(query_or_payload, models=[], options={})
|
23
|
+
if models.empty?
|
24
|
+
models = Object.constants
|
25
|
+
.select { |c| Kernel.const_get(c).respond_to?(:__elasticsearch__) }
|
26
|
+
.map { |c| c.is_a?(Class) ? c : Kernel.const_get(c) }
|
27
|
+
end
|
28
|
+
|
29
|
+
models = MultipleModels.new(models)
|
30
|
+
|
31
|
+
index_names = models.map { |c| c.index_name }
|
32
|
+
document_types = models.map { |c| c.document_type }
|
33
|
+
|
34
|
+
search = Searching::SearchRequest.new(
|
35
|
+
models,
|
36
|
+
query_or_payload,
|
37
|
+
{index: index_names, type: document_types}.merge(options)
|
38
|
+
)
|
39
|
+
|
40
|
+
Response::Response.new(models, search)
|
41
|
+
end
|
42
|
+
|
43
|
+
module_function :search
|
44
|
+
end
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
Georgia::Engine.routes.draw do
|
2
2
|
|
3
|
-
|
3
|
+
mount Ckeditor::Engine => '/ckeditor'
|
4
|
+
devise_for :users, class_name: "Georgia::User", path: '', module: 'georgia/users', path_names: {sign_in: 'login', sign_out: 'logout'}
|
4
5
|
|
5
6
|
namespace :api do
|
6
7
|
resources :media, only: [] do
|
@@ -8,38 +9,12 @@ Georgia::Engine.routes.draw do
|
|
8
9
|
get :pictures
|
9
10
|
end
|
10
11
|
end
|
11
|
-
resources :tags, only: [] do
|
12
|
+
resources :tags, only: [:index] do
|
12
13
|
get :search, on: :collection
|
13
14
|
end
|
14
15
|
end
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
collection do
|
19
|
-
get :search
|
20
|
-
post :sort
|
21
|
-
post :publish
|
22
|
-
post :unpublish
|
23
|
-
post 'flush-cache', to: :flush_cache, as: :flush_cache
|
24
|
-
delete '/', to: :destroy
|
25
|
-
end
|
26
|
-
|
27
|
-
member do
|
28
|
-
get :copy
|
29
|
-
get :settings
|
30
|
-
end
|
31
|
-
|
32
|
-
resources :revisions do
|
33
|
-
member do
|
34
|
-
get :preview
|
35
|
-
get :review
|
36
|
-
get :approve
|
37
|
-
get :store
|
38
|
-
get :decline
|
39
|
-
get :restore
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
17
|
+
Georgia::PageableRouteConcern.included(self)
|
43
18
|
|
44
19
|
resources :pages, concerns: [:pageable]
|
45
20
|
|
@@ -50,18 +25,20 @@ Georgia::Engine.routes.draw do
|
|
50
25
|
delete '/', to: :destroy
|
51
26
|
end
|
52
27
|
end
|
53
|
-
resources :users
|
28
|
+
resources :users do
|
29
|
+
get 'permissions', on: :collection
|
30
|
+
end
|
54
31
|
resources :menus, path: 'navigation'
|
55
32
|
resources :links, only: [:create, :show]
|
56
33
|
resources :widgets
|
57
34
|
resources :ui_associations, path: 'ui-associations', only: [:new]
|
58
35
|
resources :slides, only: [:new]
|
59
36
|
|
60
|
-
unauthenticated do
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
end
|
65
|
-
root :
|
37
|
+
# unauthenticated do
|
38
|
+
# as :user do
|
39
|
+
# root to: 'users/sessions#new'
|
40
|
+
# end
|
41
|
+
# end
|
42
|
+
root to: "dashboard#show"
|
66
43
|
|
67
44
|
end
|