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,21 @@
|
|
|
1
|
+
%h3 Upload new image
|
|
2
|
+
|
|
3
|
+
= simple_form_for @image, url: upload_panel_admin_media_modal_index_path, html: {class: 'js-image-upload-panel'} do |f|
|
|
4
|
+
|
|
5
|
+
#upload-file-field-wrap
|
|
6
|
+
%a#browse-files-btn.btn.btn-success{href: '#'}
|
|
7
|
+
Browse Files
|
|
8
|
+
|
|
9
|
+
= f.file_field :image, id: "image-upload-file-field"
|
|
10
|
+
|
|
11
|
+
.upload-progress
|
|
12
|
+
.progress-text.text-muted.text-right
|
|
13
|
+
Upload Progress:
|
|
14
|
+
%span.progress-amount= "0%"
|
|
15
|
+
.progress
|
|
16
|
+
.progress-bar.progress-bar-success{style: "width: 0%;"}
|
|
17
|
+
= f.input :name, label: "Image name"
|
|
18
|
+
= f.input :alt_text, as: :string, label: "Alt text (optional)"
|
|
19
|
+
= f.input :credit, label: "Credit (optional, can include HTML)", as: :string
|
|
20
|
+
= f.button :submit, "Upload Image", class: 'btn btn-inverse pull-right', id: 'upload-button'
|
|
21
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#media-modal.modal.fade
|
|
2
|
+
.modal-dialog.media-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 Media Library
|
|
8
|
+
.modal-body
|
|
9
|
+
.row
|
|
10
|
+
.col-md-3.leftbar
|
|
11
|
+
%ul.nav.nav-pills.nav-stacked.media-modal-nav
|
|
12
|
+
%li{class: ('active' if action?('index', 'library_panel'))}
|
|
13
|
+
= link_to library_panel_admin_media_modal_index_path, id: 'media-library-tab-btn' do
|
|
14
|
+
Media Library
|
|
15
|
+
%li{class: ('active' if action?('upload_panel'))}
|
|
16
|
+
= link_to upload_panel_admin_media_modal_index_path, id: 'upload-tab-btn' do
|
|
17
|
+
Upload Image
|
|
18
|
+
#media-modal-content-area.col-md-9
|
|
19
|
+
= render partial: 'library_panel'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
- content_for :site_settings_content do
|
|
2
|
+
%h2 Changelog
|
|
3
|
+
|
|
4
|
+
%table.table.newsletter-versions
|
|
5
|
+
%thead
|
|
6
|
+
%tr
|
|
7
|
+
%th Newsletter Into Copy
|
|
8
|
+
%th Date
|
|
9
|
+
%tbody
|
|
10
|
+
- if @versions.empty?
|
|
11
|
+
%tr.empty
|
|
12
|
+
%td{colspan: '2'}
|
|
13
|
+
No revisions
|
|
14
|
+
|
|
15
|
+
- @versions.each do |version|
|
|
16
|
+
- if version.changeset.keys.include?("weekly_newsletter_intro_copy")
|
|
17
|
+
- changes = version.changeset["weekly_newsletter_intro_copy"]
|
|
18
|
+
- old_val = changes[0]
|
|
19
|
+
|
|
20
|
+
- if old_val.present?
|
|
21
|
+
%tr
|
|
22
|
+
%td= old_val
|
|
23
|
+
%td= version.created_at.to_s(:slashes)
|
|
24
|
+
|
|
25
|
+
= paginate @versions
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
- content_for :site_settings_content do
|
|
2
|
+
%h2 Weekly Newsletter Settings
|
|
3
|
+
= simple_form_for @site, url: admin_newsletter_path, method: :patch do |f|
|
|
4
|
+
= f.input :weekly_newsletter_intro_copy
|
|
5
|
+
= f.button :submit, "Save Settings", data: {disable_with: "Saving..."}
|
|
6
|
+
= link_to "View Changelog »".html_safe, admin_newsletter_changelog_path, class: "pull-right"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
- content_for :site_settings_content do
|
|
2
|
+
= form_tag admin_page_modules_path, method: :patch do
|
|
3
|
+
.spacer
|
|
4
|
+
- if @page_modules.empty?
|
|
5
|
+
%p.text-muted.empty-message
|
|
6
|
+
You have not yet created any page modules
|
|
7
|
+
- else
|
|
8
|
+
- @page_modules.each do |page_module|
|
|
9
|
+
.page-module-checkbox-wrap
|
|
10
|
+
= hidden_field_tag "page_modules[#{page_module.id}]", '', id: "hidden_page_modules_#{page_module.id}"
|
|
11
|
+
= check_box_tag "page_modules[#{page_module.id}]", true, page_module.enabled, class: 'page-module-checkbox'
|
|
12
|
+
%label.page-module-box{for: "page_modules_#{page_module.id}"}
|
|
13
|
+
= page_module.name
|
|
14
|
+
|
|
15
|
+
- if page_module.editable_subject?
|
|
16
|
+
= link_to "Edit Settings", admin_edit_page_module_subject_path(page_module), class: 'page-module-edit-subject pull-right'
|
|
17
|
+
|
|
18
|
+
.clear
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
.spacer
|
|
22
|
+
= submit_tag "Save Settings", class: 'btn btn-primary pull-right', data: {disable_with: "Saving..."}
|
|
23
|
+
|
|
24
|
+
:sass
|
|
25
|
+
.status-text
|
|
26
|
+
position: absolute
|
|
27
|
+
left: -152px
|
|
28
|
+
margin-top: 200px
|
|
29
|
+
background: #000
|
|
30
|
+
color: #fff
|
|
31
|
+
border-radius: 3px
|
|
32
|
+
padding: 5px 10px
|
|
33
|
+
font-size: 14px
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
- content_for :site_settings_content do
|
|
2
|
+
= simple_form_for @page_module, url: admin_edit_page_module_subject_path(@page_module) do |f|
|
|
3
|
+
- if @page_module.name == "Tag Focus"
|
|
4
|
+
= hidden_field_tag 'page_module[subject_type]', 'Tag'
|
|
5
|
+
= f.input :subject_id, as: :select, collection: Tag.order(name: :asc)
|
|
6
|
+
- else
|
|
7
|
+
= f.input :subject_headline, as: :string, input_html: {id: 'page-module-subject-select'}
|
|
8
|
+
= hidden_field_tag 'page_module[subject_type]', 'Post'
|
|
9
|
+
= f.hidden_field :subject_id
|
|
10
|
+
|
|
11
|
+
- if @page_module.can_set_posts?
|
|
12
|
+
.form-group
|
|
13
|
+
%label.control-label Posts
|
|
14
|
+
.controls
|
|
15
|
+
- # multiselect widget orders selections based on position in the select dropdown, wtf...
|
|
16
|
+
- first = f.object.page_module_posts.by_position.map(&:post)
|
|
17
|
+
|
|
18
|
+
- rest = Post.where.not(id: f.object.page_module_posts.by_position.map(&:post_id)).order(headline: :asc).to_a
|
|
19
|
+
|
|
20
|
+
= select_tag 'post_ids[]', options_for_select((first + rest).map{|p| [truncate(p.headline, length: 50), p.id] }, f.object.page_module_posts.by_position.map(&:post_id)), multiple: true, class: 'js-post-multiselect page-module-post-ids'
|
|
21
|
+
|
|
22
|
+
.clear
|
|
23
|
+
|
|
24
|
+
- if @page_module.name == "Tag Focus"
|
|
25
|
+
= f.input :image, label: "Background image"
|
|
26
|
+
- if @page_module.image.present?
|
|
27
|
+
.form-group
|
|
28
|
+
%label
|
|
29
|
+
Image preview
|
|
30
|
+
|
|
31
|
+
= link_to @page_module.image.url, class: 'image-preview-wrap page-module-image-preview' do
|
|
32
|
+
= image_tag @page_module.image.url, class: 'image-preview'
|
|
33
|
+
|
|
34
|
+
.clear
|
|
35
|
+
|
|
36
|
+
= f.button :submit, "Save Settings", class: 'btn btn-primary'
|
|
37
|
+
= link_to "#", class: "pull-right clear-select js-clear-page-module-subject clear-link" do
|
|
38
|
+
%i.fa.fa-times
|
|
39
|
+
Clear Selection
|
|
40
|
+
|
|
41
|
+
:coffee
|
|
42
|
+
$ ->
|
|
43
|
+
new PageModuleEditSubjectForm
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
- cache do
|
|
2
|
+
.container.top-margin
|
|
3
|
+
%h1 Help Pages
|
|
4
|
+
%p.info
|
|
5
|
+
You'll find documentation here for more obscure site functions.
|
|
6
|
+
%br
|
|
7
|
+
These help pages are a work in progress. Please feel free to make suggestions about worthwhile additions.
|
|
8
|
+
%br
|
|
9
|
+
At present, it is mostly a place to document shortcodes.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
.spacer
|
|
13
|
+
|
|
14
|
+
%h2 Image Sizes
|
|
15
|
+
.well.help-well
|
|
16
|
+
%p.help-description
|
|
17
|
+
The image versions used throughout the site are listed below. Image uploads are processed to fit within a crop box of the following dimensions. All feature image uploads should be at least 2000px wide by 578px tall.
|
|
18
|
+
|
|
19
|
+
%dl.dl-horizontal
|
|
20
|
+
%dt Medium Thumb (600x337px):
|
|
21
|
+
%dd This is the image version used for article previews (for instance on the homepage and article index pages)
|
|
22
|
+
%dt Content (800x800px):
|
|
23
|
+
%dd This is the image version used for image uploads placed within the post body
|
|
24
|
+
%dt Wide (2000x578px):
|
|
25
|
+
%dd This is the image version used in the feature image box (large image at the top of post pages and on homepage).
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
.spacer
|
|
29
|
+
|
|
30
|
+
%h2 Shortcodes
|
|
31
|
+
|
|
32
|
+
.well.help-well
|
|
33
|
+
%h4 Embed an image from the media library
|
|
34
|
+
|
|
35
|
+
%p.help-description
|
|
36
|
+
Use this shortcode to embed a named image from the media library.
|
|
37
|
+
%code
|
|
38
|
+
= "[image name=\"the image name\" caption=\"Your caption text\"]"
|
|
39
|
+
%p.help-description
|
|
40
|
+
To embed this image without a caption, use the shortcode:
|
|
41
|
+
%code
|
|
42
|
+
= "[image name=\"the image name\"]"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
.well.help-well
|
|
46
|
+
%h4 Pull quote
|
|
47
|
+
|
|
48
|
+
%p.help-description
|
|
49
|
+
To present post text in the style of a "pull quote", wrap it in the "[pullquote]" shortcode like so:
|
|
50
|
+
%code
|
|
51
|
+
= "[pullquote]Here is some text I want to stand out[/pullquote]"
|
|
52
|
+
|
|
53
|
+
.well.help-well
|
|
54
|
+
%h4 Block quote
|
|
55
|
+
|
|
56
|
+
%p.help-description
|
|
57
|
+
A block quote is similar to a pull-quote but for less impactful material. Content wrapped
|
|
58
|
+
in the "blockquote" shortcode is wrapped in a <blockquote> html element. You can add an optional
|
|
59
|
+
"source" attribute which will add a formatted "source" line (ex: "- David Pogue, New York Times") to the
|
|
60
|
+
block quote.
|
|
61
|
+
%code
|
|
62
|
+
= "[blockquote]Here is a block quote[/blockquote]"
|
|
63
|
+
|
|
64
|
+
With a source:
|
|
65
|
+
|
|
66
|
+
%code
|
|
67
|
+
= "[blockquote source=\"David Pogue, New York Times\"]Here is a block quote from a named source[/blockquote]"
|
|
68
|
+
|
|
69
|
+
.well.help-well
|
|
70
|
+
%h4 Embed a tweet
|
|
71
|
+
|
|
72
|
+
%p.help-description
|
|
73
|
+
The standard tweet embed code you might pull from a tweet detail page on twitter is incompatible
|
|
74
|
+
with our post editor. To embed a tweet in a way that is compatible, use the following shortcode:
|
|
75
|
+
%code
|
|
76
|
+
= "[tweet url=\"the tweet url\"]"
|
|
77
|
+
|
|
78
|
+
%p.help-description
|
|
79
|
+
A working example:
|
|
80
|
+
|
|
81
|
+
%code
|
|
82
|
+
= "[tweet url=\"https://twitter.com/pmarca/status/595091029847486464\"]"
|
|
83
|
+
|
|
84
|
+
.well.help-well
|
|
85
|
+
%h4 Embed a video
|
|
86
|
+
|
|
87
|
+
%p.help-description
|
|
88
|
+
You can embed Youtube and Vimeo videos in a way that applies standardized
|
|
89
|
+
formatting by using the following shortcode:
|
|
90
|
+
%code
|
|
91
|
+
= "[video url=\"the video url\"]"
|
|
92
|
+
|
|
93
|
+
%p.help-description
|
|
94
|
+
A working example:
|
|
95
|
+
|
|
96
|
+
%code
|
|
97
|
+
= "[video url=\"https://www.youtube.com/watch?v=keFBEoBy0zY\"]"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
.well.help-well
|
|
101
|
+
%h4 H1, H2, H3, H4 tags
|
|
102
|
+
|
|
103
|
+
%p.help-description
|
|
104
|
+
We've included shortcodes for H1, H2, H3 and H4 tags as well:
|
|
105
|
+
%code
|
|
106
|
+
= "[h1]Your H1 content[/h1]"
|
|
107
|
+
%code
|
|
108
|
+
= "[h2]Your H2 content[/h2]"
|
|
109
|
+
%code
|
|
110
|
+
= "[h3]Your H3 content[/h3]"
|
|
111
|
+
%code
|
|
112
|
+
= "[h4]Your H4 content[/h4]"
|
|
113
|
+
|
|
114
|
+
.spacer.xl
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
= select_tag "post[author_id]", options_for_select(Virgo::User.authors.by_name.map{|u| [u.pretty_name, u.id] }, @post.try(:author_id) || current_user.id), include_blank: false, class: 'form-control js-author-dropdown', data: {refresh_uri: author_dropdown_admin_posts_path(post_id: @post.try(:id))}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
.post-categories
|
|
2
|
+
- if Virgo::Category.top_level.any?
|
|
3
|
+
.post-categories-list
|
|
4
|
+
- Virgo::Category.top_level.order(navbar_weight: :asc).each do |category|
|
|
5
|
+
= render '/virgo/admin/posts/category', category: category, level: 0
|
|
6
|
+
|
|
7
|
+
= link_to "+ Add New Category", "#", data: {uri: modal_form_admin_categories_path(post_id: @post.try(:id))}, id: 'new-category-link'
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
- level = local_assigns.has_key?(:level) ? level : 0
|
|
2
|
+
- next_level = level + 1
|
|
3
|
+
|
|
4
|
+
.category-item
|
|
5
|
+
- if category.children.any?
|
|
6
|
+
%label
|
|
7
|
+
- level.times do
|
|
8
|
+
%span.level
|
|
9
|
+
|
|
10
|
+
= check_box_tag "post[category_ids][]", category.id, @post && @post.category_ids.include?(category.id)
|
|
11
|
+
%span.text= category.name
|
|
12
|
+
|
|
13
|
+
- category.children.each do |child|
|
|
14
|
+
= render '/virgo/admin/posts/category', category: child, level: next_level
|
|
15
|
+
|
|
16
|
+
- else
|
|
17
|
+
%label
|
|
18
|
+
- level.times do
|
|
19
|
+
%span.level
|
|
20
|
+
|
|
21
|
+
= check_box_tag "post[category_ids][]", category.id, @post && @post.category_ids.include?(category.id)
|
|
22
|
+
%span.text= category.name
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
.row
|
|
2
|
+
- url = @post.new_record? ? admin_posts_path : admin_post_path(@post)
|
|
3
|
+
|
|
4
|
+
#post-locked-messaged{class: ('hidden' unless (@post.is_mid_edit? && @post.editing_user != current_user))}
|
|
5
|
+
.container-fluid
|
|
6
|
+
.row.alert-row.fade.in
|
|
7
|
+
.col-md-12
|
|
8
|
+
.alert.alert-danger.flash
|
|
9
|
+
.inner-text
|
|
10
|
+
%strong.alert-heading
|
|
11
|
+
= icon 'lock'
|
|
12
|
+
Warning!
|
|
13
|
+
This post is currently being edited by
|
|
14
|
+
:erb
|
|
15
|
+
<span class='editing-user-name'><%= @post.editing_user.try(:pretty_name) %></span>. Any changes that you make while the user is still editing the post
|
|
16
|
+
may be lost. A popup will appear when the user has finished editing the post giving you the option to refresh this page and view
|
|
17
|
+
their changes.
|
|
18
|
+
|
|
19
|
+
= simple_form_for @post, url: url, html: {class: 'admin-post-form'} do |f|
|
|
20
|
+
= base_errors(@post)
|
|
21
|
+
|
|
22
|
+
= f.hidden_field :post_type
|
|
23
|
+
.col-md-9
|
|
24
|
+
= f.input :headline, as: :string, input_html: {id: 'headline-input'}
|
|
25
|
+
|
|
26
|
+
= f.input :slug, label: "Permalink slug", input_html: {placeholder: "example: \"a-blog-post\"", "data-toggle" => "character-counter", id: 'slug-input'}
|
|
27
|
+
|
|
28
|
+
- if @post.post?
|
|
29
|
+
= f.input :subhead, label: "Subhead", input_html: {id: 'subhead-input'}
|
|
30
|
+
|
|
31
|
+
-# %a.btn.btn-sm.btn-default.pull-left.js-launch-media-modal.media-button{href: "#"}
|
|
32
|
+
-# = icon 'image'
|
|
33
|
+
-# Insert Image
|
|
34
|
+
.clear
|
|
35
|
+
.editor-wrap
|
|
36
|
+
.editor-word-count
|
|
37
|
+
%span.count-number
|
|
38
|
+
%span.count-text
|
|
39
|
+
%textarea.editor-custom{name: "post[body]", rows: 50}
|
|
40
|
+
= f.object.body.try(:html_safe)
|
|
41
|
+
|
|
42
|
+
.spacer
|
|
43
|
+
|
|
44
|
+
- if @post.post?
|
|
45
|
+
.panel.panel-default
|
|
46
|
+
.panel-heading Excerpt
|
|
47
|
+
.panel-body
|
|
48
|
+
= f.input :excerpt, input_html: {id: "excerpt-input"}
|
|
49
|
+
|
|
50
|
+
- if @post.persisted?
|
|
51
|
+
.panel.panel-default
|
|
52
|
+
.panel-heading Revisions
|
|
53
|
+
.panel-body
|
|
54
|
+
- # hide for now, on jeff's request
|
|
55
|
+
- # render partial: 'revisions', locals: {limit: true}
|
|
56
|
+
.see-all-revisions.text-left
|
|
57
|
+
= link_to revisions_admin_post_path(@post), target: '_blank' do
|
|
58
|
+
See all revisions »
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
- if @post.persisted? && (admin? || @post.author == current_user)
|
|
63
|
+
= link_to admin_post_path(@post), class: 'btn btn-danger pull-left delete-post-link', data: {method: :delete, confirm: "Are you sure you want to delete this #{@post.post? ? 'post' : 'page'} permanently?"} do
|
|
64
|
+
%i.fa.fa-trash-o
|
|
65
|
+
= "Delete #{@post.post? ? 'Post' : 'Page'}"
|
|
66
|
+
|
|
67
|
+
= f.button :submit, 'Save', class: 'btn btn-info pull-right post-save-btn', data: {disable_with: "Saving"}, id: "primary-save-button"
|
|
68
|
+
|
|
69
|
+
.spacer
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
.col-md-3
|
|
73
|
+
.panel.panel-default.push-down-sm
|
|
74
|
+
.panel-heading Publish
|
|
75
|
+
.panel-body
|
|
76
|
+
.form-group
|
|
77
|
+
%label.label-block
|
|
78
|
+
Author
|
|
79
|
+
= link_to new_admin_user_path, class: 'new-user-link pull-right', target: '_blank' do
|
|
80
|
+
Add User
|
|
81
|
+
= icon 'external-link'
|
|
82
|
+
= render 'author_dropdown'
|
|
83
|
+
.refresh-author-wrap.text-right
|
|
84
|
+
%a#refresh-authors.js-refresh-authors{href: '#', data: {toggle: 'tooltip', placement: 'top'}, title: 'Refresh authors dropdown'}
|
|
85
|
+
= icon 'refresh'
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
= f.input :status, label: 'Status', as: :select, collection: Virgo::Post.status_names, include_blank: false
|
|
89
|
+
|
|
90
|
+
= f.input :publish_at, label: 'Publish on date', as: :string, input_html: {id: 'publish-at-input', value: f.object.publish_at.try(:to_s, :slashes_with_time)}
|
|
91
|
+
|
|
92
|
+
= f.button :submit, "Save", class: 'btn btn-info pull-right'
|
|
93
|
+
|
|
94
|
+
.col-md-3
|
|
95
|
+
- if @post.post?
|
|
96
|
+
.panel.panel-default.push-down-sm
|
|
97
|
+
.panel-heading Categories
|
|
98
|
+
.panel-body
|
|
99
|
+
= render 'categories_form'
|
|
100
|
+
|
|
101
|
+
.panel.panel-default
|
|
102
|
+
.panel-heading Tags
|
|
103
|
+
.panel-body.tags-panel-body
|
|
104
|
+
.box-loading-overlay.tags-box-loading
|
|
105
|
+
%i.spinner.fa.fa-circle-o-notch.fa-spin
|
|
106
|
+
.row
|
|
107
|
+
.col-sm-12
|
|
108
|
+
= f.hidden_field :ordered_tag_ids, multiple: true, class: 'tags-select', value: "[#{post_params[:ordered_tag_ids].present? ? post_params[:ordered_tag_ids].try(:[], 0) : f.object.post_tags.order(position: :asc).map{|pt| "\"#{pt.tag_id}\""}.join(',')}]"
|
|
109
|
+
= link_to "+ Add New Tag", "#", data: {uri: modal_form_admin_tags_path(post_id: @post.id)}, id: 'new-category-link'
|
|
110
|
+
|
|
111
|
+
.panel.panel-default
|
|
112
|
+
.panel-heading Column
|
|
113
|
+
.panel-body
|
|
114
|
+
.row
|
|
115
|
+
.col-sm-12
|
|
116
|
+
.post-column-field
|
|
117
|
+
= f.input :column_id, as: :select, label: false, collection: Virgo::Column.order(name: :asc)
|
|
118
|
+
|
|
119
|
+
.panel.panel-default.push-down-sm
|
|
120
|
+
.panel-heading Citation
|
|
121
|
+
.panel-body
|
|
122
|
+
= f.input :citation_name, as: :string, label: "Citation name (optional)"
|
|
123
|
+
= f.input :citation_url, as: :string, label: "Citation url (optional)"
|
|
124
|
+
|
|
125
|
+
.panel.panel-default.push-down-sm
|
|
126
|
+
.panel-heading SEO
|
|
127
|
+
.panel-body
|
|
128
|
+
= f.input :title_tag_text, label: "Title tag value (optional)", input_html: {placeholder: "defaults to headline text"}
|
|
129
|
+
= f.input :meta_description_tag_value, label: "Meta description tag value (optional)", input_html: {placeholder: "Defaults to first 160 characters of post body (stripped of markup)"}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
- if @post.post?
|
|
133
|
+
.panel.panel-default
|
|
134
|
+
.panel-heading Publishing Options
|
|
135
|
+
.panel-body
|
|
136
|
+
.row
|
|
137
|
+
.col-sm-12
|
|
138
|
+
= f.input :comments_enabled, label: "Comments enabled?"
|
|
139
|
+
|
|
140
|
+
.panel.panel-default.featured-image-settings-box
|
|
141
|
+
.panel-heading Featured Image
|
|
142
|
+
.panel-body
|
|
143
|
+
.row
|
|
144
|
+
.col-sm-12
|
|
145
|
+
.featured-image-thumbnail{class: ('hidden' unless @post.featured_image)}
|
|
146
|
+
= link_to @post.featured_image.try(:image).try(:url), target: '_blank', class: 'thumbnail' do
|
|
147
|
+
= image_tag @post.featured_image.try(:image).try(:url)
|
|
148
|
+
|
|
149
|
+
%p.info.muted.no-image-message.js-no-featured-image-message{class: ('hidden' if @post.thumbnail_image)}
|
|
150
|
+
No image selected
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
.featured-image-box-buttons
|
|
154
|
+
= link_to '#', class: 'js-select-featured-image featured-image-link pull-left btn btn-info' do
|
|
155
|
+
= icon 'plus'
|
|
156
|
+
Choose Image
|
|
157
|
+
|
|
158
|
+
= f.button :submit, 'Save Changes', class: "btn btn-primary pull-left js-save-featured-image hidden"
|
|
159
|
+
|
|
160
|
+
= link_to 'Remove Image', (@post.new_record? ? '#' : featured_image_admin_post_path(@post)), class: "btn btn-danger pull-left js-remove-featured-image#{' hidden' if @post.featured_image.nil?}"
|
|
161
|
+
|
|
162
|
+
.clear
|
|
163
|
+
= f.input :show_feature_image_on_post_page, label: "Display featured image on post page?", input_html: {class: 'show-on-post-page'}
|
|
164
|
+
|
|
165
|
+
= f.input :featured_image_id, as: :hidden
|
|
166
|
+
|
|
167
|
+
.panel.panel-default.thumbnail-image-settings-box
|
|
168
|
+
.panel-heading Thumbnail Image (Optional)
|
|
169
|
+
.panel-body
|
|
170
|
+
.row
|
|
171
|
+
.col-sm-12
|
|
172
|
+
%p.info
|
|
173
|
+
If selected, the post thumbnail image will override the feature image
|
|
174
|
+
on index pages and widgets sitewide.
|
|
175
|
+
.thumbnail-image-thumbnail{class: ('hidden' unless @post.thumbnail_image)}
|
|
176
|
+
= link_to @post.thumbnail_image.try(:image).try(:url), target: '_blank', class: 'thumbnail' do
|
|
177
|
+
= image_tag @post.thumbnail_image.try(:image).try(:url)
|
|
178
|
+
|
|
179
|
+
%p.info.muted.no-image-message.js-no-thumbnail-image-message{class: ('hidden' if @post.thumbnail_image)}
|
|
180
|
+
No image selected
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
.thumbnail-image-box-buttons
|
|
184
|
+
= link_to '#', class: 'js-select-thumbnail-image thumbnail-image-link pull-left btn btn-info' do
|
|
185
|
+
= icon 'plus'
|
|
186
|
+
Choose Image
|
|
187
|
+
|
|
188
|
+
= f.button :submit, 'Save Changes', class: "btn btn-primary pull-left js-save-thumbnail-image hidden"
|
|
189
|
+
|
|
190
|
+
= link_to 'Remove Image', (@post.new_record? ? '#' : thumbnail_image_admin_post_path(@post)), class: "btn btn-danger pull-left js-remove-thumbnail-image#{' hidden' if @post.thumbnail_image.nil?}"
|
|
191
|
+
|
|
192
|
+
.clear
|
|
193
|
+
|
|
194
|
+
= f.input :thumbnail_image_id, as: :hidden
|
|
195
|
+
|
|
196
|
+
-# = f.button :submit, "Save Post", class: 'btn btn-info pull-right post-save-btn post-save-btn', data: {disable_with: "Saving"}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
- cache [Virgo::Tag.cache_key, 'tag_ids'] do
|
|
200
|
+
:javascript
|
|
201
|
+
window.tag_info = #{ Virgo::Tag.all.map{ |t| {t.name => t.id} }.reduce({}, :update).to_json };
|