padrino-admin 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. data/VERSION +1 -1
  2. data/lib/padrino-admin.rb +3 -2
  3. data/lib/padrino-admin/access_control.rb +2 -1
  4. data/lib/padrino-admin/generators/admin_app.rb +1 -0
  5. data/lib/padrino-admin/generators/app/app.rb.tt +16 -5
  6. data/lib/padrino-admin/generators/app/views/javascripts/admin.js.erb +4 -1
  7. data/lib/padrino-admin/generators/{app/public → assets}/flash/charts.swf +0 -0
  8. data/lib/padrino-admin/generators/{app/public → assets}/flash/clippy.swf +0 -0
  9. data/lib/padrino-admin/generators/{app/public → assets}/flash/expressinstall.swf +0 -0
  10. data/lib/padrino-admin/generators/{app/public → assets}/flash/swfupload.swf +0 -0
  11. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/back.gif +0 -0
  12. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/background.png +0 -0
  13. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/bg-content.png +0 -0
  14. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/bg-hd-slate.png +0 -0
  15. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/bg-hd.png +0 -0
  16. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/bg-intro.png +0 -0
  17. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/bg-login.png +0 -0
  18. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/bg-menu-slate.png +0 -0
  19. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/bg-menu.png +0 -0
  20. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/bg.png +0 -0
  21. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/btn-login.png +0 -0
  22. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/cancel.gif +0 -0
  23. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/categories.gif +0 -0
  24. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/close.gif +0 -0
  25. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/close.png +0 -0
  26. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/delete.gif +0 -0
  27. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/download.gif +0 -0
  28. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/duplicate.gif +0 -0
  29. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/edit.gif +0 -0
  30. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/export.gif +0 -0
  31. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/hd-bg.gif +0 -0
  32. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/image.gif +0 -0
  33. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/loader.gif +0 -0
  34. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/logo-loader.png +0 -0
  35. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/logo-small.png +0 -0
  36. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/new.gif +0 -0
  37. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/no-image.png +0 -0
  38. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/preview.gif +0 -0
  39. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/print.gif +0 -0
  40. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/save.gif +0 -0
  41. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/support.gif +0 -0
  42. data/lib/padrino-admin/generators/{app/public → assets}/images/admin/up.gif +0 -0
  43. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/box/corners-blue.gif +0 -0
  44. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/box/corners.gif +0 -0
  45. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/box/l-blue.gif +0 -0
  46. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/box/l.gif +0 -0
  47. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/box/r-blue.gif +0 -0
  48. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/box/r.gif +0 -0
  49. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/box/tb-blue.gif +0 -0
  50. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/box/tb.gif +0 -0
  51. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/arrow.gif +0 -0
  52. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/btn.gif +0 -0
  53. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/group-cs.gif +0 -0
  54. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/group-lr.gif +0 -0
  55. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/group-tb.gif +0 -0
  56. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/s-arrow-b-noline.gif +0 -0
  57. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/s-arrow-b.gif +0 -0
  58. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/s-arrow-bo.gif +0 -0
  59. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/s-arrow-noline.gif +0 -0
  60. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/s-arrow-o.gif +0 -0
  61. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/button/s-arrow.gif +0 -0
  62. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/dd/drop-add.gif +0 -0
  63. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/dd/drop-no.gif +0 -0
  64. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/dd/drop-yes.gif +0 -0
  65. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/editor/tb-sprite.gif +0 -0
  66. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/checkbox.gif +0 -0
  67. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/clear-trigger.gif +0 -0
  68. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/clear-trigger.psd +0 -0
  69. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/date-trigger.gif +0 -0
  70. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/date-trigger.psd +0 -0
  71. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/error-tip-corners.gif +0 -0
  72. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/exclamation.gif +0 -0
  73. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/radio.gif +0 -0
  74. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/search-trigger.gif +0 -0
  75. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/search-trigger.psd +0 -0
  76. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/text-bg.gif +0 -0
  77. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/trigger-tpl.gif +0 -0
  78. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/trigger.gif +0 -0
  79. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/form/trigger.psd +0 -0
  80. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/gradient-bg.gif +0 -0
  81. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/Thumbs.db +0 -0
  82. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/arrow-left-white.gif +0 -0
  83. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/arrow-right-white.gif +0 -0
  84. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/col-move-bottom.gif +0 -0
  85. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/col-move-top.gif +0 -0
  86. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/columns.gif +0 -0
  87. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/dirty.gif +0 -0
  88. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/done.gif +0 -0
  89. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/drop-no.gif +0 -0
  90. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/drop-yes.gif +0 -0
  91. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/footer-bg.gif +0 -0
  92. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid-blue-hd.gif +0 -0
  93. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid-blue-split.gif +0 -0
  94. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid-hrow.gif +0 -0
  95. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid-loading.gif +0 -0
  96. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid-split.gif +0 -0
  97. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid-vista-hd.gif +0 -0
  98. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid3-hd-btn.gif +0 -0
  99. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid3-hrow-over.gif +0 -0
  100. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid3-hrow.gif +0 -0
  101. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid3-special-col-bg.gif +0 -0
  102. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/grid3-special-col-sel-bg.gif +0 -0
  103. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/group-by.gif +0 -0
  104. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/group-expand-sprite.gif +0 -0
  105. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/hd-pop.gif +0 -0
  106. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/hmenu-asc.gif +0 -0
  107. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/hmenu-desc.gif +0 -0
  108. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/hmenu-lock.gif +0 -0
  109. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/hmenu-lock.png +0 -0
  110. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/hmenu-unlock.gif +0 -0
  111. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/hmenu-unlock.png +0 -0
  112. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/invalid_line.gif +0 -0
  113. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/loading.gif +0 -0
  114. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/mso-hd.gif +0 -0
  115. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/nowait.gif +0 -0
  116. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/page-first-disabled.gif +0 -0
  117. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/page-first.gif +0 -0
  118. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/page-last-disabled.gif +0 -0
  119. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/page-last.gif +0 -0
  120. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/page-next-disabled.gif +0 -0
  121. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/page-next.gif +0 -0
  122. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/page-prev-disabled.gif +0 -0
  123. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/page-prev.gif +0 -0
  124. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/pick-button.gif +0 -0
  125. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/refresh.gif +0 -0
  126. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/row-check-sprite.gif +0 -0
  127. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/row-expand-sprite.gif +0 -0
  128. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/row-over.gif +0 -0
  129. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/row-sel.gif +0 -0
  130. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/sort-hd.gif +0 -0
  131. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/sort_asc.gif +0 -0
  132. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/sort_desc.gif +0 -0
  133. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/grid/wait.gif +0 -0
  134. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/collapse.gif +0 -0
  135. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/expand.gif +0 -0
  136. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/gradient-bg.gif +0 -0
  137. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/mini-bottom.gif +0 -0
  138. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/mini-left.gif +0 -0
  139. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/mini-right.gif +0 -0
  140. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/mini-top.gif +0 -0
  141. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/ns-collapse.gif +0 -0
  142. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/ns-expand.gif +0 -0
  143. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/panel-close.gif +0 -0
  144. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/panel-title-bg.gif +0 -0
  145. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/panel-title-light-bg.gif +0 -0
  146. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/stick.gif +0 -0
  147. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/stuck.gif +0 -0
  148. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/tab-close-on.gif +0 -0
  149. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/layout/tab-close.gif +0 -0
  150. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/menu/checked.gif +0 -0
  151. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/menu/group-checked.gif +0 -0
  152. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/menu/item-over.gif +0 -0
  153. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/menu/menu-parent.gif +0 -0
  154. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/menu/menu.gif +0 -0
  155. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/menu/unchecked.gif +0 -0
  156. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/corners-sprite.gif +0 -0
  157. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/left-right.gif +0 -0
  158. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/light-hd.gif +0 -0
  159. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/tool-sprite-tpl.gif +0 -0
  160. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/tool-sprites.gif +0 -0
  161. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/tools-sprites-trans.gif +0 -0
  162. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/top-bottom.gif +0 -0
  163. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/top-bottom.png +0 -0
  164. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/white-corners-sprite.gif +0 -0
  165. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/white-left-right.gif +0 -0
  166. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/panel/white-top-bottom.gif +0 -0
  167. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/progress/progress-bg.gif +0 -0
  168. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/qtip/bg.gif +0 -0
  169. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/qtip/close.gif +0 -0
  170. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/qtip/tip-anchor-sprite.gif +0 -0
  171. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/qtip/tip-sprite.gif +0 -0
  172. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/s.gif +0 -0
  173. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shadow-c.png +0 -0
  174. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shadow-lr.png +0 -0
  175. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shadow.png +0 -0
  176. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/blue-loading.gif +0 -0
  177. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/calendar.gif +0 -0
  178. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/glass-bg.gif +0 -0
  179. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/hd-sprite.gif +0 -0
  180. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/large-loading.gif +0 -0
  181. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/left-btn.gif +0 -0
  182. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/loading-balls.gif +0 -0
  183. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/right-btn.gif +0 -0
  184. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/shared/warning.gif +0 -0
  185. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/e-handle-dark.gif +0 -0
  186. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/e-handle.gif +0 -0
  187. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/ne-handle-dark.gif +0 -0
  188. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/ne-handle.gif +0 -0
  189. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/nw-handle-dark.gif +0 -0
  190. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/nw-handle.gif +0 -0
  191. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/s-handle-dark.gif +0 -0
  192. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/s-handle.gif +0 -0
  193. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/se-handle-dark.gif +0 -0
  194. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/se-handle.gif +0 -0
  195. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/square.gif +0 -0
  196. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/sw-handle-dark.gif +0 -0
  197. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/sizer/sw-handle.gif +0 -0
  198. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/slider/slider-bg.png +0 -0
  199. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/slider/slider-thumb.png +0 -0
  200. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/slider/slider-v-bg.png +0 -0
  201. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/slider/slider-v-thumb.png +0 -0
  202. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/scroll-left.gif +0 -0
  203. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/scroll-right.gif +0 -0
  204. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/scroller-bg.gif +0 -0
  205. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
  206. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
  207. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tab-btm-left-bg.gif +0 -0
  208. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tab-btm-right-bg.gif +0 -0
  209. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tab-close.gif +0 -0
  210. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tab-strip-bg.gif +0 -0
  211. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tab-strip-bg.png +0 -0
  212. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tab-strip-btm-bg.gif +0 -0
  213. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tabs/tabs-sprite.gif +0 -0
  214. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/bg.gif +0 -0
  215. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/btn-arrow-light.gif +0 -0
  216. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/btn-arrow.gif +0 -0
  217. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/btn-over-bg.gif +0 -0
  218. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/gray-bg.gif +0 -0
  219. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/more.gif +0 -0
  220. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/tb-bg.gif +0 -0
  221. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/tb-btn-sprite.gif +0 -0
  222. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/tb-xl-btn-sprite.gif +0 -0
  223. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/toolbar/tb-xl-sep.gif +0 -0
  224. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/arrows.gif +0 -0
  225. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/drop-add.gif +0 -0
  226. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/drop-between.gif +0 -0
  227. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/drop-no.gif +0 -0
  228. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/drop-over.gif +0 -0
  229. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/drop-under.gif +0 -0
  230. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/drop-yes.gif +0 -0
  231. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-end-minus-nl.gif +0 -0
  232. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-end-minus.gif +0 -0
  233. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-end-plus-nl.gif +0 -0
  234. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-end-plus.gif +0 -0
  235. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-end.gif +0 -0
  236. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-line.gif +0 -0
  237. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-minus-nl.gif +0 -0
  238. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-minus.gif +0 -0
  239. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-plus-nl.gif +0 -0
  240. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow-plus.gif +0 -0
  241. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/elbow.gif +0 -0
  242. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/folder-open.gif +0 -0
  243. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/folder.gif +0 -0
  244. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/leaf.gif +0 -0
  245. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/loading.gif +0 -0
  246. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/tree/s.gif +0 -0
  247. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/icon-error.gif +0 -0
  248. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/icon-info.gif +0 -0
  249. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/icon-question.gif +0 -0
  250. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/icon-warning.gif +0 -0
  251. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/left-corners.png +0 -0
  252. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/left-corners.psd +0 -0
  253. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/left-right.png +0 -0
  254. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/left-right.psd +0 -0
  255. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/right-corners.png +0 -0
  256. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/right-corners.psd +0 -0
  257. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/top-bottom.png +0 -0
  258. data/lib/padrino-admin/generators/{app/public → assets}/images/ext/default/window/top-bottom.psd +0 -0
  259. data/lib/padrino-admin/generators/{app/public → assets}/javascripts/controls.js +0 -0
  260. data/lib/padrino-admin/generators/{app/public → assets}/javascripts/dragdrop.js +0 -0
  261. data/lib/padrino-admin/generators/{app/public → assets}/javascripts/effects.js +0 -0
  262. data/lib/padrino-admin/generators/{app/public → assets}/javascripts/ext.js +0 -0
  263. data/lib/padrino-admin/generators/{app/public → assets}/javascripts/prototype.js +0 -0
  264. data/lib/padrino-admin/generators/{app/public → assets}/javascripts/swfupload.js +0 -0
  265. data/lib/padrino-admin/generators/{app/public → assets}/stylesheets/admin.css +0 -0
  266. data/lib/padrino-admin/generators/{app/public → assets}/stylesheets/ext.css +0 -0
  267. data/lib/padrino-admin/generators/{app/public → assets}/stylesheets/login.css +0 -0
  268. data/lib/padrino-admin/generators/{app/public → assets}/stylesheets/standard.css +0 -0
  269. data/lib/padrino-admin/generators/templates/uploader/lib/uploader.rb +43 -31
  270. data/lib/padrino-admin/helpers/view.rb +8 -2
  271. data/lib/padrino-admin/orm/abstract.rb +2 -1
  272. data/padrino-admin.gemspec +273 -273
  273. data/test/helper.rb +1 -1
  274. data/test/test_active_record.rb +1 -0
  275. data/test/test_data_mapper.rb +1 -0
  276. metadata +267 -267
@@ -1,54 +1,66 @@
1
1
  class Uploader < CarrierWave::Uploader::Base
2
2
 
3
- # Include RMagick or ImageScience support
4
- # include CarrierWave::RMagick
5
- # include CarrierWave::ImageScience
6
- include CarrierWave::MiniMagick
3
+ ##
4
+ # Image manipulator library:
5
+ #
6
+ # include CarrierWave::RMagick
7
+ # include CarrierWave::ImageScience
8
+ # include CarrierWave::MiniMagick
7
9
 
8
- # Choose what kind of storage to use for this uploader
10
+ ##
11
+ # Storage type
12
+ #
9
13
  storage :file
10
- # storage :s3
11
-
12
- # Override the directory where uploaded files will be stored
13
- # This is a sensible default for uploaders that are meant to be mounted:
14
-
15
- def root
16
- "app/public"
17
- end
14
+ # storage :s3
18
15
 
16
+ ##
17
+ # Directory where uploaded files will be stored (default is /public/uploads)
18
+ #
19
19
  def store_dir
20
20
  "uploads"
21
21
  end
22
22
 
23
+ ##
24
+ # Directory where uploaded temp files will be stored (default is [root]/tmp)
25
+ #
23
26
  def cache_dir
24
- "tmp"
27
+ Padrino.root("tmp")
25
28
  end
26
29
 
27
- # Provide a default URL as a default if there hasn't been a file uploaded
28
- # def default_url
29
- # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
30
- # end
30
+ ##
31
+ # Default URL as a default if there hasn't been a file uploaded
32
+ #
33
+ # def default_url
34
+ # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
35
+ # end
36
+
37
+ ##
31
38
  # Process files as they are uploaded.
32
- process :resize_to_fit => [640, 480]
39
+ #
40
+ # process :resize_to_fit => [640, 480]
33
41
  #
34
- # def scale(width, height)
35
- # # do something
36
- # end
42
+ # def scale(width, height)
43
+ # # do something
44
+ # end
37
45
 
46
+ ##
38
47
  # Create different versions of your uploaded files
39
- version :thumb do
40
- process :resize_to_fit => [128, 128]
41
- end
48
+ #
49
+ # version :thumb do
50
+ # process :resize_to_fit => [128, 128]
51
+ # end
42
52
 
43
- # Add a white list of extensions which are allowed to be uploaded,
44
- # for images you might use something like this:
53
+ ##
54
+ # White list of extensions which are allowed to be uploaded:
55
+ #
45
56
  # def extension_white_list
46
57
  # %w(jpg jpeg gif png)
47
58
  # end
48
59
 
60
+ ##
49
61
  # Override the filename of the uploaded files
50
- # def filename
51
- # "something.jpg" if original_filename
52
- # end
53
-
62
+ #
63
+ # def filename
64
+ # "something.jpg" if original_filename
65
+ # end
54
66
  end
@@ -144,6 +144,7 @@ module Padrino
144
144
  #
145
145
  # :with:: name of the association. Ex: :images.
146
146
  # :url:: the url of the gird, by default we autogenerate them using +:with+ ex: url(:images_index, :format => :js)
147
+ # :controller:: the name of the controller that contains the gird, by default is +:with+
147
148
  # :show:: value to display, if it's a symbol we tranform them using +with+ ex: :name, will be: data["images.name"]
148
149
  # :get:: value to store in our db, Default: +:id+
149
150
  # :grid:: the name of the var of Admin.grid. Default :grid
@@ -188,7 +189,8 @@ module Padrino
188
189
  def open_window_grid(object_name, method, options={})
189
190
 
190
191
  # We need plural version of our association
191
- controller = options[:multiple] ? options[:with] : "#{options[:with].to_s.pluralize}".to_sym
192
+ options[:controller] ||= options[:with]
193
+ controller = options[:multiple] ? options[:controller] : "#{options[:controller].to_s.pluralize}".to_sym
192
194
 
193
195
  # Now we need our association
194
196
  association = instance_variable_get("@#{object_name}").send(options[:with])
@@ -205,6 +207,10 @@ module Padrino
205
207
  input_name = "#{object_name}[#{method}]"
206
208
  input_name += "[]" if options[:multiple]
207
209
 
210
+ # We need always some defaults values
211
+ defaults = hidden_field_tag(input_name)
212
+
213
+ # Now a reusable (also from extjs) template
208
214
  template = (<<-HTML).gsub(/ {10}/, "")
209
215
  <li>
210
216
  <span class="display">{0}</span>
@@ -224,7 +230,7 @@ module Padrino
224
230
  collection << li_link
225
231
 
226
232
  # Now we have the final container
227
- container = content_tag(:ul, collection.join.gsub("\\",""), :id => "#{object_name}_#{method}", :class => "open-window-grid")
233
+ container = content_tag(:ul, defaults + collection.join.gsub("\\",""), :id => "#{object_name}_#{method}", :class => "open-window-grid")
228
234
 
229
235
  # We need to refactor some values
230
236
  show = "data['#{controller}.#{options[:show]}']" if options[:show].is_a?(Symbol)
@@ -1,6 +1,7 @@
1
1
  module Padrino
2
2
  module Admin
3
- class OrmError < StandardError; end
3
+ class OrmError < StandardError #:nodoc:
4
+ end
4
5
 
5
6
  module Orm
6
7
  module Abstract