push_type_admin 0.1.0.beta3
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/LICENSE.md +20 -0
- data/README.md +3 -0
- data/app/assets/images/push_type/icon-file-audio.png +0 -0
- data/app/assets/images/push_type/icon-file-document.png +0 -0
- data/app/assets/images/push_type/icon-file-video.png +0 -0
- data/app/assets/images/push_type/pushtype-logo.png +0 -0
- data/app/assets/javascripts/push_type/admin.js.coffee +74 -0
- data/app/assets/javascripts/push_type/asset_pipeline.js.coffee.erb +17 -0
- data/app/assets/javascripts/push_type/assets.js.coffee +61 -0
- data/app/assets/javascripts/push_type/nodes.js.coffee +60 -0
- data/app/assets/stylesheets/push_type/admin.scss +515 -0
- data/app/assets/stylesheets/push_type/foundation_and_overrides.scss +1443 -0
- data/app/assets/stylesheets/push_type/froala_theme.scss +373 -0
- data/app/controllers/push_type/admin_controller.rb +14 -0
- data/app/controllers/push_type/assets_controller.rb +68 -0
- data/app/controllers/push_type/nodes_controller.rb +93 -0
- data/app/controllers/push_type/users_controller.rb +73 -0
- data/app/helpers/push_type/admin_helper.rb +15 -0
- data/app/helpers/push_type/assets_helper.rb +15 -0
- data/app/helpers/push_type/users_helper.rb +13 -0
- data/app/views/kaminari/_first_page.html.haml +2 -0
- data/app/views/kaminari/_gap.html.haml +2 -0
- data/app/views/kaminari/_last_page.html.haml +2 -0
- data/app/views/kaminari/_next_page.html.haml +2 -0
- data/app/views/kaminari/_page.html.haml +2 -0
- data/app/views/kaminari/_paginator.html.haml +11 -0
- data/app/views/kaminari/_prev_page.html.haml +2 -0
- data/app/views/layouts/push_type/admin.html.erb +55 -0
- data/app/views/push_type/assets/_form.html.haml +50 -0
- data/app/views/push_type/assets/edit.html.haml +4 -0
- data/app/views/push_type/assets/index.html.haml +34 -0
- data/app/views/push_type/assets/new.html.haml +4 -0
- data/app/views/push_type/fields/_default.html.haml +2 -0
- data/app/views/push_type/nodes/_form_fields.html.haml +61 -0
- data/app/views/push_type/nodes/_meta_table.html.haml +8 -0
- data/app/views/push_type/nodes/_new_node_button.html.haml +17 -0
- data/app/views/push_type/nodes/edit.html.haml +7 -0
- data/app/views/push_type/nodes/index.html.haml +56 -0
- data/app/views/push_type/nodes/new.html.haml +11 -0
- data/app/views/push_type/users/_form.html.haml +30 -0
- data/app/views/push_type/users/_meta_table.html.haml +0 -0
- data/app/views/push_type/users/_user.html.haml +7 -0
- data/app/views/push_type/users/edit.html.haml +4 -0
- data/app/views/push_type/users/index.html.haml +24 -0
- data/app/views/push_type/users/new.html.haml +4 -0
- data/config/initializers/inline_error_messages.rb +7 -0
- data/config/initializers/kaminari_config.rb +10 -0
- data/config/routes.rb +16 -0
- data/lib/push_type/admin/engine.rb +16 -0
- data/lib/push_type/admin.rb +27 -0
- data/lib/push_type/breadcrumbs/foundation.rb +11 -0
- data/lib/push_type/rails/form_builder.rb +13 -0
- data/lib/push_type_admin.rb +1 -0
- data/lib/tasks/push_type_tasks.rake +4 -0
- data/test/controllers/push_type/assets_controller_test.rb +67 -0
- data/test/controllers/push_type/nodes_controller_test.rb +101 -0
- data/test/controllers/push_type/users_controller_test.rb +72 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +16 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/page.rb +10 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/nodes/page.html.erb +3 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +14 -0
- data/test/dummy/config/boot.rb +4 -0
- data/test/dummy/config/database.yml +85 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/push_type.rb +5 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +59 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20141205213506_create_push_type_users.push_type.rb +13 -0
- data/test/dummy/db/migrate/20141205213507_create_push_type_nodes.push_type.rb +25 -0
- data/test/dummy/db/migrate/20141205213508_create_push_type_node_hierarchies.push_type.rb +17 -0
- data/test/dummy/db/migrate/20141205213509_create_push_type_assets.push_type.rb +19 -0
- data/test/dummy/db/schema.rb +67 -0
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/log/test.log +2322 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +5 -0
- data/test/dummy/tmp/cache/assets/test/sass/53cc07db53069364c4116d03ae9493d85566d502/_functions.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_accordion.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_alert-boxes.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_block-grid.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_breadcrumbs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_button-groups.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_clearing.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_dropdown-buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_dropdown.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_flex-video.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_forms.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_global.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_grid.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_icon-bar.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_inline-lists.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_joyride.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_keystrokes.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_labels.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_magellan.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_offcanvas.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_orbit.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_pagination.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_panels.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_pricing-tables.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_progress-bars.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_range-slider.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_reveal.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_side-nav.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_split-buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_sub-nav.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_switches.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_tables.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_tabs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_thumbs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_tooltips.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_top-bar.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_type.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_visibility.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/68968d876746de0885a03aacd18ec354e154ffed/foundation-icons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/805c0b657f4b79d174c13bc42a4759a57d5a5484/foundation.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/806626419a476c98acb0fcf38feea6623fb99ce0/admin.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/806626419a476c98acb0fcf38feea6623fb99ce0/foundation_and_overrides.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/806626419a476c98acb0fcf38feea6623fb99ce0/froala_theme.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/00ae61e049df7e5570b8c57835868cfe +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/042e6dec69dbf88f86f5e8c360b52bcb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0448802b256c25a379824969bf01241e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/05f11ba90b1f59f6a65002fef96de531 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/090f2c9bc57f8e73105a98a800051354 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/09fd8b22d7c059ed78b065ffa44138a4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0a01f1c3288f982772ed595695292767 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0b83e9e8467b82a0991df336697846e0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/10a718d020e26634ffd3071d63270dd1 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/12375f1bf3d91db0a06c3fc436918949 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/12a4fbfdcb2f1ed98ebd869761bce11e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1505f3ddd93d7be2405c81d84a45cbfb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/161b66dc0b76d65e577b5465f86cb767 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/18ee507bade4f16ba4f6a5c93f3aac22 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1c63cb75109171c505bf1b6b3f26513b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1da46bb361bbd7b80dc66e5737dbf2a7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2479bd5cbccdeac3ab4df62c2c12e8d3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2599cde7c63354f12928a204c42fe68b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/25b238c2ec907a80d53955a0bb81073c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2821176477eee8de7b9581f0564d0947 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2a00ce050c10f75691b820576ec3aefd +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2a854446f76c1902defbfa436b1e7df8 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2c745da65bdbc8ebb88b6bce026972b9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2d1bc2b9dc5ee0ed5635abc31fb1bc88 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/31c57ad31a65f9a951c6d7268cdedae5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/337d12a0890572dfec336aa11e864651 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/3a2e7d8d06318496bd7e5c6bac44adf8 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/3d4f40cd6363f1841fa7c17dcbd281ce +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/47dcfb84d9a092ad939f512e1d3db43c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/48582f4afd1c515e7eb10a8fc2195deb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/4c6b223eba19a3d4009cbda20ed1ae2d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/4fc498f23125a9811434c6d5d5b43b64 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/505162da4e90217e5f52f5e8f1922a0d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/557b45e924759b342404ddfb736f95a2 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/55d58e1add1ca367e262464e83ad82cf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/55d7985953b175268932d2f7e50f64e0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/59992ed1702654aa166f8572af80a301 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/600202d00479f08d2e69019e34d12e65 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/62462f7d0da5dfe3ae7923c7c21325c0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/666e486cb09d9612ba03d995085ea02d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/67d67f783372c9b99e2ff84c12d38dfb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6d21cd96abbcb6506d99fb93e8a11196 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6e714e8b8ac03d2e562e8a71c40e00f8 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6f2f2b2fbb1097278be40facf7aa8447 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/72e0f0b80593c7ccfaf939c504f8127f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7326e3e660754d56c46671c7347c5e97 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/75c5663a92b2003b794d5f5d184fde44 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7b63c613f1053bde6004342003178a0e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7d07558d12b9bd9b9dfa778344bab4ac +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7ea9d575b03f8effb678d4dcedf3d079 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7f0b91f5fa71c52d3cbe1f108fb7c942 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/805c63977d339feb2ea7b61e1141a32f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/81ba6a364949bd4ffe2732ae5745012d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/81e2498e0e1457dd93b47780ae28fc03 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/897553ff72f546645e24e94feec75255 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8a34d99aaa243ebb4e60f483a5b5a817 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8e20677e2b4bd3f063a63fcf9e673971 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8feb3d758b7824f15b301f9dc024c3f6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/932f699ead87a4b9910d47334ed14d60 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/959fa77a7302a3002d5fb1394575117b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/969e05674f51d3b5b500e605e0292573 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/972e71e7d6b360ef56c88716f3191aaf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/98228623f6175426b2d7964b4a921cbb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/987bf17b1a3915d5c6d95ebda01e8f49 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/9aef3ae1f0c62b895d86ab60901dd450 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/9f65b180bd79d7b67e5fb1fe8ded1383 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a4ee671663a58ce1f1860b1e9a9d17fb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a55e988592ebc0d8e4e4ef1244ae4da7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a590260912e62280bb115dd52a953b18 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a6453a78eb0c813a0b69a12cb7c4ab2c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a721a930039ed66bd3f092ab1e9c8de6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a748bad0d4f5d6e6bbdf1b340905795b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a96494099d559bfd8cb5257e21cb196c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a970f64c67051f35069f45d8dad113a5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/aaa6dc2bd59e21dd14b0c86a308a1d1f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ac1b1f0c521a6acb5833209d7b18d888 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b24f2d6f62512f4cb11c6a2e44bf90e4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b28bcc6d89b692e6b74758c30e21b862 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b3b2a83d3d7d735130f0b029e58b29b8 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b3d0193a1439465426a4d051a161291d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b657c356e24f45a8b92d4f4da9ff361d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b76beafa9aef0c7a18bf63fe612ecd17 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b771c2de3967bda011cf04e0979497cf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b8a73c4d259957f05d45cb5d96d41ff1 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ba87909b8d71ddaedd84c3f6c00dce72 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/badf6e6ab7c3d1cc2b180e5883005a40 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bbfc8dec2c2cc07cf4c1708597316a77 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bc732efa6ca399217b023bd1e04f0404 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bd5b45287cfdac63ed7199b7982da02f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bee4e1605077e29abd380b05b645cbb4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c0e7a018799e51565da4aae3cd7409b4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c190d0bdd188c43629f35b9f463b86af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c2b59fd99edc4b53754f7cb4e160452f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c42a7aac68d827f88bcc25a41cdb5591 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c5ef052e357af6829f6c522a38916fc7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c705dc7fb9e60c7d39b5c23a101cd830 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c988fd2c5c9497ccef54f79a9e444ac6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cb761fc7bfc4c192abf5c946f863ab1e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ce523687d631719d872f2869d34803b0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d2215e57429ecae68a054210e665d787 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d30a320df486e076298c602d428f3145 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d3921fc37cc437f0933c4dee9d089fd8 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d527d40cd214f965c2751831ef138ba7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d8daf6c8e5df881485c0e1139a275f6d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d9e5382620928a6b4a8cd70bdac10aa3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/dd803fd7a93619599c7e703c2b307411 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e05796fbbc7fcdcaefdd97534f2e4030 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e1c3eff1f3886da4c71a854d42077d10 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e568172da8ab8581f83f98dad0a73d29 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f02093872b151ddb0fd1074fe83ff846 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f100237ea34e5360da23f95cca21c340 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f25b88a46a5a3b1b179079f6c0e4039a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f31d581aaa301ef9ef6a08edc4319c35 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f5fcab9d313889bf6d14a05040aff5bc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f66bf7665e75e4d537977c71a5e39a4e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f6c61aec4cc93384f9655a7d8aba73fe +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/fa7e1f9a13f606e2603a17f8e00aa32a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/fcce52ee43ecad8cb3f18fc8f13a66b7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/fd5e59fed8301f86b74e551534fce2b2 +0 -0
- data/test/helpers/push_type/admin_helper_test.rb +25 -0
- data/test/helpers/push_type/assets_helper_test.rb +26 -0
- data/test/test_helper.rb +19 -0
- data/vendor/assets/javascripts/confirm_with_reveal.js.coffee +148 -0
- data/vendor/assets/javascripts/jquery.filedrop.js +568 -0
- data/vendor/assets/javascripts/jquery.sortable.js +81 -0
- data/vendor/assets/javascripts/jquery.sticky.js +170 -0
- metadata +724 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>PushType :: <%= yield :title %></title>
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<%= javascript_include_tag 'vendor/modernizr' %>
|
|
8
|
+
<%= javascript_include_tag 'push_type/admin' %>
|
|
9
|
+
<%= stylesheet_link_tag 'push_type/admin', '//fonts.googleapis.com/css?family=Lato:300,300italic,400,700', media: 'all' %>
|
|
10
|
+
<%= csrf_meta_tags %>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
|
|
14
|
+
<header class="header" role="banner">
|
|
15
|
+
<div class="row">
|
|
16
|
+
<div class="small-4 medium-3 large-2 columns">
|
|
17
|
+
<%= link_to image_tag('push_type/pushtype-logo.png', alt: 'PushType'), push_type.root_path %>
|
|
18
|
+
</div>
|
|
19
|
+
<nav class="small-4 medium-6 large-8 columns">
|
|
20
|
+
<ul class="inline-list">
|
|
21
|
+
<%= content_tag :li, link_to('Content', push_type.nodes_path), class: 'active' %>
|
|
22
|
+
<%= content_tag :li, link_to('Media', push_type.assets_path) %>
|
|
23
|
+
<%= content_tag :li, link_to('Users', push_type.users_path) %>
|
|
24
|
+
</ul>
|
|
25
|
+
</nav>
|
|
26
|
+
<nav class="small-4 medium-3 large-2 columns">
|
|
27
|
+
<ul class="inline-list right">
|
|
28
|
+
<%= content_tag :li, link_to(ficon(:info), '#') %>
|
|
29
|
+
<%= content_tag :li, link_to(ficon(:widget), '#') %>
|
|
30
|
+
<%= content_tag :li, link_to(ficon(:power), push_type.destroy_user_session_path, method: 'delete') rescue nil %>
|
|
31
|
+
</ul>
|
|
32
|
+
</nav>
|
|
33
|
+
</div>
|
|
34
|
+
</header>
|
|
35
|
+
|
|
36
|
+
<section class="main" role="main">
|
|
37
|
+
<div class="row">
|
|
38
|
+
<div class="columns">
|
|
39
|
+
<% flash.each do |key, value| %>
|
|
40
|
+
<%= content_tag :div, class: "alert-box radius #{key}", data: { alert: '' } do %>
|
|
41
|
+
<%= value %>
|
|
42
|
+
<a href="#" class="close">×</a>
|
|
43
|
+
<% end %>
|
|
44
|
+
<% end %>
|
|
45
|
+
<%= breadcrumbs.render format: :foundation %>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="row">
|
|
50
|
+
<%= yield %>
|
|
51
|
+
</div>
|
|
52
|
+
</section>
|
|
53
|
+
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
%div{ ng: { controller: 'AssetUploadCtrl', init: "asset=#{ @asset.to_json }; createUrl='#{ push_type.assets_path }'; updateUrl='#{ push_type.asset_path('~id') }'" } }
|
|
2
|
+
= form_for @asset, url: '{{ saveUrl() }}', method: 'post' do |f|
|
|
3
|
+
= hidden_field_tag :_method, '{{ method() }}'
|
|
4
|
+
.large-8.columns
|
|
5
|
+
.container
|
|
6
|
+
.head
|
|
7
|
+
.left.btn= link_to ficon(:previous), push_type.assets_path
|
|
8
|
+
.title= yield :title
|
|
9
|
+
.body.padded
|
|
10
|
+
.row.asset-upload
|
|
11
|
+
%div{ ng: { show: "asset['new_record?']" } }
|
|
12
|
+
.columns
|
|
13
|
+
.dropzone{ asset: { upload: push_type.upload_assets_path, fallback: 'asset_file' } }
|
|
14
|
+
.prompt Drag a file to quickly upload it… (or click)
|
|
15
|
+
.icon= ficon(:upload_cloud)
|
|
16
|
+
.columns{ ng: { hide: "hideFileField && #{ !@asset.errors.include?(:file) }" } }
|
|
17
|
+
= f.label :file
|
|
18
|
+
= f.file_field :file
|
|
19
|
+
%div{ ng: { show: "!asset['new_record?']" } }
|
|
20
|
+
.small-4.medium-3.columns
|
|
21
|
+
%img.preview{ alt: '{{ asset.file_name }}', ng: { src: '{{ previewthumbUrl() }}' } }
|
|
22
|
+
.small-8.medium-9.columns
|
|
23
|
+
%table
|
|
24
|
+
%tr
|
|
25
|
+
%th File name
|
|
26
|
+
%td {{ asset.file_name }}
|
|
27
|
+
%tr
|
|
28
|
+
%th File size
|
|
29
|
+
%td {{ asset.file_size }} kb
|
|
30
|
+
%tr
|
|
31
|
+
%th Content type
|
|
32
|
+
%td {{ asset.mime_type }}
|
|
33
|
+
%tr
|
|
34
|
+
%th Uploaded
|
|
35
|
+
%td {{ uploadedDate() }}
|
|
36
|
+
.row.string
|
|
37
|
+
.columns
|
|
38
|
+
= f.label :description
|
|
39
|
+
= f.text_field :description
|
|
40
|
+
|
|
41
|
+
.large-4.columns
|
|
42
|
+
.side-panel{ :'side-panel' => true }
|
|
43
|
+
.padded
|
|
44
|
+
.meta-table
|
|
45
|
+
.submit.text-center
|
|
46
|
+
%button.button.radius{ ng: { class: 'saveButtonClass()' } }
|
|
47
|
+
= ficon :check, '{{ saveButtonText() }}'
|
|
48
|
+
- unless @asset.new_record?
|
|
49
|
+
.delete-link= link_to 'Delete media', push_type.asset_path(@asset), method: 'delete', data: { confirm: { body: 'Deleted media will be moved to the trash. You can restore trashed media later.' } }
|
|
50
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
- title 'Media'
|
|
2
|
+
|
|
3
|
+
- if @assets.empty?
|
|
4
|
+
.columns
|
|
5
|
+
.empty-default{ ng: { hide: 'assetCount() > 0' } }
|
|
6
|
+
%h2 No uploads
|
|
7
|
+
%p Upload images, documents, videos. Get started by uploading your first file.
|
|
8
|
+
= link_to ficon(:plus, 'New upload'), push_type.new_asset_path, class: 'button radius success'
|
|
9
|
+
|
|
10
|
+
- else
|
|
11
|
+
%div{ ng: { controller: 'AssetListCtrl', init: "assets=#{ @assets.all.to_json }; assetUrl='#{ push_type.edit_asset_path('~id') }'" } }
|
|
12
|
+
.large-8.columns
|
|
13
|
+
%section
|
|
14
|
+
%ul.asset-list.small-block-grid-2.medium-block-grid-4
|
|
15
|
+
%li{ ng: { repeat: 'asset in assets' } }
|
|
16
|
+
%article.asset-list-item
|
|
17
|
+
%a{ ng: { href: '{{ editUrl(asset) }}' } }
|
|
18
|
+
.preview
|
|
19
|
+
%img{ alt: '{{ asset.file_name }}', ng: { src: '{{ previewthumbUrl(asset) }}' } }
|
|
20
|
+
.title {{ asset.description_or_file_name }}
|
|
21
|
+
|
|
22
|
+
.large-4.columns
|
|
23
|
+
.side-panel{ :'side-panel' => true }
|
|
24
|
+
.padded
|
|
25
|
+
.pagination-centered
|
|
26
|
+
.pagination-stats {{ assetCount() }} items - Page #{ @assets.current_page } of #{ @assets.total_pages }
|
|
27
|
+
= paginate @assets
|
|
28
|
+
.cta.text-center
|
|
29
|
+
= link_to ficon(:plus, 'New upload'), push_type.new_asset_path, class: 'button radius success'
|
|
30
|
+
- if @assets.current_page == 1
|
|
31
|
+
.asset-upload
|
|
32
|
+
.dropzone{ asset: { upload: push_type.upload_assets_path, maxfiles: 10 } }
|
|
33
|
+
.prompt Drag files to quickly upload them…
|
|
34
|
+
.icon= ficon(:upload_cloud)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
%div{ ng: { controller: 'NodeFormCtrl', init: "node=#{ @node.to_json(only: [:type, :title, :slug, :status, :published_at, :published_to], methods: [:new_record?, :published?]) }" } }
|
|
2
|
+
.large-8.columns
|
|
3
|
+
.container
|
|
4
|
+
.head
|
|
5
|
+
.left.btn= link_to ficon(:previous), @node.parent ? push_type.node_nodes_path(@node.parent) : push_type.nodes_path
|
|
6
|
+
.title= yield :title
|
|
7
|
+
.body.padded
|
|
8
|
+
.row.title
|
|
9
|
+
.columns
|
|
10
|
+
= f.label :title
|
|
11
|
+
= f.text_field :title, :'ng-model' => 'node.title', :'ng-keyup' => 'setSlug()'
|
|
12
|
+
.row.permalink
|
|
13
|
+
.columns{ ng: { class: 'permalinkVisibility()' } }
|
|
14
|
+
%span.key Permalink
|
|
15
|
+
%span.value
|
|
16
|
+
%span.show-for-medium-up http://#{ request.host_with_port }/
|
|
17
|
+
= content_tag :span, @node.parent.permalink+'/' if @node.parent
|
|
18
|
+
%span {{ node.slug }}
|
|
19
|
+
%button.button.tiny.radius.secondary{ data: { dropdown: 'slug-field' }} Edit
|
|
20
|
+
#slug-field.f-dropdown.content{ data: { dropdown: { content: true } } }
|
|
21
|
+
= f.label :slug
|
|
22
|
+
= f.text_field :slug, :'ng-model' => 'node.slug'
|
|
23
|
+
- if @node.errors.include? :slug
|
|
24
|
+
.error-icon= ficon :info, 'Error'
|
|
25
|
+
- @node.fields.each do |key, field|
|
|
26
|
+
= f.custom_field_row field
|
|
27
|
+
|
|
28
|
+
.large-4.columns
|
|
29
|
+
.side-panel{ :'side-panel' => true }
|
|
30
|
+
.padded
|
|
31
|
+
.meta-table
|
|
32
|
+
.meta-row{ ng: { class: 'publishDatesVisibility()' } }
|
|
33
|
+
.key= ficon :calendar, 'Publish'
|
|
34
|
+
.value.editable{ data: { dropdown: 'publish-date-fields' }} {{ publishedDates() }}
|
|
35
|
+
#publish-date-fields.f-dropdown.content{ data: { dropdown: { content: true } } }
|
|
36
|
+
.row.publish-date
|
|
37
|
+
.columns
|
|
38
|
+
= f.label :published_at
|
|
39
|
+
= f.datetime_select :published_at, {}, :'node-datetime' => 'published_at'
|
|
40
|
+
.row.publish-date
|
|
41
|
+
.columns
|
|
42
|
+
= f.label :published_to
|
|
43
|
+
= f.datetime_select :published_to, include_blank: true, default: nil
|
|
44
|
+
= render 'meta_table'
|
|
45
|
+
|
|
46
|
+
.submit.text-center
|
|
47
|
+
= f.hidden_field :status, value: '{{ node.status }}'
|
|
48
|
+
%button.button.radius.split{ ng: { class: 'saveButtonClass()' } }
|
|
49
|
+
= ficon :check, "{{ saveButtonText() }}"
|
|
50
|
+
%span{ data: { dropdown: 'publish-toggle', options: 'align:bottom' } }
|
|
51
|
+
%ul#publish-toggle.f-dropdown.tiny{ data: { dropdown: { content: true } } }
|
|
52
|
+
%li
|
|
53
|
+
%a{ href: '#', node: { status: 'draft' } } Save as draft
|
|
54
|
+
%li
|
|
55
|
+
%a{ href: '#', node: { status: 'published' } } Save and publish
|
|
56
|
+
|
|
57
|
+
- unless @node.new_record?
|
|
58
|
+
.delete-link
|
|
59
|
+
= link_to "Delete #{@node.type.downcase}", push_type.node_path(@node), method: 'delete', data: { confirm: { body: 'Deleted content will be moved to the trash. You can restore trashed content later.' } }
|
|
60
|
+
|
|
61
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
- if @parent
|
|
2
|
+
- if @parent.child_node_types.size == 1
|
|
3
|
+
= link_to ficon(:page_add, "New #{ @parent.child_node_types.first.humanize }"), push_type.new_node_node_path(kind: @parent.child_node_types.first), class: 'button radius success'
|
|
4
|
+
- elsif @parent.child_node_types.size > 1
|
|
5
|
+
= link_to ficon(:page_add, 'New content'), push_type.new_node_node_path(kind: @parent.child_node_types.first), class: 'button radius success dropdown', data: { dropdown: 'new-node' }
|
|
6
|
+
%ul#new-node.f-dropdown
|
|
7
|
+
- for kind in @parent.child_node_types
|
|
8
|
+
%li= link_to "New #{ kind.humanize }", push_type.new_node_node_path(kind: kind)
|
|
9
|
+
|
|
10
|
+
- else
|
|
11
|
+
- if PushType.root_node_types.size == 1
|
|
12
|
+
= link_to ficon(:page_add, "New #{ PushType.root_node_types.first.humanize }"), push_type.new_node_path(kind: PushType.root_node_types.first), class: 'button radius success'
|
|
13
|
+
- elsif PushType.root_node_types.size > 1
|
|
14
|
+
= link_to ficon(:page_add, 'New content'), push_type.new_node_path(kind: PushType.root_node_types.first), class: 'button radius success dropdown', data: { dropdown: 'new-node' }
|
|
15
|
+
%ul#new-node.f-dropdown
|
|
16
|
+
- for kind in PushType.root_node_types
|
|
17
|
+
%li= link_to "New #{ kind.humanize }", push_type.new_node_path(kind: kind)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
- title "Edit #{ @node.type }"
|
|
2
|
+
- for node in @node.ancestors.reverse
|
|
3
|
+
- breadcrumbs.add node.title, push_type.node_nodes_path(node)
|
|
4
|
+
- breadcrumbs.add @node.title, push_type.edit_node_path(@node)
|
|
5
|
+
|
|
6
|
+
= form_for @node, url: push_type.node_path(@node), builder: PushType::FormBuilder do |f|
|
|
7
|
+
= render 'form_fields', f: f
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
- title 'Content'
|
|
2
|
+
|
|
3
|
+
- if @parent
|
|
4
|
+
- for node in @parent.self_and_ancestors.reverse
|
|
5
|
+
- breadcrumbs.add node.title, push_type.node_nodes_path(node)
|
|
6
|
+
|
|
7
|
+
- if !@parent && @nodes.empty?
|
|
8
|
+
.columns
|
|
9
|
+
.empty-default
|
|
10
|
+
%h2 No content
|
|
11
|
+
%p A website without any content makes for a pretty poor user experience. Better sort this one out now and create your first page.
|
|
12
|
+
= render 'new_node_button'
|
|
13
|
+
|
|
14
|
+
- else
|
|
15
|
+
.large-8.columns
|
|
16
|
+
%section.container
|
|
17
|
+
.head
|
|
18
|
+
- if @parent
|
|
19
|
+
.left.btn= link_to ficon(:previous), @parent.root? ? push_type.nodes_path : push_type.node_nodes_path(@parent.parent)
|
|
20
|
+
.title= @parent.title
|
|
21
|
+
- else
|
|
22
|
+
.title Content
|
|
23
|
+
.body
|
|
24
|
+
- if @nodes.empty?
|
|
25
|
+
.empty-default
|
|
26
|
+
%h3 No content
|
|
27
|
+
%p There is no content in this section yet.
|
|
28
|
+
- else
|
|
29
|
+
%ul.node-list.sortable
|
|
30
|
+
- for node in @nodes.all
|
|
31
|
+
%li.node-list-item{ data: { id: node.id } }
|
|
32
|
+
= link_to push_type.edit_node_path(node) do
|
|
33
|
+
.title= node.title
|
|
34
|
+
.meta
|
|
35
|
+
%span.label.secondary.radius= node.type
|
|
36
|
+
%span.label.radius{ class: node.published? ? 'success' : 'warning' }= node.status.titlecase
|
|
37
|
+
%time Updated #{ time_ago_in_words node.updated_at } ago
|
|
38
|
+
\-
|
|
39
|
+
%span= pluralize node.child_ids.size, 'child'
|
|
40
|
+
.buttons
|
|
41
|
+
= link_to ficon(:magnifying_glass), '#'
|
|
42
|
+
- unless node.child_node_types.empty?
|
|
43
|
+
= link_to ficon(:folder), push_type.node_nodes_path(node)
|
|
44
|
+
.handle
|
|
45
|
+
|
|
46
|
+
.large-4.columns
|
|
47
|
+
.side-panel{ :'side-panel' => true }
|
|
48
|
+
.padded
|
|
49
|
+
.pagination-centered
|
|
50
|
+
.pagination-stats
|
|
51
|
+
= pluralize @nodes.total_count, 'item'
|
|
52
|
+
- unless @nodes.total_count == 0
|
|
53
|
+
\- Page #{ @nodes.current_page } of #{ @nodes.total_pages }
|
|
54
|
+
= paginate @nodes
|
|
55
|
+
.cta.text-center
|
|
56
|
+
= render 'new_node_button'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
- title "New #{ @node.type }"
|
|
2
|
+
|
|
3
|
+
- if @parent
|
|
4
|
+
- for node in @parent.self_and_ancestors.reverse
|
|
5
|
+
- breadcrumbs.add node.title, push_type.node_nodes_path(node)
|
|
6
|
+
- breadcrumbs.add yield(:title), push_type.new_node_node_path(@parent)
|
|
7
|
+
- else
|
|
8
|
+
- breadcrumbs.add yield(:title), push_type.new_node_path
|
|
9
|
+
|
|
10
|
+
= form_for @node, url: (@parent ? push_type.node_nodes_path(@parent, kind: @node.type.underscore) : push_type.nodes_path(kind: @node.type.underscore)), builder: PushType::FormBuilder do |f|
|
|
11
|
+
= render 'form_fields', f: f
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
= form_for @user, builder: PushType::FormBuilder do |f|
|
|
2
|
+
.large-8.columns
|
|
3
|
+
.container
|
|
4
|
+
.head
|
|
5
|
+
.left.btn= link_to ficon(:previous), push_type.users_path
|
|
6
|
+
.title= yield :title
|
|
7
|
+
.body.padded
|
|
8
|
+
.row.title
|
|
9
|
+
.columns
|
|
10
|
+
= f.label :name
|
|
11
|
+
= f.text_field :name
|
|
12
|
+
.row.email
|
|
13
|
+
.columns
|
|
14
|
+
= f.label :email
|
|
15
|
+
= f.email_field :email
|
|
16
|
+
- @user.fields.each do |key, field|
|
|
17
|
+
= f.custom_field_row field
|
|
18
|
+
|
|
19
|
+
.large-4.columns
|
|
20
|
+
.side-panel{ :'side-panel' => true }
|
|
21
|
+
.padded
|
|
22
|
+
.meta-table= render 'meta_table'
|
|
23
|
+
.submit.text-center
|
|
24
|
+
- if @user.new_record?
|
|
25
|
+
%button.button.success.radius= ficon :check, 'Create user'
|
|
26
|
+
- else
|
|
27
|
+
%button.button.radius= ficon :check, 'Update user'
|
|
28
|
+
.delete-link= link_to 'Delete user', push_type.user_path(@user), method: 'delete', data: { confirm: true }
|
|
29
|
+
|
|
30
|
+
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
- title 'Users'
|
|
2
|
+
|
|
3
|
+
- if @users.empty?
|
|
4
|
+
.columns
|
|
5
|
+
.empty-default
|
|
6
|
+
%h2 No users
|
|
7
|
+
%p This is weird. How are you even seeing this?
|
|
8
|
+
= link_to ficon(:plus, 'New user'), push_type.new_user_path, class: 'button radius success'
|
|
9
|
+
|
|
10
|
+
- else
|
|
11
|
+
.large-8.columns
|
|
12
|
+
%section
|
|
13
|
+
%ul.user-list.small-block-grid-1.medium-block-grid-2
|
|
14
|
+
- for user in @users.all
|
|
15
|
+
%li= render 'user', user: user
|
|
16
|
+
|
|
17
|
+
.large-4.columns
|
|
18
|
+
.side-panel{ :'side-panel' => true }
|
|
19
|
+
.padded
|
|
20
|
+
.pagination-centered
|
|
21
|
+
.pagination-stats #{ pluralize @users.total_count, 'user' } - Page #{ @users.current_page } of #{ @users.total_pages }
|
|
22
|
+
= paginate @users
|
|
23
|
+
.cta.text-center
|
|
24
|
+
= link_to ficon(:plus, 'New user'), push_type.new_user_path, class: 'button radius success'
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
|
|
2
|
+
if html_tag =~ /\<label/
|
|
3
|
+
%(<div class="error">#{ html_tag }</div>)
|
|
4
|
+
else
|
|
5
|
+
%(<div class="error">#{ html_tag }<small class="error">#{ Array(instance.error_message).join(', ') }</small></div>)
|
|
6
|
+
end.html_safe
|
|
7
|
+
end
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
PushType::Core::Engine.routes.draw do
|
|
2
|
+
|
|
3
|
+
resources :nodes, except: :show do
|
|
4
|
+
resources :nodes, only: [:index, :new, :create]
|
|
5
|
+
post 'position', on: :member
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
resources :assets, except: :show, path: 'media' do
|
|
9
|
+
post 'upload', on: :collection
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
resources :users, except: :show
|
|
13
|
+
|
|
14
|
+
root to: redirect('nodes')
|
|
15
|
+
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module PushType
|
|
2
|
+
module Admin
|
|
3
|
+
class Engine < ::Rails::Engine
|
|
4
|
+
isolate_namespace PushType
|
|
5
|
+
engine_name 'push_type_admin'
|
|
6
|
+
|
|
7
|
+
config.generators do |g|
|
|
8
|
+
g.assets false
|
|
9
|
+
g.helper false
|
|
10
|
+
g.test_framework :minitest, spec: true, fixture: false
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
config.assets.precompile += %w(push_type/admin.css push_type/admin.js)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require 'push_type_core'
|
|
2
|
+
|
|
3
|
+
require 'coffee-rails'
|
|
4
|
+
require 'sass-rails'
|
|
5
|
+
require 'haml-rails'
|
|
6
|
+
require 'foundation-rails'
|
|
7
|
+
require 'foundation-icons-sass-rails'
|
|
8
|
+
require 'jquery-rails'
|
|
9
|
+
require 'angularjs-rails'
|
|
10
|
+
require 'wysiwyg-rails'
|
|
11
|
+
require 'font-awesome-rails'
|
|
12
|
+
require 'momentjs-rails'
|
|
13
|
+
require 'turbolinks'
|
|
14
|
+
|
|
15
|
+
require 'breadcrumbs'
|
|
16
|
+
require 'kaminari'
|
|
17
|
+
|
|
18
|
+
module PushType
|
|
19
|
+
|
|
20
|
+
module Admin
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
require 'push_type/admin/engine'
|
|
25
|
+
|
|
26
|
+
require 'push_type/rails/form_builder'
|
|
27
|
+
require 'push_type/breadcrumbs/foundation'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module PushType
|
|
2
|
+
class FormBuilder < ActionView::Helpers::FormBuilder
|
|
3
|
+
|
|
4
|
+
def custom_field_row(field, &block)
|
|
5
|
+
@template.content_tag :div, class: "row #{ field.kind }" do
|
|
6
|
+
@template.content_tag :div, class: 'columns' do
|
|
7
|
+
@template.render "push_type/fields/#{ field.template }", f: self, field: field
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'push_type/admin'
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
require "test_helper"
|
|
2
|
+
|
|
3
|
+
module PushType
|
|
4
|
+
describe AssetsController do
|
|
5
|
+
|
|
6
|
+
let(:asset_attrs) { FactoryGirl.attributes_for(:asset) }
|
|
7
|
+
let(:asset) { FactoryGirl.create :asset }
|
|
8
|
+
|
|
9
|
+
describe 'GET #index' do
|
|
10
|
+
before do
|
|
11
|
+
5.times { FactoryGirl.create :asset }
|
|
12
|
+
get :index
|
|
13
|
+
end
|
|
14
|
+
it { response.must_render_template 'index' }
|
|
15
|
+
it { assigns[:assets].size.must_equal 5 }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
describe 'GET #new' do
|
|
19
|
+
before { get :new }
|
|
20
|
+
it { response.must_render_template 'new' }
|
|
21
|
+
it { assigns[:asset].must_be :new_record? }
|
|
22
|
+
it { assigns[:asset].must_be_instance_of Asset }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
describe 'POST #create' do
|
|
26
|
+
let(:action!) { post :create, asset: asset_attrs }
|
|
27
|
+
describe 'with valid asset' do
|
|
28
|
+
before { action! }
|
|
29
|
+
it { response.must_respond_with :redirect }
|
|
30
|
+
it { flash[:notice].must_be :present? }
|
|
31
|
+
end
|
|
32
|
+
describe 'asset count' do
|
|
33
|
+
it { proc { action! }.must_change 'Asset.count', 1 }
|
|
34
|
+
end
|
|
35
|
+
describe 'with in-valid asset' do
|
|
36
|
+
let(:asset_attrs) { {} }
|
|
37
|
+
before { action! }
|
|
38
|
+
it { response.must_render_template 'new' }
|
|
39
|
+
it { assigns[:asset].errors.must_be :present? }
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
describe 'GET #edit' do
|
|
44
|
+
before { get :edit, id: asset.id }
|
|
45
|
+
it { response.must_render_template 'edit' }
|
|
46
|
+
it { assigns[:asset].must_equal asset }
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
describe 'PUT #update' do
|
|
50
|
+
before { put :update, id: asset.id, asset: { description: new_description } }
|
|
51
|
+
describe 'with valid asset' do
|
|
52
|
+
let(:new_description) { 'Foo bar baz' }
|
|
53
|
+
it { response.must_respond_with :redirect }
|
|
54
|
+
it { flash[:notice].must_be :present? }
|
|
55
|
+
it { asset.reload.description.must_equal new_description }
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
describe 'DELETE #destroy' do
|
|
60
|
+
before { delete :destroy, id: asset.id }
|
|
61
|
+
it { response.must_respond_with :redirect }
|
|
62
|
+
it { flash[:notice].must_be :present? }
|
|
63
|
+
it { asset.reload.must_be :trashed? }
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
67
|
+
end
|