templus_models 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 +3 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/raro_crud.js +95 -0
- data/app/controllers/crud_controller.rb +148 -0
- data/app/helpers/crud_helper.rb +169 -0
- data/app/helpers/search_helper.rb +241 -0
- data/app/raro_crud/raro_crud.rb +274 -0
- data/app/views/crud/_crud_template.html.erb +35 -0
- data/app/views/crud/_edit.html.erb +1 -0
- data/app/views/crud/_form.html.erb +68 -0
- data/app/views/crud/_links.html.erb +0 -0
- data/app/views/crud/_new.html.erb +1 -0
- data/app/views/crud/_record.html.erb +51 -0
- data/app/views/crud/_records.html.erb +24 -0
- data/app/views/crud/_scopes.html.erb +18 -0
- data/app/views/crud/_search.html.erb +20 -0
- data/app/views/crud/_show.html.erb +60 -0
- data/app/views/crud/create.js.erb +13 -0
- data/app/views/crud/edit.html.erb +8 -0
- data/app/views/crud/index.html.erb +7 -0
- data/app/views/crud/new.html.erb +10 -0
- data/app/views/crud/show.html.erb +8 -0
- data/app/views/layouts/_menu_crud.html.erb +8 -0
- data/app/views/layouts/_template_raro_crud.html.erb +73 -0
- data/app/views/tabelas/_precos.html.erb +0 -0
- data/config/initializers/raro_search.rb +17 -0
- data/config/initializers/simple_form.rb +173 -0
- data/config/routes.rb +13 -0
- data/lib/generators/crud/USAGE +8 -0
- data/lib/generators/crud/crud_generator.rb +10 -0
- data/lib/generators/crud/templates/crud.rb +52 -0
- data/lib/generators/crud/templates/crud2.rb +58 -0
- data/lib/tasks/templus_models_tasks.rake +4 -0
- data/lib/templus_models.rb +9 -0
- data/lib/templus_models/engine.rb +4 -0
- data/lib/templus_models/version.rb +3 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +14 -0
- data/test/dummy/app/assets/javascripts/crud/alert1.js +1 -0
- data/test/dummy/app/assets/javascripts/crud/alert2.js +1 -0
- data/test/dummy/app/assets/javascripts/jquery/jquery-2.1.1.js +4 -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/ability.rb +35 -0
- data/test/dummy/app/models/teste.rb +9 -0
- data/test/dummy/app/models/teste1.rb +5 -0
- data/test/dummy/app/raro_crud/#{file_name}_crud.rb +0 -0
- data/test/dummy/app/raro_crud/pessoa_crud.rb +50 -0
- data/test/dummy/app/raro_crud/teste1_crud.rb +14 -0
- data/test/dummy/app/raro_crud/teste_crud.rb +58 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -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.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +39 -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/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 +56 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150415214253_create_testes.rb +9 -0
- data/test/dummy/db/migrate/20150416220930_create_teste1s.rb +10 -0
- data/test/dummy/db/schema.rb +31 -0
- data/test/dummy/log/development.log +11980 -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/test/fixtures/teste1s.yml +7 -0
- data/test/dummy/test/fixtures/testes.yml +7 -0
- data/test/dummy/test/models/teste1_test.rb +7 -0
- data/test/dummy/test/models/teste_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/-0RkuYMXJCukyo6fA0YmSXUwMd47QpzpUhQatZpEqkY.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/-AtorCA2iqgAMYxvH7W0eRa0fsPWw_adQ1E2a4T-ncs.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/-MzeH9Nm-DG1fsBzYAO6iyo-dqHmHQD5JQiC725Whko.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/-fEzfBEg4v147_Xfhlzq6AcSNGSYcxiMFDcZiY__4qg.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/-raUXfOtrQirgvak5TOJHfEFDLcORHoJWFVSkL2kFLQ.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/-rj6TLs6ScHy9rBVR1FtAG7sMhFwBhL-h_ql0-fjoO8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/00RruQPZ9NMEjxmmNLv-brb7Dz3JIcMmqznNLCV_eBg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/0zYv6B2AICV6CQqG9xsbhg0q0zgBEqHmqYT_oM2t63c.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/2R9HI_ug87lStS_VoW5EAjaLi9vK_6V7QD6kCsr8i0M.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/2WJz14KMpvhFJIFov0mbMmTKFGtCLEC36x7lVjzq87U.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/2WRAXn1FZWe_1EQTP6dnelRkMOSABdpw4I1BgWO87UE.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/2_CA3YFYuY8rjSK2fn5wiT8aepkp6YGqTYOjRurC220.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/3PB0fIDBf8wgB_W12ygFqvjqAlXcuHtoolp3A2Qcdsw.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/3plMbIHZMFJHbJTBWe2g7SenboxXqlxzU8aI900m22E.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/3s3k0T7lXZyr84Rkm9J_VXqLwYW_I4_hXj7FOH-zfLM.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/4B-h9SsGXeh2w8VQGniJjUysS2w7rO8I5c5JSUzp08o.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/4COj5bJqFYUkKXUEQ47_DmXTi6Ac8IsStYYK5lo9LWc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/4Jm4uat5-HtEtboNSBYcPmZcwKBKYzcBa_DasUL3qNY.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/4rTGqQYT_JbF0LetrygDgyPCH9is1SatjEQe-8k78so.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/50IW238EtzEH5989d0XdN803CNIGp1InvXlIAU1HM40.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/5s_bVndzZYo6nm7AZyOJxU4x3kvhcKsyqIKfcC_2Iu0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6HYdSeJp0z3vfKTcO-NmYDcSJGsWpIRKiUQTx4wz4hE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6QgJZL40nTelMwpeat779Ykv-8Dth_sdqaRfkrNDhiI.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6RfXmG9hCd6ds3txAlhE3SWj0j606PtQi64RPEM-TcA.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6em5auU0KgFUqVS55AUI5FFNo1Yall5joJNTPh6cREM.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6kJYp3x1cBZDpDSd_3XEOz6ifWEwKOE3Gb5z5Zoxt84.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/74SkyQLF_kk_zAkQfJT0erg9zkZ6Fofeu05Fexi2a5w.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/751lrK8ccX2v0VkMqF0nY6eMMFzmjQ0l3vatKsjPoG0.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/7Gyv818zzArjMYxSFo6BCf-PRW6AYStsOd4xLRmF8hU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/7qXrvz_aUAoXT6FIX0DxsF9CTccT5fksyglG-DHDMfI.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/85H49xavK_2TtUGG0BAapvIqdyry4-7eH0f99YabgSc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/8a2Q3fVjuE3Z7z0R5agncr869C89Cummxep05-u4UWw.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/9AVKXW1Jc3ILufGozaIo5yvFLEaPS_zAwfHbO__usIs.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/9WjO6_wu3g8yBTUfXWpOlu6yDNz-nACKkeuVxV7TSuo.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/9oqzZU1KzLnwoLPfmeAx8oMfMdXsnZpq-jZB5-rNYqQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ALbGYuKATYSyElK_JYkccwgBRS3Lx61h74toN1jliI0.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/A_Q5nO455RK-6h7qFBGx6NtGhbVJORpYvJ4RZs8RaeM.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/AdReWx5s_03lXymktcB3CMl6CTKFus2HTcOJvGhdCUw.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/B0rzMLMi8Ci8Q47RmCw4vHizwKPwIAeNjvGEb2qJbzg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/B6oh0lsvUcgddWUpcJhGWeson5WKq9oXNm--8MbrOWs.cache +6 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/BBUbO6W8N9-HtTfZjgASnsqBUePYt3-1RHFFp8u0u5U.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/BGf7Y0SyTPz9Ydt8hwJRXQ4EroI1gI107ukxlevk5Z8.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/BvU-skW8wL4KmDFzH8XT1gUWXo07dmQ0FoB8M_8bofA.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/CUl-GCrcAiBnZAR6OPR1vtmvZvPqWWAdLZMfIPZJYb0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/CceiAev4oDf3En1JQCOEbxL3h03YbKFxFDc0hV8KUgw.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/CfAlr2nebJ3Kl-Lcydx5d7Yv6iRRelwdfXmVCp27BEY.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/CyLoGmEoSwmAeobjNGvGhebq_-s3ejljxrVV6czKqSU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/DF6ikykd1zv_eO5SEGyMxuxwd7mBtZNnk1kojMCscA0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/DMuQdFrhOQ6urUFtNTl6rJJqcaNloLms8jg1Tf5pUhY.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/EdhOx5YJzUYE7Ys67yOzg04iV1LoIkN2C3J-V6Kd7kA.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Eoz00hNTX8KygNr0aVpIEbh34MSEDX5m7ZqR8Lad9OE.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/EvmXBcpSJlMPk0SMVRVNxX3HOkhFyF-hmBynvhH407Q.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ExITjXq3B3I4D2iPC9-7bWBMQMG067_pNyr51yzERWg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/FuxdU4c7Xc6cHVNpEbfk4KCJYp6NKj1jD1LvHQr87G0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/G1BmAqwKmBzIzvmqHrnas7bseYPySeYy_kKQUCudyRI.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/GtlaUxUQN9roRptWCK4bcibWSGXX8YZOUL7rv6A3bMs.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/HM5akuFqjvooR5YQPelVy9Gp2DEIXBhbCtXtEJe_Gw4.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/HVGc6yBzGqr8JZ9wVVx9DwuAoB62xqX5o7-7GF8_D2k.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Hp2z2qsfAtIig0amAkDdPBx8YTqC3eI6i13chZgIP84.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/I3WA6ZiWG-zuR5mSSRisBfw157kRwx6rq6lCw0GvJuc.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/JS4ML3ziOZ-0gHe13rM5fwAREuPNrJ-gZFjO3srZStk.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/JXCGqqJsYbeS4osNafEUotYV8g2yH-okmlCShN2_skY.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/K7qFaWBvn05qTKLldfHX3OEFRM776XCtH2oKNpbwkVE.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/KEZbyOpyYalySpkvic4ZC-V30PpSmlS7hlnkzTIVzcI.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/LPXp9MfnAoNxpQnHzcYEg5vRityYS8YU3catMirmhE4.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Lz31lhNAZRtljaFrKzzDxo9anoBL4UXf0b6qSu3ixOg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/MAV4GtRsTNuMa7mh-FRGi2wL9z9semz4ipA-taBAp4w.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/N25GQGIWXDow0UJUDlGjYFTg8_UB925vu960hWdxlSg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/N2Kc4daD17uXszWGiTWCpGWU7uIclgJ1QRaAdY5Zg1M.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/NFE5HSRPELMk2JjUOBW48fPksAlUV8kIVYmdAeSryl0.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/NkWwgnvgSUOGryPKuNnkQb37Udk1rbSi61oM7hFbS-0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/NzbuktItre-lQg5qhPHMdUL0ZwJLhELLqjL7Ak6yoE8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/O3U8kR_sGWfEYOfQtUzA9R7yWGaQeHdWnTMBtHOCqK0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/OPYstxXigozf6p1NcN6nFnBUONF9Crz_2Xe3N4N4-tk.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/P2fhx18EfM52CRdcUcVblqJ3-2-kPkAqnOJfuBgNUxw.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/PHuB8XHtS6zagW6bl1nAke04twK5oE_0P7MdUnhrp7A.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/PhQ3QEw8R2R0F2G7n62dm5Nj10IhS_GSAIG82MvXc7c.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Po2LrqIRsW1B-1hA6ydI-Rt_mpx2pXBac66EN2hhshA.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Pv_TicOezYHAqPrhipb0dtidBfvIzfu-rjKFTW3yl1I.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/QJefgE9eLObDoOA71vu5TV8kqFobztSkhB_mw7H4_-Q.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/QcXaJ4--BWzhpQD7doOhC-SygbDl5oyf-HOuVprksh4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/QogVK7Zl4bvRfOdAM7ZsEkUgbV84BW22FN5WPi1Jhm0.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/R5HsD0POG0xexSuYEwLy2ad0x3hBHFusyes1eRU0N6Y.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RAlAgkJK39zk8mrzAiedu6RIgni7Ca95CDYewbIyqyU.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RlHMp3gZ1aRTediB9KIBC-JNz3IXwShkqClSTt4gH7Q.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RrimogpCYT4gLOhSxEP23MTWQKLes2NFZauoPVBKoh0.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Run9n7a73bx1qzBABFw705w_RTLh2hDFRZ1pxxX5A9k.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RwKuSDjm7JYYkbvfOLdCGgzeIqDJw8UkcJXHv-PCaw8.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/S1P584VolTNZh4Ih05tAW__rYq64a1bPJy4Ku_MekC8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/S8qr6hNqBkDfzk_M783TIbmCgtyDIA6x9uW5TONaP-w.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/SJ3EEmIti8GPIgc0WexzzMn6kEEZ0t9kpzifJsADKVk.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/SNJD-4NH0aXPJecBz7iofpNPHR217ufNeftApCooPjg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/SUgEmzuKRgYzQPBAVtWz-hBg99Riz9wLvi6aHWnDEwQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/SfnKk1dQvf8qIKaCdUsVa2cjOtgM_Xj6NQcYfy80Ck0.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Sxj5zwmBihDy8UhTHtImyrN1_KKkcla1d7JDVKuYip4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/T-2u3VedKGzdLVQKVEWEPTlTfZp5VNvqcVJES9esUiQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/TCXLy1tuwOhuK--MGtxXQFDTVo0EzGWm7SmJL2DebN8.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/UCn-O-RZ6clYhkVyWgHMWglyAPFouB_VaQVDJrL9Z88.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/UD5VPXqQzQVdXxBKbHriF6JCw8Qb9i7UE69lCXVN2OI.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/UKKkjAe9vIzKz6qCsd0eyqIvSip6qtm9-YQbKZ-ze1Q.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/V39AXCaEZmT-kOlIoZiCD0AyP1s7Xu7p94qQYQAt2s8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/VJtHFSLCtAMr7n-S0iAcXJuEeWLSGWr6HHdKJ_BbQpc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/VkKNjTO7kyAVClPp7bsHvVeLtvERoW59_A7Uo6lktlY.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/WIXMTWvd2zBvQTEEpe9iJeFWW3lknQM0WLaB9LxMfg4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/WNYt-1VbjD4C9NEaYRJP1zlEmVzYt0ZIDESu5IcpMTU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/WX9tkL5_hG-PV_IQFjT26XsvSWhf85ZXv0nK2tBarGM.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/XB4hg9UPbd45TylzMYymCymRnR7JxkQMpfCkeOT-3j0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/XQ4aIm-_RQNLlv_p-dZByJg8jsTS6LZs6lFARh-xWt0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/XikcGw0VNsR9odl0TNFSH11KSaRXARhXT-Ikb44Kr6o.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Xu95SO3OK8xHiuD7VNZIsN5kLyB7ZLoOaSppRnpa2L8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/YJFZ_DgaJy6oEgEbRNYq_xbT5hg7Eu1h3WM5JPo7rdY.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/YxDHUFE7wdRHeXKHLDmwSwz4fl9RkdIDtzeS8cnAyIE.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Z6u7GBxS_lJQoT58OLOlQ45pyYfRR9Cv3hTyfbLYbjw.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/_E5NnnUabpFFzkAQQ0RUiN4_5tRCHxdzu1_My4tw6IE.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/_tyOMUndB2DVeq9nwU8pRQ39CkAU8lLzlFSrMNf_S3s.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/a1AuugcwlWVX_ZnsaPnA4nvs_I74k_1BrwyftiVO7a4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ar7XJXwMY_jRPYT6bfHpiMHlM8I4blvXzDgIZ50aMoE.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/b-4ZOkjwvbGyC48dHtxES-yjISuUiqX-MPIZBgVu4iA.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bLSqdfBxS0hG8iE9YGbz6XcdnT76l3bqqbH1j-8VYMs.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bM42Ou_AvvRvhSpuZqF7sPrYdGg-8tuEwQ14R4YpJDQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bO3GaNycaPsLp3vX0Bgw7LYjlecep0FefE2Wsg2LH6o.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bmIthijT-qXHXtpDdnJPqADbj3aN2WcF-niJo-CW6kc.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bslCOFLEjB4LrqrjRzN4iOo3XJzXCUgaZRWI21lyOcI.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/cei-NTbQTYBnfaLXMg7W6WJtPBQXucHzybQzztHfPek.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/d6lfgb9qmUmGi5Ky9sB1L0FXLN_zXO8y-0eDtIMPmI0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/dVz07HiNkWxAeWuyadttjZ8gjJERJ4-RVt2kfFnPza4.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/dlTvwgYuIwoWEZGMoujEUgkC4BpMgcX27kQjRdUgHuc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/e1WZZp0R9rj2aqI4sqtaPoR6rPwIcIhLCDZW6RJSKjY.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/enSxWB88Tfl_5rIdKRRR658oDujh_E7di20GL-1ZIS0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/f0dWb4ayOVY6BW4NdPUh_ZBZDm31umoKULCxP7JsSeQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/f8kJ7icPeFCN4AhIHCJUkizUReVZI4BJH4IUfaixE2w.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/fG3BvTkCrakUd3CVBYY8kHi1A8Yv2lcvbLtUmAVlCoY.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/fP_fEndiX1YdfVxwuEQsbk2nFv5nvBIY2eVVrLbAVfk.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/fk6VEJiGQHxr9GVfpsjW5O8eixvxYj6LMFxzQrh6Xkk.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/frnU1s3KmCm5DwyiZk1bFaApN7XgeMPSviilEaAqTig.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/fvlVm0klEuWZekWgCSvDLOGw9peTpqOIwmACHsSwtL4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/gKpBPMi-T0qbsZWmO2mEuO1rR1tnI67HkR7fV5-MiKU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ggkncbfz1SC-5i7rp2QXjHn-SPQYv-c2oaJTP4kl3-Q.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/gyxR-VFHc3_dn9O9lS5SqQK_DXawjrt4H8PMI2hV-So.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/i8KeXclJwkLX6gr6Vr6L_wdN1c429kOOUakNGccYIWs.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/iJxOOx5Xnu8h5BXQzcUgfZlrfKPN9k-Q8dy3EwIg2Dk.cache +6 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/iUBSNc-5E5E4cN6X25OxX6APuzCtcxlfYazpNqhcQFU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/i_me0DwVwcfHchaKe9FFKjwORU_G61cz1heJSHNC4i4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/isPH7sBbG8wW0XpIU8w2JiRFzKmqpb0B3PtfjY-Fju4.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/j10VJq1uwquWfiehjlw7kyrv_W-Gui-hrZFhaPVbzI0.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jHE2MSq7IKoXNMSSFB-DwZ8aKQvd-R4CPVH7K0q27_k.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jRxj7keJ-TAUqhgV0FvFYkM-p6pXRilTBNt7Xh1VX_E.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jtifSOVyGP_LNOAtPAUbEWNhcPQpnWTVp7lvyMvOnLc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jyvcPE97vy_b-82NOzpqEX5jeTagB1kN4W1Wp45i4uk.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/lAsroOrUZ4A2g90xX5jCzdRCYREw6VKOj0xBIJYMiGY.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/lDe8sNEstNhniLIjHzYf_vHQjlEQV4qH-REZVOMOjFc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/laBJzx_b6JUB8MPLlFlxbgN_xkef7mGv0WN4tQIO2cg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/m4ZJqBa8y36aVwf3N0mF0-3RtnYRQCfqbGQJe-Lc_5g.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/mYMDaxAPAJM8ErG8TXvZQxol46eqK3AV3CQ8G8V-b4M.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/mxschIrqaPr6xevnPQT5ef8ZeaIgUSQ0RADbaMREQEA.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/nJboFt8klA4zcXScAuBNJoSmGktbcif8nSSeWpLUEMk.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/nOYKNZpj5-0kIhxeV40X6DsgyL8S66Ahhg66h2JBKG8.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/nPoU98hJn_xwYkQDLg-VGhLzDs24XLcwgcX65MBQE5c.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ntqZkzoIE68aMjuc0yp-tmVqAc_-5xq69ePuaKaQOso.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/nuc0ksGFSHVwsH9Sqi7WP_LJbqW_IjT6_XkDrdX3MjE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/o0W3V7MDQHortA5GOSC6ii4M6sUqp5lzzGlW7DrNHsQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/o4N2GkOe3km73jRtXr6g1RhVtqBHmQXipLQSccjjics.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ogvxFdj-oDmf63tOXEM5hp4plavRvExl8Qnqap8sW7k.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/p2enRakkRzJyMpSAJawDAE0o_OBSrSIa7KdUv-lcMow.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pHanFOUjaiuOlFtAv0dzy0MwMv_BuFtRR8JTcYXg2XQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pQziWwowuowx0FOYx2HAk84JbNUZcALmDixIYvQuJZg.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pS0_jaasn7nnwtSdY5bIvEr-P6DaJU7HsyH9sFKE0GI.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pxF_aFjVSm677g7jSkzExURX9cgPazYDabFXsta4Txo.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/q4l5PLa8Zl9VK3e1PNYVXbSB1LW6ayfSq7YYMUSbgcU.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/qKd0hTNCpbPOAgI3T6Om735FkvgjPnpGRPrMP2z0k2c.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/qTqEguBBn4OieaN6XlRehOzjelVJSOsfcjfNKSBi_h0.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/qc1z_lojge7OJ0N9FLjaFenXsN82iIEnKN5S-t_sBlU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/r93DDvPtjPyZa8taxSosNNvvOyHtMsF_ngrSs31aHOY.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/rQM71yPXAdtASPadnfu1m7F_gQOb-uh_Adxs5P55R7U.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/rbjKrg9BdrF2KtWN35sVH9aZOwvhLrEdX1xsyaYpxEM.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/rcIDrjXwMeotIKYDncG2DGA50sE4HAYSUVSEYT2_VIE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/rtP4xELGID8pEJo_BvmsxpiYVBxvMCLlvdlJUvUgqEg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/rykyMLrVFRiIIFUPH9OmnTjB-rUqcfXIXnpn5BW9Qm8.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/s4TQBqPusIoFIDSX3E4KAuPCuQDQojW6slN6AoIJJ-U.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/tZ5iPXN6G9X1ixL0WHs-uh5VAqziiY6UW-Z2hvUF6Yk.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/uWSNrNOkPR4BhWrOxXX5TfqNlJIbszyfZtHnTTKZ9cg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/uduw2awKAS_DPp9gklbfvv2RDev7wEpenbCFDA4DNxs.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/uzyaJavSCzdPUOHA5GK3am45IFBayRibD2aAssiJ38M.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/vVrp5o_oj54K9Spnx5HkfJ6ga4Tm7GxFZKt4WZB8FIo.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/vuecJc1nwUoDltWHnzMRV85v7LwdiSgS7ZxysZYrRdg.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/weIC5cXLvacNNF25heFbcWBeOsb2iQ-7WcBUahSrfEE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/wvCRibnMjYfz4MGqnbW1nweqNRiPm4ATaK-ewK5ssOQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/wyL3h6Marl2JMfZYLDwQkXRdK4NuLKiCWHQm6igReZ4.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/x0Q5Wf3UaFu2wIgP9JPFAVuYUi0n-xY58FuBZ-0O2xI.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/xCb6Q2JAt2SWDS5ibOqetMJWKJm1BdJXdfAdLfLXYVc.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/xkckYJjDSntINUKHZDIlrd09lKxhlFZdN7bT8Q0E1iE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/xoHo4y-EuHmK9O3z662PKRsIZpkyFW4KFE0JA6Bp3w8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/y5iLcw4EhWkb07ULRjXL7JsXk9-lj40vgPx1f3nlXeY.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/y8ezrzwP5d8BLJ61T6L_Q4pitouvrbICokHEnxXC1ao.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/yAZJ5fnLUjXfVQXlEOoO_EszVleGJC2-Lg6z7_9KvBI.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/yThvUcySW81LnX3krwb-Uhi7OEIn0LrQo5jJVQxm-N0.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/yXXUoKEykhpZPMXWVzUf3GtTwgAtNSDCOK6TvomSdoM.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/zsJ7Mb8REasrj4nUuq6H0d0o74xxuUlQk7KtCJSdqMg.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/zwqXp6G2mEvMWMFcZeiFfb2jr3PymMGXDPQdfjBCrR0.cache +1 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/lib/generators/crud_generator_test.rb +14 -0
- data/test/templus_models_test.rb +7 -0
- data/test/test_helper.rb +18 -0
- metadata +693 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
<%unless params[:render] == 'modal'%>
|
2
|
+
<% content_for :breadcumb do %>
|
3
|
+
<li class=""><%= link_to @crud_helper.title, @crud_helper.root_path %></li>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
|
7
|
+
<% content_for :header do %>
|
8
|
+
<%=@crud_helper.title%>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% content_for :scopes do %>
|
12
|
+
<%= render "/crud/scopes" %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
|
16
|
+
<% content_for :actions do %>
|
17
|
+
<% @crud_helper.top_links.each do |link| %>
|
18
|
+
<%=render_link(link)%>
|
19
|
+
<%end%>
|
20
|
+
<% if @crud_helper.search_fields.present? %>
|
21
|
+
<button id="button_search_<%=@model.name.underscore%>" class="btn btn-warning btn-rounded" data-toggle="modal" data-target="#modal_search">
|
22
|
+
<i class="fa fa-search"></i>
|
23
|
+
</button>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<% content_for :modal do %>
|
28
|
+
<% if @crud_helper.search_fields.present? %>
|
29
|
+
<%= render "/crud/search" %>
|
30
|
+
<% end %>
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
<%end%>
|
34
|
+
|
35
|
+
<%= render "layouts/template_raro_crud" %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render "form" %>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<div class="modal inmodal" id="modal_new_record" tabindex="-1" role="dialog" aria-hidden="true">
|
2
|
+
<div class="modal-dialog modal-lg">
|
3
|
+
<div class="modal-content animated bounceInRight">
|
4
|
+
<div class="modal-body">
|
5
|
+
</div>
|
6
|
+
<div class="modal-footer">
|
7
|
+
<button type="button" class="btn btn-white" data-dismiss="modal">Cancelar</button>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<%unless params[:render] == 'modal'%>
|
14
|
+
<% url = "/crud/#{@model.name.underscore}/#{@record.new_record? ? 'create' : @record.id.to_s+'/create'}" %>
|
15
|
+
<% remote_form = false%>
|
16
|
+
<%else%>
|
17
|
+
<% url = "/crud/#{@model.name.underscore}/#{@record.new_record? ? 'create?render=modal' : @record.id.to_s+'/create?render=modal'}" %>
|
18
|
+
<% remote_form = true%>
|
19
|
+
<%end%>
|
20
|
+
<%= simple_nested_form_for @record, remote: remote_form, html: {class: "form-horizontal"}, url: url do |f| %>
|
21
|
+
<%= f.error_notification %>
|
22
|
+
<%@crud_helper.form_fields.each do |field|%>
|
23
|
+
<% if @model.reflect_on_association(field[:attribute]).class == ActiveRecord::Reflection::BelongsToReflection and is_raro_crud(field[:attribute]) %>
|
24
|
+
<%= render_plus_button(field,f,@model,@record) %>
|
25
|
+
<%else%>
|
26
|
+
<%= render_field(field,f,@model,@record) %>
|
27
|
+
<%end%>
|
28
|
+
|
29
|
+
<% end %>
|
30
|
+
<%@crud_helper.form_groups.each do |key, groups|%>
|
31
|
+
<% if [:has_many,:has_and_belongs_to_many].include?(@model.reflect_on_association(key).macro) && @record.new_record? %>
|
32
|
+
<% @record.send(key).build %>
|
33
|
+
<% elsif @record.new_record?%>
|
34
|
+
<% @record.send("build_#{key}") %>
|
35
|
+
<% end %>
|
36
|
+
<%= f.simple_fields_for key do |g| %>
|
37
|
+
<div class="col-sm-12">
|
38
|
+
<h3 class="col-sm-2"><%= key.to_s.singularize.titleize %></h3>
|
39
|
+
</div>
|
40
|
+
<% groups.each do |field| %>
|
41
|
+
<%= render_field(field,g,@model,@record) %>
|
42
|
+
<% end %>
|
43
|
+
<% if [:has_many,:has_and_belongs_to_many].include?(@model.reflect_on_association(key).macro) %>
|
44
|
+
<div class="form-group">
|
45
|
+
<div class="col-sm-10 col-sm-offset-2">
|
46
|
+
<%= g.link_to_remove "Remove #{key.to_s.singularize}" %>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
<% end %>
|
50
|
+
<% end %>
|
51
|
+
<% if [:has_many,:has_and_belongs_to_many].include?(@model.reflect_on_association(key).macro) %>
|
52
|
+
<div class="form-group">
|
53
|
+
<div class="col-sm-12">
|
54
|
+
<%= f.link_to_add "Adicionar #{key.to_s.singularize}", key %>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
<% end %>
|
58
|
+
<% end %>
|
59
|
+
<div class="form-group">
|
60
|
+
<div class="col-sm-4 col-sm-offset-2">
|
61
|
+
<%= f.submit "Salvar", class: 'btn btn-primary' %>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
<% end %>
|
65
|
+
<% @crud_helper.form_scripts.each do |script| %>
|
66
|
+
<%= javascript_include_tag "crud/#{script}" %>
|
67
|
+
<% end %>
|
68
|
+
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render "form" %>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<%= content_tag :tr, id: "record-#{record.id}" do %>
|
2
|
+
<%@crud_helper.index_fields.each do |att| %>
|
3
|
+
<% if record.send(att[:attribute]).present? or record.send(att[:attribute]).to_s == "false"%>
|
4
|
+
<% if @model.columns_hash[att[:attribute].to_s].present? && [:date, :datetime].include?(@model.columns_hash[att[:attribute].to_s].type)%>
|
5
|
+
<% if att[:date_format].present?%>
|
6
|
+
<td><%= record.send(att[:attribute]).strftime(att[:date_format]) %></td>
|
7
|
+
<% else %>
|
8
|
+
<td><%= l record.send(att[:attribute]) %></td>
|
9
|
+
<% end %>
|
10
|
+
<% elsif @model.reflect_on_association(att[:attribute]) && @model.reflect_on_association(att[:attribute]).macro != :belongs_to%>
|
11
|
+
<td>
|
12
|
+
<% record.send(att[:attribute]).each do |rec| %>
|
13
|
+
<li>
|
14
|
+
<%= rec.to_s %>
|
15
|
+
</li>
|
16
|
+
<% end %>
|
17
|
+
</td>
|
18
|
+
<% elsif record.send(att[:attribute]).respond_to?(:url) and record.send(att[:attribute]).url(:thumb) %>
|
19
|
+
<td><%= image_tag(record.send(att[:attribute]).url(:thumb)) %></td>
|
20
|
+
<% else %>
|
21
|
+
<% if record.send(att[:attribute]).to_s == "false" or record.send(att[:attribute]).to_s == "true" %>
|
22
|
+
<td><%= record.send(att[:attribute]) ? "Sim" : "Não" %></td>
|
23
|
+
<% else %>
|
24
|
+
<td><%= record.send(att[:attribute]).to_s %></td>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
<% else %>
|
28
|
+
<td></td>
|
29
|
+
<% end %>
|
30
|
+
<%end%>
|
31
|
+
<td>
|
32
|
+
<%if @crud_helper.view_action%>
|
33
|
+
<a href="/crud/<%=@model.name.underscore%>/<%=record.id%>"
|
34
|
+
class="btn btn-primary btn-xs" data-push="partial" data-target="#form">Visualizar</a>
|
35
|
+
<%end%>
|
36
|
+
<%if @crud_helper.edit_action%>
|
37
|
+
<a href="/crud/<%=@model.name.underscore%>/<%=record.id%>/edit"
|
38
|
+
class="btn btn-primary btn-xs" data-push="partial" data-target="#form">Editar</a>
|
39
|
+
<%end%>
|
40
|
+
<%if @crud_helper.destroy_action%>
|
41
|
+
<a href="/crud/<%=@model.name.underscore%>/<%=record.id%>/destroy"
|
42
|
+
class="btn btn-danger btn-xs" data-push="partial" data-target="#form" data-method="delete">Excluir</a>
|
43
|
+
<%end%>
|
44
|
+
<%@crud_helper.actions.each do |a|%>
|
45
|
+
<% if ((a[2].present? && a[2].call(record)) || !a[2].present?) %>
|
46
|
+
<a href="/crud/<%=@model.name.underscore%>/<%=record.id%>/acao/<%=a[0]%>"
|
47
|
+
class="btn btn-primary btn-xs" data-push="partial" data-target="#form"><%=a[1]%></a>
|
48
|
+
<%end %>
|
49
|
+
<%end %>
|
50
|
+
</td>
|
51
|
+
<% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<%= flash_messages_for %>
|
2
|
+
<div>
|
3
|
+
<%= render "links" %>
|
4
|
+
</div>
|
5
|
+
<div class="dataTables_wrapper form-inline">
|
6
|
+
<table class="table table-striped table-bordered table-hover dataTables-example dataTable">
|
7
|
+
<thead>
|
8
|
+
<tr>
|
9
|
+
<%@crud_helper.index_fields.each do |att| %>
|
10
|
+
<th><%= sort_link @q, att[:attribute], att[:label], {},data: {push: 'partial', target: "#form"}%></th>
|
11
|
+
<%end%>
|
12
|
+
<%if @crud_helper.view_action || @crud_helper.edit_action || @crud_helper.destroy_action || @crud_helper.actions.present?%>
|
13
|
+
<td>Opções</td>
|
14
|
+
<% end %>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
<tbody id="records-body">
|
18
|
+
<% @records.each do |record| %>
|
19
|
+
<%= render 'record', record: record %>
|
20
|
+
<% end %>
|
21
|
+
</tbody>
|
22
|
+
</table>
|
23
|
+
<%= paginate @records, target: '#form'%>
|
24
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if @crud_helper.scopes.present? %>
|
2
|
+
<% @crud_helper.scopes.each do |escopo| %>
|
3
|
+
<%= link_to "/crud/#{@model.name.underscore}?scope=#{escopo[0]}", id: "#{escopo[0]}", data: {push: true, crumb: 'wielka'} do%>
|
4
|
+
<div style="float: left; margin-left: 10px; min-width: 100px;">
|
5
|
+
<div class="widget style1 gray-bg">
|
6
|
+
<div class="row vertical-align text-center">
|
7
|
+
<h3 class="font-bold">
|
8
|
+
<%= escopo[1] %>
|
9
|
+
<span class="label label-success pull-right" style="margin-left: 10px;">
|
10
|
+
<%= @model.send(escopo[0]).count %>
|
11
|
+
</span>
|
12
|
+
</h3>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<%end%>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<div class="modal inmodal" id="modal_search" tabindex="-1" role="dialog" aria-hidden="true">
|
2
|
+
<div class="modal-dialog modal-lg">
|
3
|
+
<div class="modal-content animated bounceInRight">
|
4
|
+
<div class="modal-header">
|
5
|
+
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Fechar</span></button>
|
6
|
+
<i class="fa fa-search modal-icon"></i>
|
7
|
+
<h4 class="modal-title">Pesquisa</h4>
|
8
|
+
<small class="font-bold">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</small>
|
9
|
+
</div>
|
10
|
+
<div class="modal-body">
|
11
|
+
<%=raro_search_form(@model, 'records','records',"/crud/#{@model.name.underscore}/query") do%>
|
12
|
+
<%raro_group "#{@model.name}"%>
|
13
|
+
<%@crud_helper.search_fields.each do |att| %>
|
14
|
+
<%raro_field att[:attribute],att[:sf]%>
|
15
|
+
<%end%>
|
16
|
+
<%end%>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<div class="widget-box">
|
2
|
+
<div class="widget-body">
|
3
|
+
<div class="widget-main">
|
4
|
+
<table class="table table-bordered table-striped">
|
5
|
+
<tbody>
|
6
|
+
<% @crud_helper.view_fields.each do |field|%>
|
7
|
+
<tr>
|
8
|
+
<% if field[:sf].present? && field[:sf][:label].present? %>
|
9
|
+
<th><%= field[:sf][:label].upcase.to_s %></th>
|
10
|
+
<% else %>
|
11
|
+
<th><%= field[:attribute].upcase.to_s %></th>
|
12
|
+
<% end %>
|
13
|
+
<% if @model.columns_hash[field[:attribute].to_s].present? && [:date, :datetime].include?(@model.columns_hash[field[:attribute].to_s].type)%>
|
14
|
+
<% if field[:date_format].present?%>
|
15
|
+
<td><%= l @record.send(field[:attribute]).strftime(field[:date_format]) if @record.send(field[:attribute]).present?%></td>
|
16
|
+
<% else %>
|
17
|
+
<td><%= l @record.send(field[:attribute]) if @record.send(field[:attribute]).present?%></td>
|
18
|
+
<% end %>
|
19
|
+
<% elsif @model.reflect_on_association(field[:attribute]) && @model.reflect_on_association(field[:attribute]).macro != :belongs_to%>
|
20
|
+
<td>
|
21
|
+
<% @record.send(field[:attribute]).each do |rec| %>
|
22
|
+
<li>
|
23
|
+
<% if field[:sf].present? && field[:sf][:label_method].present? %>
|
24
|
+
<% if rec.send(field[:sf][:label_method]).respond_to?(:url) %>
|
25
|
+
<%= render_field_file(rec.send(field[:sf][:label_method])) %>
|
26
|
+
<% else %>
|
27
|
+
<%= rec.send(field[:sf][:label_method]) %>
|
28
|
+
<% end %>
|
29
|
+
<% else %>
|
30
|
+
<% if rec.to_s.respond_to?(:url) %>
|
31
|
+
<%= render_field_file(rec.to_s) %>
|
32
|
+
<% else %>
|
33
|
+
<%= rec.to_s %>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
36
|
+
</li>
|
37
|
+
<% end %>
|
38
|
+
</td>
|
39
|
+
<% elsif @record.send(field[:attribute]).respond_to?(:url) %>
|
40
|
+
<td>
|
41
|
+
<%= render_field_file(@record.send(field[:attribute])) %>
|
42
|
+
</td>
|
43
|
+
<% elsif ["false","true"].include? @record.send(field[:attribute]).to_s %>
|
44
|
+
<td><%= @record.send(field[:attribute]) ? "Sim" : "Não" %></td>
|
45
|
+
<% else %>
|
46
|
+
<td>
|
47
|
+
<% if field[:sf].present? && field[:sf][:label_method].present? && @record.send(field[:attribute]).present?%>
|
48
|
+
<%= @record.send(field[:attribute]).send(field[:sf][:label_method]) %>
|
49
|
+
<% else %>
|
50
|
+
<%= @record.send(field[:attribute]) %>
|
51
|
+
<% end %>
|
52
|
+
</td>
|
53
|
+
<% end %>
|
54
|
+
</tr>
|
55
|
+
<% end %>
|
56
|
+
</tbody>
|
57
|
+
</table>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%unless params[:render] == 'modal'%>
|
2
|
+
$('#form').html("<%=j render('edit')%>")
|
3
|
+
<%else%>
|
4
|
+
<%if @saved %>
|
5
|
+
var modal_target = "#modal_new_record." + '<%=@model.name.underscore%>';
|
6
|
+
$(modal_target).attr('data-saved','true')
|
7
|
+
$(modal_target).attr('data-entity-name','<%=@record.to_s%>')
|
8
|
+
$(modal_target).attr('data-entity-id','<%=@record.id%>')
|
9
|
+
$(modal_target).modal('hide')
|
10
|
+
<%else%>
|
11
|
+
$('#modal_new_record_<%=@model.name.underscore%> .modal-body').html("<%=j render('edit')%>")
|
12
|
+
<%end%>
|
13
|
+
<%end%>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<li class="parent-menu <%= is_active_controller('crud') %>">
|
2
|
+
<a href=""><i class="fa fa-edit"></i><span class="nav-label">Cadastros</span><span class="fa arrow"></span></a>
|
3
|
+
<ul class="nav nav-second-level <%= is_active_controller('crud') %>">
|
4
|
+
<% raro_models.each do |modelo| %>
|
5
|
+
<%= menu_helper_crud("#{modelo.name.underscore}", "/crud/#{modelo.name.underscore}", "#{modelo.name.underscore}_crud".camelize.constantize.title, modelo, 'edit') %>
|
6
|
+
<% end %>
|
7
|
+
</ul>
|
8
|
+
</li>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<%unless params[:render] == 'modal'%>
|
2
|
+
<div class="row wrapper border-bottom white-bg page-heading">
|
3
|
+
<div class="col-lg-3">
|
4
|
+
<h2>
|
5
|
+
<% if content_for? :header %>
|
6
|
+
<%= yield :header %>
|
7
|
+
<% end %>
|
8
|
+
</h2>
|
9
|
+
<ol class="breadcrumb">
|
10
|
+
<li>
|
11
|
+
<a href="/">Home</a>
|
12
|
+
</li>
|
13
|
+
<% if content_for? :breadcumb %>
|
14
|
+
<%= yield :breadcumb %>
|
15
|
+
<% end %>
|
16
|
+
</ol>
|
17
|
+
</div>
|
18
|
+
<div class="col-lg-9">
|
19
|
+
<div class="pull-right">
|
20
|
+
<% if content_for? :scopes %>
|
21
|
+
<%= yield :scopes %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div class="wrapper wrapper-content animated fadeInRight">
|
28
|
+
<div class="row">
|
29
|
+
<div class="col-lg-12">
|
30
|
+
<div class="ibox float-e-margins">
|
31
|
+
<div class="ibox-title">
|
32
|
+
<% if is_action_edit? && @model.present?%>
|
33
|
+
<h5>Editar
|
34
|
+
<small> você pode editar todos os seus dados. <%=@model.name.humanize %></small>
|
35
|
+
</h5>
|
36
|
+
<% elsif is_action_create? && @model.present? %>
|
37
|
+
<h5>Cadastrar
|
38
|
+
<small> você pode cadastrar todos os seus dados. <%=@model.name.humanize %></small>
|
39
|
+
</h5>
|
40
|
+
<% elsif is_action_show? && @crud_helper.present? %>
|
41
|
+
<h5><%= @crud_helper.subtitle(:show) %>
|
42
|
+
<small><%= @crud_helper.description(:show) %></small>
|
43
|
+
</h5>
|
44
|
+
<% elsif @crud_helper.present? %>
|
45
|
+
<h5><%= @crud_helper.subtitle(:index) %>
|
46
|
+
<small><%= @crud_helper.description(:index) %></small>
|
47
|
+
</h5>
|
48
|
+
<% end %>
|
49
|
+
<div class="pull-right actions">
|
50
|
+
<% if content_for? :actions %>
|
51
|
+
<%= yield :actions %>
|
52
|
+
<% end %>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
<div class="ibox-content">
|
56
|
+
<%end%>
|
57
|
+
|
58
|
+
<% if content_for? :corpo %>
|
59
|
+
<%= yield :corpo %>
|
60
|
+
<% end %>
|
61
|
+
<%unless params[:render] == 'modal'%>
|
62
|
+
|
63
|
+
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
<% if content_for? :modal %>
|
70
|
+
<%= yield :modal %>
|
71
|
+
<% end %>
|
72
|
+
|
73
|
+
<%end%>
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Ransack.configure do |config|
|
2
|
+
config.add_predicate 'in_string',
|
3
|
+
arel_predicate: 'in',
|
4
|
+
formatter: proc { |v| v.split(",") },
|
5
|
+
validator: proc { |v| v.present? },
|
6
|
+
compounds: true,
|
7
|
+
type: :string
|
8
|
+
end
|
9
|
+
|
10
|
+
module Kaminari
|
11
|
+
module ActionViewExtension
|
12
|
+
def paginate(scope, options = {}, &block)
|
13
|
+
paginator = Kaminari::Helpers::Paginator.new self, options.reverse_merge(:current_page => scope.current_page, :total_pages => scope.total_pages, :per_page => scope.limit_value, :total_count => scope.total_count, :remote => false)
|
14
|
+
paginator.to_s
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|