sunrise-cms 0.6.11 → 0.7.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/sunrise/application.js +5 -4
- data/app/assets/javascripts/sunrise/jquery.dialog.js.coffee +2 -2
- data/app/assets/stylesheets/sunrise/application.css +4 -1
- data/app/views/sunrise/manager/_header_show.html.erb +1 -1
- data/app/views/sunrise/manager/buttons/_delete.html.erb +2 -1
- data/app/views/sunrise/manager/structures/thumbs/_record.html.erb +2 -1
- data/app/views/sunrise/manager/structures/tree/_record.html.erb +1 -1
- data/app/views/sunrise/manager/table/_record.html.erb +1 -1
- data/app/views/sunrise/manager/thumbs/_record.html.erb +1 -1
- data/app/views/sunrise/shared/services.json.jbuilder +1 -1
- data/config/routes.rb +1 -1
- data/db/migrate/20120611095315_create_settings.rb +3 -3
- data/lib/generators/sunrise/install_generator.rb +2 -2
- data/lib/generators/sunrise/templates/models/active_record/asset.rb +1 -1
- data/lib/generators/sunrise/templates/models/active_record/settings.rb +9 -2
- data/lib/generators/sunrise/templates/models/active_record/structure.rb +1 -2
- data/lib/generators/sunrise/templates/models/active_record/user.rb +1 -3
- data/lib/generators/sunrise/templates/models/mongoid/settings.rb +0 -1
- data/lib/generators/sunrise/templates/models/mongoid/structure.rb +1 -1
- data/lib/generators/sunrise/templates/models/mongoid/user.rb +1 -2
- data/lib/sunrise/carrierwave/base_uploader.rb +2 -2
- data/lib/sunrise/config/model.rb +1 -1
- data/lib/sunrise/core_ext/string.rb +7 -25
- data/lib/sunrise/models/user.rb +3 -26
- data/lib/sunrise/version.rb +1 -1
- data/spec/dummy/log/test.log +22584 -0
- data/spec/dummy/public/uploads/avatar/content_rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814500-44499-6278/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814500-44499-6278/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814500-44499-6278/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814501-44499-0716/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814501-44499-0716/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814501-44499-0716/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814501-44499-6498/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814501-44499-6498/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814501-44499-6498/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814502-44499-9048/silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397814502-44499-9048/small_silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397814502-44499-9048/thumb_silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397814509-44499-4712/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814511-44499-6511/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814514-44499-0946/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814515-44499-4275/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814516-44499-7258/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814743-45062-5613/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814743-45062-5613/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814743-45062-5613/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814744-45062-2352/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814744-45062-2352/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814744-45062-2352/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814744-45062-7990/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814744-45062-7990/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814744-45062-7990/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814745-45062-4632/silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397814745-45062-4632/small_silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397814745-45062-4632/thumb_silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397814752-45062-3620/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814754-45062-7554/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814757-45062-6575/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814758-45062-2473/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397814758-45062-7698/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815061-45673-4098/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815061-45673-4098/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815061-45673-4098/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815062-45673-5873/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815062-45673-5873/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815062-45673-5873/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815062-45673-9908/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815062-45673-9908/small_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815062-45673-9908/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815063-45673-6362/silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397815063-45673-6362/small_silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397815063-45673-6362/thumb_silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/1397815070-45673-9261/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815072-45673-2350/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815075-45673-3163/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815076-45673-3745/rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/1397815077-45673-2689/rails.png +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/025a845bfc99eb99aa9690545d024974 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/02ca6949ca99936393e2992467409faf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/03bae0b322a9c8706915fdb4f8d50961 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/06632caa2dd14ba28b138446bd3d807a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/06a86d61c2e57fad1cee30584df6f969 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/07d036bf808a7ace22ce3b32701a2867 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0cc8e44f8b692c44ef509fd2d7f38941 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0d7fd69f7cbd03f1617b280bfb33677e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0e7270936d642e566d747ab335c44ec2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0f382880a507fbcedb3a83727f118f84 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0fab3bb8b5212da52c8b7e0ae428b22a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/12bbe81ebeeacdf11820f57a821789ff +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/146ce2f3522fd98d4a8a1501f16c7092 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/172c139e25cc08516d5a8c72c777dd4d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/18b64b11b8b00cc21a396da25a5ff156 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/197d8d604ec08a638b656e053944b734 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1bdb903463fe67323dbadb0f78337c70 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1beea1617441e02d76649f4b799aedac +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/20f8ac265bd1f0c57067c7a4b5c8f119 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/212fc15df4fd708ebdef5bd3be2191c1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/256dcb01e7f35659d770584fd71a85d2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/25a167c7563d6fe8ec6b13ec1ac09274 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2a6ef2448bbff5c2c3c70c141f744cf5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2dedb8177c20286c4259c1d58c5646cc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/33b9cc34fd627b9c81e63eb0faf06efb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/33bd898bccf5b0821d1d3ffa02e9d1b6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/350390c7e44df7d038254cff29468e2d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3633276e08728ac0cfea5659b4f8b516 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/37b103f4623089af1456b90830fe941c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/392239d689265304b5fe68912a8f2383 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3c396fbac68d9fb827a0f4c9d8cae3b6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/43ad0cf2497efae7114ac03a314706c5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/46e447bca92498433b2a3114106389a9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/47395ef44102932b2b9fe17a46c16601 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4c1c0c6c54ed879c4a5489eadd3a772c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4ca01587005a9b895bca383881bec87d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4cffdba2a7aac80c1765e060b152b382 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/54d68ac9b230a01a37ef415779a748da +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/55b923cfea92fd264597042a44303f0c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/56d4d696f46e9a63d0a42e11556bce11 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/56e5bd2f3c94d7a9d0da7c4e05c7ad78 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5807e61754ed8b16702f6ad7ba34d439 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5a44970074ecbfeae2cc9798ed7da7aa +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5ab8f53cba6a8bdf2c6d671491c397ce +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5e27babe25470126fbc4635dc9fe9a6a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6056bd921f3a4b6e437dab030d7fef90 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/61533733f5f9ec09571d2d5c45d5ab47 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/68c52f388e9c2401252c0bedf6247c8c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6a1e72555b75237fffccb5de8937b4d4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6a8187f5c6f2e115d1a1c21ca2ec81a0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7041d544b28bff5f26dde49d77a2e87d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/747d1d7298f227da4193f23f3932ac8e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/749bd767d6654c80265f5ca0959dc8e1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/75870e6b6fe8335a7912ca4ea859a76a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/759bbbe7d51d98664d8072e51b24744b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7a1f4a9bcb1d7d1e515330c4f5c391ad +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7ad564910e515e335bb008989a97efb7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7b55037b89f2debe558b43fe7542e409 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7ff7dd624cb7a6db5ec99af129138020 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/80870efa2a2ddb1de325c224daff5712 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/856b05d9307e97e681bc5c7f3649f714 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8766064af197b444eb1f06a6650ca9c3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/894aeaae9cc8483fa9f7a5146ff6ff6f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8a559f967fac90d4ae5a84af92c111e1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8c5ee15b5860dcf2941abd00daf001eb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8c9393d7c6a1a2b6bb1fc9a9ccaba111 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8d476275ed52a5aa897cb7eef648dbc4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/906da6ff8c06db3e472a0a10985b668c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/94826bb92d888d50a265392a81ce1286 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/956d7ea9ee52ec12759995ab47f1e780 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/974812817397ff6032b286a281d9a163 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9ba0cab624f25b68f79447e62fbc6112 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a1c0fa5689dff4e7edcc4f175f9d54bf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a43280845b1d41babd3f6714cd2d1337 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a50e247ceb9e9af32260a73eadbb65cb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a668bf13b4df6854c8c1085b26daa63a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a78a33e8cea959257da93b3e67786300 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aa4822def20c419f0e50e2a38e73a1df +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aa94554c7d6f15d3f88e9710b043c2cc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/abde9800d767ab39abc91703e5a83d70 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b25e1f0b850e73d0e1ef154249ce8135 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b4e0977feb24777fe3df7dd188b2b123 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b4e12b8782fac2f3caaa4aea2f89087c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b8c47badf85ceedb2268ef3b0f074257 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bafd6678f36ffd5fb29e4d9055df1f97 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bc4b7beed5a786619d6c3855909cb077 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bfc0fef30976427a03ddccb1ce78d6e7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c104157fd9dbe5edc61a1889af968e19 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c37e2e0969ee5b3590335141a08ed884 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c3dc3ada4560805584739bfe7c2b24d9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c4d36397803a4adf8ea86a8936b2d5f5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c8f8b0ae15c86cf8aae9e3601758435e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cbbe8f22213647e8549911f486aee9b3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cc04ce51d1e3d02a64f2781ea0876af3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cebb517859b2ed48276bf54e0ba6dcec +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d311318a280b46ab076da5c419b210ab +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d48c8e1ff1b6fcdbacf6ab08f8bde111 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d7c40ebee2fb9471bab352337570ba40 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d9390b9983c2dcadf2533a63d0f7a84c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/da055188ac218679c8fe62932c379340 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/da4488b32bd6fb75c655a077956c9034 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e0f1660d21c6375d8a36eac87ae8ccbc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e1639f86099d91eb2fede327d443906f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e25f607f69c16bc5ffb481f9606b457e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e2c4f946939f2d7d0b42d86383755cae +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e4a2ab1f3bf2d0726dff720ae88e8abc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e4f46080338c0c52e3933999a7f8106d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e59a3c2ff941e0fdc7987168580bf4cc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e5ab921ab9e413144898d780049a5c88 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e6cfe2e09e34ec2b24494a74eed5243a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e994cc6f07f643c4c230a9b740fd03f5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ec87c33887ff6c0258bd8469a77bdcb4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/eccb73ad1563f9b070c4ffdf07ffff38 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ee5a41236d43159aac87f9224a0bcfb8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f00fb03eca205b5e302d9ae7ed652817 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f24a0e7771eab5bd17ee05c73c56649e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f2de4855fd4840abb2f6e80afee5f4ed +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f475ab32c44efa173bf8ba75435d2570 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f5165c4d7cee0e7cb99bc069fd4c09b9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f53b02f1d2cbab753c7931e700469bed +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f5cf5c65e6bf2039363f3b1e09bcdc9c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f975cba8c490022ddfc45bab0b512879 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fba4eeb0b33c40737a907a18ee0770a4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fbe8d6803f3e5a9ccb6eb7a285b95ee0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fd7e46e0b42a510b40f17d1f1bacf80e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fd9e24b6acf76f9d44cc8e26d3148e39 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fe03e8232ec516da863efecd7bb2678b +0 -0
- data/spec/generators/install_generator_spec.rb +1 -1
- data/spec/models/user_spec.rb +0 -8
- data/spec/requests/manager/default/update_spec.rb +1 -1
- metadata +415 -42
- data/lib/sunrise/core_ext/array.rb +0 -22
- data/lib/sunrise/models/settings.rb +0 -144
- data/vendor/assets/stylesheets/smoothness/jquery-ui-1.8.16.custom.css +0 -568
@@ -1,6 +1,10 @@
|
|
1
1
|
//= require jquery
|
2
2
|
//= require jquery_ujs
|
3
|
-
|
3
|
+
|
4
|
+
//= require jquery.ui.sortable
|
5
|
+
//= require jquery.ui.datepicker
|
6
|
+
//= require datepicker/jquery.ui.datepicker-uk
|
7
|
+
//= require datepicker/jquery.ui.datepicker-ru
|
4
8
|
|
5
9
|
//= require sunrise/jquery.tmpl.min
|
6
10
|
//= require sunrise/jquery.cookie
|
@@ -8,9 +12,6 @@
|
|
8
12
|
//= require sunrise/chosen.jquery
|
9
13
|
//= require sunrise/chosen.overflow.fix
|
10
14
|
|
11
|
-
//= require datepicker/jquery.ui.datepicker-uk
|
12
|
-
//= require datepicker/jquery.ui.datepicker-ru
|
13
|
-
|
14
15
|
//= require sunrise/jquery.editable
|
15
16
|
//= require sunrise/jquery.dialog
|
16
17
|
//= require sunrise/jquery.tooltip
|
@@ -101,9 +101,9 @@ class SortDialog extends Dialog
|
|
101
101
|
$('.sort-item').each (index) ->
|
102
102
|
items['ids[' + $(this).data('record-id') + ']'] = index + 1
|
103
103
|
|
104
|
-
$.ajax
|
104
|
+
$.rails.ajax
|
105
105
|
url: @element.data 'url'
|
106
|
-
|
106
|
+
type: 'POST'
|
107
107
|
data: items
|
108
108
|
success: ->
|
109
109
|
klass.hide()
|
@@ -7,6 +7,9 @@
|
|
7
7
|
*= require sunrise/customize.css
|
8
8
|
*= require sunrise/plugins.css
|
9
9
|
*= require sunrise/chosen.css
|
10
|
-
*= require smoothness/jquery-ui-1.8.16.custom.css
|
11
10
|
*= require uploader/application
|
11
|
+
|
12
|
+
*= require jquery.ui.core
|
13
|
+
*= require jquery.ui.theme
|
14
|
+
*= require jquery.ui.datepicker
|
12
15
|
*/
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<div class="but-holder">
|
2
2
|
<div class="act-but">
|
3
|
-
<%= link_to image_tag('sunrise/empty.gif'), mass_destroy_path, :class => 'but-container del disabled', :title => 'Delete',
|
3
|
+
<%= link_to image_tag('sunrise/empty.gif'), mass_destroy_path, :class => 'but-container del disabled', :title => 'Delete',
|
4
|
+
:data => { :confirm => t('manage.confirm_mass_delete'), :editable => 'destroy'} %>
|
4
5
|
</div>
|
5
6
|
</div>
|
@@ -21,7 +21,8 @@
|
|
21
21
|
<div class="but-block" style="display: none">
|
22
22
|
<div class="act-but">
|
23
23
|
<%= link_to image_tag('sunrise/empty.gif'), delete_path(abstract_model.parent_hash.merge(:id => record.id)),
|
24
|
-
:method=>:delete, :confirm=>t("manage.confirm_delete"), :class=>"but-container del",
|
24
|
+
:method=>:delete, :data => {:confirm=>t("manage.confirm_delete")}, :class=>"but-container del",
|
25
|
+
:id => dom_id(record, :delete) if can?(:delete, record, :context => :sunrise) %>
|
25
26
|
</div>
|
26
27
|
|
27
28
|
<div class="act-but">
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<% else %>
|
10
10
|
<%= link_to '', edit_path(abstract_model.parent_hash.merge(:id => record.id)), :class => "btn_edit", :id => dom_id(record, :edit) if can?(:edit, record, :context => :sunrise) %>
|
11
11
|
|
12
|
-
<%= link_to '', delete_path(abstract_model.parent_hash.merge(:id => record.id)), :method => :delete, :confirm => t("manage.confirm_delete"), :class => "btn_del", :id => dom_id(record, :delete) if can?(:delete, record, :context => :sunrise) %>
|
12
|
+
<%= link_to '', delete_path(abstract_model.parent_hash.merge(:id => record.id)), :method => :delete, :data => { :confirm => t("manage.confirm_delete")}, :class => "btn_del", :id => dom_id(record, :delete) if can?(:delete, record, :context => :sunrise) %>
|
13
13
|
<% end %>
|
14
14
|
|
15
15
|
<a href="#" class="dnd_link"></a>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<div class="act-but">
|
13
13
|
<%= link_to image_tag('sunrise/empty.gif'), delete_path(abstract_model.parent_hash.merge(:id => record.id)),
|
14
14
|
:method=>:delete,
|
15
|
-
:confirm=>t("manage.confirm_delete"),
|
15
|
+
:data => { :confirm => t("manage.confirm_delete") },
|
16
16
|
:class=>"but-container del",
|
17
17
|
:id => dom_id(record, :delete) if can?(:delete, record, :context => :sunrise)%>
|
18
18
|
</div>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<div class="act-but">
|
26
26
|
<%= link_to image_tag('sunrise/empty.gif'), delete_path(abstract_model.parent_hash.merge(:id => record.id)),
|
27
27
|
:method=>:delete,
|
28
|
-
:confirm=>t("manage.confirm_delete"),
|
28
|
+
:data => {:confirm => t("manage.confirm_delete") },
|
29
29
|
:class=>"but-container del",
|
30
30
|
:id => dom_id(record, :delete) if can?(:delete, record, :context => :sunrise) %>
|
31
31
|
</div>
|
data/config/routes.rb
CHANGED
@@ -18,7 +18,7 @@ Sunrise::Engine.routes.draw do
|
|
18
18
|
scope ":id" do
|
19
19
|
get "/", :to => :show, :as => "show"
|
20
20
|
get "/edit", :to => :edit, :as => "edit"
|
21
|
-
|
21
|
+
patch "/edit", :to => :update, :as => "update"
|
22
22
|
get "/delete", :to => :delete, :as => "delete"
|
23
23
|
delete "/delete", :to => :destroy, :as => "destroy"
|
24
24
|
end
|
@@ -3,12 +3,12 @@ class CreateSettings < ActiveRecord::Migration
|
|
3
3
|
create_table(:settings) do |t|
|
4
4
|
t.string :var, :limit => 50, :null => false
|
5
5
|
t.text :value
|
6
|
-
t.integer :
|
7
|
-
t.string :
|
6
|
+
t.integer :thing_id
|
7
|
+
t.string :thing_type, :limit => 30
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
10
|
|
11
|
-
add_index :settings, [:
|
11
|
+
add_index :settings, [:thing_type, :thing_id, :var], :unique => true
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.down
|
@@ -33,7 +33,7 @@ module Sunrise
|
|
33
33
|
# copy models
|
34
34
|
def copy_models
|
35
35
|
directory "models/#{orm}", "app/models/defaults"
|
36
|
-
directory "models/sunrise", "app/
|
36
|
+
directory "models/sunrise", "app/sunrise"
|
37
37
|
end
|
38
38
|
|
39
39
|
# Add devise routes
|
@@ -48,7 +48,7 @@ module Sunrise
|
|
48
48
|
log :autoload_paths, "models/defaults"
|
49
49
|
sentinel = /\.autoload_paths\s+\+=\s+\%W\(\#\{config\.root\}\/extras\)\s*$/
|
50
50
|
|
51
|
-
code = 'config.autoload_paths += %W(#{config.root}/app/models/defaults #{config.root}/app/
|
51
|
+
code = 'config.autoload_paths += %W(#{config.root}/app/models/defaults #{config.root}/app/sunrise)'
|
52
52
|
|
53
53
|
in_root do
|
54
54
|
inject_into_file 'config/application.rb', " #{code}\n", { :after => sentinel, :verbose => false }
|
@@ -1,6 +1,13 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require "rails-settings-cached"
|
2
|
+
|
3
|
+
class Settings < RailsSettings::CachedSettings
|
3
4
|
include PublicActivity::Model
|
4
5
|
|
5
6
|
tracked owner: ->(controller, model) { controller.try(:current_user) }
|
7
|
+
|
8
|
+
def self.update_attributes(attributes)
|
9
|
+
attributes.each do |key, value|
|
10
|
+
self[key] = value
|
11
|
+
end
|
12
|
+
end
|
6
13
|
end
|
@@ -3,8 +3,7 @@ class Structure < ActiveRecord::Base
|
|
3
3
|
include PageParts::Extension
|
4
4
|
include MetaManager::Taggable
|
5
5
|
include PublicActivity::Model
|
6
|
-
include ActiveModel::ForbiddenAttributesProtection
|
7
6
|
|
8
7
|
tracked owner: ->(controller, model) { controller.try(:current_user) }
|
9
|
-
|
8
|
+
page_parts :content
|
10
9
|
end
|
@@ -1,12 +1,10 @@
|
|
1
1
|
class User < ActiveRecord::Base
|
2
2
|
include Sunrise::Models::User
|
3
3
|
include PublicActivity::Model
|
4
|
-
include ActiveModel::ForbiddenAttributesProtection
|
5
4
|
|
6
5
|
# Include default devise modules.
|
7
6
|
devise :database_authenticatable, :confirmable, :lockable, :timeoutable,
|
8
|
-
:recoverable, :rememberable, :trackable, :validatable
|
9
|
-
:encryptable, :encryptor => :sha512
|
7
|
+
:recoverable, :rememberable, :trackable, :validatable
|
10
8
|
|
11
9
|
fileuploads :avatar
|
12
10
|
|
@@ -48,8 +48,7 @@ class User
|
|
48
48
|
|
49
49
|
# Include default devise modules.
|
50
50
|
devise :database_authenticatable, :confirmable, :lockable, :timeoutable,
|
51
|
-
:recoverable, :rememberable, :trackable, :validatable
|
52
|
-
:encryptable, :encryptor => :sha512
|
51
|
+
:recoverable, :rememberable, :trackable, :validatable
|
53
52
|
|
54
53
|
fileuploads :avatar
|
55
54
|
|
@@ -91,8 +91,8 @@ module Sunrise
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def image?(new_file = nil)
|
94
|
-
|
95
|
-
|
94
|
+
_type = (file || new_file).content_type
|
95
|
+
_type.include?('image') && !['photoshop', 'psd'].any? {|p| _type.include?(p) }
|
96
96
|
end
|
97
97
|
|
98
98
|
def dimensions
|
data/lib/sunrise/config/model.rb
CHANGED
@@ -16,7 +16,7 @@ module Sunrise
|
|
16
16
|
end
|
17
17
|
|
18
18
|
register_instance_option(:label) do
|
19
|
-
(@label ||= {})[::I18n.locale] ||= abstract_model.model.model_name.human(:default => abstract_model.model.model_name.
|
19
|
+
(@label ||= {})[::I18n.locale] ||= abstract_model.model.model_name.human(:default => abstract_model.model.model_name.to_s.underscore.humanize)
|
20
20
|
end
|
21
21
|
|
22
22
|
# The display for a model instance (i.e. a single database record).
|
@@ -1,30 +1,12 @@
|
|
1
1
|
require 'active_support/inflector/inflections'
|
2
2
|
|
3
3
|
class String
|
4
|
-
def
|
5
|
-
|
6
|
-
end
|
7
|
-
|
8
|
-
def no_html
|
9
|
-
str = self.dup
|
10
|
-
str.gsub!(/<\/?[^>]*>/, '')
|
11
|
-
str.strip!
|
12
|
-
str.gsub!(' ', '')
|
13
|
-
str
|
14
|
-
end
|
15
|
-
|
16
|
-
def words_count
|
17
|
-
frequencies = Hash.new(0)
|
18
|
-
downcase.scan(/(\w+([-'.]\w+)*)/) { |word, ignore| frequencies[word] += 1 }
|
19
|
-
return frequencies
|
20
|
-
end
|
21
|
-
|
22
|
-
def parameterize(sep = '-')
|
23
|
-
value = Sunrise::Utils::Transliteration.transliterate(self)
|
4
|
+
def parameterize(sep = '-')
|
5
|
+
value = Sunrise::Utils::Transliteration.transliterate(self)
|
24
6
|
ActiveSupport::Inflector.parameterize(value, sep)
|
25
7
|
end
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
8
|
+
|
9
|
+
def self.randomize(length = 8)
|
10
|
+
Array.new(length) { (rand(122-97) + 97).chr }.join
|
11
|
+
end
|
12
|
+
end
|
data/lib/sunrise/models/user.rb
CHANGED
@@ -14,10 +14,9 @@ module Sunrise
|
|
14
14
|
|
15
15
|
has_one :avatar, :as => :assetable, :dependent => :destroy, :autosave => true
|
16
16
|
|
17
|
-
|
18
|
-
before_validation :set_default_role, :if => :role_empty?
|
17
|
+
after_initialize :set_default_role
|
19
18
|
|
20
|
-
|
19
|
+
validates :name, :presence => true
|
21
20
|
validate :check_role
|
22
21
|
|
23
22
|
scope :with_email, lambda {|email| where(:email => email) }
|
@@ -64,10 +63,6 @@ module Sunrise
|
|
64
63
|
def role_empty?
|
65
64
|
self.role_type_id.nil?
|
66
65
|
end
|
67
|
-
|
68
|
-
def has_login?
|
69
|
-
respond_to?(:login)
|
70
|
-
end
|
71
66
|
|
72
67
|
def role_symbols
|
73
68
|
[role_type.try(:code)]
|
@@ -79,34 +74,16 @@ module Sunrise
|
|
79
74
|
|
80
75
|
def state
|
81
76
|
return 'active' if active_for_authentication?
|
82
|
-
return '
|
77
|
+
return 'confirm' unless confirmed?
|
83
78
|
return 'suspend' if access_locked?
|
84
79
|
return 'pending'
|
85
80
|
end
|
86
81
|
|
87
|
-
def events_for_current_state
|
88
|
-
events = []
|
89
|
-
events << 'activate' unless confirmed?
|
90
|
-
events << 'unlock' if access_locked?
|
91
|
-
# TODO: ban access for active users
|
92
|
-
# events << 'suspend' if active_for_authentication?
|
93
|
-
events
|
94
|
-
end
|
95
|
-
|
96
82
|
protected
|
97
83
|
|
98
84
|
def set_default_role
|
99
85
|
self.role_type ||= ::RoleType.default
|
100
86
|
end
|
101
|
-
|
102
|
-
def generate_login
|
103
|
-
self.login ||= begin
|
104
|
-
unless email.blank?
|
105
|
-
tmp_login = email.split('@').first
|
106
|
-
tmp_login.parameterize.downcase.gsub(/[^A-Za-z0-9-]+/, '-').gsub(/-+/, '-')
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
87
|
|
111
88
|
def check_role
|
112
89
|
errors.add(:role_type_id, :invalid) unless ::RoleType.legal?(role_type_id)
|
data/lib/sunrise/version.rb
CHANGED