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
Binary file
@@ -0,0 +1,223 @@
1
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
2
+ // the compiled file.
3
+ //
4
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
5
+ // GO AFTER THE REQUIRES BELOW.
6
+ //
7
+ //= require codemirror
8
+ //= require codemirror/addons/mode/overlay
9
+ //= require codemirror/addons/edit/continuelist
10
+ //= require codemirror/addons/display/fullscreen
11
+ //= require codemirror/modes/xml
12
+ //= require codemirror/modes/css
13
+ //= require codemirror/modes/javascript
14
+ //= require codemirror/modes/htmlmixed
15
+ //- require codemirror/modes/htmlembedded
16
+ //= require codemirror/modes/markdown
17
+ //= require codemirror/modes/gfm
18
+ //= require dm_core/admin_extra.js
19
+
20
+ // Function for toggling the revealing of an item, through slide and fading
21
+ //----------------------------------------------------------------
22
+ function toggle_reveal(item, options) {
23
+ options = (typeof options == 'undefined') ? {duration:500} : options;
24
+ options.duration = (typeof options.duration == 'undefined') ? 500 : options.duration;
25
+ $(item).animate({
26
+ height: 'toggle',
27
+ opacity: 'toggle'
28
+ }, options.duration);
29
+ }
30
+
31
+ //------------------------------------------------------------------------------
32
+
33
+ $(document).ready(function() {
34
+
35
+ // For any div that has a data-load attribute, load up the supplied url and put in div.
36
+ // For example:
37
+ // <div id="widget_lesson_comments" data-load="<%= dm_lms.admin_widget_lesson_comments_path(comment_day: 0) %>">
38
+ // </div>
39
+ //----------------------------------------------------------------
40
+ $("div[data-load]").filter(":visible").each(function(){
41
+ var path = $(this).attr('data-load');
42
+ $(this).load(path);
43
+ });
44
+
45
+ //----------------------------------------------------------------
46
+ $('#drag_sort').sortable({
47
+ axis: 'y',
48
+ dropOnEmpty: false,
49
+ cursor: 'row-resize',
50
+ items: '.item',
51
+ handle: '.sort_handle',
52
+ opacity: 0.4,
53
+ scroll: true,
54
+ update: function(e, ui) {
55
+ var item_id = ui.item.data('item_id');
56
+ var position = ui.item.index();
57
+ $.ajax({
58
+ type: 'POST',
59
+ url: $(this).data('update_url'),
60
+ dataType: 'json',
61
+ data: { id: item_id, item: { row_order_position: position } }
62
+ })
63
+ }
64
+ });
65
+
66
+ // http://boagworld.com/dev/creating-a-draggable-sitemap-with-jquery/
67
+ //----------------------------------------------------------------------
68
+ $('#tree_sort li').prepend('<div class="dropzone"></div>');
69
+
70
+ $('#tree_sort li').draggable({
71
+ handle: ' > dl',
72
+ opacity: .8,
73
+ addClasses: false,
74
+ helper: 'clone',
75
+ zIndex: 100
76
+ });
77
+
78
+ $('#tree_sort dl, #tree_sort .dropzone').droppable({
79
+ accept: '#tree_sort li',
80
+ tolerance: 'pointer',
81
+ drop: function(e, ui) {
82
+ var li = $(this).parent();
83
+ var add_child = !$(this).hasClass('dropzone');
84
+ //--- If this is our first child, we'll need a ul to drop into.
85
+ if (add_child && li.children('ul').length == 0) {
86
+ li.append('<ul/>');
87
+ }
88
+ //--- ui.draggable is our reference to the item that's been dragged.
89
+ if (add_child) {
90
+ li.children('ul').append(ui.draggable);
91
+ }
92
+ else {
93
+ li.before(ui.draggable);
94
+ }
95
+
96
+ //--- send update to the server
97
+ var item_id = ui.draggable.data('item_id');
98
+ var position = ui.draggable.index();
99
+ if (add_child) {
100
+ var parent_id = li.data('item_id');
101
+ }
102
+ else {
103
+ var parent_id = li.parents('li').first().data('item_id');
104
+ }
105
+ $.ajax({
106
+ type: 'POST',
107
+ url: $('#tree_sort').data('update_url'),
108
+ dataType: 'json',
109
+ data: { id: item_id, item: { position: position, parent_id: parent_id } }
110
+ })
111
+
112
+ //--- reset our background colours.
113
+ li.find('dl,.dropzone').css({ backgroundColor: '', borderColor: '' });
114
+ },
115
+ over: function() {
116
+ $(this).filter('dl').css({ backgroundColor: '#ccc' });
117
+ $(this).filter('.dropzone').css({ borderColor: '#aaa' });
118
+ },
119
+ out: function() {
120
+ $(this).filter('dl').css({ backgroundColor: '' });
121
+ $(this).filter('.dropzone').css({ borderColor: '' });
122
+ }
123
+ });
124
+
125
+ $('.tree_expand').on('click', function() {
126
+ $(this).parent().parent().parent().toggleClass('tree_open').toggleClass('tree_closed');
127
+ li = $(this).parent().parent().parent();
128
+ toggle_reveal(li.children('ul'));
129
+ cookie_name = 'page_tree_' + li.data('item_id');
130
+ if ($.cookie(cookie_name) == '1') {
131
+ $.removeCookie(cookie_name);
132
+ } else {
133
+ $.cookie(cookie_name, '1', { expires: 365 });
134
+ }
135
+ return false;
136
+ });
137
+
138
+ // https://github.com/jhfrench/bootstrap-tree
139
+ //------------------------------------------------------------------------------
140
+ $('.tree > ul').attr('role', 'tree').find('ul').attr('role', 'group');
141
+ $('.tree').find('li:has(ul)').addClass('parent_li').attr('role', 'treeitem').find(' > span').attr('title', 'Collapse this branch').on('click', function (e) {
142
+ // var children = $(this).parent('li.parent_li').find(' > ul > li');
143
+ var children = $(this).parent('li.parent_li').find(' > ul');
144
+ var cookie_name = $(this).parent('li.parent_li').data('save_id');
145
+ if (children.is(':visible')) {
146
+ children.hide('fast');
147
+ $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-circle').removeClass('icon-minus-circle');
148
+ $.removeCookie(cookie_name, { path: '/' });
149
+ }
150
+ else {
151
+ children.show('fast');
152
+ $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-circle').removeClass('icon-plus-circle');
153
+ $.cookie(cookie_name, '1', { expires: 365, path: '/' });
154
+ }
155
+ e.stopPropagation();
156
+ });
157
+
158
+ //----------------------------------------------------------------
159
+ $(".notice, .alert").click(function() {
160
+ $(this).fadeTo(200, 0.00, function(){ //fade
161
+ $(this).slideUp(200, function() { //slide up
162
+ $(this).remove(); //then remove from the DOM
163
+ });
164
+ });
165
+ });
166
+
167
+ $('#new_user_sparkline').sparkline(
168
+ 'html', {type: 'bar', barColor: '#a6c659', height: '35px', barWidth: "5px", barSpacing: "2px", zeroAxis: "false"}
169
+ );
170
+ $('#access_user_sparkline').sparkline(
171
+ 'html', {type: 'bar', barColor: '#a6c659', height: '35px', barWidth: "5px", barSpacing: "2px", zeroAxis: "false"}
172
+ );
173
+
174
+ // Toggle the visibility of a specific element
175
+ //----------------------------------------------------------------
176
+ $(".toggle_link").on("click", function(et, e){
177
+ toggle_reveal(this.getAttribute("data-toggleid"));
178
+ return false;
179
+ });
180
+
181
+ //----------------------------------------------------------------
182
+ $('#user_table').dataTable( {
183
+ bJQueryUI: false,
184
+ iDisplayLength: 50,
185
+ bProcessing: false,
186
+ bServerSide: true,
187
+ bStateSave: true,
188
+ aaSorting: [[4, 'desc']],
189
+ aoColumnDefs: [
190
+ { bSortable: false, aTargets: [ 0 ] },
191
+ { bSortable: false, aTargets: [ 5 ] }
192
+ ],
193
+ sAjaxSource: $('#user_table').data('source')
194
+ });
195
+
196
+ //----------------------------------------------------------------
197
+ $.fn.toolbarTabs = function(){
198
+
199
+ $(this).find(".tab_content").hide(); //Hide all content
200
+ $(this).find("ul.tabs.toolbar li:first").addClass("activeTab").show(); //Activate first tab
201
+ $(this).find(".tab_content:first").show(); //Show first tab content
202
+
203
+ $("ul.tabs.toolbar li").click(function() {
204
+ $(this).parent().parent().find("ul.tabs li").removeClass("activeTab"); //Remove any "active" class
205
+ $(this).addClass("activeTab"); //Add "active" class to selected tab
206
+ $(this).parent().parent().parent().find(".tab_content").hide(); //Hide all tab content
207
+ var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
208
+ $(activeTab).show(); //Fade in the active content
209
+ return false;
210
+ });
211
+
212
+ };
213
+ $("div[class^='widget']").toolbarTabs(); //Run function on any div with class name of "Content Tabs"
214
+
215
+ // Attach tooltip to any class with 'hovertip' inside the main content
216
+ // block. Must do this way to ensure tooltips work in new ajax content
217
+ //----------------------------------------------------------------
218
+ $('.page-container').tooltip( {
219
+ selector: '.hovertip',
220
+ delay: {show: 200, hide: 0 }
221
+ });
222
+
223
+ });