dm_core 4.2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (522) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +22 -0
  3. data/README.md +25 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/images/dm_core/draft_menu_bg.png +0 -0
  6. data/app/assets/images/dm_core/expand.png +0 -0
  7. data/app/assets/images/dm_core/flags/ad.gif +0 -0
  8. data/app/assets/images/dm_core/flags/ae.gif +0 -0
  9. data/app/assets/images/dm_core/flags/af.gif +0 -0
  10. data/app/assets/images/dm_core/flags/ag.gif +0 -0
  11. data/app/assets/images/dm_core/flags/ai.gif +0 -0
  12. data/app/assets/images/dm_core/flags/al.gif +0 -0
  13. data/app/assets/images/dm_core/flags/am.gif +0 -0
  14. data/app/assets/images/dm_core/flags/an.gif +0 -0
  15. data/app/assets/images/dm_core/flags/ao.gif +0 -0
  16. data/app/assets/images/dm_core/flags/ar.gif +0 -0
  17. data/app/assets/images/dm_core/flags/as.gif +0 -0
  18. data/app/assets/images/dm_core/flags/at.gif +0 -0
  19. data/app/assets/images/dm_core/flags/au.gif +0 -0
  20. data/app/assets/images/dm_core/flags/aw.gif +0 -0
  21. data/app/assets/images/dm_core/flags/ax.gif +0 -0
  22. data/app/assets/images/dm_core/flags/az.gif +0 -0
  23. data/app/assets/images/dm_core/flags/ba.gif +0 -0
  24. data/app/assets/images/dm_core/flags/bb.gif +0 -0
  25. data/app/assets/images/dm_core/flags/bd.gif +0 -0
  26. data/app/assets/images/dm_core/flags/be.gif +0 -0
  27. data/app/assets/images/dm_core/flags/bf.gif +0 -0
  28. data/app/assets/images/dm_core/flags/bg.gif +0 -0
  29. data/app/assets/images/dm_core/flags/bh.gif +0 -0
  30. data/app/assets/images/dm_core/flags/bi.gif +0 -0
  31. data/app/assets/images/dm_core/flags/bj.gif +0 -0
  32. data/app/assets/images/dm_core/flags/bm.gif +0 -0
  33. data/app/assets/images/dm_core/flags/bn.gif +0 -0
  34. data/app/assets/images/dm_core/flags/bo.gif +0 -0
  35. data/app/assets/images/dm_core/flags/br.gif +0 -0
  36. data/app/assets/images/dm_core/flags/bs.gif +0 -0
  37. data/app/assets/images/dm_core/flags/bt.gif +0 -0
  38. data/app/assets/images/dm_core/flags/bv.gif +0 -0
  39. data/app/assets/images/dm_core/flags/bw.gif +0 -0
  40. data/app/assets/images/dm_core/flags/by.gif +0 -0
  41. data/app/assets/images/dm_core/flags/bz.gif +0 -0
  42. data/app/assets/images/dm_core/flags/ca.gif +0 -0
  43. data/app/assets/images/dm_core/flags/cc.gif +0 -0
  44. data/app/assets/images/dm_core/flags/cd.gif +0 -0
  45. data/app/assets/images/dm_core/flags/cf.gif +0 -0
  46. data/app/assets/images/dm_core/flags/cg.gif +0 -0
  47. data/app/assets/images/dm_core/flags/ch.gif +0 -0
  48. data/app/assets/images/dm_core/flags/ci.gif +0 -0
  49. data/app/assets/images/dm_core/flags/ck.gif +0 -0
  50. data/app/assets/images/dm_core/flags/cl.gif +0 -0
  51. data/app/assets/images/dm_core/flags/cm.gif +0 -0
  52. data/app/assets/images/dm_core/flags/cn.gif +0 -0
  53. data/app/assets/images/dm_core/flags/co.gif +0 -0
  54. data/app/assets/images/dm_core/flags/cr.gif +0 -0
  55. data/app/assets/images/dm_core/flags/cs.gif +0 -0
  56. data/app/assets/images/dm_core/flags/cu.gif +0 -0
  57. data/app/assets/images/dm_core/flags/cv.gif +0 -0
  58. data/app/assets/images/dm_core/flags/cx.gif +0 -0
  59. data/app/assets/images/dm_core/flags/cy.gif +0 -0
  60. data/app/assets/images/dm_core/flags/cz.gif +0 -0
  61. data/app/assets/images/dm_core/flags/de.gif +0 -0
  62. data/app/assets/images/dm_core/flags/dj.gif +0 -0
  63. data/app/assets/images/dm_core/flags/dk.gif +0 -0
  64. data/app/assets/images/dm_core/flags/dm.gif +0 -0
  65. data/app/assets/images/dm_core/flags/do.gif +0 -0
  66. data/app/assets/images/dm_core/flags/dz.gif +0 -0
  67. data/app/assets/images/dm_core/flags/ec.gif +0 -0
  68. data/app/assets/images/dm_core/flags/ee.gif +0 -0
  69. data/app/assets/images/dm_core/flags/eg.gif +0 -0
  70. data/app/assets/images/dm_core/flags/eh.gif +0 -0
  71. data/app/assets/images/dm_core/flags/en.gif +0 -0
  72. data/app/assets/images/dm_core/flags/england.gif +0 -0
  73. data/app/assets/images/dm_core/flags/er.gif +0 -0
  74. data/app/assets/images/dm_core/flags/es.gif +0 -0
  75. data/app/assets/images/dm_core/flags/et.gif +0 -0
  76. data/app/assets/images/dm_core/flags/fam.gif +0 -0
  77. data/app/assets/images/dm_core/flags/fi.gif +0 -0
  78. data/app/assets/images/dm_core/flags/fj.gif +0 -0
  79. data/app/assets/images/dm_core/flags/fk.gif +0 -0
  80. data/app/assets/images/dm_core/flags/fm.gif +0 -0
  81. data/app/assets/images/dm_core/flags/fo.gif +0 -0
  82. data/app/assets/images/dm_core/flags/fr.gif +0 -0
  83. data/app/assets/images/dm_core/flags/ga.gif +0 -0
  84. data/app/assets/images/dm_core/flags/gb.gif +0 -0
  85. data/app/assets/images/dm_core/flags/gd.gif +0 -0
  86. data/app/assets/images/dm_core/flags/ge.gif +0 -0
  87. data/app/assets/images/dm_core/flags/gh.gif +0 -0
  88. data/app/assets/images/dm_core/flags/gi.gif +0 -0
  89. data/app/assets/images/dm_core/flags/gl.gif +0 -0
  90. data/app/assets/images/dm_core/flags/gm.gif +0 -0
  91. data/app/assets/images/dm_core/flags/gn.gif +0 -0
  92. data/app/assets/images/dm_core/flags/gp.gif +0 -0
  93. data/app/assets/images/dm_core/flags/gq.gif +0 -0
  94. data/app/assets/images/dm_core/flags/gr.gif +0 -0
  95. data/app/assets/images/dm_core/flags/gs.gif +0 -0
  96. data/app/assets/images/dm_core/flags/gt.gif +0 -0
  97. data/app/assets/images/dm_core/flags/gu.gif +0 -0
  98. data/app/assets/images/dm_core/flags/gw.gif +0 -0
  99. data/app/assets/images/dm_core/flags/gy.gif +0 -0
  100. data/app/assets/images/dm_core/flags/hk.gif +0 -0
  101. data/app/assets/images/dm_core/flags/hn.gif +0 -0
  102. data/app/assets/images/dm_core/flags/hr.gif +0 -0
  103. data/app/assets/images/dm_core/flags/ht.gif +0 -0
  104. data/app/assets/images/dm_core/flags/hu.gif +0 -0
  105. data/app/assets/images/dm_core/flags/id.gif +0 -0
  106. data/app/assets/images/dm_core/flags/ie.gif +0 -0
  107. data/app/assets/images/dm_core/flags/il.gif +0 -0
  108. data/app/assets/images/dm_core/flags/in.gif +0 -0
  109. data/app/assets/images/dm_core/flags/io.gif +0 -0
  110. data/app/assets/images/dm_core/flags/iq.gif +0 -0
  111. data/app/assets/images/dm_core/flags/ir.gif +0 -0
  112. data/app/assets/images/dm_core/flags/is.gif +0 -0
  113. data/app/assets/images/dm_core/flags/it.gif +0 -0
  114. data/app/assets/images/dm_core/flags/ja.gif +0 -0
  115. data/app/assets/images/dm_core/flags/jm.gif +0 -0
  116. data/app/assets/images/dm_core/flags/jo.gif +0 -0
  117. data/app/assets/images/dm_core/flags/ke.gif +0 -0
  118. data/app/assets/images/dm_core/flags/kg.gif +0 -0
  119. data/app/assets/images/dm_core/flags/kh.gif +0 -0
  120. data/app/assets/images/dm_core/flags/ki.gif +0 -0
  121. data/app/assets/images/dm_core/flags/km.gif +0 -0
  122. data/app/assets/images/dm_core/flags/kn.gif +0 -0
  123. data/app/assets/images/dm_core/flags/kp.gif +0 -0
  124. data/app/assets/images/dm_core/flags/kr.gif +0 -0
  125. data/app/assets/images/dm_core/flags/kw.gif +0 -0
  126. data/app/assets/images/dm_core/flags/ky.gif +0 -0
  127. data/app/assets/images/dm_core/flags/kz.gif +0 -0
  128. data/app/assets/images/dm_core/flags/la.gif +0 -0
  129. data/app/assets/images/dm_core/flags/lb.gif +0 -0
  130. data/app/assets/images/dm_core/flags/lc.gif +0 -0
  131. data/app/assets/images/dm_core/flags/li.gif +0 -0
  132. data/app/assets/images/dm_core/flags/lk.gif +0 -0
  133. data/app/assets/images/dm_core/flags/lr.gif +0 -0
  134. data/app/assets/images/dm_core/flags/ls.gif +0 -0
  135. data/app/assets/images/dm_core/flags/lt.gif +0 -0
  136. data/app/assets/images/dm_core/flags/lu.gif +0 -0
  137. data/app/assets/images/dm_core/flags/lv.gif +0 -0
  138. data/app/assets/images/dm_core/flags/ly.gif +0 -0
  139. data/app/assets/images/dm_core/flags/ma.gif +0 -0
  140. data/app/assets/images/dm_core/flags/mc.gif +0 -0
  141. data/app/assets/images/dm_core/flags/md.gif +0 -0
  142. data/app/assets/images/dm_core/flags/mg.gif +0 -0
  143. data/app/assets/images/dm_core/flags/mh.gif +0 -0
  144. data/app/assets/images/dm_core/flags/mk.gif +0 -0
  145. data/app/assets/images/dm_core/flags/ml.gif +0 -0
  146. data/app/assets/images/dm_core/flags/mm.gif +0 -0
  147. data/app/assets/images/dm_core/flags/mn.gif +0 -0
  148. data/app/assets/images/dm_core/flags/mo.gif +0 -0
  149. data/app/assets/images/dm_core/flags/mp.gif +0 -0
  150. data/app/assets/images/dm_core/flags/mq.gif +0 -0
  151. data/app/assets/images/dm_core/flags/mr.gif +0 -0
  152. data/app/assets/images/dm_core/flags/ms.gif +0 -0
  153. data/app/assets/images/dm_core/flags/mt.gif +0 -0
  154. data/app/assets/images/dm_core/flags/mu.gif +0 -0
  155. data/app/assets/images/dm_core/flags/mv.gif +0 -0
  156. data/app/assets/images/dm_core/flags/mw.gif +0 -0
  157. data/app/assets/images/dm_core/flags/mx.gif +0 -0
  158. data/app/assets/images/dm_core/flags/my.gif +0 -0
  159. data/app/assets/images/dm_core/flags/mz.gif +0 -0
  160. data/app/assets/images/dm_core/flags/na.gif +0 -0
  161. data/app/assets/images/dm_core/flags/nc.gif +0 -0
  162. data/app/assets/images/dm_core/flags/ne.gif +0 -0
  163. data/app/assets/images/dm_core/flags/nf.gif +0 -0
  164. data/app/assets/images/dm_core/flags/ng.gif +0 -0
  165. data/app/assets/images/dm_core/flags/ni.gif +0 -0
  166. data/app/assets/images/dm_core/flags/nl.gif +0 -0
  167. data/app/assets/images/dm_core/flags/no.gif +0 -0
  168. data/app/assets/images/dm_core/flags/np.gif +0 -0
  169. data/app/assets/images/dm_core/flags/nr.gif +0 -0
  170. data/app/assets/images/dm_core/flags/nu.gif +0 -0
  171. data/app/assets/images/dm_core/flags/nz.gif +0 -0
  172. data/app/assets/images/dm_core/flags/om.gif +0 -0
  173. data/app/assets/images/dm_core/flags/pa.gif +0 -0
  174. data/app/assets/images/dm_core/flags/pe.gif +0 -0
  175. data/app/assets/images/dm_core/flags/pf.gif +0 -0
  176. data/app/assets/images/dm_core/flags/pg.gif +0 -0
  177. data/app/assets/images/dm_core/flags/ph.gif +0 -0
  178. data/app/assets/images/dm_core/flags/pk.gif +0 -0
  179. data/app/assets/images/dm_core/flags/pl.gif +0 -0
  180. data/app/assets/images/dm_core/flags/pm.gif +0 -0
  181. data/app/assets/images/dm_core/flags/pn.gif +0 -0
  182. data/app/assets/images/dm_core/flags/pr.gif +0 -0
  183. data/app/assets/images/dm_core/flags/ps.gif +0 -0
  184. data/app/assets/images/dm_core/flags/pt.gif +0 -0
  185. data/app/assets/images/dm_core/flags/pw.gif +0 -0
  186. data/app/assets/images/dm_core/flags/py.gif +0 -0
  187. data/app/assets/images/dm_core/flags/qa.gif +0 -0
  188. data/app/assets/images/dm_core/flags/ro.gif +0 -0
  189. data/app/assets/images/dm_core/flags/ru.gif +0 -0
  190. data/app/assets/images/dm_core/flags/rw.gif +0 -0
  191. data/app/assets/images/dm_core/flags/sa.gif +0 -0
  192. data/app/assets/images/dm_core/flags/sb.gif +0 -0
  193. data/app/assets/images/dm_core/flags/sc.gif +0 -0
  194. data/app/assets/images/dm_core/flags/scotland.gif +0 -0
  195. data/app/assets/images/dm_core/flags/sd.gif +0 -0
  196. data/app/assets/images/dm_core/flags/se.gif +0 -0
  197. data/app/assets/images/dm_core/flags/sg.gif +0 -0
  198. data/app/assets/images/dm_core/flags/sh.gif +0 -0
  199. data/app/assets/images/dm_core/flags/si.gif +0 -0
  200. data/app/assets/images/dm_core/flags/sk.gif +0 -0
  201. data/app/assets/images/dm_core/flags/sl.gif +0 -0
  202. data/app/assets/images/dm_core/flags/sm.gif +0 -0
  203. data/app/assets/images/dm_core/flags/sn.gif +0 -0
  204. data/app/assets/images/dm_core/flags/so.gif +0 -0
  205. data/app/assets/images/dm_core/flags/sr.gif +0 -0
  206. data/app/assets/images/dm_core/flags/st.gif +0 -0
  207. data/app/assets/images/dm_core/flags/sv.gif +0 -0
  208. data/app/assets/images/dm_core/flags/sy.gif +0 -0
  209. data/app/assets/images/dm_core/flags/sz.gif +0 -0
  210. data/app/assets/images/dm_core/flags/tc.gif +0 -0
  211. data/app/assets/images/dm_core/flags/td.gif +0 -0
  212. data/app/assets/images/dm_core/flags/tf.gif +0 -0
  213. data/app/assets/images/dm_core/flags/tg.gif +0 -0
  214. data/app/assets/images/dm_core/flags/th.gif +0 -0
  215. data/app/assets/images/dm_core/flags/tj.gif +0 -0
  216. data/app/assets/images/dm_core/flags/tk.gif +0 -0
  217. data/app/assets/images/dm_core/flags/tl.gif +0 -0
  218. data/app/assets/images/dm_core/flags/tm.gif +0 -0
  219. data/app/assets/images/dm_core/flags/tn.gif +0 -0
  220. data/app/assets/images/dm_core/flags/to.gif +0 -0
  221. data/app/assets/images/dm_core/flags/tr.gif +0 -0
  222. data/app/assets/images/dm_core/flags/tt.gif +0 -0
  223. data/app/assets/images/dm_core/flags/tv.gif +0 -0
  224. data/app/assets/images/dm_core/flags/tw.gif +0 -0
  225. data/app/assets/images/dm_core/flags/tz.gif +0 -0
  226. data/app/assets/images/dm_core/flags/ua.gif +0 -0
  227. data/app/assets/images/dm_core/flags/ug.gif +0 -0
  228. data/app/assets/images/dm_core/flags/um.gif +0 -0
  229. data/app/assets/images/dm_core/flags/us.gif +0 -0
  230. data/app/assets/images/dm_core/flags/uy.gif +0 -0
  231. data/app/assets/images/dm_core/flags/uz.gif +0 -0
  232. data/app/assets/images/dm_core/flags/va.gif +0 -0
  233. data/app/assets/images/dm_core/flags/vc.gif +0 -0
  234. data/app/assets/images/dm_core/flags/ve.gif +0 -0
  235. data/app/assets/images/dm_core/flags/vg.gif +0 -0
  236. data/app/assets/images/dm_core/flags/vi.gif +0 -0
  237. data/app/assets/images/dm_core/flags/vn.gif +0 -0
  238. data/app/assets/images/dm_core/flags/vu.gif +0 -0
  239. data/app/assets/images/dm_core/flags/wales.gif +0 -0
  240. data/app/assets/images/dm_core/flags/wf.gif +0 -0
  241. data/app/assets/images/dm_core/flags/ws.gif +0 -0
  242. data/app/assets/images/dm_core/flags/ye.gif +0 -0
  243. data/app/assets/images/dm_core/flags/yt.gif +0 -0
  244. data/app/assets/images/dm_core/flags/za.gif +0 -0
  245. data/app/assets/images/dm_core/flags/zm.gif +0 -0
  246. data/app/assets/images/dm_core/flags/zw.gif +0 -0
  247. data/app/assets/images/dm_core/user.gif +0 -0
  248. data/app/assets/javascripts/dm_core/admin.js +223 -0
  249. data/app/assets/javascripts/dm_core/admin_extra.js.coffee +118 -0
  250. data/app/assets/javascripts/dm_core/application.js +14 -0
  251. data/app/assets/javascripts/dm_core/common_js.js.coffee +61 -0
  252. data/app/assets/javascripts/dm_core/underscore-1.4.4-min.js +1 -0
  253. data/app/assets/javascripts/dm_core/underscore-1.4.4.js +1227 -0
  254. data/app/assets/stylesheets/dm_core/admin.css +250 -0
  255. data/app/assets/stylesheets/dm_core/application.css +31 -0
  256. data/app/assets/stylesheets/dm_core/font-awesome.css +1479 -0
  257. data/app/assets/stylesheets/dm_core/font/FontAwesome.otf +0 -0
  258. data/app/assets/stylesheets/dm_core/font/fontawesome-webfont.eot +0 -0
  259. data/app/assets/stylesheets/dm_core/font/fontawesome-webfont.svg +399 -0
  260. data/app/assets/stylesheets/dm_core/font/fontawesome-webfont.ttf +0 -0
  261. data/app/assets/stylesheets/dm_core/font/fontawesome-webfont.woff +0 -0
  262. data/app/controllers/dm_core/admin/accounts_controller.rb +125 -0
  263. data/app/controllers/dm_core/admin/admin_controller.rb +133 -0
  264. data/app/controllers/dm_core/admin/comments_controller.rb +70 -0
  265. data/app/controllers/dm_core/admin/dashboard_controller.rb +38 -0
  266. data/app/controllers/dm_core/admin/system_controller.rb +44 -0
  267. data/app/controllers/dm_core/admin/users_controller.rb +106 -0
  268. data/app/controllers/dm_core/application_controller.rb +253 -0
  269. data/app/controllers/dm_core/concerns/profile_controller.rb +41 -0
  270. data/app/controllers/dm_core/profile_controller.rb +8 -0
  271. data/app/datatables/user_datatable.rb +75 -0
  272. data/app/helpers/devise_helper.rb +25 -0
  273. data/app/helpers/dm_core/account_helper.rb +70 -0
  274. data/app/helpers/dm_core/admin/application_helper.rb +23 -0
  275. data/app/helpers/dm_core/application_helper.rb +58 -0
  276. data/app/helpers/dm_core/liquid_helper.rb +79 -0
  277. data/app/helpers/dm_core/params_helper.rb +19 -0
  278. data/app/helpers/dm_core/render_helper.rb +104 -0
  279. data/app/helpers/dm_core/url_helper.rb +189 -0
  280. data/app/helpers/dm_utilities/currency_helper.rb +24 -0
  281. data/app/helpers/dm_utilities/date_helper.rb +72 -0
  282. data/app/inputs/code_editor_input.rb +51 -0
  283. data/app/inputs/text_full_width_input.rb +9 -0
  284. data/app/inputs/toggle_checked_input.rb +9 -0
  285. data/app/inputs/toggle_input.rb +9 -0
  286. data/app/mailers/dm_core/site_mailer.rb +18 -0
  287. data/app/models/account.rb +241 -0
  288. data/app/models/activity.rb +10 -0
  289. data/app/models/address.rb +24 -0
  290. data/app/models/category.rb +18 -0
  291. data/app/models/comment.rb +24 -0
  292. data/app/models/custom_field.rb +99 -0
  293. data/app/models/custom_field_def.rb +61 -0
  294. data/app/models/dm_core/concerns/ability.rb +17 -0
  295. data/app/models/dm_core/concerns/defines_custom_fields.rb +17 -0
  296. data/app/models/dm_core/concerns/friendly_id.rb +57 -0
  297. data/app/models/dm_core/concerns/has_custom_fields.rb +28 -0
  298. data/app/models/dm_core/concerns/public_private.rb +151 -0
  299. data/app/models/dm_core/concerns/user.rb +144 -0
  300. data/app/models/dm_core/concerns/user_profile.rb +113 -0
  301. data/app/models/dm_core/concerns/user_site_profile.rb +65 -0
  302. data/app/models/dm_core/country.rb +8 -0
  303. data/app/models/dm_core/language.rb +59 -0
  304. data/app/models/dm_core/permitted_params.rb +52 -0
  305. data/app/models/follow.rb +13 -0
  306. data/app/models/liquid_validator.rb +26 -0
  307. data/app/models/payment_history.rb +57 -0
  308. data/app/models/presence_default_locale_validator.rb +12 -0
  309. data/app/models/role.rb +12 -0
  310. data/app/models/system_email.rb +15 -0
  311. data/app/models/ultracart/notification.rb +107 -0
  312. data/app/models/ultracart/payment_history.rb +55 -0
  313. data/app/models/user.rb +22 -0
  314. data/app/models/user_profile.rb +9 -0
  315. data/app/models/user_site_profile.rb +11 -0
  316. data/app/presenters/base_presenter.rb +30 -0
  317. data/app/presenters/comment_presenter.rb +20 -0
  318. data/app/presenters/user_presenter.rb +48 -0
  319. data/app/uploaders/avatar_uploader.rb +75 -0
  320. data/app/views/devise/mailer/confirmation_instructions.html.erb +7 -0
  321. data/app/views/devise/mailer/confirmation_instructions.text.erb +7 -0
  322. data/app/views/devise/mailer/reset_password_instructions.html.erb +9 -0
  323. data/app/views/devise/mailer/reset_password_instructions.text.erb +9 -0
  324. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  325. data/app/views/devise/mailer/unlock_instructions.text.erb +7 -0
  326. data/app/views/dm_core/admin/accounts/_settings_menu.html.erb +24 -0
  327. data/app/views/dm_core/admin/accounts/analytics.html.erb +38 -0
  328. data/app/views/dm_core/admin/accounts/email.html.erb +26 -0
  329. data/app/views/dm_core/admin/accounts/general.html.erb +22 -0
  330. data/app/views/dm_core/admin/accounts/media.html.erb +37 -0
  331. data/app/views/dm_core/admin/accounts/metadata.html.erb +22 -0
  332. data/app/views/dm_core/admin/comments/_comment.html.erb +14 -0
  333. data/app/views/dm_core/admin/comments/_comment_edit_form.html.erb +3 -0
  334. data/app/views/dm_core/admin/comments/_comment_form.html.erb +15 -0
  335. data/app/views/dm_core/admin/comments/_comment_list.html.erb +5 -0
  336. data/app/views/dm_core/admin/comments/_comment_section.html.erb +7 -0
  337. data/app/views/dm_core/admin/comments/create.js.erb +4 -0
  338. data/app/views/dm_core/admin/comments/destroy.js.erb +1 -0
  339. data/app/views/dm_core/admin/comments/edit.js.erb +2 -0
  340. data/app/views/dm_core/admin/comments/update.js.erb +2 -0
  341. data/app/views/dm_core/admin/custom_fields/_check_box_collection.html.erb +4 -0
  342. data/app/views/dm_core/admin/custom_fields/_custom_field_def_fields.html.erb +34 -0
  343. data/app/views/dm_core/admin/custom_fields/_divider.html.erb +1 -0
  344. data/app/views/dm_core/admin/custom_fields/_number_field.html.erb +4 -0
  345. data/app/views/dm_core/admin/custom_fields/_radio_buttons.html.erb +4 -0
  346. data/app/views/dm_core/admin/custom_fields/_select.html.erb +4 -0
  347. data/app/views/dm_core/admin/custom_fields/_text_area.html.erb +4 -0
  348. data/app/views/dm_core/admin/custom_fields/_text_field.html.erb +4 -0
  349. data/app/views/dm_core/admin/dashboard/_index_sidebar.html.erb +22 -0
  350. data/app/views/dm_core/admin/dashboard/_widget_recent_new_users.html.erb +23 -0
  351. data/app/views/dm_core/admin/dashboard/_widget_recent_user_activity.html.erb +21 -0
  352. data/app/views/dm_core/admin/dashboard/index.html.erb +7 -0
  353. data/app/views/dm_core/admin/dashboard/update_site_assets.html.erb +5 -0
  354. data/app/views/dm_core/admin/shared/_header_stats_new_users.html.erb +2 -0
  355. data/app/views/dm_core/admin/shared/_header_stats_user_activity.html.erb +2 -0
  356. data/app/views/dm_core/admin/system/show.html.erb +23 -0
  357. data/app/views/dm_core/admin/users/_form.html.erb +44 -0
  358. data/app/views/dm_core/admin/users/edit.html.erb +201 -0
  359. data/app/views/dm_core/admin/users/index.html.erb +30 -0
  360. data/app/views/dm_core/profile/_profile_sidebar.html.erb +6 -0
  361. data/app/views/dm_core/profile/account.html.erb +38 -0
  362. data/app/views/dm_core/profile/details.html.erb +38 -0
  363. data/app/views/layouts/dm_core/application.html.erb +14 -0
  364. data/app/views/layouts/dm_core/maintenance.html.erb +31 -0
  365. data/app/views/layouts/email_templates/default_email_layout.html.erb +289 -0
  366. data/config/initializers/_dm_core.rb +7 -0
  367. data/config/initializers/carrierwave.rb +33 -0
  368. data/config/initializers/devise.rb +252 -0
  369. data/config/initializers/friendly_id.rb +88 -0
  370. data/config/initializers/globalize_easy_accessors.rb +67 -0
  371. data/config/initializers/globalize_papertrail_fix.rb +20 -0
  372. data/config/initializers/globalize_reflections.rb +22 -0
  373. data/config/initializers/rolify.rb +8 -0
  374. data/config/initializers/simple_form.rb +161 -0
  375. data/config/initializers/simple_form_amsterdam.rb +31 -0
  376. data/config/initializers/simple_form_bootstrap.rb +87 -0
  377. data/config/initializers/simple_form_bootstrap3.rb +175 -0
  378. data/config/initializers/will_paginate.rb +87 -0
  379. data/config/locales/custom.cs.yml +82 -0
  380. data/config/locales/custom.de.yml +82 -0
  381. data/config/locales/custom.en.yml +84 -0
  382. data/config/locales/custom.fi.yml +84 -0
  383. data/config/locales/custom.ja.yml +84 -0
  384. data/config/locales/devise.cs.yml +70 -0
  385. data/config/locales/devise.de.yml +60 -0
  386. data/config/locales/devise.en.yml +59 -0
  387. data/config/locales/devise.fi.yml +57 -0
  388. data/config/locales/devise.ja.yml +102 -0
  389. data/config/locales/rails.cs.yml +211 -0
  390. data/config/locales/rails.de-AT.yml +203 -0
  391. data/config/locales/rails.de.yml +203 -0
  392. data/config/locales/rails.en-GB.yml +205 -0
  393. data/config/locales/rails.en-IN.yml +205 -0
  394. data/config/locales/rails.en.yml +205 -0
  395. data/config/locales/rails.fi.yml +199 -0
  396. data/config/locales/rails.fr-CH.yml +207 -0
  397. data/config/locales/rails.fr.yml +215 -0
  398. data/config/locales/rails.ja.yml +197 -0
  399. data/config/locales/simple_form.cs.yml +26 -0
  400. data/config/locales/simple_form.de.yml +26 -0
  401. data/config/locales/simple_form.en.yml +26 -0
  402. data/config/locales/simple_form.fi.yml +26 -0
  403. data/config/locales/simple_form.ja.yml +26 -0
  404. data/config/routes.rb +33 -0
  405. data/db/globalize_seed_data.sql +76 -0
  406. data/db/migrate/20121023202117_add_globalize_countries.rb +49 -0
  407. data/db/migrate/20121028125329_devise_create_users.rb +45 -0
  408. data/db/migrate/20121028125831_add_user_fields.rb +13 -0
  409. data/db/migrate/20121028153317_rolify_create_roles.rb +19 -0
  410. data/db/migrate/20121105205634_add_last_access.rb +9 -0
  411. data/db/migrate/20121110213512_create_versions.rb +18 -0
  412. data/db/migrate/20121110213513_add_object_changes_column_to_versions.rb +11 -0
  413. data/db/migrate/20130206121535_create_dm_core_accounts.rb +12 -0
  414. data/db/migrate/20130206223323_add_account_to_users.rb +8 -0
  415. data/db/migrate/20130207170247_create_preferences.rb +12 -0
  416. data/db/migrate/20130321144726_create_comments.rb +21 -0
  417. data/db/migrate/20130402203739_add_activity.rb +20 -0
  418. data/db/migrate/20130415095617_add_type_to_comments.rb +8 -0
  419. data/db/migrate/20130429191051_add_category.rb +27 -0
  420. data/db/migrate/20130513112751_create_email_table.rb +25 -0
  421. data/db/migrate/20130516143539_add_user_profile.rb +45 -0
  422. data/db/migrate/20130518155712_add_profile_email.rb +13 -0
  423. data/db/migrate/20130620145610_create_payment_history.rb +36 -0
  424. data/db/migrate/20130625091108_change_anchor_field.rb +9 -0
  425. data/db/migrate/20130628112848_create_user_site_profile.rb +26 -0
  426. data/db/migrate/20130708150236_add_avatar.rb +11 -0
  427. data/db/migrate/20130914132041_add_notify_to_payment_history.rb +7 -0
  428. data/db/migrate/20140105133446_acts_as_votable_migration.rb +27 -0
  429. data/db/migrate/20140107112418_add_user_site_profile_uuid.rb +18 -0
  430. data/db/migrate/20140129110547_add_invoice_id.rb +6 -0
  431. data/db/migrate/20140201092656_acts_as_follower_migration.rb +17 -0
  432. data/db/migrate/20140203131320_rename_invoice_id.rb +11 -0
  433. data/db/migrate/20140210195143_add_core_addresses.rb +17 -0
  434. data/db/migrate/20140411190454_papertrail_increase_column.rb +8 -0
  435. data/db/migrate/20140501160009_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +31 -0
  436. data/db/migrate/20140501160010_add_missing_unique_indices.acts_as_taggable_on_engine.rb +22 -0
  437. data/db/migrate/20140501160011_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +15 -0
  438. data/db/migrate/20140529164730_create_custom_fields.rb +39 -0
  439. data/db/migrate/20140709145503_add_missing_taggable_index.acts_as_taggable_on_engine.rb +10 -0
  440. data/db/migrate/20141216094639_add_favored_locale.rb +18 -0
  441. data/db/migrate/20160128094739_update_papertrail_v4.rb +73 -0
  442. data/db/migrate/20160630095745_create_delayed_jobs.rb +22 -0
  443. data/db/migrate/20160821150111_index_foreign_keys_in_core_accounts.rb +5 -0
  444. data/db/migrate/20160821150113_index_foreign_keys_in_core_addresses.rb +5 -0
  445. data/db/migrate/20160821150114_index_foreign_keys_in_core_categories.rb +5 -0
  446. data/db/migrate/20160821150115_index_foreign_keys_in_core_comments.rb +5 -0
  447. data/db/migrate/20160821150116_index_foreign_keys_in_core_custom_fields.rb +5 -0
  448. data/db/migrate/20160821150117_index_foreign_keys_in_core_payment_histories.rb +7 -0
  449. data/db/migrate/20160821150118_index_foreign_keys_in_core_system_email_translations.rb +5 -0
  450. data/db/migrate/20160821150119_index_foreign_keys_in_core_system_emails.rb +6 -0
  451. data/db/migrate/20160821150128_index_foreign_keys_in_preferences.rb +5 -0
  452. data/db/migrate/20160821150129_index_foreign_keys_in_roles.rb +5 -0
  453. data/db/migrate/20160821150130_index_foreign_keys_in_taggings.rb +5 -0
  454. data/db/migrate/20160821150131_index_foreign_keys_in_user_profiles.rb +7 -0
  455. data/db/migrate/20160821150132_index_foreign_keys_in_user_site_profiles.rb +6 -0
  456. data/db/migrate/20160821150133_index_foreign_keys_in_users_roles.rb +5 -0
  457. data/db/migrate/20160821150134_index_foreign_keys_in_version_associations.rb +5 -0
  458. data/db/migrate/20160821150135_index_foreign_keys_in_versions.rb +5 -0
  459. data/db/seeds.rb +433 -0
  460. data/db/seeds/globalize_countries.rb +239 -0
  461. data/db/seeds/globalize_languages.rb +186 -0
  462. data/lib/dm_core.rb +38 -0
  463. data/lib/dm_core/csv_exporter.rb +210 -0
  464. data/lib/dm_core/csv_importer.rb +16 -0
  465. data/lib/dm_core/engine.rb +51 -0
  466. data/lib/dm_core/liquid_extensions.rb +125 -0
  467. data/lib/dm_core/nls.rb +31 -0
  468. data/lib/dm_core/scio_excel.rb +501 -0
  469. data/lib/dm_core/state_select.rb +135 -0
  470. data/lib/dm_core/version.rb +3 -0
  471. data/lib/tasks/dm_core_tasks.rake +60 -0
  472. data/spec/dummy/README.rdoc +28 -0
  473. data/spec/dummy/Rakefile +6 -0
  474. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  475. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  476. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  477. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  478. data/spec/dummy/app/models/ability.rb +10 -0
  479. data/spec/dummy/app/models/user.rb +6 -0
  480. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  481. data/spec/dummy/bin/bundle +3 -0
  482. data/spec/dummy/bin/rails +4 -0
  483. data/spec/dummy/bin/rake +4 -0
  484. data/spec/dummy/config.ru +4 -0
  485. data/spec/dummy/config/application.rb +27 -0
  486. data/spec/dummy/config/boot.rb +5 -0
  487. data/spec/dummy/config/database.yml +25 -0
  488. data/spec/dummy/config/environment.rb +5 -0
  489. data/spec/dummy/config/environments/development.rb +37 -0
  490. data/spec/dummy/config/environments/production.rb +82 -0
  491. data/spec/dummy/config/environments/test.rb +39 -0
  492. data/spec/dummy/config/initializers/assets.rb +8 -0
  493. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  494. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  495. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  496. data/spec/dummy/config/initializers/inflections.rb +16 -0
  497. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  498. data/spec/dummy/config/initializers/session_store.rb +3 -0
  499. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  500. data/spec/dummy/config/locales/en.yml +23 -0
  501. data/spec/dummy/config/routes.rb +11 -0
  502. data/spec/dummy/config/secrets.yml +22 -0
  503. data/spec/dummy/db/development.sqlite3 +0 -0
  504. data/spec/dummy/db/schema.rb +399 -0
  505. data/spec/dummy/db/test.sqlite3 +0 -0
  506. data/spec/dummy/log/test.log +374 -0
  507. data/spec/dummy/public/404.html +67 -0
  508. data/spec/dummy/public/422.html +67 -0
  509. data/spec/dummy/public/500.html +66 -0
  510. data/spec/dummy/public/favicon.ico +0 -0
  511. data/spec/factories/accounts.rb +9 -0
  512. data/spec/factories/user_profiles.rb +10 -0
  513. data/spec/factories/users.rb +19 -0
  514. data/spec/helpers/account_helper_spec.rb +50 -0
  515. data/spec/models/account_spec.rb +20 -0
  516. data/spec/models/user_spec.rb +99 -0
  517. data/spec/rails_helper.rb +70 -0
  518. data/spec/spec_helper.rb +85 -0
  519. data/spec/support/accounts.rb +19 -0
  520. data/spec/support/devise.rb +44 -0
  521. data/spec/support/fix_locale.rb +57 -0
  522. metadata +1124 -0
@@ -0,0 +1,38 @@
1
+ <% content_for :sidebar do %>
2
+ <%= render partial: 'dm_core/profile/profile_sidebar' %>
3
+ <% end %>
4
+
5
+ <%= simple_form_for(@user_profile, url: dm_core.edit_profile_details_path, wrapper: simple_form_theme_wrapper, html: {id: 'profile_form', class: 'profile_details_form'}) do |f| %>
6
+ <%= flash_notices %>
7
+ <%= f.error_notification message: I18n.t('core.errors_below') %>
8
+
9
+ <fieldset>
10
+ <h2><%= I18n.t 'core.profile_public_title' %></h2>
11
+ <p><%= I18n.t 'core.profile_public_explanation' %></p>
12
+ <%= f.input :public_name, label: I18n.t('core.profile_public_name'), required: true %>
13
+ <%= f.input :country_id, collection: ut_country_select_collection(false), label: I18n.t('core.profile_country'), required: true %>
14
+ <%= f.input :public_avatar, label: I18n.t('core.profile_public_upload'), as: :image, hint: I18n.t('core.profile_public_upload_help'), input_html: {preview_version: :sq100} %>
15
+ </fieldset>
16
+
17
+ <fieldset>
18
+ <h2><%= I18n.t 'core.profile_private_title' %></h2>
19
+ <p><%= I18n.t 'core.profile_private_explanation' %></p>
20
+ <% if I18n.locale == :ja %>
21
+ <%= f.input :last_name, label: I18n.t('core.profile_last_name'), required: true %>
22
+ <%= f.input :first_name, label: I18n.t('core.profile_first_name'), required: true %>
23
+ <% else %>
24
+ <%= f.input :first_name, label: I18n.t('core.profile_first_name'), required: true %>
25
+ <%= f.input :last_name, label: I18n.t('core.profile_last_name'), required: true %>
26
+ <% end %>
27
+ <%= f.input :address, label: I18n.t('core.profile_address') %>
28
+ <%= f.input :address2, label: I18n.t('core.profile_address2') %>
29
+ <%= f.input :city, label: I18n.t('core.profile_city') %>
30
+ <%= f.input :state, label: I18n.t('core.profile_state') %>
31
+ <%= f.input :zipcode, label: I18n.t('core.profile_zipcode') %>
32
+ </fieldset>
33
+
34
+ <fieldset class="submit_form">
35
+ <%= f.button :submit, I18n.t('core.profile_update_btn') %>
36
+ </fieldset>
37
+
38
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>DmCore</title>
5
+ <%= stylesheet_link_tag "dm_core/application", :media => "all" %>
6
+ <%= javascript_include_tag "dm_core/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
5
+ <meta charset="utf-8" />
6
+ <title>Site Down for Maintenance</title>
7
+
8
+ <style media="screen" type="text/css">
9
+ html { height: 100%; }
10
+ body { font-family: Arial, Helvetica, sans-serif; background: url(/error_body.jpg); font-size: 12px; line-height: 22px; color: #5f5f5f; min-height: 100%; position: relative; }
11
+ .errorWrapper { position: absolute; top: 50%; bottom: 0; margin-top: -190px; text-align: center; left: 0; right: 0; }
12
+ .errorContent { width: 380px; margin: auto; margin-top: 35px; }
13
+ .errorWrapper .errorTitle { display: block; text-shadow: 1px 0 0 #fff; text-align: center; font-size: 20px; border-bottom: 1px solid #cdcdcd; padding: 20px 14px; font-weight: bold; color: #d76a6a; font-style: italic; }
14
+ .errorWrapper .errorNum { color: #fff; font-size: 100px; text-stroke: 1px transparent; padding: 110px 0 80px 0; display: block; text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15); }
15
+ .errorDesc { display: block; margin: 20px 0 20px 0; font-weight: bold; font-size: 14px; }
16
+ .errorContent .buttonM { margin-top: 25px; }
17
+ </style>
18
+ </head>
19
+
20
+ <body>
21
+
22
+ <div class="errorWrapper">
23
+ <span class="errorNum">Maintenance</span>
24
+ <div class="errorContent">
25
+ <span class="errorDesc">The site is currently down for maintenance.<br />
26
+ We should have it back online shortly.</span>
27
+ </div>
28
+ </div>
29
+
30
+ </body>
31
+ </html>
@@ -0,0 +1,289 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+
6
+ <style type="text/css">
7
+ #outlook a { padding:0; }
8
+ body { width:100% !important; }
9
+ .ReadMsgBody { width:100%; }
10
+ .ExternalClass { width:100%; }
11
+ figure {margin:0; padding:0; display:block;}
12
+ body { -webkit-text-size-adjust:none; }
13
+ body {
14
+ margin:0;
15
+ padding:0;
16
+ font-size: 12px;
17
+ font-family: Arial, sans-serif;
18
+ }
19
+ img {
20
+ border:0;
21
+ height:auto;
22
+ line-height:100%;
23
+ outline:none;
24
+ text-decoration:none;
25
+ }
26
+ table td { border-collapse:collapse; }
27
+ #backgroundTable{
28
+ height:100% !important;
29
+ margin:0;
30
+ padding:0;
31
+ width:100% !important;
32
+ }
33
+ body,#backgroundTable { background-color:#F4F4F4; }
34
+ #templateContainer { border:none; }
35
+ h1,.h1 {
36
+ color:#7a530c;
37
+ display:block;
38
+ font-family:Arial;
39
+ font-size: 18px;
40
+ font-weight: normal;
41
+ line-height: 24px;
42
+ text-transform: uppercase;
43
+ margin-top:20px;
44
+ margin-right:0;
45
+ margin-bottom:20px;
46
+ margin-left:0;
47
+ text-align:left;
48
+ padding-bottom: 5px;
49
+ }
50
+ h2,.h2 {
51
+ color:#3f565e;
52
+ display:block;
53
+ font-family:Arial;
54
+ font-size:16px;
55
+ font-weight:normal;
56
+ line-height:100%;
57
+ margin-top:0;
58
+ margin-right:0;
59
+ margin-bottom:10px;
60
+ margin-left:0;
61
+ text-align:left;
62
+ text-transform: uppercase;
63
+ }
64
+ h3,.h3 {
65
+ color:#3f565e;
66
+ display:block;
67
+ font-family:Arial;
68
+ font-size:16px;
69
+ font-weight:normal;
70
+ line-height:100%;
71
+ margin-top:0;
72
+ margin-right:0;
73
+ margin-bottom:10px;
74
+ margin-left:0;
75
+ text-align:left;
76
+ }
77
+ h4,.h4 {
78
+ color:#7a530c;
79
+ display:block;
80
+ font-family:Arial;
81
+ font-size:14px;
82
+ font-weight:bold;
83
+ line-height:100%;
84
+ margin-top:0;
85
+ margin-right:0;
86
+ margin-bottom:10px;
87
+ margin-left:0;
88
+ text-align:left;
89
+ }
90
+ #templateHeader {
91
+ background-color:#F4F4F4;
92
+ border-bottom:0;
93
+ }
94
+ .headerContent {
95
+ color:#202020;
96
+ font-family:Arial;
97
+ font-size:34px;
98
+ font-weight:bold;
99
+ line-height:100%;
100
+ padding:0;
101
+ text-align:center;
102
+ vertical-align:middle;
103
+ height: 30px;
104
+ }
105
+ .headerContent a:link,.headerContent a:visited,.headerContent a .yshortcuts {
106
+ color:#336699;
107
+ font-weight:normal;
108
+ text-decoration:underline;
109
+ }
110
+ #headerImage {
111
+ height:auto;
112
+ max-width:650px !important;
113
+ }
114
+ #templateContainer,.bodyContent { background-color:#F4F4F4; }
115
+ .bodyContent {
116
+ background-color: white;
117
+ border: 1px solid #ddd;
118
+ border-radius: 2px;
119
+ }
120
+ .bodyContent div {
121
+ color:#444;
122
+ font-family:"Helvetica Neue", Helvetica;
123
+ font-size:15px;
124
+ line-height:150%;
125
+ text-align:left;
126
+ }
127
+ .bodyContent div a:link,.bodyContent div a:visited,.bodyContent div a .yshortcuts {
128
+ color:#336699;
129
+ font-weight:normal;
130
+ text-decoration:underline;
131
+ }
132
+ .bodyContent img {
133
+ display:inline;
134
+ height:auto;
135
+ }
136
+ #templateFooter {}
137
+ .footerContent div {
138
+ color:#333;
139
+ font-family:Arial;
140
+ font-size:11px;
141
+ line-height:125%;
142
+ text-align:left;
143
+ }
144
+ .footerContent div a:link,.footerContent div a:visited,.footerContent div a .yshortcuts {
145
+ color:#333;
146
+ font-weight:normal;
147
+ text-decoration:underline;
148
+ }
149
+ .footerContent img { display:inline; }
150
+ .bodyContent .date {
151
+ text-align: right;
152
+ font-size: 12px;
153
+ }
154
+ .bodyContent img {
155
+ padding: 4px;
156
+ background-color: white;
157
+ margin: 0px 0px 0px 0px;
158
+ }
159
+ img.img_right, img[align="right"] {
160
+ float: right;
161
+ margin: 0px 0px 10px 20px;
162
+ }
163
+ img.img_left, img[align="left"] {
164
+ float: left;
165
+ margin: 0px 20px 10px 0px;
166
+ }
167
+ img.img_full, img[align="none"], img[align="center"] {
168
+ float: none;
169
+ margin: 0px 0px 0px 0px;
170
+ clear: both;
171
+ }
172
+ a.button {
173
+ color: white !important;
174
+ text-decoration: none !important;
175
+ background-color:#5983AE;
176
+ padding-left:20px;
177
+ padding-right:20px;
178
+ padding-top: 10px;
179
+ padding-bottom: 10px;
180
+ font-family:helvetica,sans-serif;
181
+ font-size:16px;color:#ffffff;
182
+ border: 1px solid #696969;
183
+ border-radius:3px;
184
+ height: 40px;
185
+ }
186
+ </style>
187
+ </head>
188
+ <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
189
+ <center>
190
+ <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable">
191
+ <tr>
192
+ <td align="center" valign="top" style="border-collapse: collapse;">
193
+
194
+ <table border="0" cellpadding="0" cellspacing="0" width="650" id="templateContainer">
195
+ <tr>
196
+ <td align="center" valign="top" style="border-collapse: collapse;">
197
+ <!-- // Begin Template Header \\ -->
198
+ <table border="0" cellpadding="0" cellspacing="0" width="650" id="templateHeader">
199
+ <tr>
200
+ <td class="headerContent">
201
+
202
+ <!-- // Begin Module: Standard Header Image \\ -->
203
+ <!-- // End Module: Standard Header Image \\ -->
204
+
205
+ </td>
206
+ </tr>
207
+ </table>
208
+ <!-- // End Template Header \\ -->
209
+ </td>
210
+ </tr>
211
+ <tr>
212
+ <td align="center" valign="top" style="border-collapse: collapse;">
213
+ <!-- // Begin Template Body \\ -->
214
+ <table border="0" cellpadding="0" cellspacing="0" width="650" id="templateBody">
215
+ <tr>
216
+ <td valign="top" style="border-collapse: collapse;">
217
+ <table border="0" cellpadding="0" cellspacing="0" width="650">
218
+ <tr>
219
+ <td valign="top" class="bodyContent">
220
+
221
+ <!-- // Begin Module: Standard Content \\ -->
222
+ <table border="0" cellpadding="20" cellspacing="0" width="100%">
223
+ <tr>
224
+ <td valign="top" style="border-collapse: collapse;">
225
+ <div>
226
+ <!-- ====================== Start Main Content ====================== -->
227
+
228
+ <%= yield %>
229
+
230
+ <!-- ====================== End Main Content ====================== -->
231
+ </div>
232
+ </td>
233
+ </tr>
234
+ </table>
235
+ <!-- // End Module: Standard Content \\ -->
236
+ </td>
237
+ </tr>
238
+ </table>
239
+ </td>
240
+ </tr>
241
+ </table>
242
+ <!-- // End Template Body \\ -->
243
+ </td>
244
+ </tr>
245
+ <tr>
246
+ <td align="center" valign="top" style="border-collapse: collapse;">
247
+ <!-- // Begin Template Footer \\ -->
248
+ <table border="0" cellpadding="10" cellspacing="0" width="650" id="templateFooter">
249
+ <tr>
250
+ <td valign="top" class="footerContent" style="border-collapse: collapse;">
251
+
252
+ <!-- // Begin Module: Standard Footer \\ -->
253
+ <table border="0" cellpadding="10" cellspacing="0" width="650" id="templateFooter">
254
+ <tr>
255
+ <td valign="top" class="footerContent" style="border-collapse: collapse;">
256
+
257
+ <!-- // Begin Module: Standard Footer \\ -->
258
+ <table border="0" cellpadding="10" cellspacing="0" width="100%">
259
+ <tr>
260
+ <td valign="top" width="650">
261
+ <div>
262
+ <em>Copyright &copy; <%= Time.now.year %> <%= Account.current.company_name %></em>
263
+ &nbsp;&bull;&nbsp;<a href="mailto:<%= Account.current.contact_email %>"><%= Account.current.contact_email %></a>
264
+ &nbsp;&bull;&nbsp;<a href="http://<%= Account.current.domain %>"><%= Account.current.domain %></a>
265
+ </div>
266
+ </td>
267
+ </tr>
268
+ </table>
269
+ <!-- // End Module: Standard Footer \\ -->
270
+
271
+ </td>
272
+ </tr>
273
+ </table>
274
+ <!-- // End Module: Standard Footer \\ -->
275
+
276
+ </td>
277
+ </tr>
278
+ </table>
279
+ <!-- // End Template Footer \\ -->
280
+ </td>
281
+ </tr>
282
+ </table>
283
+ <br>
284
+ </td>
285
+ </tr>
286
+ </table>
287
+ </center>
288
+ </body>
289
+ </html>
@@ -0,0 +1,7 @@
1
+ #--- Make sure console user knows this app is mult-tenant
2
+ if defined?(Rails::Console)
3
+ puts "-------------------------------------------------------------------------------------"
4
+ puts " App is Multi-Tenant. Make sure to issue the following command before anything else."
5
+ puts " Account.current_by_prefix('specify_account_prefix') "
6
+ puts "-------------------------------------------------------------------------------------"
7
+ end
@@ -0,0 +1,33 @@
1
+ CarrierWave.configure do |config|
2
+ config.cache_dir = Rails.root.join 'tmp/uploads'
3
+ end
4
+
5
+ #------------------------------------------------------------------------------
6
+ # Put the version name at the end of the file, instead of beginning
7
+ # https://github.com/carrierwaveuploader/carrierwave/wiki/How-To:-Move-version-name-to-end-of-filename,-instead-of-front
8
+ #------------------------------------------------------------------------------
9
+ module CarrierWave
10
+ module Uploader
11
+ module Versions
12
+ def full_filename(for_file)
13
+ parent_name = super(for_file)
14
+ ext = File.extname(parent_name)
15
+ base_name = parent_name.chomp(ext)
16
+ [base_name, version_name].compact.join('_') + ext
17
+ end
18
+
19
+ def full_original_filename
20
+ parent_name = super
21
+ ext = File.extname(parent_name)
22
+ base_name = parent_name.chomp(ext)
23
+ [base_name, version_name].compact.join('_') + ext
24
+ end
25
+ end
26
+ end
27
+ end
28
+
29
+ #--- allow the '@' in a file name, to support retina image naming conventions
30
+ CarrierWave::SanitizedFile.sanitize_regexp = /[^[:word:]\.\-\+\@]/
31
+
32
+ #--- carrierwave only loads english locale by default. pull in the other locales
33
+ I18n.load_path += Dir.glob( Gem.loaded_specs['carrierwave'].full_gem_path + "/lib/carrierwave/locale/*.yml" )
@@ -0,0 +1,252 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # ==> Mailer Configuration
5
+ # Configure the e-mail address which will be shown in Devise::Mailer,
6
+ # note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
+ #--- leave blank - DmCore::SiteMailer will set the address if it's not already set
8
+ config.mailer_sender = ""
9
+
10
+ # Configure the class responsible to send e-mails.
11
+ config.mailer = "Devise::Mailer"
12
+ config.parent_mailer = "DmCore::SiteMailer"
13
+
14
+ # ==> ORM configuration
15
+ # Load and configure the ORM. Supports :active_record (default) and
16
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
17
+ # available as additional gems.
18
+ require 'devise/orm/active_record'
19
+
20
+ # ==> Configuration for any authentication mechanism
21
+ # Configure which keys are used when authenticating a user. The default is
22
+ # just :email. You can configure it to use [:username, :subdomain], so for
23
+ # authenticating a user, both parameters are required. Remember that those
24
+ # parameters are used only when authenticating and not when retrieving from
25
+ # session. If you need permissions, you should implement that in a before filter.
26
+ # You can also supply a hash where the value is a boolean determining whether
27
+ # or not authentication should be aborted when the value is not present.
28
+ # config.authentication_keys = [ :email ]
29
+
30
+ # Configure parameters from the request object used for authentication. Each entry
31
+ # given should be a request method and it will automatically be passed to the
32
+ # find_for_authentication method and considered in your model lookup. For instance,
33
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
34
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
35
+ # config.request_keys = []
36
+
37
+ # Configure which authentication keys should be case-insensitive.
38
+ # These keys will be downcased upon creating or modifying a user and when used
39
+ # to authenticate or find a user. Default is :email.
40
+ config.case_insensitive_keys = [ :email ]
41
+
42
+ # Configure which authentication keys should have whitespace stripped.
43
+ # These keys will have whitespace before and after removed upon creating or
44
+ # modifying a user and when used to authenticate or find a user. Default is :email.
45
+ config.strip_whitespace_keys = [ :email ]
46
+
47
+ # Tell if authentication through request.params is enabled. True by default.
48
+ # It can be set to an array that will enable params authentication only for the
49
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
50
+ # enable it only for database (email + password) authentication.
51
+ # config.params_authenticatable = true
52
+
53
+ # Tell if authentication through HTTP Auth is enabled. False by default.
54
+ # It can be set to an array that will enable http authentication only for the
55
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
56
+ # enable it only for database authentication. The supported strategies are:
57
+ # :database = Support basic authentication with authentication key + password
58
+ # config.http_authenticatable = false
59
+
60
+ # If http headers should be returned for AJAX requests. True by default.
61
+ # config.http_authenticatable_on_xhr = true
62
+
63
+ # The realm used in Http Basic Authentication. 'Application' by default.
64
+ # config.http_authentication_realm = 'Application'
65
+
66
+ # It will change confirmation, password recovery and other workflows
67
+ # to behave the same regardless if the e-mail provided was right or wrong.
68
+ # Does not affect registerable.
69
+ # config.paranoid = true
70
+
71
+ # By default Devise will store the user in session. You can skip storage for
72
+ # particular strategies by setting this option.
73
+ # Notice that if you are skipping storage for all authentication paths, you
74
+ # may want to disable generating routes to Devise's sessions controller by
75
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
76
+ config.skip_session_storage = [:http_auth]
77
+
78
+ # By default, Devise cleans up the CSRF token on authentication to
79
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
80
+ # requests for sign in and sign up, you need to get a new CSRF token
81
+ # from the server. You can disable this option at your own risk.
82
+ # config.clean_up_csrf_token_on_authentication = true
83
+
84
+ # ==> Configuration for :database_authenticatable
85
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
86
+ # using other encryptors, it sets how many times you want the password re-encrypted.
87
+ #
88
+ # Limiting the stretches to just one in testing will increase the performance of
89
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
90
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
91
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
92
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
93
+ config.stretches = Rails.env.test? ? 1 : 10
94
+
95
+ # Setup a pepper to generate the encrypted password.
96
+ config.pepper = "689f5860966c4513f8c7d743bbd3e6349034059953aaa72e178d879abf7b18fd5c53d80a46ba28e897ed141e3e94bde2c5cb4af7d9f34f5e1b0df5088c5b188d"
97
+
98
+ # ==> Configuration for :confirmable
99
+ # A period that the user is allowed to access the website even without
100
+ # confirming their account. For instance, if set to 2.days, the user will be
101
+ # able to access the website for two days without confirming their account,
102
+ # access will be blocked just in the third day. Default is 0.days, meaning
103
+ # the user cannot access the website without confirming their account.
104
+ # config.allow_unconfirmed_access_for = 2.days
105
+
106
+ # A period that the user is allowed to confirm their account before their
107
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
108
+ # their account within 3 days after the mail was sent, but on the fourth day
109
+ # their account can't be confirmed with the token any more.
110
+ # Default is nil, meaning there is no restriction on how long a user can take
111
+ # before confirming their account.
112
+ # config.confirm_within = 3.days
113
+
114
+ # If true, requires any email changes to be confirmed (exactly the same way as
115
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
116
+ # db field (see migrations). Until confirmed, new email is stored in
117
+ # unconfirmed_email column, and copied to email column on successful confirmation.
118
+ config.reconfirmable = true
119
+
120
+ # Defines which key will be used when confirming an account
121
+ # config.confirmation_keys = [ :email ]
122
+
123
+ # ==> Configuration for :rememberable
124
+ # The time the user will be remembered without asking for credentials again.
125
+ # config.remember_for = 2.weeks
126
+
127
+ # If true, extends the user's remember period when remembered via cookie.
128
+ # config.extend_remember_period = false
129
+
130
+ # Options to be passed to the created cookie. For instance, you can set
131
+ # secure: true in order to force SSL only cookies.
132
+ # config.rememberable_options = {}
133
+
134
+ # ==> Configuration for :validatable
135
+ # Range for password length.
136
+ config.password_length = 8..128
137
+
138
+ # Email regex used to validate email formats. It simply asserts that
139
+ # one (and only one) @ exists in the given string. This is mainly
140
+ # to give user feedback and not to assert the e-mail validity.
141
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
142
+
143
+ # ==> Configuration for :timeoutable
144
+ # The time you want to timeout the user session without activity. After this
145
+ # time the user will be asked for credentials again. Default is 30 minutes.
146
+ # config.timeout_in = 30.minutes
147
+
148
+ # If true, expires auth token on session timeout.
149
+ # config.expire_auth_token_on_timeout = false
150
+
151
+ # ==> Configuration for :lockable
152
+ # Defines which strategy will be used to lock an account.
153
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
154
+ # :none = No lock strategy. You should handle locking by yourself.
155
+ # config.lock_strategy = :failed_attempts
156
+
157
+ # Defines which key will be used when locking and unlocking an account
158
+ # config.unlock_keys = [ :email ]
159
+
160
+ # Defines which strategy will be used to unlock an account.
161
+ # :email = Sends an unlock link to the user email
162
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
163
+ # :both = Enables both strategies
164
+ # :none = No unlock strategy. You should handle unlocking by yourself.
165
+ # config.unlock_strategy = :both
166
+
167
+ # Number of authentication tries before locking an account if lock_strategy
168
+ # is failed attempts.
169
+ # config.maximum_attempts = 20
170
+
171
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
172
+ # config.unlock_in = 1.hour
173
+
174
+ # Warn on the last attempt before the account is locked.
175
+ # config.last_attempt_warning = false
176
+
177
+ # ==> Configuration for :recoverable
178
+ #
179
+ # Defines which key will be used when recovering the password for an account
180
+ # config.reset_password_keys = [ :email ]
181
+
182
+ # Time interval you can reset your password with a reset password key.
183
+ # Don't put a too small interval or your users won't have the time to
184
+ # change their passwords.
185
+ config.reset_password_within = 6.hours
186
+
187
+ # ==> Configuration for :encryptable
188
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
189
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
190
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
191
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
192
+ # REST_AUTH_SITE_KEY to pepper).
193
+ #
194
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
195
+ # config.encryptor = :sha512
196
+
197
+ # ==> Scopes configuration
198
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
199
+ # "users/sessions/new". It's turned off by default because it's slower if you
200
+ # are using only default views.
201
+ # config.scoped_views = false
202
+
203
+ # Configure the default scope given to Warden. By default it's the first
204
+ # devise role declared in your routes (usually :user).
205
+ # config.default_scope = :user
206
+
207
+ # Set this configuration to false if you want /users/sign_out to sign out
208
+ # only the current scope. By default, Devise signs out all scopes.
209
+ # config.sign_out_all_scopes = true
210
+
211
+ # ==> Navigation configuration
212
+ # Lists the formats that should be treated as navigational. Formats like
213
+ # :html, should redirect to the sign in page when the user does not have
214
+ # access, but formats like :xml or :json, should return 401.
215
+ #
216
+ # If you have any extra navigational formats, like :iphone or :mobile, you
217
+ # should add them to the navigational formats lists.
218
+ #
219
+ # The "*/*" below is required to match Internet Explorer requests.
220
+ # config.navigational_formats = ['*/*', :html]
221
+
222
+ # The default HTTP method used to sign out a resource. Default is :delete.
223
+ config.sign_out_via = :delete
224
+
225
+ # ==> OmniAuth
226
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
227
+ # up on your models and hooks.
228
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
229
+
230
+ # ==> Warden configuration
231
+ # If you want to use other strategies, that are not supported by Devise, or
232
+ # change the failure app, you can configure them inside the config.warden block.
233
+ #
234
+ # config.warden do |manager|
235
+ # manager.intercept_401 = false
236
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
237
+ # end
238
+
239
+ # ==> Mountable engine configurations
240
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
241
+ # is mountable, there are some extra configurations to be taken into account.
242
+ # The following options are available, assuming the engine is mounted as:
243
+ #
244
+ # mount MyEngine, at: '/my_engine'
245
+ #
246
+ # The router that invoked `devise_for`, in the example above, would be:
247
+ # config.router_name = :my_engine
248
+ #
249
+ # When using omniauth, Devise cannot automatically set Omniauth path,
250
+ # so you need to do it manually. For the users scope, it would be:
251
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
252
+ end