padrino-admin 0.8.5 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +40 -84
- data/VERSION +1 -1
- data/lib/padrino-admin.rb +3 -20
- data/lib/padrino-admin/access_control.rb +78 -326
- data/lib/padrino-admin/generators/actions.rb +6 -26
- data/lib/padrino-admin/generators/admin_app.rb +40 -11
- data/lib/padrino-admin/generators/admin_page.rb +11 -17
- data/lib/padrino-admin/generators/orm.rb +85 -0
- data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +43 -0
- data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +54 -0
- data/lib/padrino-admin/generators/templates/{page/db → account}/seeds.rb.tt +5 -6
- data/lib/padrino-admin/generators/{app/app.rb.tt → templates/app/app.rb} +2 -10
- data/lib/padrino-admin/generators/templates/app/controllers/base.rb +7 -0
- data/lib/padrino-admin/generators/{app → templates/app}/controllers/sessions.rb +6 -6
- data/lib/padrino-admin/generators/templates/assets/stylesheets/base.css +370 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/amro/style.css +364 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec-green/style.css +290 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec/style.css +301 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/blue/style.css +287 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/default/style.css +373 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/djime-cerulean/style.css +305 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/kathleene/style.css +279 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/olive/style.css +345 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/orange/style.css +269 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/reidb-greenish/style.css +302 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/ruby/style.css +281 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/warehouse/style.css +391 -0
- data/lib/padrino-admin/generators/templates/erb/app/base/_sidebar.erb.tt +13 -0
- data/lib/padrino-admin/generators/templates/erb/app/base/index.erb.tt +17 -0
- data/lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt +44 -0
- data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +46 -0
- data/lib/padrino-admin/generators/templates/erb/page/_form.erb.tt +11 -0
- data/lib/padrino-admin/generators/templates/erb/page/edit.erb.tt +18 -0
- data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +36 -0
- data/lib/padrino-admin/generators/templates/erb/page/new.erb.tt +17 -0
- data/lib/padrino-admin/generators/templates/page/controller.rb.tt +32 -22
- data/lib/padrino-admin/helpers/authentication_helpers.rb +8 -9
- data/lib/padrino-admin/helpers/view_helpers.rb +20 -338
- data/lib/padrino-admin/locale/admin/de.yml +15 -49
- data/lib/padrino-admin/locale/admin/en.yml +12 -50
- data/lib/padrino-admin/locale/admin/it.yml +15 -50
- data/padrino-admin.gemspec +40 -321
- data/test/fixtures/data_mapper.rb +56 -7
- data/test/generators/test_admin_app_generator.rb +17 -16
- data/test/generators/test_admin_page_generator.rb +12 -16
- data/test/test_admin_application.rb +193 -12
- metadata +33 -314
- data/lib/padrino-admin/column_store.rb +0 -156
- data/lib/padrino-admin/config.rb +0 -36
- data/lib/padrino-admin/generators/admin_uploader.rb +0 -88
- data/lib/padrino-admin/generators/app/controllers/accounts.rb +0 -37
- data/lib/padrino-admin/generators/app/controllers/base.rb +0 -11
- data/lib/padrino-admin/generators/app/controllers/javascripts.rb +0 -10
- data/lib/padrino-admin/generators/app/views/accounts/_form.haml +0 -24
- data/lib/padrino-admin/generators/app/views/accounts/edit.haml +0 -3
- data/lib/padrino-admin/generators/app/views/accounts/grid.js.erb +0 -9
- data/lib/padrino-admin/generators/app/views/accounts/new.haml +0 -3
- data/lib/padrino-admin/generators/app/views/accounts/store.jml +0 -7
- data/lib/padrino-admin/generators/app/views/base/dashboard.haml +0 -3
- data/lib/padrino-admin/generators/app/views/base/index.haml +0 -19
- data/lib/padrino-admin/generators/app/views/javascripts/admin.js.erb +0 -490
- data/lib/padrino-admin/generators/app/views/javascripts/locale.js.erb +0 -135
- data/lib/padrino-admin/generators/app/views/sessions/new.haml +0 -26
- data/lib/padrino-admin/generators/assets/flash/charts.swf +0 -0
- data/lib/padrino-admin/generators/assets/flash/clippy.swf +0 -0
- data/lib/padrino-admin/generators/assets/flash/expressinstall.swf +0 -0
- data/lib/padrino-admin/generators/assets/flash/swfupload.swf +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/back.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/background.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/bg-content.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/bg-hd-slate.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/bg-hd.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/bg-intro.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/bg-login.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/bg-menu-slate.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/bg-menu.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/bg.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/btn-login.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/cancel.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/categories.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/close.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/close.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/delete.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/download.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/duplicate.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/edit.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/export.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/hd-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/image.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/loader.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/logo-loader.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/logo-small.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/new.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/no-image.png +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/preview.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/print.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/save.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/support.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/admin/up.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/box/corners-blue.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/box/corners.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/box/l-blue.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/box/l.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/box/r-blue.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/box/r.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/box/tb-blue.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/box/tb.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/arrow.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/btn.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/group-cs.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/group-lr.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/group-tb.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-b-noline.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-b.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-bo.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-noline.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-o.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/dd/drop-add.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/dd/drop-no.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/dd/drop-yes.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/editor/tb-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/checkbox.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/clear-trigger.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/clear-trigger.psd +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/date-trigger.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/date-trigger.psd +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/error-tip-corners.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/exclamation.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/radio.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/search-trigger.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/search-trigger.psd +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/text-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/trigger-tpl.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/trigger.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/form/trigger.psd +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/gradient-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/Thumbs.db +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/arrow-left-white.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/arrow-right-white.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/col-move-bottom.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/col-move-top.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/columns.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/dirty.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/done.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/drop-no.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/drop-yes.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/footer-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid-blue-hd.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid-blue-split.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid-hrow.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid-loading.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid-split.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid-vista-hd.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-hd-btn.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-hrow-over.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-hrow.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-special-col-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-special-col-sel-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/group-by.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/group-expand-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/hd-pop.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-asc.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-desc.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-lock.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-lock.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-unlock.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-unlock.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/invalid_line.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/loading.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/mso-hd.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/nowait.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/page-first-disabled.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/page-first.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/page-last-disabled.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/page-last.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/page-next-disabled.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/page-next.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/page-prev-disabled.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/page-prev.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/pick-button.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/refresh.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/row-check-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/row-expand-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/row-over.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/row-sel.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/sort-hd.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/sort_asc.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/sort_desc.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/grid/wait.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/collapse.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/expand.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/gradient-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/mini-bottom.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/mini-left.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/mini-right.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/mini-top.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/ns-collapse.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/ns-expand.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/panel-close.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/panel-title-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/panel-title-light-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/stick.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/stuck.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/tab-close-on.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/layout/tab-close.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/menu/checked.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/menu/group-checked.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/menu/item-over.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/menu/menu-parent.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/menu/menu.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/menu/unchecked.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/corners-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/left-right.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/light-hd.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/tool-sprite-tpl.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/tool-sprites.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/tools-sprites-trans.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/top-bottom.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/top-bottom.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/white-corners-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/white-left-right.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/panel/white-top-bottom.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/progress/progress-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/qtip/bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/qtip/close.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/qtip/tip-anchor-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/qtip/tip-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/s.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shadow-c.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shadow-lr.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shadow.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/blue-loading.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/calendar.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/glass-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/hd-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/large-loading.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/left-btn.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/loading-balls.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/right-btn.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/shared/warning.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/e-handle-dark.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/e-handle.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/ne-handle-dark.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/ne-handle.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/nw-handle-dark.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/nw-handle.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/s-handle-dark.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/s-handle.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/se-handle-dark.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/se-handle.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/square.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/sw-handle-dark.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/sizer/sw-handle.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/slider/slider-bg.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/slider/slider-thumb.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/slider/slider-v-bg.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/slider/slider-v-thumb.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/scroll-left.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/scroll-right.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/scroller-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-btm-left-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-btm-right-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-close.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-strip-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-strip-bg.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-strip-btm-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tabs/tabs-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/btn-arrow-light.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/btn-arrow.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/btn-over-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/gray-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/more.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/tb-bg.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/tb-btn-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/tb-xl-btn-sprite.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/toolbar/tb-xl-sep.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/arrows.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/drop-add.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/drop-between.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/drop-no.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/drop-over.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/drop-under.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/drop-yes.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end-minus-nl.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end-minus.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end-plus-nl.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end-plus.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-line.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-minus-nl.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-minus.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-plus-nl.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-plus.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/elbow.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/folder-open.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/folder.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/leaf.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/loading.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/tree/s.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/icon-error.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/icon-info.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/icon-question.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/icon-warning.gif +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/left-corners.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/left-corners.psd +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/left-right.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/left-right.psd +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/right-corners.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/right-corners.psd +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/top-bottom.png +0 -0
- data/lib/padrino-admin/generators/assets/images/ext/default/window/top-bottom.psd +0 -0
- data/lib/padrino-admin/generators/assets/javascripts/controls.js +0 -3
- data/lib/padrino-admin/generators/assets/javascripts/dragdrop.js +0 -3
- data/lib/padrino-admin/generators/assets/javascripts/effects.js +0 -4
- data/lib/padrino-admin/generators/assets/javascripts/ext.js +0 -29
- data/lib/padrino-admin/generators/assets/javascripts/prototype.js +0 -14
- data/lib/padrino-admin/generators/assets/javascripts/swfupload.js +0 -4
- data/lib/padrino-admin/generators/assets/stylesheets/admin.css +0 -60
- data/lib/padrino-admin/generators/assets/stylesheets/ext.css +0 -1543
- data/lib/padrino-admin/generators/assets/stylesheets/login.css +0 -17
- data/lib/padrino-admin/generators/assets/stylesheets/standard.css +0 -62
- data/lib/padrino-admin/generators/templates/page/views/_form.haml.tt +0 -9
- data/lib/padrino-admin/generators/templates/page/views/edit.haml.tt +0 -3
- data/lib/padrino-admin/generators/templates/page/views/grid.js.erb.tt +0 -9
- data/lib/padrino-admin/generators/templates/page/views/new.haml.tt +0 -3
- data/lib/padrino-admin/generators/templates/page/views/store.jml.tt +0 -6
- data/lib/padrino-admin/generators/templates/uploader/controller.rb +0 -24
- data/lib/padrino-admin/generators/templates/uploader/lib/uploader.rb +0 -66
- data/lib/padrino-admin/generators/templates/uploader/views/grid.js.erb +0 -57
- data/lib/padrino-admin/generators/templates/uploader/views/store.jml +0 -10
- data/lib/padrino-admin/locale/extjs/de.yml +0 -147
- data/lib/padrino-admin/locale/extjs/en.yml +0 -147
- data/lib/padrino-admin/locale/extjs/it.yml +0 -147
- data/lib/padrino-admin/orm.rb +0 -48
- data/lib/padrino-admin/orm/abstract.rb +0 -95
- data/lib/padrino-admin/orm/activerecord.rb +0 -144
- data/lib/padrino-admin/orm/datamapper.rb +0 -229
- data/lib/padrino-admin/orm/mongomapper.rb +0 -65
- data/lib/padrino-admin/utils/literal.rb +0 -13
- data/test/fixtures/active_record.rb +0 -29
- data/test/fixtures/mongo_mapper.rb +0 -12
- data/test/fixtures/test_column_store.jml +0 -11
- data/test/generators/test_admin_uploader_generator.rb +0 -56
- data/test/test_access_control.rb +0 -99
- data/test/test_active_record.rb +0 -96
- data/test/test_column_store.rb +0 -87
- data/test/test_config.rb +0 -13
- data/test/test_data_mapper.rb +0 -114
- data/test/test_mongo_mapper.rb +0 -30
@@ -15,20 +15,69 @@ end
|
|
15
15
|
# Fake Account Model
|
16
16
|
class Account
|
17
17
|
include DataMapper::Resource
|
18
|
-
|
19
|
-
|
18
|
+
include DataMapper::Validate
|
19
|
+
attr_accessor :password, :password_confirmation
|
20
|
+
|
21
|
+
# Properties
|
22
|
+
property :id, Serial
|
23
|
+
property :name, String
|
24
|
+
property :surname, String
|
25
|
+
property :email, String
|
26
|
+
property :crypted_password, String
|
27
|
+
property :salt, String
|
28
|
+
property :role, String
|
29
|
+
|
30
|
+
# Validations
|
31
|
+
validates_present :email, :role
|
32
|
+
validates_present :password, :if => :password_required
|
33
|
+
validates_present :password_confirmation, :if => :password_required
|
34
|
+
validates_length :password, :min => 4, :max => 40, :if => :password_required
|
35
|
+
validates_is_confirmed :password, :if => :password_required
|
36
|
+
validates_length :email, :min => 3, :max => 100
|
37
|
+
validates_is_unique :email, :case_sensitive => false
|
38
|
+
validates_format :email, :with => :email_address
|
39
|
+
validates_format :role, :with => /[A-Za-z]/
|
40
|
+
|
20
41
|
has n, :categories
|
21
|
-
def self.admin; first(:role => "
|
22
|
-
def self.editor; first(:role => "
|
42
|
+
def self.admin; first(:role => "admin"); end
|
43
|
+
def self.editor; first(:role => "editor"); end
|
44
|
+
|
45
|
+
# Callbacks
|
46
|
+
before :save, :generate_password
|
47
|
+
|
48
|
+
##
|
49
|
+
# This method it's for authentication purpose
|
50
|
+
#
|
51
|
+
def self.authenticate(email, password)
|
52
|
+
account = first(:conditions => { :email => email }) if email.present?
|
53
|
+
account && account.password_clean == password ? account : nil
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# This method it's used for retrive the original password.
|
58
|
+
#
|
59
|
+
def password_clean
|
60
|
+
crypted_password.decrypt(salt)
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
def generate_password
|
65
|
+
return if password.blank?
|
66
|
+
self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{email}--") if new?
|
67
|
+
self.crypted_password = password.encrypt(self.salt)
|
68
|
+
end
|
69
|
+
|
70
|
+
def password_required
|
71
|
+
crypted_password.blank? || !password.blank?
|
72
|
+
end
|
23
73
|
end
|
24
74
|
|
25
|
-
Padrino::Admin::Orm.register!
|
26
75
|
DataMapper.auto_migrate!
|
27
76
|
|
28
77
|
# We build some fake accounts
|
29
|
-
admin = Account.create(:name => "DAddYE", :role => "
|
78
|
+
admin = Account.create(:name => "DAddYE", :role => "admin", :email => "d.dagostino@lipsiasoft.com",
|
30
79
|
:password => "some", :password_confirmation => "some")
|
31
|
-
editor = Account.create(:name => "Dexter", :role => "
|
80
|
+
editor = Account.create(:name => "Dexter", :role => "editor", :email => "editor@lipsiasoft.com",
|
32
81
|
:password => "some", :password_confirmation => "some")
|
33
82
|
|
34
83
|
%w(News Press HowTo).each do |c|
|
@@ -25,11 +25,16 @@ class TestAdminAppGenerator < Test::Unit::TestCase
|
|
25
25
|
assert_raise(SystemExit) { silence_logger { @admin.start(['-r=/tmp/sample_project']) } }
|
26
26
|
end
|
27
27
|
|
28
|
-
should 'fail if we don\'t
|
28
|
+
should 'fail if we don\'t a valid orm' do
|
29
29
|
assert_nothing_raised { silence_logger { @project.start(['sample_project', '--root=/tmp', '-d=sequel']) } }
|
30
30
|
assert_raise(SystemExit) { silence_logger { @admin.start(['-r=/tmp/sample_project']) } }
|
31
31
|
end
|
32
32
|
|
33
|
+
should 'fail if we don\'t a valid theme' do
|
34
|
+
assert_nothing_raised { silence_logger { @project.start(['sample_project', '--root=/tmp', '-d=activerecord']) } }
|
35
|
+
assert_raise(SystemExit) { silence_logger { @admin.start(['-r=/tmp/sample_project', '--theme=foo']) } }
|
36
|
+
end
|
37
|
+
|
33
38
|
should 'correctyl generate a new padrino admin application' do
|
34
39
|
assert_nothing_raised { silence_logger { @project.start(['sample_project', '--root=/tmp', '-d=activerecord']) } }
|
35
40
|
assert_nothing_raised { silence_logger { @admin.start(['--root=/tmp/sample_project']) } }
|
@@ -39,29 +44,25 @@ class TestAdminAppGenerator < Test::Unit::TestCase
|
|
39
44
|
assert_file_exists('/tmp/sample_project/admin/controllers')
|
40
45
|
assert_file_exists('/tmp/sample_project/admin/controllers/accounts.rb')
|
41
46
|
assert_file_exists('/tmp/sample_project/admin/controllers/base.rb')
|
42
|
-
assert_file_exists('/tmp/sample_project/admin/controllers/javascripts.rb')
|
43
47
|
assert_file_exists('/tmp/sample_project/admin/controllers/sessions.rb')
|
44
48
|
assert_file_exists('/tmp/sample_project/admin/views')
|
45
|
-
assert_file_exists('/tmp/sample_project/admin/views/accounts/_form.
|
46
|
-
assert_file_exists('/tmp/sample_project/admin/views/accounts/edit.
|
47
|
-
assert_file_exists('/tmp/sample_project/admin/views/accounts/
|
48
|
-
assert_file_exists('/tmp/sample_project/admin/views/accounts/new.
|
49
|
-
assert_file_exists('/tmp/sample_project/admin/views/
|
50
|
-
assert_file_exists('/tmp/sample_project/admin/views/
|
51
|
-
assert_file_exists('/tmp/sample_project/admin/views/base/
|
52
|
-
assert_file_exists('/tmp/sample_project/admin/views/
|
53
|
-
assert_file_exists('/tmp/sample_project/admin/views/
|
54
|
-
assert_file_exists('/tmp/sample_project/admin/views/sessions/new.
|
49
|
+
assert_file_exists('/tmp/sample_project/admin/views/accounts/_form.erb')
|
50
|
+
assert_file_exists('/tmp/sample_project/admin/views/accounts/edit.erb')
|
51
|
+
assert_file_exists('/tmp/sample_project/admin/views/accounts/index.erb')
|
52
|
+
assert_file_exists('/tmp/sample_project/admin/views/accounts/new.erb')
|
53
|
+
assert_file_exists('/tmp/sample_project/admin/views/base/index.erb')
|
54
|
+
assert_file_exists('/tmp/sample_project/admin/views/sessions/new.erb')
|
55
|
+
assert_file_exists('/tmp/sample_project/admin/views/base/_sidebar.erb')
|
56
|
+
assert_file_exists('/tmp/sample_project/admin/views/base/index.erb')
|
57
|
+
assert_file_exists('/tmp/sample_project/admin/views/layouts/application.erb')
|
58
|
+
assert_file_exists('/tmp/sample_project/admin/views/sessions/new.erb')
|
55
59
|
assert_file_exists('/tmp/sample_project/public/admin')
|
56
|
-
assert_file_exists('/tmp/sample_project/public/admin/flash')
|
57
|
-
assert_file_exists('/tmp/sample_project/public/admin/images')
|
58
|
-
assert_file_exists('/tmp/sample_project/public/admin/javascripts')
|
59
60
|
assert_file_exists('/tmp/sample_project/public/admin/stylesheets')
|
60
61
|
assert_file_exists('/tmp/sample_project/app/models/account.rb')
|
61
62
|
assert_file_exists('/tmp/sample_project/db/seeds.rb')
|
62
|
-
assert_match_in_file "gem 'haml'", '/tmp/sample_project/Gemfile'
|
63
63
|
assert_match_in_file 'Padrino.mount("Admin").to("/admin")', '/tmp/sample_project/config/apps.rb'
|
64
64
|
assert_match_in_file 'class Admin < Padrino::Application', '/tmp/sample_project/admin/app.rb'
|
65
|
+
assert_match_in_file 'role.project_module :accounts, "/accounts"', '/tmp/sample_project/admin/app.rb'
|
65
66
|
end
|
66
67
|
end
|
67
68
|
end
|
@@ -14,10 +14,10 @@ class TestAdminPageGenerator < Test::Unit::TestCase
|
|
14
14
|
|
15
15
|
def setup
|
16
16
|
`rm -rf /tmp/sample_project`
|
17
|
-
@project
|
18
|
-
@admin
|
19
|
-
@page
|
20
|
-
@model
|
17
|
+
@project = Padrino::Generators::Project.dup
|
18
|
+
@admin = Padrino::Generators::AdminApp.dup
|
19
|
+
@page = Padrino::Generators::AdminPage.dup
|
20
|
+
@model = Padrino::Generators::Model.dup
|
21
21
|
end
|
22
22
|
|
23
23
|
context 'the admin page generator' do
|
@@ -31,7 +31,7 @@ class TestAdminPageGenerator < Test::Unit::TestCase
|
|
31
31
|
should 'fail without argument and model' do
|
32
32
|
silence_logger { @project.start(['sample_project', '--root=/tmp', '-d=activerecord']) }
|
33
33
|
silence_logger { @admin.start(['--root=/tmp/sample_project']) }
|
34
|
-
assert_raise(
|
34
|
+
assert_raise(Padrino::Admin::Generators::OrmError) { @page.start(['foo', '-r=/tmp/sample_project']) }
|
35
35
|
end
|
36
36
|
|
37
37
|
should 'correctyl generate a new padrino admin application' do
|
@@ -41,19 +41,15 @@ class TestAdminPageGenerator < Test::Unit::TestCase
|
|
41
41
|
silence_logger { @model.start(['person', "name:string", "age:integer", "email:string", '-root=/tmp/sample_project']) }
|
42
42
|
silence_logger { @page.start(['person', '--root=/tmp/sample_project']) }
|
43
43
|
assert_file_exists '/tmp/sample_project/admin/controllers/people.rb'
|
44
|
-
assert_file_exists '/tmp/sample_project/admin/views/people/_form.
|
45
|
-
assert_file_exists '/tmp/sample_project/admin/views/people/edit.
|
46
|
-
assert_file_exists '/tmp/sample_project/admin/views/people/
|
47
|
-
assert_file_exists '/tmp/sample_project/admin/views/people/new.
|
48
|
-
assert_file_exists '/tmp/sample_project/admin/views/people/store.jml'
|
44
|
+
assert_file_exists '/tmp/sample_project/admin/views/people/_form.erb'
|
45
|
+
assert_file_exists '/tmp/sample_project/admin/views/people/edit.erb'
|
46
|
+
assert_file_exists '/tmp/sample_project/admin/views/people/index.erb'
|
47
|
+
assert_file_exists '/tmp/sample_project/admin/views/people/new.erb'
|
49
48
|
%w(name age email).each do |field|
|
50
|
-
assert_match_in_file "label :#{field}", '/tmp/sample_project/admin/views/people/_form.
|
51
|
-
assert_match_in_file "text_field :#{field}", '/tmp/sample_project/admin/views/people/_form.
|
49
|
+
assert_match_in_file "label :#{field}", '/tmp/sample_project/admin/views/people/_form.erb'
|
50
|
+
assert_match_in_file "text_field :#{field}", '/tmp/sample_project/admin/views/people/_form.erb'
|
52
51
|
end
|
53
|
-
assert_match_in_file 'role.project_module :people
|
54
|
-
project.menu :list, "/admin/people.js"
|
55
|
-
project.menu :new, "/admin/people/new"
|
56
|
-
end', '/tmp/sample_project/admin/app.rb'
|
52
|
+
assert_match_in_file 'role.project_module :people, "/people"', '/tmp/sample_project/admin/app.rb'
|
57
53
|
end
|
58
54
|
end
|
59
55
|
end
|
@@ -9,18 +9,20 @@ class TestAdminApplication < Test::Unit::TestCase
|
|
9
9
|
should 'require correctly login' do
|
10
10
|
mock_app do
|
11
11
|
enable :authentication
|
12
|
-
set :app_name, :test_me
|
13
|
-
set :use_orm, :datamapper
|
14
12
|
|
15
13
|
# Do a simple mapping
|
16
|
-
access_control.roles_for :any do |role|
|
17
|
-
role.
|
18
|
-
role.require_login "/foo"
|
14
|
+
access_control.roles_for :any do |role|
|
15
|
+
role.protect "/foo"
|
19
16
|
end
|
20
17
|
|
21
18
|
get "/foo", :respond_to => [:html, :js] do
|
22
19
|
"foo"
|
23
20
|
end
|
21
|
+
|
22
|
+
get "/unauthenticated" do
|
23
|
+
"unauthenticated"
|
24
|
+
end
|
25
|
+
|
24
26
|
end
|
25
27
|
|
26
28
|
get "/foo"
|
@@ -28,25 +30,24 @@ class TestAdminApplication < Test::Unit::TestCase
|
|
28
30
|
|
29
31
|
get "/foo.js"
|
30
32
|
assert_equal "alert('Protected resource')", body
|
33
|
+
|
34
|
+
get "/unauthenticated"
|
35
|
+
assert_equal "unauthenticated", body
|
31
36
|
end
|
32
37
|
|
33
38
|
should 'set basic roles with store location and login page' do
|
34
39
|
mock_app do
|
40
|
+
set :app_name, :basic_app
|
35
41
|
enable :authentication
|
36
42
|
enable :store_location
|
37
43
|
set :login_page, "/login"
|
38
|
-
set :app_name, :test_me
|
39
|
-
set :use_orm, :datamapper
|
40
44
|
|
41
|
-
|
42
|
-
|
43
|
-
role.allow "/"
|
44
|
-
role.require_login "/foo"
|
45
|
+
access_control.roles_for :any do |role|
|
46
|
+
role.protect "/foo"
|
45
47
|
end
|
46
48
|
|
47
49
|
# Prepare a basic page
|
48
50
|
get "/login" do
|
49
|
-
assert_equal "[]", admin_menu
|
50
51
|
redirect_back_or_default("/foo") if logged_in?
|
51
52
|
set_current_account(Account.admin)
|
52
53
|
"login page"
|
@@ -61,11 +62,191 @@ class TestAdminApplication < Test::Unit::TestCase
|
|
61
62
|
follow_redirect!
|
62
63
|
assert_equal "login page", body
|
63
64
|
|
65
|
+
get "/foo"
|
66
|
+
assert_equal "foo", body
|
67
|
+
|
64
68
|
get "/login"
|
65
69
|
follow_redirect!
|
66
70
|
assert_equal "foo", body
|
67
71
|
end
|
68
72
|
|
73
|
+
should 'set advanced roles with store location and login page' do
|
74
|
+
mock_app do
|
75
|
+
enable :authentication
|
76
|
+
|
77
|
+
access_control.roles_for :any do |role|
|
78
|
+
role.protect "/"
|
79
|
+
role.allow "/login"
|
80
|
+
role.allow "/any"
|
81
|
+
end
|
82
|
+
|
83
|
+
access_control.roles_for :admin do |role|
|
84
|
+
role.project_module :settings, "/settings"
|
85
|
+
end
|
86
|
+
|
87
|
+
access_control.roles_for :editor do |role|
|
88
|
+
role.project_module :posts, "/posts"
|
89
|
+
end
|
90
|
+
|
91
|
+
assert access_control.allowed?(Account.admin, "/login")
|
92
|
+
assert access_control.allowed?(Account.admin, "/any")
|
93
|
+
assert access_control.allowed?(Account.admin, "/settings")
|
94
|
+
assert ! access_control.allowed?(Account.admin, "/posts")
|
95
|
+
|
96
|
+
assert access_control.allowed?(Account.editor, "/login")
|
97
|
+
assert access_control.allowed?(Account.editor, "/any")
|
98
|
+
assert ! access_control.allowed?(Account.editor, "/settings")
|
99
|
+
assert access_control.allowed?(Account.editor, "/posts")
|
100
|
+
|
101
|
+
# Prepare a basic page
|
102
|
+
get "/login/(:role)" do
|
103
|
+
set_current_account(Account.send(params[:role])) if params[:role]
|
104
|
+
"logged as #{params[:role] || "any"}"
|
105
|
+
end
|
106
|
+
|
107
|
+
get "/any" do; "any"; end
|
108
|
+
get "/settings" do; "settings"; end
|
109
|
+
get "/posts" do; "posts"; end
|
110
|
+
end
|
111
|
+
|
112
|
+
get "/login/"
|
113
|
+
assert_equal "logged as any", body
|
114
|
+
|
115
|
+
get "/any"
|
116
|
+
assert_equal "any", body
|
117
|
+
|
118
|
+
get "/settings"
|
119
|
+
assert_equal "You don't have permission for this resource", body
|
120
|
+
|
121
|
+
get "/posts"
|
122
|
+
assert_equal "You don't have permission for this resource", body
|
123
|
+
|
124
|
+
get "/login/admin"
|
125
|
+
assert_equal "logged as admin", body
|
126
|
+
|
127
|
+
get "/any"
|
128
|
+
assert_equal "any", body
|
129
|
+
|
130
|
+
get "/settings"
|
131
|
+
assert_equal "settings", body
|
132
|
+
|
133
|
+
get "/posts"
|
134
|
+
assert_equal "You don't have permission for this resource", body
|
135
|
+
|
136
|
+
get "/login/editor"
|
137
|
+
assert_equal "logged as editor", body
|
138
|
+
|
139
|
+
get "/any"
|
140
|
+
assert_equal "any", body
|
141
|
+
|
142
|
+
get "/settings"
|
143
|
+
assert_equal "You don't have permission for this resource", body
|
144
|
+
|
145
|
+
get "/posts"
|
146
|
+
assert_equal "posts", body
|
147
|
+
end
|
148
|
+
|
149
|
+
should 'emulate an ecommerce app' do
|
150
|
+
mock_app do
|
151
|
+
enable :authentication
|
152
|
+
|
153
|
+
access_control.roles_for :any do |role|
|
154
|
+
role.protect "/cart"
|
155
|
+
role.allow "/cart/add"
|
156
|
+
role.allow "/cart/empty"
|
157
|
+
end
|
158
|
+
|
159
|
+
get "/login" do
|
160
|
+
set_current_account(Account.admin)
|
161
|
+
"Logged in"
|
162
|
+
end
|
163
|
+
|
164
|
+
get "/cart/checkout" do
|
165
|
+
"Checkout"
|
166
|
+
end
|
167
|
+
|
168
|
+
get "/cart/add" do
|
169
|
+
"Product Added"
|
170
|
+
end
|
171
|
+
|
172
|
+
get "/cart/empty" do
|
173
|
+
"Cart Empty"
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
get "/cart/checkout"
|
178
|
+
assert_equal "You don't have permission for this resource", body
|
179
|
+
|
180
|
+
get "/cart/add"
|
181
|
+
assert_equal "Product Added", body
|
182
|
+
|
183
|
+
get "/cart/empty"
|
184
|
+
assert_equal "Cart Empty", body
|
185
|
+
|
186
|
+
get "/login"
|
187
|
+
assert_equal "Logged in", body
|
188
|
+
|
189
|
+
get "/cart/checkout"
|
190
|
+
assert_equal "Checkout", body
|
191
|
+
|
192
|
+
get "/cart/add"
|
193
|
+
assert_equal "Product Added", body
|
194
|
+
|
195
|
+
get "/cart/empty"
|
196
|
+
assert_equal "Cart Empty", body
|
197
|
+
end
|
198
|
+
|
199
|
+
should 'check access control helper' do
|
200
|
+
mock_app do
|
201
|
+
enable :authentication
|
202
|
+
|
203
|
+
access_control.roles_for :any do |role|
|
204
|
+
role.project_module :foo, "/foo"
|
205
|
+
role.project_module :bar, "/bar"
|
206
|
+
end
|
207
|
+
|
208
|
+
access_control.roles_for :admin do |role|
|
209
|
+
role.project_module :admin, "/admin"
|
210
|
+
end
|
211
|
+
|
212
|
+
access_control.roles_for :editor do |role|
|
213
|
+
role.project_module :editor, "/editor"
|
214
|
+
end
|
215
|
+
|
216
|
+
get "/login" do
|
217
|
+
set_current_account(Account.admin)
|
218
|
+
"Logged in"
|
219
|
+
end
|
220
|
+
|
221
|
+
get "/roles" do
|
222
|
+
access_control.roles.join(", ")
|
223
|
+
end
|
224
|
+
|
225
|
+
get "/modules" do
|
226
|
+
project_modules.collect { |pm| "#{pm.name} => #{pm.path}" }.join(", ")
|
227
|
+
end
|
228
|
+
|
229
|
+
get "/modules-prefixed" do
|
230
|
+
project_modules.collect { |pm| "#{pm.name} => #{pm.path("/admin")}" }.join(", ")
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
get "/roles"
|
235
|
+
assert_equal "admin, editor", body
|
236
|
+
|
237
|
+
get "/modules"
|
238
|
+
assert_equal "foo => /foo, bar => /bar", body
|
239
|
+
|
240
|
+
get "/modules-prefixed"
|
241
|
+
assert_equal "foo => /admin/foo, bar => /admin/bar", body
|
242
|
+
|
243
|
+
get "/login"
|
244
|
+
assert_equal "Logged in", body
|
245
|
+
|
246
|
+
get "/modules"
|
247
|
+
assert_equal "admin => /admin", body
|
248
|
+
end
|
249
|
+
|
69
250
|
should 'use correclty flash middleware' do
|
70
251
|
mock_app do
|
71
252
|
use Padrino::Admin::Middleware::FlashMiddleware, :session_id
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: padrino-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2010-02-
|
15
|
+
date: 2010-02-23 00:00:00 -08:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - "="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
36
|
+
version: 0.9.0
|
37
37
|
version:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: padrino-gen
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: 0.9.0
|
47
47
|
version:
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: padrino-helpers
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - "="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.9.0
|
57
57
|
version:
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: haml
|
@@ -122,335 +122,54 @@ files:
|
|
122
122
|
- VERSION
|
123
123
|
- lib/padrino-admin.rb
|
124
124
|
- lib/padrino-admin/access_control.rb
|
125
|
-
- lib/padrino-admin/column_store.rb
|
126
|
-
- lib/padrino-admin/config.rb
|
127
125
|
- lib/padrino-admin/generators/actions.rb
|
128
126
|
- lib/padrino-admin/generators/admin_app.rb
|
129
127
|
- lib/padrino-admin/generators/admin_page.rb
|
130
|
-
- lib/padrino-admin/generators/
|
131
|
-
- lib/padrino-admin/generators/
|
132
|
-
- lib/padrino-admin/generators/
|
133
|
-
- lib/padrino-admin/generators/
|
134
|
-
- lib/padrino-admin/generators/app/
|
135
|
-
- lib/padrino-admin/generators/app/controllers/
|
136
|
-
- lib/padrino-admin/generators/app/
|
137
|
-
- lib/padrino-admin/generators/
|
138
|
-
- lib/padrino-admin/generators/
|
139
|
-
- lib/padrino-admin/generators/
|
140
|
-
- lib/padrino-admin/generators/
|
141
|
-
- lib/padrino-admin/generators/
|
142
|
-
- lib/padrino-admin/generators/
|
143
|
-
- lib/padrino-admin/generators/
|
144
|
-
- lib/padrino-admin/generators/
|
145
|
-
- lib/padrino-admin/generators/
|
146
|
-
- lib/padrino-admin/generators/assets/
|
147
|
-
- lib/padrino-admin/generators/assets/
|
148
|
-
- lib/padrino-admin/generators/assets/
|
149
|
-
- lib/padrino-admin/generators/assets/
|
150
|
-
- lib/padrino-admin/generators/
|
151
|
-
- lib/padrino-admin/generators/
|
152
|
-
- lib/padrino-admin/generators/
|
153
|
-
- lib/padrino-admin/generators/
|
154
|
-
- lib/padrino-admin/generators/
|
155
|
-
- lib/padrino-admin/generators/
|
156
|
-
- lib/padrino-admin/generators/
|
157
|
-
- lib/padrino-admin/generators/
|
158
|
-
- lib/padrino-admin/generators/assets/images/admin/bg-menu.png
|
159
|
-
- lib/padrino-admin/generators/assets/images/admin/bg.png
|
160
|
-
- lib/padrino-admin/generators/assets/images/admin/btn-login.png
|
161
|
-
- lib/padrino-admin/generators/assets/images/admin/cancel.gif
|
162
|
-
- lib/padrino-admin/generators/assets/images/admin/categories.gif
|
163
|
-
- lib/padrino-admin/generators/assets/images/admin/close.gif
|
164
|
-
- lib/padrino-admin/generators/assets/images/admin/close.png
|
165
|
-
- lib/padrino-admin/generators/assets/images/admin/delete.gif
|
166
|
-
- lib/padrino-admin/generators/assets/images/admin/download.gif
|
167
|
-
- lib/padrino-admin/generators/assets/images/admin/duplicate.gif
|
168
|
-
- lib/padrino-admin/generators/assets/images/admin/edit.gif
|
169
|
-
- lib/padrino-admin/generators/assets/images/admin/export.gif
|
170
|
-
- lib/padrino-admin/generators/assets/images/admin/hd-bg.gif
|
171
|
-
- lib/padrino-admin/generators/assets/images/admin/image.gif
|
172
|
-
- lib/padrino-admin/generators/assets/images/admin/loader.gif
|
173
|
-
- lib/padrino-admin/generators/assets/images/admin/logo-loader.png
|
174
|
-
- lib/padrino-admin/generators/assets/images/admin/logo-small.png
|
175
|
-
- lib/padrino-admin/generators/assets/images/admin/new.gif
|
176
|
-
- lib/padrino-admin/generators/assets/images/admin/no-image.png
|
177
|
-
- lib/padrino-admin/generators/assets/images/admin/preview.gif
|
178
|
-
- lib/padrino-admin/generators/assets/images/admin/print.gif
|
179
|
-
- lib/padrino-admin/generators/assets/images/admin/save.gif
|
180
|
-
- lib/padrino-admin/generators/assets/images/admin/support.gif
|
181
|
-
- lib/padrino-admin/generators/assets/images/admin/up.gif
|
182
|
-
- lib/padrino-admin/generators/assets/images/ext/default/box/corners-blue.gif
|
183
|
-
- lib/padrino-admin/generators/assets/images/ext/default/box/corners.gif
|
184
|
-
- lib/padrino-admin/generators/assets/images/ext/default/box/l-blue.gif
|
185
|
-
- lib/padrino-admin/generators/assets/images/ext/default/box/l.gif
|
186
|
-
- lib/padrino-admin/generators/assets/images/ext/default/box/r-blue.gif
|
187
|
-
- lib/padrino-admin/generators/assets/images/ext/default/box/r.gif
|
188
|
-
- lib/padrino-admin/generators/assets/images/ext/default/box/tb-blue.gif
|
189
|
-
- lib/padrino-admin/generators/assets/images/ext/default/box/tb.gif
|
190
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/arrow.gif
|
191
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/btn.gif
|
192
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/group-cs.gif
|
193
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/group-lr.gif
|
194
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/group-tb.gif
|
195
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-b-noline.gif
|
196
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-b.gif
|
197
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-bo.gif
|
198
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-noline.gif
|
199
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow-o.gif
|
200
|
-
- lib/padrino-admin/generators/assets/images/ext/default/button/s-arrow.gif
|
201
|
-
- lib/padrino-admin/generators/assets/images/ext/default/dd/drop-add.gif
|
202
|
-
- lib/padrino-admin/generators/assets/images/ext/default/dd/drop-no.gif
|
203
|
-
- lib/padrino-admin/generators/assets/images/ext/default/dd/drop-yes.gif
|
204
|
-
- lib/padrino-admin/generators/assets/images/ext/default/editor/tb-sprite.gif
|
205
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/checkbox.gif
|
206
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/clear-trigger.gif
|
207
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/clear-trigger.psd
|
208
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/date-trigger.gif
|
209
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/date-trigger.psd
|
210
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/error-tip-corners.gif
|
211
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/exclamation.gif
|
212
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/radio.gif
|
213
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/search-trigger.gif
|
214
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/search-trigger.psd
|
215
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/text-bg.gif
|
216
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/trigger-tpl.gif
|
217
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/trigger.gif
|
218
|
-
- lib/padrino-admin/generators/assets/images/ext/default/form/trigger.psd
|
219
|
-
- lib/padrino-admin/generators/assets/images/ext/default/gradient-bg.gif
|
220
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/Thumbs.db
|
221
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/arrow-left-white.gif
|
222
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/arrow-right-white.gif
|
223
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/col-move-bottom.gif
|
224
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/col-move-top.gif
|
225
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/columns.gif
|
226
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/dirty.gif
|
227
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/done.gif
|
228
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/drop-no.gif
|
229
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/drop-yes.gif
|
230
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/footer-bg.gif
|
231
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid-blue-hd.gif
|
232
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid-blue-split.gif
|
233
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid-hrow.gif
|
234
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid-loading.gif
|
235
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid-split.gif
|
236
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid-vista-hd.gif
|
237
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-hd-btn.gif
|
238
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-hrow-over.gif
|
239
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-hrow.gif
|
240
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-special-col-bg.gif
|
241
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/grid3-special-col-sel-bg.gif
|
242
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/group-by.gif
|
243
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/group-expand-sprite.gif
|
244
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/hd-pop.gif
|
245
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-asc.gif
|
246
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-desc.gif
|
247
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-lock.gif
|
248
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-lock.png
|
249
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-unlock.gif
|
250
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/hmenu-unlock.png
|
251
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/invalid_line.gif
|
252
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/loading.gif
|
253
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/mso-hd.gif
|
254
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/nowait.gif
|
255
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/page-first-disabled.gif
|
256
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/page-first.gif
|
257
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/page-last-disabled.gif
|
258
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/page-last.gif
|
259
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/page-next-disabled.gif
|
260
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/page-next.gif
|
261
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/page-prev-disabled.gif
|
262
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/page-prev.gif
|
263
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/pick-button.gif
|
264
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/refresh.gif
|
265
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/row-check-sprite.gif
|
266
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/row-expand-sprite.gif
|
267
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/row-over.gif
|
268
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/row-sel.gif
|
269
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/sort-hd.gif
|
270
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/sort_asc.gif
|
271
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/sort_desc.gif
|
272
|
-
- lib/padrino-admin/generators/assets/images/ext/default/grid/wait.gif
|
273
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/collapse.gif
|
274
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/expand.gif
|
275
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/gradient-bg.gif
|
276
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/mini-bottom.gif
|
277
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/mini-left.gif
|
278
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/mini-right.gif
|
279
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/mini-top.gif
|
280
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/ns-collapse.gif
|
281
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/ns-expand.gif
|
282
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/panel-close.gif
|
283
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/panel-title-bg.gif
|
284
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/panel-title-light-bg.gif
|
285
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/stick.gif
|
286
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/stuck.gif
|
287
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/tab-close-on.gif
|
288
|
-
- lib/padrino-admin/generators/assets/images/ext/default/layout/tab-close.gif
|
289
|
-
- lib/padrino-admin/generators/assets/images/ext/default/menu/checked.gif
|
290
|
-
- lib/padrino-admin/generators/assets/images/ext/default/menu/group-checked.gif
|
291
|
-
- lib/padrino-admin/generators/assets/images/ext/default/menu/item-over.gif
|
292
|
-
- lib/padrino-admin/generators/assets/images/ext/default/menu/menu-parent.gif
|
293
|
-
- lib/padrino-admin/generators/assets/images/ext/default/menu/menu.gif
|
294
|
-
- lib/padrino-admin/generators/assets/images/ext/default/menu/unchecked.gif
|
295
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/corners-sprite.gif
|
296
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/left-right.gif
|
297
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/light-hd.gif
|
298
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/tool-sprite-tpl.gif
|
299
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/tool-sprites.gif
|
300
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/tools-sprites-trans.gif
|
301
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/top-bottom.gif
|
302
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/top-bottom.png
|
303
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/white-corners-sprite.gif
|
304
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/white-left-right.gif
|
305
|
-
- lib/padrino-admin/generators/assets/images/ext/default/panel/white-top-bottom.gif
|
306
|
-
- lib/padrino-admin/generators/assets/images/ext/default/progress/progress-bg.gif
|
307
|
-
- lib/padrino-admin/generators/assets/images/ext/default/qtip/bg.gif
|
308
|
-
- lib/padrino-admin/generators/assets/images/ext/default/qtip/close.gif
|
309
|
-
- lib/padrino-admin/generators/assets/images/ext/default/qtip/tip-anchor-sprite.gif
|
310
|
-
- lib/padrino-admin/generators/assets/images/ext/default/qtip/tip-sprite.gif
|
311
|
-
- lib/padrino-admin/generators/assets/images/ext/default/s.gif
|
312
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shadow-c.png
|
313
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shadow-lr.png
|
314
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shadow.png
|
315
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/blue-loading.gif
|
316
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/calendar.gif
|
317
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/glass-bg.gif
|
318
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/hd-sprite.gif
|
319
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/large-loading.gif
|
320
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/left-btn.gif
|
321
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/loading-balls.gif
|
322
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/right-btn.gif
|
323
|
-
- lib/padrino-admin/generators/assets/images/ext/default/shared/warning.gif
|
324
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/e-handle-dark.gif
|
325
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/e-handle.gif
|
326
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/ne-handle-dark.gif
|
327
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/ne-handle.gif
|
328
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/nw-handle-dark.gif
|
329
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/nw-handle.gif
|
330
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/s-handle-dark.gif
|
331
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/s-handle.gif
|
332
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/se-handle-dark.gif
|
333
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/se-handle.gif
|
334
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/square.gif
|
335
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/sw-handle-dark.gif
|
336
|
-
- lib/padrino-admin/generators/assets/images/ext/default/sizer/sw-handle.gif
|
337
|
-
- lib/padrino-admin/generators/assets/images/ext/default/slider/slider-bg.png
|
338
|
-
- lib/padrino-admin/generators/assets/images/ext/default/slider/slider-thumb.png
|
339
|
-
- lib/padrino-admin/generators/assets/images/ext/default/slider/slider-v-bg.png
|
340
|
-
- lib/padrino-admin/generators/assets/images/ext/default/slider/slider-v-thumb.png
|
341
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/scroll-left.gif
|
342
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/scroll-right.gif
|
343
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/scroller-bg.gif
|
344
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-btm-inactive-left-bg.gif
|
345
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-btm-inactive-right-bg.gif
|
346
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-btm-left-bg.gif
|
347
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-btm-right-bg.gif
|
348
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-close.gif
|
349
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-strip-bg.gif
|
350
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-strip-bg.png
|
351
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tab-strip-btm-bg.gif
|
352
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tabs/tabs-sprite.gif
|
353
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/bg.gif
|
354
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/btn-arrow-light.gif
|
355
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/btn-arrow.gif
|
356
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/btn-over-bg.gif
|
357
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/gray-bg.gif
|
358
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/more.gif
|
359
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/tb-bg.gif
|
360
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/tb-btn-sprite.gif
|
361
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/tb-xl-btn-sprite.gif
|
362
|
-
- lib/padrino-admin/generators/assets/images/ext/default/toolbar/tb-xl-sep.gif
|
363
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/arrows.gif
|
364
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/drop-add.gif
|
365
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/drop-between.gif
|
366
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/drop-no.gif
|
367
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/drop-over.gif
|
368
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/drop-under.gif
|
369
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/drop-yes.gif
|
370
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end-minus-nl.gif
|
371
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end-minus.gif
|
372
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end-plus-nl.gif
|
373
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end-plus.gif
|
374
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-end.gif
|
375
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-line.gif
|
376
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-minus-nl.gif
|
377
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-minus.gif
|
378
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-plus-nl.gif
|
379
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow-plus.gif
|
380
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/elbow.gif
|
381
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/folder-open.gif
|
382
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/folder.gif
|
383
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/leaf.gif
|
384
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/loading.gif
|
385
|
-
- lib/padrino-admin/generators/assets/images/ext/default/tree/s.gif
|
386
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/icon-error.gif
|
387
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/icon-info.gif
|
388
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/icon-question.gif
|
389
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/icon-warning.gif
|
390
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/left-corners.png
|
391
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/left-corners.psd
|
392
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/left-right.png
|
393
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/left-right.psd
|
394
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/right-corners.png
|
395
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/right-corners.psd
|
396
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/top-bottom.png
|
397
|
-
- lib/padrino-admin/generators/assets/images/ext/default/window/top-bottom.psd
|
398
|
-
- lib/padrino-admin/generators/assets/javascripts/controls.js
|
399
|
-
- lib/padrino-admin/generators/assets/javascripts/dragdrop.js
|
400
|
-
- lib/padrino-admin/generators/assets/javascripts/effects.js
|
401
|
-
- lib/padrino-admin/generators/assets/javascripts/ext.js
|
402
|
-
- lib/padrino-admin/generators/assets/javascripts/prototype.js
|
403
|
-
- lib/padrino-admin/generators/assets/javascripts/swfupload.js
|
404
|
-
- lib/padrino-admin/generators/assets/stylesheets/admin.css
|
405
|
-
- lib/padrino-admin/generators/assets/stylesheets/ext.css
|
406
|
-
- lib/padrino-admin/generators/assets/stylesheets/login.css
|
407
|
-
- lib/padrino-admin/generators/assets/stylesheets/standard.css
|
128
|
+
- lib/padrino-admin/generators/orm.rb
|
129
|
+
- lib/padrino-admin/generators/templates/account/activerecord.rb.tt
|
130
|
+
- lib/padrino-admin/generators/templates/account/datamapper.rb.tt
|
131
|
+
- lib/padrino-admin/generators/templates/account/seeds.rb.tt
|
132
|
+
- lib/padrino-admin/generators/templates/app/app.rb
|
133
|
+
- lib/padrino-admin/generators/templates/app/controllers/base.rb
|
134
|
+
- lib/padrino-admin/generators/templates/app/controllers/sessions.rb
|
135
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/base.css
|
136
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/amro/style.css
|
137
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec-green/style.css
|
138
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec/style.css
|
139
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/blue/style.css
|
140
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/default/style.css
|
141
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/djime-cerulean/style.css
|
142
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/kathleene/style.css
|
143
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/olive/style.css
|
144
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/orange/style.css
|
145
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/reidb-greenish/style.css
|
146
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/ruby/style.css
|
147
|
+
- lib/padrino-admin/generators/templates/assets/stylesheets/themes/warehouse/style.css
|
148
|
+
- lib/padrino-admin/generators/templates/erb/app/base/_sidebar.erb.tt
|
149
|
+
- lib/padrino-admin/generators/templates/erb/app/base/index.erb.tt
|
150
|
+
- lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt
|
151
|
+
- lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt
|
152
|
+
- lib/padrino-admin/generators/templates/erb/page/_form.erb.tt
|
153
|
+
- lib/padrino-admin/generators/templates/erb/page/edit.erb.tt
|
154
|
+
- lib/padrino-admin/generators/templates/erb/page/index.erb.tt
|
155
|
+
- lib/padrino-admin/generators/templates/erb/page/new.erb.tt
|
408
156
|
- lib/padrino-admin/generators/templates/page/controller.rb.tt
|
409
|
-
- lib/padrino-admin/generators/templates/page/db/seeds.rb.tt
|
410
|
-
- lib/padrino-admin/generators/templates/page/views/_form.haml.tt
|
411
|
-
- lib/padrino-admin/generators/templates/page/views/edit.haml.tt
|
412
|
-
- lib/padrino-admin/generators/templates/page/views/grid.js.erb.tt
|
413
|
-
- lib/padrino-admin/generators/templates/page/views/new.haml.tt
|
414
|
-
- lib/padrino-admin/generators/templates/page/views/store.jml.tt
|
415
|
-
- lib/padrino-admin/generators/templates/uploader/controller.rb
|
416
|
-
- lib/padrino-admin/generators/templates/uploader/lib/uploader.rb
|
417
|
-
- lib/padrino-admin/generators/templates/uploader/views/grid.js.erb
|
418
|
-
- lib/padrino-admin/generators/templates/uploader/views/store.jml
|
419
157
|
- lib/padrino-admin/helpers/authentication_helpers.rb
|
420
158
|
- lib/padrino-admin/helpers/view_helpers.rb
|
421
159
|
- lib/padrino-admin/locale/admin/de.yml
|
422
160
|
- lib/padrino-admin/locale/admin/en.yml
|
423
161
|
- lib/padrino-admin/locale/admin/it.yml
|
424
|
-
- lib/padrino-admin/locale/extjs/de.yml
|
425
|
-
- lib/padrino-admin/locale/extjs/en.yml
|
426
|
-
- lib/padrino-admin/locale/extjs/it.yml
|
427
162
|
- lib/padrino-admin/locale/orm/de.yml
|
428
163
|
- lib/padrino-admin/locale/orm/en.yml
|
429
164
|
- lib/padrino-admin/locale/orm/it.yml
|
430
165
|
- lib/padrino-admin/middleware/flash_middleware.rb
|
431
|
-
- lib/padrino-admin/orm.rb
|
432
|
-
- lib/padrino-admin/orm/abstract.rb
|
433
|
-
- lib/padrino-admin/orm/activerecord.rb
|
434
|
-
- lib/padrino-admin/orm/datamapper.rb
|
435
|
-
- lib/padrino-admin/orm/mongomapper.rb
|
436
166
|
- lib/padrino-admin/utils/crypt.rb
|
437
|
-
- lib/padrino-admin/utils/literal.rb
|
438
167
|
- padrino-admin.gemspec
|
439
|
-
- test/fixtures/active_record.rb
|
440
168
|
- test/fixtures/data_mapper.rb
|
441
|
-
- test/fixtures/mongo_mapper.rb
|
442
|
-
- test/fixtures/test_column_store.jml
|
443
169
|
- test/generators/test_admin_app_generator.rb
|
444
170
|
- test/generators/test_admin_page_generator.rb
|
445
|
-
- test/generators/test_admin_uploader_generator.rb
|
446
171
|
- test/helper.rb
|
447
|
-
- test/test_access_control.rb
|
448
|
-
- test/test_active_record.rb
|
449
172
|
- test/test_admin_application.rb
|
450
|
-
- test/test_column_store.rb
|
451
|
-
- test/test_config.rb
|
452
|
-
- test/test_data_mapper.rb
|
453
|
-
- test/test_mongo_mapper.rb
|
454
173
|
has_rdoc: true
|
455
174
|
homepage: http://github.com/padrino/padrino-framework/tree/master/padrino-admin
|
456
175
|
licenses: []
|