virgo 0.1
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/Rakefile +37 -0
- data/app/assets/javascripts/tinymce/manifest.coffee +1 -0
- data/app/assets/javascripts/tinymce/plugins/image_manager/plugin.coffee +234 -0
- data/app/assets/javascripts/virgo/admin/page_modules/edit_form.coffee +4 -0
- data/app/assets/javascripts/virgo/admin/page_modules/edit_subject_form.coffee +29 -0
- data/app/assets/javascripts/virgo/admin/posts/edit_locking.coffee +35 -0
- data/app/assets/javascripts/virgo/admin/posts/form.coffee +183 -0
- data/app/assets/javascripts/virgo/admin/slides/form.coffee +27 -0
- data/app/assets/javascripts/virgo/admin/slideshows/form.coffee +26 -0
- data/app/assets/javascripts/virgo/admin_only.coffee +1 -0
- data/app/assets/javascripts/virgo/application.coffee +51 -0
- data/app/assets/javascripts/virgo/common.coffee +83 -0
- data/app/assets/javascripts/virgo/common/character_counter.coffee +27 -0
- data/app/assets/javascripts/virgo/components/header.coffee +47 -0
- data/app/assets/javascripts/virgo/components/media_modal.coffee +151 -0
- data/app/assets/javascripts/virgo/components/share_bar.coffee +53 -0
- data/app/assets/javascripts/virgo/components/slideshow.coffee +35 -0
- data/app/assets/javascripts/virgo/lib/jquery-ui-multiselect.js +342 -0
- data/app/assets/javascripts/virgo/lib/jquery.browser.js +184 -0
- data/app/assets/javascripts/virgo/lib/jquery.cookie.js +114 -0
- data/app/assets/javascripts/virgo/lib/jquery.pjax.js +932 -0
- data/app/assets/javascripts/virgo/lib/jquery_ext.coffee +0 -0
- data/app/assets/javascripts/virgo/lib/manifest.coffee +5 -0
- data/app/assets/javascripts/virgo/lib/ouibounce.js +194 -0
- data/app/assets/javascripts/virgo/page_modules.coffee +175 -0
- data/app/assets/javascripts/virgo/posts/show.coffee +32 -0
- data/app/assets/stylesheets/tinymce/skin.sass +2 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/content.min.sass +82 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.svg +62 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.svg +63 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/anchor.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/loader.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/object.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/trans.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/skin.min.sass +1703 -0
- data/app/assets/stylesheets/virgo/_common.sass +65 -0
- data/app/assets/stylesheets/virgo/admin.sass +301 -0
- data/app/assets/stylesheets/virgo/admin/columns.sass +3 -0
- data/app/assets/stylesheets/virgo/admin/images.sass +14 -0
- data/app/assets/stylesheets/virgo/admin/media_modal.sass +72 -0
- data/app/assets/stylesheets/virgo/admin/post.sass +102 -0
- data/app/assets/stylesheets/virgo/admin/slideshow.sass +35 -0
- data/app/assets/stylesheets/virgo/admin/users.sass +2 -0
- data/app/assets/stylesheets/virgo/admin_only.sass +1 -0
- data/app/assets/stylesheets/virgo/application.sass +605 -0
- data/app/assets/stylesheets/virgo/columns.sass +51 -0
- data/app/assets/stylesheets/virgo/install.sass +15 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-imports.sass +9 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-overrides.sass +51 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-variables.sass +27 -0
- data/app/assets/stylesheets/virgo/lib/jquery-ui-multiselect.css +30 -0
- data/app/assets/stylesheets/virgo/lib/manifest.sass +3 -0
- data/app/assets/stylesheets/virgo/lib/ouibounce.css +222 -0
- data/app/assets/stylesheets/virgo/lib/select2-imports.sass +8 -0
- data/app/assets/stylesheets/virgo/page_modules.sass +54 -0
- data/app/assets/stylesheets/virgo/pages/authors.sass +30 -0
- data/app/assets/stylesheets/virgo/posts.sass +782 -0
- data/app/assets/stylesheets/virgo/search.sass +36 -0
- data/app/assets/stylesheets/virgo/ui.sass +434 -0
- data/app/assets/stylesheets/virgo/users.sass +9 -0
- data/app/controllers/virgo/admin/base_controller.rb +22 -0
- data/app/controllers/virgo/admin/categories_controller.rb +90 -0
- data/app/controllers/virgo/admin/columns_controller.rb +65 -0
- data/app/controllers/virgo/admin/images_controller.rb +89 -0
- data/app/controllers/virgo/admin/media_modal_controller.rb +101 -0
- data/app/controllers/virgo/admin/newsletters_controller.rb +37 -0
- data/app/controllers/virgo/admin/page_modules_controller.rb +62 -0
- data/app/controllers/virgo/admin/pages_controller.rb +6 -0
- data/app/controllers/virgo/admin/posts_controller.rb +173 -0
- data/app/controllers/virgo/admin/sites_controller.rb +31 -0
- data/app/controllers/virgo/admin/slides_controller.rb +71 -0
- data/app/controllers/virgo/admin/slideshows_controller.rb +66 -0
- data/app/controllers/virgo/admin/tags_controller.rb +98 -0
- data/app/controllers/virgo/admin/users/sessions_controller.rb +21 -0
- data/app/controllers/virgo/admin/users_controller.rb +84 -0
- data/app/controllers/virgo/application_controller.rb +151 -0
- data/app/controllers/virgo/categories_controller.rb +20 -0
- data/app/controllers/virgo/columns_controller.rb +24 -0
- data/app/controllers/virgo/images_controller.rb +9 -0
- data/app/controllers/virgo/install_controller.rb +46 -0
- data/app/controllers/virgo/page_modules_controller.rb +23 -0
- data/app/controllers/virgo/pages_controller.rb +29 -0
- data/app/controllers/virgo/posts_controller.rb +101 -0
- data/app/controllers/virgo/search_controller.rb +35 -0
- data/app/controllers/virgo/subscribers_controller.rb +54 -0
- data/app/controllers/virgo/tags_controller.rb +15 -0
- data/app/controllers/virgo/users/confirmations_controller.rb +18 -0
- data/app/controllers/virgo/users/passwords_controller.rb +31 -0
- data/app/controllers/virgo/users/registrations_controller.rb +41 -0
- data/app/controllers/virgo/users/sessions_controller.rb +32 -0
- data/app/controllers/virgo/users_controller.rb +15 -0
- data/app/helpers/virgo/admin/post_helper.rb +54 -0
- data/app/helpers/virgo/admin_helper.rb +15 -0
- data/app/helpers/virgo/application_helper.rb +124 -0
- data/app/helpers/virgo/hooks_helper.rb +30 -0
- data/app/helpers/virgo/page_modules_helper.rb +4 -0
- data/app/helpers/virgo/post_helper.rb +159 -0
- data/app/helpers/virgo/render_helper.rb +33 -0
- data/app/helpers/virgo/search_helper.rb +49 -0
- data/app/helpers/virgo/shortcode_helper.rb +7 -0
- data/app/helpers/virgo/text_helper.rb +12 -0
- data/app/helpers/virgo/video_helper.rb +34 -0
- data/app/models/concerns/virgo/common/slug_history.rb +36 -0
- data/app/models/concerns/virgo/common/uuid.rb +22 -0
- data/app/models/concerns/virgo/post/recommendations.rb +15 -0
- data/app/models/concerns/virgo/post/search.rb +100 -0
- data/app/models/concerns/virgo/user/search.rb +39 -0
- data/app/models/virgo/ability.rb +59 -0
- data/app/models/virgo/category.rb +44 -0
- data/app/models/virgo/column.rb +25 -0
- data/app/models/virgo/form_model.rb +19 -0
- data/app/models/virgo/image.rb +63 -0
- data/app/models/virgo/page_module.rb +42 -0
- data/app/models/virgo/page_module_post.rb +8 -0
- data/app/models/virgo/post.rb +391 -0
- data/app/models/virgo/post_category.rb +8 -0
- data/app/models/virgo/post_search.rb +7 -0
- data/app/models/virgo/post_tag.rb +10 -0
- data/app/models/virgo/site.rb +36 -0
- data/app/models/virgo/slide.rb +23 -0
- data/app/models/virgo/slideshow.rb +37 -0
- data/app/models/virgo/slug_history.rb +5 -0
- data/app/models/virgo/subscriber.rb +5 -0
- data/app/models/virgo/tag.rb +34 -0
- data/app/models/virgo/user.rb +145 -0
- data/app/uploaders/virgo/application_uploader.rb +11 -0
- data/app/uploaders/virgo/avatar_uploader.rb +21 -0
- data/app/uploaders/virgo/featured_image_uploader.rb +28 -0
- data/app/uploaders/virgo/image_uploader.rb +40 -0
- data/app/uploaders/virgo/slide_uploader.rb +19 -0
- data/app/views/layouts/virgo/admin.haml +16 -0
- data/app/views/layouts/virgo/admin/site_settings.haml +14 -0
- data/app/views/layouts/virgo/application.haml +63 -0
- data/app/views/layouts/virgo/errors.haml +42 -0
- data/app/views/layouts/virgo/main.haml +5 -0
- data/app/views/layouts/virgo/posts.haml +10 -0
- data/app/views/virgo/admin/categories/_form.haml +19 -0
- data/app/views/virgo/admin/categories/edit.haml +7 -0
- data/app/views/virgo/admin/categories/index.haml +38 -0
- data/app/views/virgo/admin/categories/modal_form.haml +11 -0
- data/app/views/virgo/admin/categories/new.haml +7 -0
- data/app/views/virgo/admin/categories/success_modal.haml +14 -0
- data/app/views/virgo/admin/columns/_form.haml +30 -0
- data/app/views/virgo/admin/columns/edit.haml +1 -0
- data/app/views/virgo/admin/columns/index.haml +30 -0
- data/app/views/virgo/admin/columns/new.haml +1 -0
- data/app/views/virgo/admin/images/_form.haml +46 -0
- data/app/views/virgo/admin/images/edit.haml +1 -0
- data/app/views/virgo/admin/images/index.haml +32 -0
- data/app/views/virgo/admin/images/new.haml +1 -0
- data/app/views/virgo/admin/media_modal/_image_settings.haml +17 -0
- data/app/views/virgo/admin/media_modal/_library_panel.haml +26 -0
- data/app/views/virgo/admin/media_modal/_upload_panel.haml +21 -0
- data/app/views/virgo/admin/media_modal/_upload_success.haml +7 -0
- data/app/views/virgo/admin/media_modal/index.haml +19 -0
- data/app/views/virgo/admin/newsletters/changelog.haml +25 -0
- data/app/views/virgo/admin/newsletters/edit.haml +6 -0
- data/app/views/virgo/admin/page_modules/edit.haml +33 -0
- data/app/views/virgo/admin/page_modules/edit_subject.haml +43 -0
- data/app/views/virgo/admin/pages/help.haml +114 -0
- data/app/views/virgo/admin/posts/_author_dropdown.haml +1 -0
- data/app/views/virgo/admin/posts/_categories_form.haml +7 -0
- data/app/views/virgo/admin/posts/_category.haml +22 -0
- data/app/views/virgo/admin/posts/_form.haml +201 -0
- data/app/views/virgo/admin/posts/_revisions.haml +40 -0
- data/app/views/virgo/admin/posts/edit.haml +9 -0
- data/app/views/virgo/admin/posts/index.haml +59 -0
- data/app/views/virgo/admin/posts/new.haml +1 -0
- data/app/views/virgo/admin/posts/revision_detail.haml +28 -0
- data/app/views/virgo/admin/posts/revisions.haml +3 -0
- data/app/views/virgo/admin/sites/edit.haml +12 -0
- data/app/views/virgo/admin/slides/_form.haml +41 -0
- data/app/views/virgo/admin/slides/edit.haml +1 -0
- data/app/views/virgo/admin/slides/new.haml +1 -0
- data/app/views/virgo/admin/slideshows/_form.haml +49 -0
- data/app/views/virgo/admin/slideshows/edit.haml +1 -0
- data/app/views/virgo/admin/slideshows/index.haml +43 -0
- data/app/views/virgo/admin/slideshows/new.haml +1 -0
- data/app/views/virgo/admin/tags/_form.haml +16 -0
- data/app/views/virgo/admin/tags/edit.haml +7 -0
- data/app/views/virgo/admin/tags/index.haml +33 -0
- data/app/views/virgo/admin/tags/modal_form.haml +12 -0
- data/app/views/virgo/admin/tags/new.haml +7 -0
- data/app/views/virgo/admin/tags/success_modal.haml +14 -0
- data/app/views/virgo/admin/users/_form.haml +62 -0
- data/app/views/virgo/admin/users/edit.haml +1 -0
- data/app/views/virgo/admin/users/index.haml +34 -0
- data/app/views/virgo/admin/users/new.haml +1 -0
- data/app/views/virgo/application/sitemap.xml.builder +0 -0
- data/app/views/virgo/authors/_profile_long.haml +13 -0
- data/app/views/virgo/authors/_profile_short.haml +10 -0
- data/app/views/virgo/categories/show.haml +24 -0
- data/app/views/virgo/columns/index.haml +19 -0
- data/app/views/virgo/columns/show.haml +18 -0
- data/app/views/virgo/common/_admin_navbar.haml +100 -0
- data/app/views/virgo/common/_alerts.haml +40 -0
- data/app/views/virgo/common/_analytics.html.erb +1 -0
- data/app/views/virgo/common/_base_errors.haml +8 -0
- data/app/views/virgo/common/_category_heading.haml +26 -0
- data/app/views/virgo/common/_disqus.html.erb +24 -0
- data/app/views/virgo/common/_disqus_comment_count.html.erb +12 -0
- data/app/views/virgo/common/_fb_api.html.erb +30 -0
- data/app/views/virgo/common/_fonts.html.erb +1 -0
- data/app/views/virgo/common/_footer.haml +13 -0
- data/app/views/virgo/common/_footer_javascript.html.erb +0 -0
- data/app/views/virgo/common/_header_analytics.html.erb +9 -0
- data/app/views/virgo/common/_list_signup.haml +20 -0
- data/app/views/virgo/common/_ouibounce_modal.haml +26 -0
- data/app/views/virgo/common/_public_nav.haml +58 -0
- data/app/views/virgo/common/_search_form.haml +8 -0
- data/app/views/virgo/common/_share_bar.haml +45 -0
- data/app/views/virgo/common/_user_vars.haml +2 -0
- data/app/views/virgo/errors/404.haml +10 -0
- data/app/views/virgo/errors/500.haml +10 -0
- data/app/views/virgo/images/_shortcode.haml +4 -0
- data/app/views/virgo/install/index.haml +58 -0
- data/app/views/virgo/install/success.haml +12 -0
- data/app/views/virgo/page_modules/_latest_posts.haml +29 -0
- data/app/views/virgo/page_modules/_popular_posts.haml +51 -0
- data/app/views/virgo/pages/authors.haml +8 -0
- data/app/views/virgo/pages/home.haml +0 -0
- data/app/views/virgo/pages/show.haml +6 -0
- data/app/views/virgo/posts/_author_info.haml +16 -0
- data/app/views/virgo/posts/_post_full.haml +63 -0
- data/app/views/virgo/posts/_post_short.haml +30 -0
- data/app/views/virgo/posts/_post_thumb_box.haml +13 -0
- data/app/views/virgo/posts/_recommendations.haml +12 -0
- data/app/views/virgo/posts/_sidebar_thumb.haml +4 -0
- data/app/views/virgo/posts/index.haml +22 -0
- data/app/views/virgo/posts/latest.haml +16 -0
- data/app/views/virgo/posts/more.haml +10 -0
- data/app/views/virgo/posts/rss.xml.builder +17 -0
- data/app/views/virgo/posts/show.haml +17 -0
- data/app/views/virgo/search/_form.haml +5 -0
- data/app/views/virgo/search/_item.haml +22 -0
- data/app/views/virgo/search/index.haml +11 -0
- data/app/views/virgo/search/new.haml +4 -0
- data/app/views/virgo/shortcode_templates/blockquote.haml +9 -0
- data/app/views/virgo/shortcode_templates/h1.haml +1 -0
- data/app/views/virgo/shortcode_templates/h2.haml +1 -0
- data/app/views/virgo/shortcode_templates/h3.haml +1 -0
- data/app/views/virgo/shortcode_templates/h4.haml +1 -0
- data/app/views/virgo/shortcode_templates/image.haml +17 -0
- data/app/views/virgo/shortcode_templates/pullquote.haml +3 -0
- data/app/views/virgo/shortcode_templates/slideshow.haml +35 -0
- data/app/views/virgo/shortcode_templates/tweet.haml +3 -0
- data/app/views/virgo/shortcode_templates/video.haml +8 -0
- data/app/views/virgo/subscribers/_success_modal.haml +13 -0
- data/app/views/virgo/subscribers/modal.haml +15 -0
- data/app/views/virgo/tags/show.haml +16 -0
- data/app/views/virgo/users/confirmations/new.html.haml +10 -0
- data/app/views/virgo/users/devise_mailer/confirmation_instructions.html.erb +7 -0
- data/app/views/virgo/users/devise_mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/virgo/users/devise_mailer/unlock_instructions.html.haml +5 -0
- data/app/views/virgo/users/passwords/edit.html.haml +14 -0
- data/app/views/virgo/users/passwords/new.html.haml +14 -0
- data/app/views/virgo/users/registrations/edit.html.haml +30 -0
- data/app/views/virgo/users/registrations/new.html.haml +13 -0
- data/app/views/virgo/users/sessions/new.html.haml +12 -0
- data/app/views/virgo/users/shared/_links.haml +26 -0
- data/app/views/virgo/users/show.haml +11 -0
- data/app/views/virgo/users/unlocks/new.html.haml +9 -0
- data/config/initializers/action_mailer.rb +7 -0
- data/config/initializers/active_record.rb +72 -0
- data/config/initializers/active_record_symbolize.rb +18 -0
- data/config/initializers/assets.rb +17 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/carrierwave.rb +36 -0
- data/config/initializers/cookies_serializer.rb +3 -0
- data/config/initializers/devise.rb +257 -0
- data/config/initializers/filter_parameter_logging.rb +4 -0
- data/config/initializers/hash.rb +5 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/mime_types.rb +4 -0
- data/config/initializers/nil_class.rb +13 -0
- data/config/initializers/non_digest_assets.rb +3 -0
- data/config/initializers/paper_trail.rb +30 -0
- data/config/initializers/schema_plus.rb +5 -0
- data/config/initializers/session_store.rb +3 -0
- data/config/initializers/shortcode.rb +12 -0
- data/config/initializers/simple_form.rb +170 -0
- data/config/initializers/simple_form_bootstrap.rb +136 -0
- data/config/initializers/string.rb +5 -0
- data/config/initializers/time_formatting.rb +23 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/devise.en.yml +60 -0
- data/config/routes.rb +96 -0
- data/config/schedule.rb +3 -0
- data/db/migrate/20150729174510_create_virgo_schema.rb +225 -0
- data/lib/generators/virgo/install/install_generator.rb +16 -0
- data/lib/generators/virgo/views/views_generator.rb +22 -0
- data/lib/tasks/virgo_tasks.rake +7 -0
- data/lib/virgo.rb +4 -0
- data/lib/virgo/development_mail_interceptor.rb +6 -0
- data/lib/virgo/email_validator.rb +6 -0
- data/lib/virgo/engine.rb +73 -0
- data/lib/virgo/reduce_validator.rb +6 -0
- data/lib/virgo/upload_helpers.rb +89 -0
- data/lib/virgo/version.rb +3 -0
- data/lib/virgo/view_help.rb +3 -0
- metadata +1051 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
- limit = local_assigns.has_key?(:limit) ? limit : false
|
|
2
|
+
|
|
3
|
+
- @versions = limit ? @post.unscoped_versions.order(created_at: :desc).limit(5) : @post.unscoped_versions.order(created_at: :desc)
|
|
4
|
+
|
|
5
|
+
- @versions = @versions.where.not(whodunnit: nil)
|
|
6
|
+
|
|
7
|
+
%table.table.post-revisions
|
|
8
|
+
%thead
|
|
9
|
+
%tr
|
|
10
|
+
%th Who?
|
|
11
|
+
%th When?
|
|
12
|
+
%th.revision-summary-col Summary
|
|
13
|
+
%th Revision details
|
|
14
|
+
|
|
15
|
+
%tbody
|
|
16
|
+
- if @versions.empty?
|
|
17
|
+
%tr.empty
|
|
18
|
+
%td{colspan: '3'}
|
|
19
|
+
No revisions
|
|
20
|
+
|
|
21
|
+
- @versions.each do |version|
|
|
22
|
+
- author = version.version_user
|
|
23
|
+
- if author
|
|
24
|
+
%tr
|
|
25
|
+
%td
|
|
26
|
+
%span.avatar-thumb= image_tag author.avatar.url(:thumb)
|
|
27
|
+
= author.pretty_name
|
|
28
|
+
%td
|
|
29
|
+
= time_ago_in_words version.created_at
|
|
30
|
+
%span.ago ago
|
|
31
|
+
|
|
32
|
+
%td= truncate version.pretty_changes, length: 80
|
|
33
|
+
%td
|
|
34
|
+
= link_to "Click to view details", admin_revision_detail_path(version)
|
|
35
|
+
|
|
36
|
+
- if limit && @versions.size > 5
|
|
37
|
+
.see-all-revisions.text-right
|
|
38
|
+
= link_to revisions_admin_post_path(@post), target: '_blank' do
|
|
39
|
+
See all revisions »
|
|
40
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
= render 'form'
|
|
2
|
+
|
|
3
|
+
- if Rails.application.config.post_locking_enabled
|
|
4
|
+
:coffee
|
|
5
|
+
window.post_editor_id = #{@post.editing_user_id}
|
|
6
|
+
window.post_status_interval = #{Rails.application.config.edit_lock_timeout * 1000}
|
|
7
|
+
window.post_status_grace = #{Rails.application.config.edit_lock_grace * 1000}
|
|
8
|
+
window.post_edit_status_uri = #{editing_admin_post_path(@post).to_json}
|
|
9
|
+
$ -> new PostEditLocking
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
- type_name = filter_params[:post_type] || 'post'
|
|
2
|
+
|
|
3
|
+
- search_url = pages_action? ? admin_posts_path(filters: {post_type: :page}) : admin_posts_path
|
|
4
|
+
|
|
5
|
+
= form_tag search_url, method: :get, class: 'search-form form-inline pull-left' do
|
|
6
|
+
= hidden_field_tag 'sort', sort_param
|
|
7
|
+
|
|
8
|
+
- if pages_action?
|
|
9
|
+
= hidden_field_tag 'filters[post_type]', 'page'
|
|
10
|
+
|
|
11
|
+
= text_field_tag 'filters[term]', filter_params[:term], class: 'form-control', placeholder: 'Filter by title'
|
|
12
|
+
= select_tag 'filters[month]', options_for_select(admin_post_month_options, filter_params[:month]), class: 'form-control', prompt: 'All dates'
|
|
13
|
+
= select_tag 'filters[category]', options_for_select(admin_post_category_options, filter_params[:category]), class: 'form-control', prompt: 'All categories'
|
|
14
|
+
= select_tag 'filters[status]', options_for_select(admin_post_status_options, filter_params[:status]), class: 'form-control', prompt: 'Any status'
|
|
15
|
+
= submit_tag "Search", class: 'btn btn-default'
|
|
16
|
+
|
|
17
|
+
- if filter_params[:term].present? || filter_params[:month].present? || filter_params[:category].present?
|
|
18
|
+
= link_to nil, href: search_url, class: 'clear-link' do
|
|
19
|
+
%i.fa.fa-times-circle-o
|
|
20
|
+
clear search
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
= link_to "Add New #{type_name.capitalize}", new_admin_post_path(post: {post_type: filter_params[:post_type] || 'post'}), class: 'btn btn-inverse pull-right action-btn', id: 'new-post-link'
|
|
24
|
+
|
|
25
|
+
.clear
|
|
26
|
+
.table-panel
|
|
27
|
+
%table.table.admin-posts-table
|
|
28
|
+
%thead
|
|
29
|
+
%tr
|
|
30
|
+
%th= sortable_column "Headline"
|
|
31
|
+
%th= sortable_column "Status"
|
|
32
|
+
%th= sortable_column "Author", column: "users.byline"
|
|
33
|
+
%th Categories
|
|
34
|
+
%th Tags
|
|
35
|
+
%th= sortable_column "Publication date", column: :publish_at
|
|
36
|
+
%th= sortable_column "Last modified", column: :updated_at
|
|
37
|
+
|
|
38
|
+
%tbody
|
|
39
|
+
- if @posts.empty?
|
|
40
|
+
%tr.empty
|
|
41
|
+
%td{colspan: "7"}
|
|
42
|
+
= "No #{type_name}s"
|
|
43
|
+
|
|
44
|
+
- @posts.each do |post|
|
|
45
|
+
%tr
|
|
46
|
+
%td= link_to post.headline.present? ? post.headline : '(no headline)', edit_admin_post_path(post)
|
|
47
|
+
%td= post_status_label(post)
|
|
48
|
+
%td= post.author.pretty_name
|
|
49
|
+
%td= post_categories(post)
|
|
50
|
+
%td= post_tags(post)
|
|
51
|
+
%td
|
|
52
|
+
- if post.publish_at.present?
|
|
53
|
+
= post.publish_at.to_s(:slashes_with_time)
|
|
54
|
+
%td
|
|
55
|
+
= post.updated_at.to_s(:slashes_with_time)
|
|
56
|
+
%br
|
|
57
|
+
= "Last modified"
|
|
58
|
+
|
|
59
|
+
= paginate @posts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
= render 'form'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.spacer
|
|
2
|
+
.row
|
|
3
|
+
.col-md-8.col-md-offset-2
|
|
4
|
+
.panel.panel-default
|
|
5
|
+
.panel-heading
|
|
6
|
+
%h3.panel-title Revision Details
|
|
7
|
+
.panel-body
|
|
8
|
+
%p.change-info.info
|
|
9
|
+
The following changes were made by
|
|
10
|
+
= @version.version_user.pretty_name
|
|
11
|
+
on
|
|
12
|
+
= @version.created_at.to_s(:slashes)
|
|
13
|
+
|
|
14
|
+
%table.table.revision-detail-table
|
|
15
|
+
%thead
|
|
16
|
+
%tr
|
|
17
|
+
%th Property
|
|
18
|
+
%th Changes
|
|
19
|
+
%tbody
|
|
20
|
+
- @version.changeset.each do |attribute, changes|
|
|
21
|
+
- if !attribute.in? ["updated_at", "created_at", "id"]
|
|
22
|
+
%tr
|
|
23
|
+
%td= attribute
|
|
24
|
+
%td
|
|
25
|
+
%span.changed changed from
|
|
26
|
+
%span.from= changes[0].present? ? "\"#{changes[0]}\"" : "(blank)"
|
|
27
|
+
%span.to-title to
|
|
28
|
+
%span.to= changes[1].present? ? "\"#{changes[1]}\"" : "(blank)"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
- content_for :site_settings_content do
|
|
2
|
+
%h2 Site Settings
|
|
3
|
+
= simple_form_for @site, url: admin_site_path, method: :patch do |f|
|
|
4
|
+
= f.input :name, as: :string, label: "Site name"
|
|
5
|
+
= f.input :description, label: "Site description (optional)"
|
|
6
|
+
= f.input :tagline, as: :string
|
|
7
|
+
= f.input :twitter_handle
|
|
8
|
+
= f.input :instagram_account_name
|
|
9
|
+
= f.input :pinterest_account_name
|
|
10
|
+
= f.input :disqus_app_id, label: "Disqus App ID"
|
|
11
|
+
= f.input :recommendations_enabled, label: "Article recommendations enabled?"
|
|
12
|
+
= f.button :submit, "Save Settings"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.spacer.md
|
|
2
|
+
.row
|
|
3
|
+
.col-md-8.col-md-offset-2
|
|
4
|
+
%h2= "#{@slide.new_record? ? 'Add New' : 'Edit'} Slide"
|
|
5
|
+
- url = @slide.new_record? ? admin_slideshow_slides_path(@slideshow) : admin_slide_path(@slide)
|
|
6
|
+
|
|
7
|
+
= simple_form_for @slide, url: url, html: {class: 'admin-slide-form'} do |f|
|
|
8
|
+
= base_errors(@slide)
|
|
9
|
+
= f.input :slideshow_id, as: :hidden
|
|
10
|
+
|
|
11
|
+
= f.input :title, label: "Title (optional, markup allowed)", as: :string
|
|
12
|
+
|
|
13
|
+
- if @slide.image.present?
|
|
14
|
+
.thumbnail.slide-thumb
|
|
15
|
+
= image_tag @slide.image.image.url, class: "js-image-thumb"
|
|
16
|
+
= link_to "Change Image", "#", class: "btn btn-default js-change-image-link"
|
|
17
|
+
|
|
18
|
+
- else
|
|
19
|
+
.thumbnail.slide-thumb.empty
|
|
20
|
+
= image_tag "#", class: "js-image-thumb hidden"
|
|
21
|
+
|
|
22
|
+
= link_to "Add Image", "#", class: "btn btn-default js-add-image-link", id: 'add-slide-image'
|
|
23
|
+
|
|
24
|
+
.spacer
|
|
25
|
+
|
|
26
|
+
= f.input :image_id, as: :hidden, input_html: {class: "js-image-id"}
|
|
27
|
+
|
|
28
|
+
%p.info
|
|
29
|
+
#{'...'} Alternatively you can present a video in this slide by pasting an embed code in the field below
|
|
30
|
+
= f.input :video_embed, label: "Video embed code"
|
|
31
|
+
= f.input :text, label: "Text (optional, markup allowed)", input_html: {class: 'md'}
|
|
32
|
+
|
|
33
|
+
= f.button :submit, "Save slide", class: "btn btn-primary pull-right", data: {disable_with: "Saving..."}, id: 'save-slide'
|
|
34
|
+
|
|
35
|
+
- if @slide.persisted?
|
|
36
|
+
= link_to admin_slide_path(@slide), data: {method: :delete, confirm: "Are you sure you want to remove this slide?"}, class: 'btn btn-danger pull-left delete-slide' do
|
|
37
|
+
%i.fa.fa-trash-o
|
|
38
|
+
Remove Slide
|
|
39
|
+
|
|
40
|
+
:coffee
|
|
41
|
+
$ -> new AdminSlideForm
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
= render 'form'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
= render 'form'
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.spacer
|
|
2
|
+
.row
|
|
3
|
+
.col-md-8.col-md-offset-2
|
|
4
|
+
%h2= "#{@slideshow.new_record? ? 'New' : 'Edit'} Slideshow"
|
|
5
|
+
= simple_form_for [:admin, @slideshow], html: {class: "admin-slideshow-form"} do |f|
|
|
6
|
+
= f.input :name, label: "Slideshow name", as: :string
|
|
7
|
+
= f.input :author_id, as: :hidden, input_html: {value: f.object.author_id || current_user.id}
|
|
8
|
+
|
|
9
|
+
- if @slideshow.persisted?
|
|
10
|
+
%p.info.text-muted
|
|
11
|
+
%em You can drag the thumbnails below up and down to reposition the slides in the slideshow.
|
|
12
|
+
|
|
13
|
+
%ul.list-unstyled.admin-slides-list.js-admin-slides-list
|
|
14
|
+
- @slideshow.slides.by_position.each do |slide|
|
|
15
|
+
%li.slide{data: {id: slide.id}}
|
|
16
|
+
.thumbnail
|
|
17
|
+
= link_to "Edit or Remove Slide", edit_admin_slide_path(slide), class: 'edit-slide-link'
|
|
18
|
+
- if slide.video?
|
|
19
|
+
.responsive-video-wrap= raw slide.video_embed
|
|
20
|
+
- elsif slide.image
|
|
21
|
+
= image_tag slide.image.image.url
|
|
22
|
+
- if slide.text.present?
|
|
23
|
+
.caption
|
|
24
|
+
= raw slide.text
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
= f.button :submit, (@slideshow.new_record? ? "Create Slideshow" : "Save Slideshow"), class: "btn btn-success pull-right", data: {disable_with: "Saving..."}, id: 'slideshow-form-submit'
|
|
29
|
+
|
|
30
|
+
- if @slideshow.persisted?
|
|
31
|
+
= link_to new_admin_slideshow_slide_path(@slideshow), class: 'btn btn-default pull-left', id: 'new-slide-link' do
|
|
32
|
+
%i.fa.fa-plus
|
|
33
|
+
Add New Slides
|
|
34
|
+
|
|
35
|
+
.spacer
|
|
36
|
+
- if @slideshow.persisted?
|
|
37
|
+
.well.help-well
|
|
38
|
+
%h4 Embed this slideshow
|
|
39
|
+
%p.info.text-muted
|
|
40
|
+
You can embed this slideshow in a post or page anywhere on the site with the following shortcode:
|
|
41
|
+
|
|
42
|
+
%code
|
|
43
|
+
= "[slideshow id=\"#{@slideshow.id}\"]"
|
|
44
|
+
|
|
45
|
+
.spacer.xxl
|
|
46
|
+
|
|
47
|
+
:coffee
|
|
48
|
+
$ ->
|
|
49
|
+
new AdminSlideshowForm
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
= render 'form'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
= form_tag admin_slideshows_path, method: :get, class: 'search-form form-inline pull-left' do
|
|
2
|
+
= hidden_field_tag 'sort', sort_param
|
|
3
|
+
|
|
4
|
+
= text_field_tag 'filters[term]', filter_params[:term], class: 'form-control', placeholder: 'Filter by name or ID'
|
|
5
|
+
= submit_tag "Search", class: 'btn btn-default'
|
|
6
|
+
|
|
7
|
+
- if filter_params[:term].present?
|
|
8
|
+
= link_to nil, href: admin_slideshows_path, class: 'clear-link' do
|
|
9
|
+
%i.fa.fa-times-circle-o
|
|
10
|
+
clear search
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
= link_to "Add New Slideshow", new_admin_slideshow_path, class: 'btn btn-inverse pull-right action-btn', id: 'new-slideshow-link'
|
|
14
|
+
|
|
15
|
+
.clear
|
|
16
|
+
.table-panel
|
|
17
|
+
%table.table.admin-posts-table
|
|
18
|
+
%thead
|
|
19
|
+
%tr
|
|
20
|
+
%th= sortable_column "ID", column: :id
|
|
21
|
+
%th= sortable_column "Name"
|
|
22
|
+
%th= sortable_column "Author", column: "users.byline"
|
|
23
|
+
%th= sortable_column "Created at", column: :created_at
|
|
24
|
+
%th= sortable_column "Last modified", column: :updated_at
|
|
25
|
+
|
|
26
|
+
%tbody
|
|
27
|
+
- if @slideshows.empty?
|
|
28
|
+
%tr.empty
|
|
29
|
+
%td{colspan: "5"}
|
|
30
|
+
= "No slideshows"
|
|
31
|
+
|
|
32
|
+
- @slideshows.each do |slideshow|
|
|
33
|
+
%tr
|
|
34
|
+
%td= link_to slideshow.id, edit_admin_slideshow_path(slideshow)
|
|
35
|
+
%td= link_to slideshow.name, edit_admin_slideshow_path(slideshow)
|
|
36
|
+
%td= slideshow.author.try(:byline)
|
|
37
|
+
%td= slideshow.created_at.to_s(:slashes_with_time)
|
|
38
|
+
%td
|
|
39
|
+
= slideshow.updated_at.to_s(:slashes_with_time)
|
|
40
|
+
%br
|
|
41
|
+
= "Last modified"
|
|
42
|
+
|
|
43
|
+
= paginate @slideshows
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
= render 'form'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
- url = tag.new_record? ? admin_tags_path : admin_tag_path(tag)
|
|
2
|
+
|
|
3
|
+
= simple_form_for tag, url: url, html: {id: 'tag-form'} do |f|
|
|
4
|
+
- if flash.now[:success].present?
|
|
5
|
+
%p.success-msg= flash.now[:success]
|
|
6
|
+
= hidden_field_tag 'post_id', post_id_param
|
|
7
|
+
= f.input :name
|
|
8
|
+
|
|
9
|
+
- if tag.persisted?
|
|
10
|
+
= link_to admin_tag_path(tag), class: 'delete-link pull-left', data: {method: :delete, confirm: "Are you sure you want to delete this tag?"} do
|
|
11
|
+
%i.fa.fa-trash-o
|
|
12
|
+
Delete Tag
|
|
13
|
+
|
|
14
|
+
= f.button :submit, class: 'btn btn-primary pull-right js-submit-tag'
|
|
15
|
+
%a.btn.btn-default.pull-right{href: '#', data: {dismiss: 'modal'}} Close
|
|
16
|
+
.clear
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
= link_to "Add New Tag", new_admin_tag_path, class: 'btn btn-inverse pull-right action-btn'
|
|
2
|
+
= render '/virgo/common/search_form', url: admin_tags_path
|
|
3
|
+
.clear
|
|
4
|
+
.table-panel
|
|
5
|
+
%table.table.admin-posts-table
|
|
6
|
+
%thead
|
|
7
|
+
%tr
|
|
8
|
+
%th= sortable_column "Name"
|
|
9
|
+
%th= sortable_column "Added at", column: :created_at
|
|
10
|
+
%th Added by
|
|
11
|
+
%th= sortable_column "Count", column: "post_count"
|
|
12
|
+
|
|
13
|
+
%tbody
|
|
14
|
+
- if @tags.empty?
|
|
15
|
+
%tr.empty
|
|
16
|
+
%td{colspan: "4"}
|
|
17
|
+
No tags
|
|
18
|
+
|
|
19
|
+
- @tags.each do |tag|
|
|
20
|
+
%tr
|
|
21
|
+
%td= link_to truncate(tag.name, length: 40), edit_admin_tag_path(tag)
|
|
22
|
+
%td= tag.created_at.to_s(:slashes_with_time)
|
|
23
|
+
%td
|
|
24
|
+
- if tag.created_by
|
|
25
|
+
= link_to tag.created_by.try(:byline), edit_admin_user_path(tag.created_by)
|
|
26
|
+
%td
|
|
27
|
+
- if tag.post_count == 0
|
|
28
|
+
%span 0
|
|
29
|
+
- else
|
|
30
|
+
= link_to tag.post_count, admin_posts_path(filters: {tag_ids: [tag.id]})
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
= paginate @tags
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
- tag = local_assigns.has_key?(:tag) ? tag : @tag
|
|
2
|
+
|
|
3
|
+
#tag-modal.modal.fade
|
|
4
|
+
.modal-dialog
|
|
5
|
+
.modal-content
|
|
6
|
+
.modal-header
|
|
7
|
+
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
|
|
8
|
+
%span{"aria-hidden" => "true"} ×
|
|
9
|
+
%h4.modal-title Add Tag
|
|
10
|
+
.modal-body
|
|
11
|
+
%p
|
|
12
|
+
= render 'form', tag: tag
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#tag-modal.modal.fade
|
|
2
|
+
.modal-dialog
|
|
3
|
+
.modal-content
|
|
4
|
+
.modal-header
|
|
5
|
+
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
|
|
6
|
+
%span{"aria-hidden" => "true"} ×
|
|
7
|
+
%h4.modal-title Success
|
|
8
|
+
.modal-body
|
|
9
|
+
%p
|
|
10
|
+
Your tag has been added.
|
|
11
|
+
|
|
12
|
+
.modal-footer
|
|
13
|
+
%button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} Close
|
|
14
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
- url = @user.new_record? ? admin_users_path : admin_user_path(@user)
|
|
2
|
+
|
|
3
|
+
.row
|
|
4
|
+
.col-md-8.col-md-offset-2
|
|
5
|
+
.panel.panel-default
|
|
6
|
+
.panel-heading
|
|
7
|
+
%h3.panel-title
|
|
8
|
+
= "#{@user.new_record? ? 'Add' : 'Manage'} User"
|
|
9
|
+
|
|
10
|
+
- if ! @user.new_record?
|
|
11
|
+
- if admin? || superuser?
|
|
12
|
+
= link_to nil, href: admin_user_sessions_path(@user), data: {method: :post}, class: "panel-heading-link pull-right" do
|
|
13
|
+
= icon('user')
|
|
14
|
+
Ghost Login
|
|
15
|
+
|
|
16
|
+
.panel-body
|
|
17
|
+
= simple_form_for @user, url: url do |f|
|
|
18
|
+
= f.input :username
|
|
19
|
+
.row
|
|
20
|
+
.col-md-6
|
|
21
|
+
= f.input :first_name
|
|
22
|
+
.col-md-6
|
|
23
|
+
= f.input :last_name
|
|
24
|
+
= f.input :byline
|
|
25
|
+
= f.input :role, as: :select, collection: Virgo::User.role_names(superuser: @user.superuser?), include_blank: false
|
|
26
|
+
= f.input :email
|
|
27
|
+
= f.input :about, label: 'Biographical info'
|
|
28
|
+
= f.input :password
|
|
29
|
+
= f.input :password_confirmation, as: :password
|
|
30
|
+
= f.input :show_on_authors_page, label: "Show this user on the \"authors\" page?"
|
|
31
|
+
|
|
32
|
+
.row
|
|
33
|
+
.col-md-3
|
|
34
|
+
= f.input :author_page_weight, label: "Weight on authors page", as: :select, collection: (-20..20)
|
|
35
|
+
|
|
36
|
+
.form-group.image.optional.user_avatar
|
|
37
|
+
%label.control-label Avatar
|
|
38
|
+
- if @user.avatar.present?
|
|
39
|
+
.avatar-preview
|
|
40
|
+
= image_tag @user.avatar.url(:thumb)
|
|
41
|
+
|
|
42
|
+
= f.input :avatar, as: :file, label: false
|
|
43
|
+
|
|
44
|
+
.well.social-well
|
|
45
|
+
%h3.well-title Social Media Accounts (optional)
|
|
46
|
+
.row
|
|
47
|
+
.col-md-6
|
|
48
|
+
= f.input :twitter_id, label: "Twitter Username"
|
|
49
|
+
= f.input :facebook_id, label: "Facebook Username"
|
|
50
|
+
= f.input :instagram_id, label: "Instagram Username"
|
|
51
|
+
.col-md-6
|
|
52
|
+
= f.input :snapchat_id, label: "Snapchat Username"
|
|
53
|
+
= f.input :linkedin_id, label: "Linkedin ID"
|
|
54
|
+
= f.input :public_email, label: "Public Email"
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
- if @user.persisted? && can?(:destroy, @user)
|
|
58
|
+
= link_to admin_user_path(@user), class: 'delete-link pull-left', data: {method: :delete, confirm: "Are you sure you want to permanently delete this user?"} do
|
|
59
|
+
%i.fa.fa-trash-o
|
|
60
|
+
Delete User
|
|
61
|
+
|
|
62
|
+
= f.button :submit, "Save Profile", class: 'btn btn-info pull-right', data: {disable_with: "Saving"}, id: "save-user"
|