intesys_asset_manager 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +127 -0
- data/Rakefile +31 -0
- data/app/assets/images/loader.gif +0 -0
- data/app/assets/javascripts/asset_manager.js.coffee +149 -0
- data/app/assets/stylesheets/asset_manager.css.sass +85 -0
- data/app/assets/stylesheets/asset_manager/base/colors.css.sass +0 -0
- data/app/assets/stylesheets/asset_manager/base/fonts.css.sass +0 -0
- data/app/assets/stylesheets/asset_manager/controllers/asset_categories.css.sass +0 -0
- data/app/assets/stylesheets/asset_manager/controllers/assets.css.sass +104 -0
- data/app/assets/stylesheets/asset_manager/controllers/index.css.sass +0 -0
- data/app/assets/stylesheets/asset_manager/layout/footer.css.sass +0 -0
- data/app/assets/stylesheets/asset_manager/layout/generic.css.sass +17 -0
- data/app/assets/stylesheets/asset_manager/layout/header.css.sass +0 -0
- data/app/assets/stylesheets/asset_manager/layout/main.css.sass +26 -0
- data/app/assets/stylesheets/asset_manager/modules/alerts.css.sass +3 -0
- data/app/assets/stylesheets/asset_manager/modules/btn_group.css.sass +3 -0
- data/app/assets/stylesheets/asset_manager/modules/page_header.sass +12 -0
- data/app/assets/stylesheets/asset_manager/modules/quick_upload.css.sass +26 -0
- data/app/assets/stylesheets/asset_manager/modules/translations.css.sass +4 -0
- data/app/assets/stylesheets/asset_manager/plugins/plugins.css.sass +7 -0
- data/app/assets/stylesheets/asset_manager/resources/asset_categories/asset_category.css.sass +0 -0
- data/app/assets/stylesheets/asset_manager/resources/asset_instances/asset_instance.css.sass +4 -0
- data/app/assets/stylesheets/asset_manager/resources/assets/asset.css.sass +35 -0
- data/app/assets/stylesheets/asset_manager/resources/resource/resource.css.sass +0 -0
- data/app/controllers/asset_manager/application_controller.rb +4 -0
- data/app/controllers/asset_manager/asset_categories_controller.rb +56 -0
- data/app/controllers/asset_manager/asset_instances_controller.rb +22 -0
- data/app/controllers/asset_manager/assets_controller.rb +122 -0
- data/app/controllers/asset_manager/index_controller.rb +8 -0
- data/app/helpers/asset_manager/application_helper.rb +9 -0
- data/app/helpers/asset_manager/asset_instances_helper.rb +59 -0
- data/app/helpers/asset_manager/assets_helper.rb +145 -0
- data/app/helpers/asset_manager/links_helper.rb +21 -0
- data/app/inputs/asset_manager_input.rb +27 -0
- data/app/models/asset_manager/asset.rb +99 -0
- data/app/models/asset_manager/asset_association.rb +15 -0
- data/app/models/asset_manager/asset_category.rb +22 -0
- data/app/models/asset_manager/asset_instance.rb +33 -0
- data/app/models/asset_manager/asset_private_instance.rb +6 -0
- data/app/models/asset_manager/asset_public_instance.rb +6 -0
- data/app/uploaders/asset_manager/asset_private_uploader.rb +9 -0
- data/app/uploaders/asset_manager/asset_public_uploader.rb +12 -0
- data/app/uploaders/asset_manager/asset_uploader.rb +36 -0
- data/app/views/admin/asset_manager/assets/_asset.html.haml +7 -0
- data/app/views/admin/asset_manager/assets/_assets.html.haml +2 -0
- data/app/views/asset_manager/asset_categories/_form.html.haml +10 -0
- data/app/views/asset_manager/asset_categories/_translated_fields.html.haml +3 -0
- data/app/views/asset_manager/asset_categories/edit.html.haml +8 -0
- data/app/views/asset_manager/asset_categories/index.html.haml +43 -0
- data/app/views/asset_manager/asset_categories/new.html.haml +4 -0
- data/app/views/asset_manager/asset_categories/show.html.haml +30 -0
- data/app/views/asset_manager/asset_instances/_asset_instance.html.haml +14 -0
- data/app/views/asset_manager/asset_instances/_asset_instance_as_flag.html.haml +3 -0
- data/app/views/asset_manager/asset_instances/_asset_instances.html.haml +5 -0
- data/app/views/asset_manager/asset_instances/_asset_instances_as_flag.html.haml +12 -0
- data/app/views/asset_manager/assets/_asset.html.haml +3 -0
- data/app/views/asset_manager/assets/_asset_draggable.html.haml +8 -0
- data/app/views/asset_manager/assets/_asset_group_by_instance_context.html.haml +7 -0
- data/app/views/asset_manager/assets/_asset_instance_fields.haml +10 -0
- data/app/views/asset_manager/assets/_assets.html.haml +4 -0
- data/app/views/asset_manager/assets/_assets_draggable.html.haml +7 -0
- data/app/views/asset_manager/assets/_form.html.haml +63 -0
- data/app/views/asset_manager/assets/_new_actions.html.haml +8 -0
- data/app/views/asset_manager/assets/_quick_upload.html.haml +20 -0
- data/app/views/asset_manager/assets/_translated_fields.html.haml +4 -0
- data/app/views/asset_manager/assets/edit.html.haml +6 -0
- data/app/views/asset_manager/assets/index.html.haml +68 -0
- data/app/views/asset_manager/assets/new.html.haml +4 -0
- data/app/views/asset_manager/assets/quick_upload.js.erb +7 -0
- data/app/views/asset_manager/assets/select.html.haml +57 -0
- data/app/views/asset_manager/assets/select.js.erb +1 -0
- data/app/views/asset_manager/assets/show.html.haml +51 -0
- data/app/views/asset_manager/index/index.html.haml +6 -0
- data/app/views/asset_manager/partials/_form_errors.html.haml +7 -0
- data/app/views/asset_manager/partials/_locales_tabs.html.haml +4 -0
- data/app/views/asset_manager/partials/_pagination_status.html.haml +2 -0
- data/app/views/layouts/asset_manager/_base.html.haml +6 -0
- data/app/views/layouts/asset_manager/application.html.haml +15 -0
- data/app/views/layouts/asset_manager/partials/_flash_messages.html.haml +4 -0
- data/app/views/layouts/asset_manager/partials/_head.html.haml +11 -0
- data/app/views/layouts/asset_manager/partials/_header.html.haml +15 -0
- data/app/views/layouts/asset_manager/simple.html.haml +4 -0
- data/config/locales/en.yml +179 -0
- data/config/locales/it.yml +181 -0
- data/config/routes.rb +20 -0
- data/db/migrate/20120919130657_asset_manager_init.rb +44 -0
- data/db/migrate/20121005072255_acts_as_taggable_on_migration.rb +30 -0
- data/db/migrate/20121102141009_add_file_type_to_asset.rb +5 -0
- data/db/migrate/20130417082644_asset_manager_add_index_to_foreign_keys.rb +5 -0
- data/db/migrate/20140512090936_add_missing_unique_indices.acts_as_taggable_on_engine.rb +20 -0
- data/db/migrate/20140512090937_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +15 -0
- data/lib/asset_manager.rb +57 -0
- data/lib/asset_manager/all.rb +5 -0
- data/lib/asset_manager/engine.rb +29 -0
- data/lib/asset_manager/extensions/active_record.rb +152 -0
- data/lib/asset_manager/extensions/all.rb +1 -0
- data/lib/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
- data/lib/assets/images/bootstrap/glyphicons-halflings.png +0 -0
- data/lib/assets/javascripts/bootstrap2/bootstrap.js +2280 -0
- data/lib/assets/stylesheets/bootstrap2/bootstrap-responsive.css +1109 -0
- data/lib/assets/stylesheets/bootstrap2/bootstrap.css.erb +6167 -0
- data/lib/custom_versions.rb +20 -0
- data/lib/deprecated.rb +61 -0
- data/lib/intesys_asset_manager.rb +1 -0
- data/lib/intesys_asset_manager/version.rb +3 -0
- data/lib/tasks/asset_manager_tasks.rake +32 -0
- data/lib/touch_translation.rb +18 -0
- data/lib/translations.rb +19 -0
- data/spec/controllers/asset_manager/asset_categories_controller_spec.rb +164 -0
- data/spec/controllers/asset_manager/assets_controller_spec.rb +164 -0
- data/spec/controllers/asset_manager/index_controller_spec.rb +12 -0
- data/spec/factories/asset_manager_asset_associations.rb +10 -0
- data/spec/factories/asset_manager_asset_categories.rb +7 -0
- data/spec/factories/asset_manager_asset_instances.rb +9 -0
- data/spec/factories/asset_manager_assets.rb +8 -0
- data/spec/helpers/asset_manager/asset_categories_helper_spec.rb +5 -0
- data/spec/helpers/asset_manager/assets_helper_spec.rb +5 -0
- data/spec/helpers/asset_manager/index_helper_spec.rb +5 -0
- data/spec/models/asset_manager/asset_association_spec.rb +5 -0
- data/spec/models/asset_manager/asset_category_spec.rb +5 -0
- data/spec/models/asset_manager/asset_instance_spec.rb +7 -0
- data/spec/models/asset_manager/asset_spec.rb +5 -0
- data/spec/requests/asset_manager/asset_manager_asset_categories_spec.rb +11 -0
- data/spec/requests/asset_manager/asset_manager_assets_spec.rb +11 -0
- data/spec/routing/asset_manager/asset_categories_routing_spec.rb +35 -0
- data/spec/routing/asset_manager/assets_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +18 -0
- data/spec/support/capybara.rb +8 -0
- data/spec/views/asset_manager/asset_categories/edit.html.haml_spec.rb +15 -0
- data/spec/views/asset_manager/asset_categories/index.html.haml_spec.rb +15 -0
- data/spec/views/asset_manager/asset_categories/new.html.haml_spec.rb +15 -0
- data/spec/views/asset_manager/asset_categories/show.html.haml_spec.rb +12 -0
- data/spec/views/asset_manager/assets/edit.html.haml_spec.rb +20 -0
- data/spec/views/asset_manager/assets/index.html.haml_spec.rb +23 -0
- data/spec/views/asset_manager/assets/new.html.haml_spec.rb +20 -0
- data/spec/views/asset_manager/assets/show.html.haml_spec.rb +17 -0
- data/spec/views/asset_manager/index/index.html.haml_spec.rb +5 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/aac.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/ai.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/aif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/asp.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/aspx.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/avi.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/bin.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/bmp.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/css.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/db.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/default.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/dll.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/dll2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/doc.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/eps.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/exe1.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/exe2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/fav.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/genericBlue.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/genericGray.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/genericOrange.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/genericRed.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/genericTurquesa.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/gif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/gz.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/help.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/help2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/hqx.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/html.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/htmlFirefox.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/htmlIE.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/htmlSafari1.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/htmlSafari2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/jpg.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/js.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/mov.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/mov2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/mp2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/mp3.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/mp4.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/mpg.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/pdf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/php.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/pic.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/png.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/pps.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/ppt.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/psd.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/rar.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/rb.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/rtf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/template.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/tif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/ttf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/txt.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/vbs.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/vbs2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/warning.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/wav.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/xls.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/xml.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/zip.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/16x16/zip2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/aac.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/ai.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/aif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/asp.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/aspx.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/avi.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/bin.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/bmp.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/css.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/db.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/default.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/dll.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/dll2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/doc.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/eps.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/exe1.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/exe2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/fav.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/genericBlue.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/genericGray.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/genericOrange.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/genericRed.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/genericTurquesa.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/gif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/gz.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/help.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/help2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/hqx.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/html.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/htmlFirefox.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/htmlIE.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/htmlSafari1.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/htmlSafari2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/jpg.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/js.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/mov.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/mov2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/mp2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/mp3.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/mp4.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/mpg.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/pdf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/php.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/pic.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/png.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/pps.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/ppt.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/psd.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/rar.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/rb.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/rtf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/template.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/tif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/ttf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/txt.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/vbs.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/vbs2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/warning.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/wav.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/xls.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/xml.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/zip.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/20x20/zip2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/aac.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/ai.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/aif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/asp.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/aspx.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/avi.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/bin.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/bmp.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/css.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/db.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/default.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/dll.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/dll2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/doc.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/eps.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/exe1.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/exe2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/fav.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/genericBlue.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/genericGray.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/genericOrange.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/genericRed.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/genericTurquesa.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/gif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/gz.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/help.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/help2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/hqx.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/html.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/htmlFirefox.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/htmlIE.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/htmlSafari1.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/htmlSafari2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/jpg.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/js.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/mov.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/mov2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/mp2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/mp3.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/mp4.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/mpg.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/pdf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/php.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/pic.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/png.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/pps.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/ppt.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/psd.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/rar.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/rb.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/rtf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/tif.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/ttf.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/txt.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/vbs.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/vbs2.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/warning.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/wav.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/xls.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/xml.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/zip.png +0 -0
- data/vendor/assets/images/asset_manager/file_icons/32x32/zip2.png +0 -0
- data/vendor/assets/images/blank.gif +0 -0
- data/vendor/assets/images/clippy.swf +0 -0
- data/vendor/assets/images/fancybox_buttons.png +0 -0
- data/vendor/assets/images/fancybox_loading.gif +0 -0
- data/vendor/assets/images/fancybox_loading@2x.gif +0 -0
- data/vendor/assets/images/fancybox_overlay.png +0 -0
- data/vendor/assets/images/fancybox_sprite.png +0 -0
- data/vendor/assets/images/fancybox_sprite@2x.png +0 -0
- data/vendor/assets/images/ias/loader.gif +0 -0
- data/vendor/assets/javascripts/ias/jquery.ias.js +620 -0
- data/vendor/assets/stylesheets/ias/jquery.ias.css +8 -0
- metadata +748 -0
File without changes
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
body
|
2
|
+
padding-top: 41px
|
3
|
+
padding-bottom: 40px
|
4
|
+
.sidebar-nav
|
5
|
+
padding: 9px 0
|
6
|
+
form
|
7
|
+
fieldset.translations[data-count="1"]
|
8
|
+
ul.nav-tabs
|
9
|
+
display: none
|
10
|
+
.control-group
|
11
|
+
&.error
|
12
|
+
.help-inline
|
13
|
+
margin-left: 180px
|
14
|
+
.controls
|
15
|
+
textarea
|
16
|
+
height: 60px
|
17
|
+
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
table
|
2
|
+
width: 100%
|
3
|
+
margin-bottom: 1em
|
4
|
+
th
|
5
|
+
background: #08c
|
6
|
+
line-height: 25px !important
|
7
|
+
color: #fff
|
8
|
+
td
|
9
|
+
&.id
|
10
|
+
width: 30px
|
11
|
+
&.actions
|
12
|
+
width: 62px
|
13
|
+
text-align: right
|
14
|
+
ul, li
|
15
|
+
margin: 0
|
16
|
+
padding: 0
|
17
|
+
li
|
18
|
+
list-style: none inside
|
19
|
+
display: inline
|
20
|
+
a
|
21
|
+
color: #000
|
22
|
+
&:hover
|
23
|
+
color: #0088cc
|
24
|
+
a
|
25
|
+
&, &:hover
|
26
|
+
text-decoration: none
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#quick_upload
|
2
|
+
margin-bottom: 1em
|
3
|
+
a.link-upload
|
4
|
+
color: #888
|
5
|
+
font-size: 14px
|
6
|
+
i
|
7
|
+
font-size: 20px
|
8
|
+
span
|
9
|
+
position: relative
|
10
|
+
top: -1px
|
11
|
+
font-weight: bold
|
12
|
+
&:hover
|
13
|
+
text-decoration: none
|
14
|
+
&.open a.link-upload, a.link-upload:hover
|
15
|
+
color: #86C441
|
16
|
+
.well
|
17
|
+
+box-shadow(0 0 0)
|
18
|
+
display: none
|
19
|
+
background: darken(whitesmoke, 5%)
|
20
|
+
border-color: darken(#e3e3e3, 5%)
|
21
|
+
form
|
22
|
+
margin-bottom: 0
|
23
|
+
&.open
|
24
|
+
.well
|
25
|
+
display: block
|
26
|
+
|
File without changes
|
@@ -0,0 +1,35 @@
|
|
1
|
+
.resource.asset
|
2
|
+
h5
|
3
|
+
margin-top: 0
|
4
|
+
font-size: 13px
|
5
|
+
font-size: 12px
|
6
|
+
|
7
|
+
.resource.asset.draggable
|
8
|
+
cursor: pointer
|
9
|
+
|
10
|
+
#sortable1
|
11
|
+
.resource.asset
|
12
|
+
float: left
|
13
|
+
width: 15%
|
14
|
+
margin: 0 1% 1% 0
|
15
|
+
.thumbnail
|
16
|
+
height: 120px !important
|
17
|
+
overflow: hidden
|
18
|
+
|
19
|
+
#sortable2
|
20
|
+
.resource.asset
|
21
|
+
position: relative
|
22
|
+
h5
|
23
|
+
margin: 0
|
24
|
+
padding-right: 30px
|
25
|
+
.details
|
26
|
+
img
|
27
|
+
position: absolute
|
28
|
+
top: 10px
|
29
|
+
right: 10px
|
30
|
+
width: 20px
|
31
|
+
height: 20px
|
32
|
+
span
|
33
|
+
display: none
|
34
|
+
|
35
|
+
|
File without changes
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require_dependency 'asset_manager/application_controller'
|
2
|
+
|
3
|
+
module AssetManager
|
4
|
+
class AssetCategoriesController < ApplicationController
|
5
|
+
def index
|
6
|
+
@search = AssetManager::AssetCategory.metasearch(params[:search])
|
7
|
+
@asset_categories = @search.relation.send(Kaminari.config.page_method_name, params[Kaminari.config.param_name]).per(50).order('id DESC')
|
8
|
+
@total_records = @search.relation.count
|
9
|
+
end
|
10
|
+
|
11
|
+
def show
|
12
|
+
@asset_category = AssetCategory.find(params[:id])
|
13
|
+
end
|
14
|
+
|
15
|
+
def new
|
16
|
+
@asset_category = AssetCategory.new
|
17
|
+
@asset_category = build_translations(@asset_category)
|
18
|
+
end
|
19
|
+
|
20
|
+
def edit
|
21
|
+
@asset_category = AssetCategory.find(params[:id])
|
22
|
+
@asset_category = build_translations(@asset_category)
|
23
|
+
end
|
24
|
+
|
25
|
+
def create
|
26
|
+
@asset_category = AssetCategory.new(params[:asset_category])
|
27
|
+
if @asset_category.save
|
28
|
+
redirect_to edit_asset_category_url(@asset_category), flash: { success: t('asset_manager.asset_categories.controller.asset_category_successfully_create') }
|
29
|
+
else
|
30
|
+
render action: 'new'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def update
|
35
|
+
@asset_category = AssetCategory.find(params[:id])
|
36
|
+
if @asset_category.update_attributes(params[:asset_category])
|
37
|
+
redirect_to edit_asset_category_url(@asset_category), flash: { success: t('asset_manager.asset_categories.controller.asset_category_successfully_update') }
|
38
|
+
else
|
39
|
+
render action: 'edit'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def destroy
|
44
|
+
@asset_category = AssetCategory.find(params[:id])
|
45
|
+
@asset_category.destroy
|
46
|
+
redirect_to asset_categories_url
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def build_translations(asset_category)
|
52
|
+
asset_category.translations_for_locales(I18n.available_locales)
|
53
|
+
asset_category
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require_dependency 'asset_manager/application_controller'
|
2
|
+
|
3
|
+
module AssetManager
|
4
|
+
class AssetInstancesController < ApplicationController
|
5
|
+
def show
|
6
|
+
asset_instance = AssetManager::AssetPrivateInstance.find_by_asset_id_and_instance_context(params[:id], params[:context])
|
7
|
+
path = (params[:version].present? ? asset_instance.file.url(params[:version]) : asset_instance.file.url)
|
8
|
+
disposition = params[:download] ? :attachment : :inline
|
9
|
+
send_file path, disposition: disposition
|
10
|
+
end
|
11
|
+
|
12
|
+
alias_method :admin_show, :show
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def store_location
|
17
|
+
if request.fullpath != '/users/sign_in' && request.fullpath != '/users/sign_up' && !request.xhr? # don't store ajax calls
|
18
|
+
Thread.current[:previous_url] = request.fullpath
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
require_dependency 'asset_manager/application_controller'
|
2
|
+
|
3
|
+
module AssetManager
|
4
|
+
class AssetsController < ApplicationController
|
5
|
+
before_filter :load_public, only: [:index, :new]
|
6
|
+
|
7
|
+
def index
|
8
|
+
@search = AssetManager::Asset.metasearch(params[:search])
|
9
|
+
@assets = @search.relation.send(Kaminari.config.page_method_name, params[Kaminari.config.param_name]).per(50).order('id DESC')
|
10
|
+
@total_records = @search.relation.count
|
11
|
+
end
|
12
|
+
|
13
|
+
def show
|
14
|
+
@asset = Asset.find(params[:id])
|
15
|
+
end
|
16
|
+
|
17
|
+
def new
|
18
|
+
@asset = Asset.new(public: @public)
|
19
|
+
@asset = build_translations(@asset)
|
20
|
+
@asset = build_asset_instances(@asset)
|
21
|
+
end
|
22
|
+
|
23
|
+
def edit
|
24
|
+
@asset = Asset.find(params[:id])
|
25
|
+
@asset = build_translations(@asset)
|
26
|
+
@asset = build_asset_instances(@asset)
|
27
|
+
end
|
28
|
+
|
29
|
+
def create
|
30
|
+
@asset = Asset.new(params[:asset])
|
31
|
+
if @asset.save
|
32
|
+
redirect_to edit_asset_url(@asset), flash: { success: t('asset_manager.assets.controller.asset_successfully_create') }
|
33
|
+
else
|
34
|
+
@asset = build_translations(@asset)
|
35
|
+
@asset = build_asset_instances(@asset)
|
36
|
+
render action: 'new'
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def update
|
41
|
+
@asset = Asset.find(params[:id])
|
42
|
+
if @asset.update_attributes(params[:asset])
|
43
|
+
redirect_to edit_asset_url(@asset), flash: { success: t('asset_manager.assets.controller.asset_successfully_update') }
|
44
|
+
else
|
45
|
+
@asset = build_translations(@asset)
|
46
|
+
@asset = build_asset_instances(@asset)
|
47
|
+
render action: 'edit'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def destroy
|
52
|
+
@asset = Asset.find(params[:id])
|
53
|
+
@asset.destroy
|
54
|
+
redirect_to assets_url
|
55
|
+
end
|
56
|
+
|
57
|
+
def preview
|
58
|
+
@assets = Asset.find_ordered(params[:ids])
|
59
|
+
render partial: '/admin/asset_manager/assets/assets', locals: { collection: @assets }
|
60
|
+
end
|
61
|
+
|
62
|
+
def select
|
63
|
+
@owner = params[:owner]
|
64
|
+
@id = params[:id]
|
65
|
+
@field = params[:field]
|
66
|
+
@save = params[:save]
|
67
|
+
|
68
|
+
owner_class = @owner.constantize
|
69
|
+
fail ActiveRecord::RecordNotFound.new('Invalid Field') unless owner_class.am_has_field?(@field)
|
70
|
+
|
71
|
+
@multiple = owner_class.am_files_fields.include?(@field.to_sym)
|
72
|
+
@max = owner_class.am_field_option(@field, :max)
|
73
|
+
@type = owner_class.am_field_option(@field, :type)
|
74
|
+
@accepted = owner_class.am_field_option(@field, :accepted)
|
75
|
+
|
76
|
+
# Recupero gli asset della risorsa, tramite ids passati come parametro o quelli associati direttamente ad essa
|
77
|
+
ids = params[:ids]
|
78
|
+
if ids
|
79
|
+
@resource_assets = ((ids.length == 1 && ids[0] == 'no') ? [] : Asset.find_ordered(ids))
|
80
|
+
else
|
81
|
+
@resource_assets = Array(owner_class.find(@id).send(@field))
|
82
|
+
ids = @resource_assets.map(&:id)
|
83
|
+
end
|
84
|
+
|
85
|
+
# Search
|
86
|
+
params[:search][:asset_category_id_in].reject!(&:blank?) rescue nil
|
87
|
+
params[:search][:file_type_in].reject!(&:blank?) rescue nil
|
88
|
+
@search = AssetManager::Asset.metasearch(params[:search])
|
89
|
+
@assets = @search.relation
|
90
|
+
@assets = @assets.not_ids(ids).public(@type).accepted(@accepted).send(Kaminari.config.page_method_name, params[Kaminari.config.param_name]).per(36).order(AssetManager::Asset.table_name + '.id DESC')
|
91
|
+
@assets = @assets.tagged_with(params[:tags], any: true) unless params[:tags].nil?
|
92
|
+
|
93
|
+
render layout: 'asset_manager/simple'
|
94
|
+
end
|
95
|
+
|
96
|
+
def quick_upload
|
97
|
+
if params[:asset][:translations_attributes]['0'][:title].blank?
|
98
|
+
tilte_by_filename = File.basename(params[:asset]["asset_#{params[:asset][:public] == 'true' ? 'public' : 'private'}_instances_attributes".to_sym]['0'][:file].original_filename, '.*').titleize
|
99
|
+
params[:asset][:translations_attributes]['0'][:title] = tilte_by_filename
|
100
|
+
end
|
101
|
+
@asset = Asset.create(params[:asset])
|
102
|
+
end
|
103
|
+
|
104
|
+
private
|
105
|
+
|
106
|
+
def load_public
|
107
|
+
@public = params[:public] == 'false' ? false : true
|
108
|
+
end
|
109
|
+
|
110
|
+
def build_asset_instances(asset)
|
111
|
+
if asset.asset_instances.empty?
|
112
|
+
asset.asset_instances.build(instance_context: AssetManager::AssetInstance.instance_context_all)
|
113
|
+
end
|
114
|
+
asset
|
115
|
+
end
|
116
|
+
|
117
|
+
def build_translations(asset)
|
118
|
+
asset.translations_for_locales(I18n.available_locales)
|
119
|
+
asset
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module AssetManager
|
2
|
+
module AssetInstancesHelper
|
3
|
+
include AssetManager::Deprecated::AssetInstancesHelper
|
4
|
+
|
5
|
+
def am_asset_instance_image(resource, options = {})
|
6
|
+
options.assert_valid_keys(:version, :linked, :link_options, :image_options)
|
7
|
+
options.reverse_merge!(linked: false, link_options: {}, image_options: {})
|
8
|
+
img_src = am_asset_instance_url(resource, version: options[:version])
|
9
|
+
img_options = options[:image_options].merge(alt: resource.asset.alt)
|
10
|
+
link_href = am_asset_instance_url(resource, version: options[:link_options][:version])
|
11
|
+
link_options = options[:link_options].except(:version).merge(title: resource.asset.alt)
|
12
|
+
link_to_if options[:linked], image_tag(img_src, img_options), link_href, link_options
|
13
|
+
end
|
14
|
+
|
15
|
+
def am_asset_instance_url(resource, options = {})
|
16
|
+
options.assert_valid_keys(:version, :download, :force_frontend)
|
17
|
+
options.reverse_merge!(version: nil, download: false, force_frontend: false)
|
18
|
+
if resource.asset.public
|
19
|
+
unless options[:version].nil?
|
20
|
+
resource.file.url(options[:version])
|
21
|
+
else
|
22
|
+
resource.file.url
|
23
|
+
end
|
24
|
+
else
|
25
|
+
if options[:force_frontend] || !in_admin_controller?
|
26
|
+
if options[:download]
|
27
|
+
asset_manager.download_asset_path(resource.asset, context: resource.instance_context)
|
28
|
+
else
|
29
|
+
asset_manager.render_asset_path(resource.asset, context: resource.instance_context, version: options[:version])
|
30
|
+
end
|
31
|
+
else
|
32
|
+
if options[:download]
|
33
|
+
asset_manager.admin_download_asset_path(resource.asset, context: resource.instance_context)
|
34
|
+
else
|
35
|
+
asset_manager.admin_render_asset_path(resource.asset, context: resource.instance_context, version: options[:version])
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def am_display_instance_context(resource)
|
42
|
+
if resource.is_all?
|
43
|
+
display_instance_context_all
|
44
|
+
else
|
45
|
+
resource.instance_context
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def display_instance_context_all
|
52
|
+
raw('⇓')
|
53
|
+
end
|
54
|
+
|
55
|
+
def in_admin_controller?
|
56
|
+
controller.class.name =~ /(AssetManager|Admin)::/
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|