customer_vault 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/customer_vault/individuals.css.scss +1 -1
  3. data/app/models/customer_vault/corporation.rb +1 -3
  4. data/app/models/customer_vault/individual.rb +0 -3
  5. data/app/models/customer_vault/person.rb +4 -1
  6. data/app/views/customer_vault/corporations/_form.html.slim +15 -28
  7. data/app/views/customer_vault/corporations/_show_details.html.slim +9 -36
  8. data/app/views/customer_vault/corporations/edit.html.slim +18 -22
  9. data/app/views/customer_vault/corporations/new.html.slim +19 -22
  10. data/app/views/customer_vault/corporations/show.html.slim +37 -39
  11. data/app/views/customer_vault/individuals/_form.html.slim +21 -58
  12. data/app/views/customer_vault/individuals/_show_details.html.slim +18 -52
  13. data/app/views/customer_vault/individuals/edit.html.slim +18 -22
  14. data/app/views/customer_vault/individuals/new.html.slim +18 -24
  15. data/app/views/customer_vault/individuals/show.html.slim +36 -38
  16. data/app/views/customer_vault/links/edit.html.slim +24 -29
  17. data/app/views/customer_vault/links/new.html.slim +21 -31
  18. data/app/views/customer_vault/people/_show_details.html.slim +4 -0
  19. data/app/views/customer_vault/people/index.html.slim +38 -42
  20. data/lib/customer_vault/version.rb +1 -1
  21. data/spec/dummy/app/assets/stylesheets/application.css.scss +4 -1
  22. data/spec/dummy/app/views/layouts/application.html.erb +4 -1
  23. data/spec/dummy/config/initializers/simple_form.rb +166 -0
  24. data/spec/dummy/config/initializers/simple_form_bootstrap.rb +136 -0
  25. data/spec/dummy/db/development.sqlite3 +0 -0
  26. data/spec/dummy/db/test.sqlite3 +0 -0
  27. data/spec/dummy/log/development.log +23 -0
  28. data/spec/dummy/log/test.log +5997 -0
  29. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_alerts.scssc +0 -0
  30. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_background-variant.scssc +0 -0
  31. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_border-radius.scssc +0 -0
  32. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_buttons.scssc +0 -0
  33. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_center-block.scssc +0 -0
  34. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_clearfix.scssc +0 -0
  35. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_forms.scssc +0 -0
  36. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_gradients.scssc +0 -0
  37. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_grid-framework.scssc +0 -0
  38. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_grid.scssc +0 -0
  39. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_hide-text.scssc +0 -0
  40. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_image.scssc +0 -0
  41. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_labels.scssc +0 -0
  42. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_list-group.scssc +0 -0
  43. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_nav-divider.scssc +0 -0
  44. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_nav-vertical-align.scssc +0 -0
  45. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_opacity.scssc +0 -0
  46. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_pagination.scssc +0 -0
  47. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_panels.scssc +0 -0
  48. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_progress-bar.scssc +0 -0
  49. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_reset-filter.scssc +0 -0
  50. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_resize.scssc +0 -0
  51. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_responsive-visibility.scssc +0 -0
  52. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_size.scssc +0 -0
  53. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_tab-focus.scssc +0 -0
  54. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_table-row.scssc +0 -0
  55. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_text-emphasis.scssc +0 -0
  56. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_text-overflow.scssc +0 -0
  57. data/spec/dummy/tmp/cache/assets/test/sass/0006ff0dbef3ccde25358c9ccd9623709ea81b53/_vendor-prefixes.scssc +0 -0
  58. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_alerts.scssc +0 -0
  59. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_badges.scssc +0 -0
  60. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_breadcrumbs.scssc +0 -0
  61. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_button-groups.scssc +0 -0
  62. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_buttons.scssc +0 -0
  63. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_carousel.scssc +0 -0
  64. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_close.scssc +0 -0
  65. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_code.scssc +0 -0
  66. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_component-animations.scssc +0 -0
  67. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_dropdowns.scssc +0 -0
  68. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_forms.scssc +0 -0
  69. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_glyphicons.scssc +0 -0
  70. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_grid.scssc +0 -0
  71. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_input-groups.scssc +0 -0
  72. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_jumbotron.scssc +0 -0
  73. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_labels.scssc +0 -0
  74. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_list-group.scssc +0 -0
  75. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_media.scssc +0 -0
  76. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_mixins.scssc +0 -0
  77. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_modals.scssc +0 -0
  78. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_navbar.scssc +0 -0
  79. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_navs.scssc +0 -0
  80. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_normalize.scssc +0 -0
  81. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_pager.scssc +0 -0
  82. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_pagination.scssc +0 -0
  83. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_panels.scssc +0 -0
  84. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_popovers.scssc +0 -0
  85. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_print.scssc +0 -0
  86. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_progress-bars.scssc +0 -0
  87. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_responsive-embed.scssc +0 -0
  88. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_responsive-utilities.scssc +0 -0
  89. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_scaffolding.scssc +0 -0
  90. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_tables.scssc +0 -0
  91. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_thumbnails.scssc +0 -0
  92. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_tooltip.scssc +0 -0
  93. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_type.scssc +0 -0
  94. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_utilities.scssc +0 -0
  95. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_variables.scssc +0 -0
  96. data/spec/dummy/tmp/cache/assets/test/sass/28f5033b184a8d363e7df1895646031709bf23d9/_wells.scssc +0 -0
  97. data/spec/dummy/tmp/cache/assets/test/sass/56e857cea6600c31fdc065577fa5347e2da021e2/application.css.scssc +0 -0
  98. data/spec/dummy/tmp/cache/assets/test/sass/c45223a4229be18e4ef8b2889ae32d342f503af2/application.css.scssc +0 -0
  99. data/spec/dummy/tmp/cache/assets/test/sass/c45223a4229be18e4ef8b2889ae32d342f503af2/corporations.css.scssc +0 -0
  100. data/spec/dummy/tmp/cache/assets/test/sass/c45223a4229be18e4ef8b2889ae32d342f503af2/individuals.css.scssc +0 -0
  101. data/spec/dummy/tmp/cache/assets/test/sass/c45223a4229be18e4ef8b2889ae32d342f503af2/links.css.scssc +0 -0
  102. data/spec/dummy/tmp/cache/assets/test/sass/c45223a4229be18e4ef8b2889ae32d342f503af2/pagination.css.scssc +0 -0
  103. data/spec/dummy/tmp/cache/assets/test/sass/fc4b9279400c8168c697f5ed561bb8ccb52e5f67/_bootstrap-sprockets.scssc +0 -0
  104. data/spec/dummy/tmp/cache/assets/test/sass/fc4b9279400c8168c697f5ed561bb8ccb52e5f67/_bootstrap.scssc +0 -0
  105. data/spec/dummy/tmp/cache/assets/test/sprockets/0c6cbcfd2ac7886202376c7ff932d8d5 +0 -0
  106. data/spec/dummy/tmp/cache/assets/test/sprockets/0e50063452927b05bf1f53a77b8e1137 +0 -0
  107. data/spec/dummy/tmp/cache/assets/test/sprockets/1aa6c8eaf0c76ce805ac43b02283d751 +0 -0
  108. data/spec/dummy/tmp/cache/assets/test/sprockets/1ee39033188b9385986e53a569323f2d +0 -0
  109. data/spec/dummy/tmp/cache/assets/test/sprockets/22344f083e6fdddd40440917b532687f +0 -0
  110. data/spec/dummy/tmp/cache/assets/test/sprockets/2c871132412a58427eec073d719b9c38 +0 -0
  111. data/spec/dummy/tmp/cache/assets/test/sprockets/2dba1fb8d155139d6e88e90a54e8ea8b +0 -0
  112. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  113. data/spec/dummy/tmp/cache/assets/test/sprockets/3161dca95ec50f801a01d3e22fb5a571 +0 -0
  114. data/spec/dummy/tmp/cache/assets/test/sprockets/32f555f2191136849fe39ad6d37dee22 +0 -0
  115. data/spec/dummy/tmp/cache/assets/test/sprockets/354c87ada66ea34ea3c3449b27de58d4 +0 -0
  116. data/spec/dummy/tmp/cache/assets/test/sprockets/36781c5ac8b6dd644e3ca64350e7c4e9 +0 -0
  117. data/spec/dummy/tmp/cache/assets/test/sprockets/3721b00ad6c043329fa66726d9b9766b +0 -0
  118. data/spec/dummy/tmp/cache/assets/test/sprockets/374e8b5a7fe9a2a0e05d456e3fdec438 +0 -0
  119. data/spec/dummy/tmp/cache/assets/test/sprockets/4158957758e07d2d90c27f200a55df25 +0 -0
  120. data/spec/dummy/tmp/cache/assets/test/sprockets/45aae7f5bdd0876ef98c35e412449d7c +0 -0
  121. data/spec/dummy/tmp/cache/assets/test/sprockets/509cd3bf7f4178cdd28f6396059d8064 +0 -0
  122. data/spec/dummy/tmp/cache/assets/test/sprockets/5593457c78faf74ab5308d8e28b42f30 +0 -0
  123. data/spec/dummy/tmp/cache/assets/test/sprockets/5695dcc93e3c4ef99a30619b849d1c3d +0 -0
  124. data/spec/dummy/tmp/cache/assets/test/sprockets/5998b5c9de215f55b8b703679fbcc8ff +0 -0
  125. data/spec/dummy/tmp/cache/assets/test/sprockets/5a1f7c9a00361b886dd09ad73978c41b +0 -0
  126. data/spec/dummy/tmp/cache/assets/test/sprockets/5d044f664c09e7a71e2f8d23dc5bb56b +0 -0
  127. data/spec/dummy/tmp/cache/assets/test/sprockets/616166c8bb883e423e177bd4d0d2bfea +0 -0
  128. data/spec/dummy/tmp/cache/assets/test/sprockets/78352579e0a2c6b74f748f3f72cd1740 +0 -0
  129. data/spec/dummy/tmp/cache/assets/test/sprockets/7d34cbd8d9384581d87985945ae4b2dd +0 -0
  130. data/spec/dummy/tmp/cache/assets/test/sprockets/816ac58210c0e421e3b917d1b904ec56 +0 -0
  131. data/spec/dummy/tmp/cache/assets/test/sprockets/874dd89a49c981cf15547f8d4516e687 +0 -0
  132. data/spec/dummy/tmp/cache/assets/test/sprockets/8848aeeeb383bb5baf3d5f392ec1059b +0 -0
  133. data/spec/dummy/tmp/cache/assets/test/sprockets/8a8cfc599d8aea7460fed2beba8fc345 +0 -0
  134. data/spec/dummy/tmp/cache/assets/test/sprockets/8ab512c9b33ac90e699b73469d71f061 +0 -0
  135. data/spec/dummy/tmp/cache/assets/test/sprockets/8e55cf0f42842afed2d9cae7f635fb01 +0 -0
  136. data/spec/dummy/tmp/cache/assets/test/sprockets/9b427fa817fc87c50cd9c2303ea86f48 +0 -0
  137. data/spec/dummy/tmp/cache/assets/test/sprockets/9cdbd650c50c41fdad744161154494a8 +0 -0
  138. data/spec/dummy/tmp/cache/assets/test/sprockets/a10a46afa0ac441a29a9efa24daf92bd +0 -0
  139. data/spec/dummy/tmp/cache/assets/test/sprockets/aa6fa76c4337a1adad7826733bc3e663 +0 -0
  140. data/spec/dummy/tmp/cache/assets/test/sprockets/ae2e6efe49141b338780cb8edab0c36d +0 -0
  141. data/spec/dummy/tmp/cache/assets/test/sprockets/bcca522c6302f184f12fe0e8a7d7e71a +0 -0
  142. data/spec/dummy/tmp/cache/assets/test/sprockets/c13fc73ceafa45876a901b3e775b83ae +0 -0
  143. data/spec/dummy/tmp/cache/assets/test/sprockets/c21b81dce4b87e00269e63c88e442790 +0 -0
  144. data/spec/dummy/tmp/cache/assets/test/sprockets/ccf97877cc1f4cd5908d329f4658389b +0 -0
  145. data/spec/dummy/tmp/cache/assets/test/sprockets/ce2f31234f91c10ad1f25d45ef853cb8 +0 -0
  146. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  147. data/spec/dummy/tmp/cache/assets/test/sprockets/d01dbffb7f991cfaee5cab6047ca38ab +0 -0
  148. data/spec/dummy/tmp/cache/assets/test/sprockets/d252cd2d8331650e15079d2f240d2fac +0 -0
  149. data/spec/dummy/tmp/cache/assets/test/sprockets/de3bbe108e9180b23f46194de4798d16 +0 -0
  150. data/spec/dummy/tmp/cache/assets/test/sprockets/e0694f7a79337d4122781ad44459b1be +0 -0
  151. data/spec/dummy/tmp/cache/assets/test/sprockets/e6d68508fff41e6a609844ae027f8876 +0 -0
  152. data/spec/dummy/tmp/cache/assets/test/sprockets/e7cf35278e58bf137a350db4a5b671ba +0 -0
  153. data/spec/dummy/tmp/cache/assets/test/sprockets/ef3ef1c4ffb6f99196e212111134278b +0 -0
  154. data/spec/dummy/tmp/cache/assets/test/sprockets/f3afb46614704db50013e463449e2a5b +0 -0
  155. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  156. data/spec/dummy/tmp/cache/assets/test/sprockets/fd07e1a9bf65d83191423a76bced6350 +0 -0
  157. data/spec/dummy/tmp/cache/assets/test/sprockets/fd6200b8231389d837487fc9f0e6682e +0 -0
  158. metadata +265 -17
  159. data/app/views/customer_vault/links/_aside.html.slim +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15b62fcc51965a154997c43c8d6c026e2e0da40c
4
- data.tar.gz: e934b8a36a209b05a31903f8065a4b74ce8a2b2b
3
+ metadata.gz: 4ff457a0825294de50e44e6db98a58416080bce5
4
+ data.tar.gz: 8ec2452865e5059fffe8562986e2d889d6a9b8cf
5
5
  SHA512:
6
- metadata.gz: c742380521d01c89d4ea3a53960d528bcf0385c4564f95a1dcfef1f1f0575a0a8299bcbe16e318fbf438574d65380b4def72f48d4268f02effa64f09f870e792
7
- data.tar.gz: 149971a98042c888c5aedf2813e7e64ac5df6a9a2bafcdcb58578bebae6e1f1e776f69036e0b714a1594e9580c0fd436b52e3534251656fa8bc0c6e5df7e99a0
6
+ metadata.gz: 62caa832a2fe4f89bd4bd9fe411cdbf32c144ecf7c59c7bb0f8bb00ee97a0f434cc86726a49b296897f0147f66728de38cf6d192f1da002dc42eee9839d3cc3b
7
+ data.tar.gz: 01936a7af059267ffb588e10c5bb24ee2532e7ada2791d47432de8094a558173610ed131a1da453251ee95c8bf7738acdf948775c2dc8eb4542d82212c271468
@@ -3,7 +3,7 @@
3
3
  They will automatically be included in application.css.
4
4
  */
5
5
 
6
- aside.individual, aside.corporation, aside .action, ul li.person{
6
+ aside.individual, aside.corporation, aside .action, ul li.person, .cadre{
7
7
  background-color:#F5F5F5;
8
8
  margin-bottom:1%;
9
9
  border:1px solid #D8D8D8;
@@ -1,9 +1,7 @@
1
1
  module CustomerVault
2
2
  class Corporation < Person
3
3
  self.table_name = 'customer_vault_corporations'
4
-
5
4
  validates_presence_of :name
6
- has_one :address, class_name: 'Dorsale::Address', as: :addressable
7
- accepts_nested_attributes_for :address, allow_destroy: true
5
+
8
6
  end
9
7
  end
@@ -8,8 +8,5 @@ module CustomerVault
8
8
 
9
9
  validates_presence_of :first_name
10
10
  validates_presence_of :last_name
11
-
12
- has_one :address, class_name: 'Dorsale::Address', as: :addressable
13
- accepts_nested_attributes_for :address, allow_destroy: true
14
11
  end
15
12
  end
@@ -1,7 +1,10 @@
1
1
  module CustomerVault
2
2
  class Person < ActiveRecord::Base
3
3
  self.abstract_class = true
4
-
4
+
5
+ has_one :address, class_name: 'Dorsale::Address', as: :addressable
6
+ accepts_nested_attributes_for :address, allow_destroy: true
7
+
5
8
  def self.list
6
9
  individuals = Individual.all
7
10
  corporations = Corporation.all
@@ -1,28 +1,15 @@
1
- = form_for [customer_vault, @corporation], html: { class: "form-horizontal"} do |f|
2
- .form-group
3
- =f.label "Name" , class:"control-label col-lg-2"
4
- div class="col-lg-10"
5
- =f.text_field :name, class:"form-control"
6
-
7
- .form-group
8
- =f.label "Email", class:"control-label col-lg-2"
9
- div class="col-lg-10"
10
- =f.text_field :email, class:"form-control"
11
-
12
- .form-group
13
- =f.label "Phone", class:"control-label col-lg-2"
14
- div class="col-lg-10"
15
- =f.text_field :phone, class:"form-control"
16
-
17
- .form-group
18
- =f.label "Fax", class:"control-label col-lg-2"
19
- div class="col-lg-10"
20
- =f.text_field :fax, class:"form-control"
21
-
22
- = f.fields_for :address do |address_form|
23
- = render partial: 'dorsale/addresses/nested_form', :locals => {:f => address_form}
24
-
25
- .actions
26
- div class= "cdiv mega-top-buffer"
27
- = f.submit 'Valider', :class=>"btn btn-success btn-sm", id: 'submit-corporation'
28
- = link_to 'Retour', customer_vault.people_path, :class=>"btn btn-primary btn-sm"
1
+ = horizontal_form_for [customer_vault, @corporation] do |f|
2
+ = f.input :name
3
+ = f.input :email
4
+ = f.input :phone
5
+ = f.input :fax
6
+
7
+ / Temporaire - A refactoriser
8
+ = f.simple_fields_for :address do |af|
9
+ = af.input :street
10
+ = af.input :street_bis
11
+ = af.input :zip
12
+ = af.input :city
13
+ = af.input :country, as: :string
14
+
15
+ = form_buttons
@@ -1,36 +1,9 @@
1
- aside.col-lg-12.corporation
2
- .row
3
- .col-lg-12.cdiv
4
- =image_tag ('customer_vault/icons/group-64.png')
5
- .col-lg-12.cdiv
6
- span class= "text-muted titre bold" #{corporation.name}
7
- .row
8
- .col-lg-12.top-buffer
9
- - if corporation.name?
10
- .col-lg-12.cdiv
11
- .bold.text-muted.cdiv Name
12
- span #{corporation.name}
13
- .col-lg-12.cdiv
14
- - if corporation.email?
15
- .bold.text-muted.cdiv Email
16
- span #{corporation.email}
17
- .col-lg-12.cdiv
18
- - if corporation.phone?
19
- .bold.text-muted.cdiv Phone
20
- span #{corporation.phone}
21
- .col-lg-12.cdiv
22
- - if corporation.fax?
23
- .bold.text-muted.cdiv Fax
24
- span #{corporation.fax}
25
- .col-lg-12.cdiv
26
- - if corporation.address && !corporation.address.one_line.blank?
27
- .bold.text-muted.cdiv Address
28
- span.address #{corporation.address.one_line}
29
-
30
- .row.mega-top-buffer.bottom-buffer
31
- .col-lg-4.cdiv
32
- =link_to 'Editer', customer_vault.edit_corporation_path(corporation), :class=>"btn btn-success btn-sm"
33
- .col-lg-4.cdiv
34
- =link_to 'Effacer', [customer_vault, corporation], data: {:confirm => 'Are you sure?'}, :method => :delete, :class=>"btn btn-danger btn-sm"
35
- .col-lg-4.cdiv
36
- = link_to 'Retour', customer_vault.people_path, :class=>"btn btn-primary btn-sm"
1
+ .corporation-context: .context
2
+ = context_icon :users
3
+ = context_title corporation.name
4
+ = actions_for corporation, url: customer_vault.corporation_path(corporation)
5
+
6
+ = context_info "E-mail", corporation.email
7
+ = context_info "Phone", corporation.phone
8
+ = context_info "Fax", corporation.fax
9
+ = context_info "Address", corporation.address.one_line if corporation.address.present?
@@ -1,23 +1,19 @@
1
- .container-fluid
2
- .div class = "col-lg-12"
3
- ol.breadcrumb
4
- li
5
- = link_to 'Home', '/'
6
- li
7
- = link_to 'People', customer_vault.people_path
8
- li.active= "Edit #{@corporation.name}"
9
- .col-lg-12
10
- .col-lg-4
11
- aside.col-lg-12
12
- .row
13
- .col-lg-12.cdiv
14
- =image_tag ('customer_vault/icons/group-64.png')
15
- .row
16
- .col-lg-12.cdiv
17
- h3.text-muted= "Edit {@corporation.name}"
18
- - if @corporation.errors.any?
19
- = render partial: 'customer_vault/layout/form_error', :locals => {:p => @corporation}
20
- .col-lg-8
21
- .col-lg-12
22
- == render 'form'
1
+ - content_for :sub_header do
2
+ ol.breadcrumb
3
+ li
4
+ = link_to 'Home', '/'
5
+ li
6
+ = link_to 'People', customer_vault.people_path
7
+ li.active
8
+ = "Edit #{@corporation.name}"
23
9
 
10
+ - content_for :context do
11
+ .corporation-context: .context
12
+ = context_icon :users
13
+ = context_title "Edit #{@corporation.name}"
14
+
15
+ - content_for :main do
16
+ .cadre
17
+ = render "form"
18
+
19
+ = render "agilidee_commons/contextual"
@@ -1,22 +1,19 @@
1
- .container-fluid
2
- .col-lg-12
3
- ol.breadcrumb
4
- li
5
- = link_to 'Home', '/'
6
- li
7
- = link_to 'People', customer_vault.people_path
8
- li.active New Corporation
9
- .col-lg-12
10
- .col-lg-4
11
- .aside.col-lg-12
12
- .row
13
- .col-lg-12.cdiv
14
- =image_tag ('customer_vault/icons/group-64.png')
15
- .row
16
- .col-lg-12.cdiv
17
- h3.text-muted New Corporation
18
- - if @corporation.errors.any?
19
- = render partial: 'customer_vault/layout/form_error', :locals => {:p => @corporation}
20
- .col-lg-8
21
- .col-lg-12
22
- == render 'form'
1
+ - content_for :sub_header do
2
+ ol.breadcrumb
3
+ li
4
+ = link_to 'Home', '/'
5
+ li
6
+ = link_to 'People', customer_vault.people_path
7
+ li.active
8
+ = "New corporation"
9
+
10
+ - content_for :context do
11
+ .corporation-context: .context
12
+ = context_icon :users
13
+ = context_title "New corporation"
14
+
15
+ - content_for :main do
16
+ .cadre
17
+ = render "form"
18
+
19
+ = render "agilidee_commons/contextual"
@@ -1,43 +1,41 @@
1
- .container-fluid
2
- .col-lg-12
3
- ol class="breadcrumb"
4
- li
5
- = link_to 'Home', '/'
6
- li
7
- = link_to 'People', customer_vault.people_path
8
- li.active #{@corporation.name}
9
- .col-lg-12
10
- .col-lg-4
11
- = render partial: 'show_details', locals: {corporation: @corporation}
1
+ - content_for :sub_header do
2
+ ol.breadcrumb
3
+ li
4
+ = link_to 'Home', '/'
5
+ li
6
+ = link_to 'People', customer_vault.people_path
7
+ li.active
8
+ = @corporation.name
12
9
 
13
- .col-lg-8
14
- .col-lg-12
15
- ul.nav.nav-tabs role="tablist"
16
- li.active
17
- a data-toggle="tab" href="#linkable" role="tab" Links
18
- li
19
- a data-toggle="tab" href="#history" role="tab" History
20
- li
21
- a data-toggle="tab" href="#todos" role="tab" Todos
22
-
23
- .tab-content
24
- #linkable.tab-pane.active
25
- ul.linkable
26
- - @corporation.links.each do |link|
27
- li.person
28
- - target = link[:person]
29
- - if target.instance_of? CustomerVault::Individual
30
- = render partial: 'customer_vault/individuals/list_details', :locals => {:i => target, person: @corporation, link: link[:origin]}
31
- - if target.instance_of? CustomerVault::Corporation
32
- = render partial: 'customer_vault/corporations/list_details', :locals => {:c => target, person: @corporation, link: link[:origin]}
33
-
34
- = link_to 'New link', customer_vault.new_corporation_link_path(@corporation.id), :class=>"btn btn-success", id: 'new-link'
35
- #history.tab-pane
36
- p
37
- ' History is soon to come
38
- #todos.tab-pane
39
- p
40
- ' Todos are soon to come
10
+ - content_for :context do
11
+ = render partial: 'show_details', locals: {corporation: @corporation}
41
12
 
13
+ - content_for :main do
14
+ ul.nav.nav-tabs role="tablist"
15
+ li.active
16
+ a data-toggle="tab" href="#linkable" role="tab" Links
17
+ li
18
+ a data-toggle="tab" href="#history" role="tab" History
19
+ li
20
+ a data-toggle="tab" href="#todos" role="tab" Todos
42
21
 
22
+ .tab-content
23
+ #linkable.tab-pane.active
24
+ ul.linkable
25
+ - @corporation.links.each do |link|
26
+ li.person
27
+ - target = link[:person]
28
+ - if target.instance_of? CustomerVault::Individual
29
+ = render partial: 'customer_vault/individuals/list_details', :locals => {:i => target, person: @corporation, link: link[:origin]}
30
+ - if target.instance_of? CustomerVault::Corporation
31
+ = render partial: 'customer_vault/corporations/list_details', :locals => {:c => target, person: @corporation, link: link[:origin]}
32
+
33
+ = link_to 'New link', customer_vault.new_corporation_link_path(@corporation.id), class: "btn btn-success", id: 'new-link'
34
+
35
+ #history.tab-pane
36
+ p = "History is soon to come"
37
+
38
+ #todos.tab-pane
39
+ p = "Todos are soon to come"
43
40
 
41
+ = render "agilidee_commons/contextual"
@@ -1,58 +1,21 @@
1
- = form_for [customer_vault, @individual], html: { class: "form-horizontal"} do |f|
2
- .form-group
3
- =f.label "First name" , class:"control-label col-lg-2"
4
- div class="col-lg-10"
5
- =f.text_field :first_name, class:"form-control"
6
-
7
- .form-group
8
- =f.label "Last name", class:"control-label col-lg-2"
9
- div class="col-lg-10"
10
- =f.text_field :last_name, class:"form-control"
11
-
12
- .form-group
13
- =f.label "Email", class:"control-label col-lg-2"
14
- div class="col-lg-10"
15
- =f.text_field :email, class:"form-control"
16
-
17
- .form-group
18
- =f.label "Title", class:"control-label col-lg-2"
19
- div class="col-lg-10"
20
- =f.text_field :title, class:"form-control"
21
-
22
- .form-group
23
- =f.label "Twitter",class:"control-label col-lg-2"
24
- div class="col-lg-10"
25
- =f.text_field :twitter, class:"form-control"
26
-
27
- .form-group
28
- =f.label "Context", class:"control-label col-lg-2"
29
- div class="col-lg-10"
30
- =f.text_area :context, class:"form-control"
31
-
32
- .form-group
33
- =f.label "Phone", class:"control-label col-lg-2"
34
- div class="col-lg-10"
35
- =f.text_field :phone, class:"form-control"
36
-
37
- .form-group
38
- =f.label "Fax", class:"control-label col-lg-2"
39
- div class="col-lg-10"
40
- =f.text_field :fax, class:"form-control"
41
-
42
- .form-group
43
- =f.label "Mobile", class:"control-label col-lg-2"
44
- div class="col-lg-10"
45
- =f.text_field :mobile, class:"form-control"
46
-
47
- .form-group
48
- =f.label "Web Site", class:"control-label col-lg-2"
49
- div class="col-lg-10"
50
- =f.text_field :www, class:"form-control"
51
-
52
- = f.fields_for :address do |address_form|
53
- = render partial: 'dorsale/addresses/nested_form', :locals => {:f => address_form}
54
-
55
- .actions
56
- div class= "cdiv"
57
- = f.submit 'Valider', :class=>"btn btn-success btn-sm", id: 'submit-individual'
58
- = link_to 'Retour', customer_vault.people_path, :class=>"btn btn-primary btn-sm"
1
+ = horizontal_form_for [customer_vault, @individual] do |f|
2
+ = f.input :first_name
3
+ = f.input :last_name
4
+ = f.input :email
5
+ = f.input :title
6
+ = f.input :twitter
7
+ = f.input :context, as: :text
8
+ = f.input :phone
9
+ = f.input :fax
10
+ = f.input :mobile
11
+ = f.input :www
12
+
13
+ / Temporaire - A refactoriser
14
+ = f.simple_fields_for :address do |af|
15
+ = af.input :street
16
+ = af.input :street_bis
17
+ = af.input :zip
18
+ = af.input :city
19
+ = af.input :country, as: :string
20
+
21
+ = form_buttons
@@ -1,52 +1,18 @@
1
- aside.col-lg-12.individual
2
- .row
3
- header
4
- .col-lg-12.cdiv
5
- =image_tag ('customer_vault/icons/individual-64.png')
6
- .col-lg-12.cdiv
7
- span class= "text-muted titre bold" #{individual.first_name}&nbsp;#{individual.last_name}
8
- .row
9
- .col-lg-12.top-buffer
10
- - if individual.email?
11
- .col-lg-12.cdiv
12
- .bold.text-muted.cdiv Email
13
- span #{individual.email}
14
- .col-lg-12.cdiv
15
- - if individual.twitter?
16
- .bold.text-muted.cdiv Twitter
17
- span #{individual.twitter}
18
- .col-lg-12.cdiv
19
- - if individual.phone?
20
- .bold.text-muted.cdiv Phone
21
- span #{individual.phone}
22
- .col-lg-12.cdiv
23
- - if individual.mobile?
24
- .bold.text-muted.cdiv Mobile
25
- span #{individual.mobile}
26
- .col-lg-12.cdiv
27
- - if individual.fax?
28
- .bold.text-muted.cdiv Fax
29
- span #{individual.fax}
30
- .col-lg-12.cdiv
31
- - if individual.context?
32
- .bold.text-muted.cdiv Context
33
- span #{individual.context}
34
- .col-lg-12.cdiv
35
- - if individual.www?
36
- .bold.text-muted.cdiv Internet Site
37
- - if individual.www.include?("http://")
38
- =link_to individual.www , individual.www
39
- - else
40
- =link_to "http://#{individual.www}" , "http://#{individual.www}"
41
- .col-lg-12.cdiv
42
- - if individual.address && !individual.address.one_line.blank?
43
- .bold.text-muted.cdiv Address
44
- span.address #{individual.address.one_line}
45
-
46
- .row.mega-top-buffer.bottom-buffer
47
- .col-lg-4.cdiv
48
- =link_to 'Editer', customer_vault.edit_individual_path(individual), :class=>"btn btn-success btn-sm"
49
- .col-lg-4.cdiv
50
- =link_to 'Effacer', [customer_vault, individual], data: {:confirm => 'Are you sure?'}, :method => :delete, :class=>"btn btn-danger btn-sm"
51
- .col-lg-4.cdiv
52
- = link_to 'Retour', customer_vault.people_path, :class=>"btn btn-primary btn-sm"
1
+ .individual-context: .context
2
+ = context_icon :user
3
+ = context_title individual.name
4
+ = actions_for individual, url: customer_vault.individual_path(individual)
5
+
6
+ = context_info "E-mail", individual.email
7
+ = context_info "Twitter", individual.twitter
8
+ = context_info "Phone", individual.phone
9
+ = context_info "Mobile", individual.mobile
10
+ = context_info "Fax", individual.fax
11
+ = context_info "Context", individual.context
12
+
13
+ - if individual.www.to_s.include?("://")
14
+ = context_info "Website", link_to(individual.www, individual.www)
15
+ - else
16
+ = context_info "Website", link_to("http://#{individual.www}", individual.www)
17
+
18
+ = context_info "Address", individual.address.one_line if individual.address.present?