adherent 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/adherent/icones/imputation-delete.png +0 -0
  3. data/app/assets/images/adherent/icones/imputation-edit.png +0 -0
  4. data/app/assets/images/images/Sorting icons.psd +0 -0
  5. data/app/assets/images/images/back_disabled.png +0 -0
  6. data/app/assets/images/images/back_enabled.png +0 -0
  7. data/app/assets/images/images/back_enabled_hover.png +0 -0
  8. data/app/assets/images/images/favicon.ico +0 -0
  9. data/app/assets/images/images/forward_disabled.png +0 -0
  10. data/app/assets/images/images/forward_enabled.png +0 -0
  11. data/app/assets/images/images/forward_enabled_hover.png +0 -0
  12. data/app/assets/images/images/sort_asc.png +0 -0
  13. data/app/assets/images/images/sort_asc_disabled.png +0 -0
  14. data/app/assets/images/images/sort_both.png +0 -0
  15. data/app/assets/images/images/sort_desc.png +0 -0
  16. data/app/assets/images/images/sort_desc_disabled.png +0 -0
  17. data/app/assets/javascripts/adherent/allpayments.js +7 -0
  18. data/app/assets/javascripts/adherent/jquery.dataTables.min.js +157 -0
  19. data/app/assets/javascripts/adherent/members.js +116 -0
  20. data/app/assets/stylesheets/adherent/allpayments.css +4 -0
  21. data/app/assets/stylesheets/adherent/demo_table.css +577 -0
  22. data/app/controllers/adherent/allpayments_controller.rb +9 -0
  23. data/app/controllers/adherent/payments_controller.rb +41 -4
  24. data/app/controllers/adherent/reglements_controller.rb +24 -0
  25. data/app/helpers/adherent/allpayments_helper.rb +5 -0
  26. data/app/helpers/adherent/application_helper.rb +24 -9
  27. data/app/helpers/adherent/payments_helper.rb +1 -10
  28. data/app/models/adherent/adhesion.rb +10 -6
  29. data/app/models/adherent/member.rb +2 -2
  30. data/app/models/adherent/payment.rb +27 -6
  31. data/app/views/adherent/allpayments/_payment.html.haml +14 -0
  32. data/app/views/adherent/allpayments/index.html.haml +22 -0
  33. data/app/views/adherent/members/index.html.erb +6 -5
  34. data/app/views/adherent/payments/_payment.html.haml +11 -0
  35. data/app/views/adherent/payments/edit.html.erb +13 -0
  36. data/app/views/adherent/payments/index.html.haml +1 -12
  37. data/app/views/adherent/payments/new.html.erb +1 -1
  38. data/app/views/adherent/payments/show.html.haml +33 -0
  39. data/app/views/adherent/reglements/show.html.haml +31 -0
  40. data/config/initializers/validators.rb +12 -0
  41. data/config/locales/fr.yml +1 -1
  42. data/config/routes.rb +3 -0
  43. data/lib/adherent/version.rb +1 -1
  44. data/test/dummy/app/models/organism.rb +1 -0
  45. data/test/dummy/log/development.log +14434 -0
  46. data/test/dummy/log/test.log +62947 -0
  47. data/test/dummy/tmp/cache/assets/BF0/070/sprockets%2F42b486109907c85c344e3428f5615140 +0 -0
  48. data/test/dummy/tmp/cache/assets/C2F/180/sprockets%2F24383c007af706866f9a978498308d01 +0 -0
  49. data/test/dummy/tmp/cache/assets/C44/670/sprockets%2Fe128312dd259094d00196a3f02f41819 +0 -0
  50. data/test/dummy/tmp/cache/assets/C4D/C10/sprockets%2Fe52bf847776498593423b635698c989c +0 -0
  51. data/test/dummy/tmp/cache/assets/C50/1E0/sprockets%2Fd687f61462083316a5947ccd9211605a +0 -0
  52. data/test/dummy/tmp/cache/assets/C53/BA0/sprockets%2F0701319e027b68d87b4d5727aa571973 +0 -0
  53. data/test/dummy/tmp/cache/assets/C7C/2A0/sprockets%2F451d3616d07ff0801851aecc85940392 +0 -0
  54. data/test/dummy/tmp/cache/assets/C8B/B50/sprockets%2F1bf0946089435ce76a87bd41668373c2 +0 -0
  55. data/test/dummy/tmp/cache/assets/C8C/C00/sprockets%2F25d88d6c610820a36668853eea17e359 +0 -0
  56. data/test/dummy/tmp/cache/assets/C91/5E0/sprockets%2F28a1436ca683918e98c79266d19d430e +0 -0
  57. data/test/dummy/tmp/cache/assets/CA4/6A0/sprockets%2F49b5803aaa253c1ffa5214311973e684 +0 -0
  58. data/test/dummy/tmp/cache/assets/CA6/0A0/sprockets%2F63a72244bdf73521f399e501b341d16d +0 -0
  59. data/test/dummy/tmp/cache/assets/CAA/020/sprockets%2Fa2032410860d92e63293c996d5fa3ac6 +0 -0
  60. data/test/dummy/tmp/cache/assets/CAA/DA0/sprockets%2Fc1d5b8783261726af51242f75d0034ef +0 -0
  61. data/test/dummy/tmp/cache/assets/CAD/BF0/sprockets%2Fd27d4e6bd84d0108fc54a21959181335 +0 -0
  62. data/test/dummy/tmp/cache/assets/CB3/3E0/sprockets%2Ff03d611409c3b2c45d75f97158197ee0 +0 -0
  63. data/test/dummy/tmp/cache/assets/CB7/310/sprockets%2F9d00a7c05c5990e797170e06dd5641d9 +0 -0
  64. data/test/dummy/tmp/cache/assets/CC5/430/sprockets%2F887b61f7cb339b94a85b7e721295493c +0 -0
  65. data/test/dummy/tmp/cache/assets/CC6/700/sprockets%2Fda996593aa3789391cab3d7762f13687 +0 -0
  66. data/test/dummy/tmp/cache/assets/CC7/410/sprockets%2Fc39062f6a04c41168a923ea22d701a5a +0 -0
  67. data/test/dummy/tmp/cache/assets/CCB/400/sprockets%2Fb211324ce679335840009b6a2aa45cfc +0 -0
  68. data/test/dummy/tmp/cache/assets/CD6/8A0/sprockets%2Fcb476833cd1a806e251da407a58d9520 +0 -0
  69. data/test/dummy/tmp/cache/assets/CDC/0B0/sprockets%2Ffef07c3c165353f861564ede180350a4 +0 -0
  70. data/test/dummy/tmp/cache/assets/CDD/EB0/sprockets%2F0e17703d917f6560e5c3b46ae85c09a2 +0 -0
  71. data/test/dummy/tmp/cache/assets/CE0/B90/sprockets%2F7baa8d092b9d409d47643521a8b55e62 +0 -0
  72. data/test/dummy/tmp/cache/assets/CE1/EB0/sprockets%2Fe2d34e55c19309ae4d1b8628d38514c6 +0 -0
  73. data/test/dummy/tmp/cache/assets/CE4/B80/sprockets%2Fdc146f8d1ff283ff045000f8349e3942 +0 -0
  74. data/test/dummy/tmp/cache/assets/CE8/950/sprockets%2Fd68548f1d6d12fe519aea39909520b36 +0 -0
  75. data/test/dummy/tmp/cache/assets/CEA/B70/sprockets%2F2cdb1061009b0d4430f4d073562b2cbc +0 -0
  76. data/test/dummy/tmp/cache/assets/CF6/590/sprockets%2F4904f8e3b4e2397b86f64f3549e3d63c +0 -0
  77. data/test/dummy/tmp/cache/assets/CF8/560/sprockets%2F7e8587b418f3496ca670f76e8b7423ea +0 -0
  78. data/test/dummy/tmp/cache/assets/CFA/700/sprockets%2Ff51725f304c66b6ed8ab01120cb1a593 +0 -0
  79. data/test/dummy/tmp/cache/assets/CFD/F60/sprockets%2Faac72c81c4f00133234e7d1bb46d7925 +0 -0
  80. data/test/dummy/tmp/cache/assets/CFE/380/sprockets%2F25b295cad423d26a3a334e3864cab085 +0 -0
  81. data/test/dummy/tmp/cache/assets/D04/640/sprockets%2F93cc6f780004fd5b09d1774c3bb0b802 +0 -0
  82. data/test/dummy/tmp/cache/assets/D0B/520/sprockets%2Fa659c61ab2078241e32ebaf671f87e41 +0 -0
  83. data/test/dummy/tmp/cache/assets/D0D/CC0/sprockets%2F90fc5652fe6161075680fcd4cd0c45d2 +0 -0
  84. data/test/dummy/tmp/cache/assets/D14/210/sprockets%2Fb5db5427cdef8d152ae598d461178026 +0 -0
  85. data/test/dummy/tmp/cache/assets/D15/960/sprockets%2F557c56f5b8b86ba772e07281f1f3a0c7 +0 -0
  86. data/test/dummy/tmp/cache/assets/D16/870/sprockets%2F3f2a439772fcd9cd0f434f723837ae51 +0 -0
  87. data/test/dummy/tmp/cache/assets/D16/D00/sprockets%2F52e940c5c1d8089bcdf984d4d27c5520 +0 -0
  88. data/test/dummy/tmp/cache/assets/D1A/390/sprockets%2F1d08a6978a059fa2494e078ec1ac7e93 +0 -0
  89. data/test/dummy/tmp/cache/assets/D1A/820/sprockets%2F20a218b05c2726d14bd025c36ba31ddd +0 -0
  90. data/test/dummy/tmp/cache/assets/D1A/D90/sprockets%2F6c459fd8844374d4aa166c64f544fae0 +0 -0
  91. data/test/dummy/tmp/cache/assets/D20/590/sprockets%2F22948c5cb4a59a4c252888f75cdf387a +0 -0
  92. data/test/dummy/tmp/cache/assets/D25/100/sprockets%2F4b9f1fdc6f9b86cc0624a7951766d926 +0 -0
  93. data/test/dummy/tmp/cache/assets/D26/A70/sprockets%2Fbb35e749193d15ad00bf0d04513a3bd6 +0 -0
  94. data/test/dummy/tmp/cache/assets/D27/980/sprockets%2F65718e7a65fd89199b02b7cd38b90be9 +0 -0
  95. data/test/dummy/tmp/cache/assets/D2A/220/sprockets%2Fb0d6ff4608e402650ca685bc013d5d0a +0 -0
  96. data/test/dummy/tmp/cache/assets/D2B/FA0/sprockets%2F32aa9ce8b2315cc01f8a2c27374215ce +0 -0
  97. data/test/dummy/tmp/cache/assets/D32/5D0/sprockets%2F3acc8697202c55974ff0122bcf20fa2b +0 -0
  98. data/test/dummy/tmp/cache/assets/D34/630/sprockets%2Fa259c79ff690848e93962f587da8f2ac +0 -0
  99. data/test/dummy/tmp/cache/assets/D34/E20/sprockets%2F3c0dfd7a47fb35af6a3ad88310713543 +0 -0
  100. data/test/dummy/tmp/cache/assets/D3E/7A0/sprockets%2Ff9a1dbe464c536a11de32284fbc89192 +0 -0
  101. data/test/dummy/tmp/cache/assets/D3F/640/sprockets%2F9b448668c4c3a12d6aaa017b94e69ed2 +0 -0
  102. data/test/dummy/tmp/cache/assets/D42/040/sprockets%2F3def97f4406db752008fa340f74a6e3f +0 -0
  103. data/test/dummy/tmp/cache/assets/D42/C40/sprockets%2F224cf987cad00c39ae3d39b971f8109b +0 -0
  104. data/test/dummy/tmp/cache/assets/D44/860/sprockets%2F9157a652853bd3cea861bd767fed0b08 +0 -0
  105. data/test/dummy/tmp/cache/assets/D44/BF0/sprockets%2Fcf34626c45538b36718fd50fa9bcb2e6 +0 -0
  106. data/test/dummy/tmp/cache/assets/D45/2A0/sprockets%2F9c55f3eca763e68ded31023b7f66543a +0 -0
  107. data/test/dummy/tmp/cache/assets/D46/650/sprockets%2F6ee2abb1888774ab7c549f15b50d615f +0 -0
  108. data/test/dummy/tmp/cache/assets/D48/B20/sprockets%2F5768e2da329c68c958acde5d26124de0 +0 -0
  109. data/test/dummy/tmp/cache/assets/D48/FD0/sprockets%2F4403ce85c7fe84fe60d426553aa99b1f +0 -0
  110. data/test/dummy/tmp/cache/assets/D49/2D0/sprockets%2F59e843295151ccde25afb2f9f6e7a605 +0 -0
  111. data/test/dummy/tmp/cache/assets/D4B/710/sprockets%2F41e4ac5488184198d7e33e18b7aece4f +0 -0
  112. data/test/dummy/tmp/cache/assets/D4B/C40/sprockets%2F2428f6c76bb4a5efb583e158681fb73d +0 -0
  113. data/test/dummy/tmp/cache/assets/D51/560/sprockets%2Ff6c8347aff37a4784ea82069ba176f5f +0 -0
  114. data/test/dummy/tmp/cache/assets/D52/250/sprockets%2F967f6481dd795af37e3a49be042f8e1b +0 -0
  115. data/test/dummy/tmp/cache/assets/D56/090/sprockets%2F4af17d268e2ffe72af8a78b78811f666 +0 -0
  116. data/test/dummy/tmp/cache/assets/D57/2C0/sprockets%2F57e8e5954196bd14468ff5db3ae99cd0 +0 -0
  117. data/test/dummy/tmp/cache/assets/D5F/600/sprockets%2F9c4623e57da4d15adb71bd1b04188b1d +0 -0
  118. data/test/dummy/tmp/cache/assets/D63/7A0/sprockets%2Fa0d549181d4ba25b5ed57b841efc2d14 +0 -0
  119. data/test/dummy/tmp/cache/assets/D65/0C0/sprockets%2F409bdde508f6197117fe0ab1344ca3de +0 -0
  120. data/test/dummy/tmp/cache/assets/D65/900/sprockets%2F4dd3fce32a54a0f8fb029c30f41d3487 +0 -0
  121. data/test/dummy/tmp/cache/assets/D68/100/sprockets%2F7d7522df5cd3ba1f22c81c653dd5d651 +0 -0
  122. data/test/dummy/tmp/cache/assets/D6A/5C0/sprockets%2F9b410af44867a4979d1aea0ab84ed24b +0 -0
  123. data/test/dummy/tmp/cache/assets/D6B/970/sprockets%2F214e29a7345faee9672bca1756e4aaf1 +0 -0
  124. data/test/dummy/tmp/cache/assets/D6B/D20/sprockets%2Fee6531726dfe6592fa84b42a420b6acd +0 -0
  125. data/test/dummy/tmp/cache/assets/D71/AF0/sprockets%2Fb289e7b3562dcfd42bd0957f27a2f52a +0 -0
  126. data/test/dummy/tmp/cache/assets/D73/0F0/sprockets%2F5ba6d2f108d33e64b84fc4dd91960d6e +0 -0
  127. data/test/dummy/tmp/cache/assets/D73/8B0/sprockets%2Fac0e6a1f5b87c2966f07864c89c0acc3 +0 -0
  128. data/test/dummy/tmp/cache/assets/D7A/3E0/sprockets%2F3dfc09dcfefff43d4680267d832149c3 +0 -0
  129. data/test/dummy/tmp/cache/assets/D7B/800/sprockets%2F850d92cf676cc2c2c662ee8dc328f82c +0 -0
  130. data/test/dummy/tmp/cache/assets/D7D/950/sprockets%2F8259f3fc885403b4eea8dd12964c2ffc +0 -0
  131. data/test/dummy/tmp/cache/assets/D7F/140/sprockets%2Fb6961cbff5838a917c93f2cb6185d6ae +0 -0
  132. data/test/dummy/tmp/cache/assets/D92/430/sprockets%2Fc55e2bbc3d3c5566893be021ec1c4ab7 +0 -0
  133. data/test/dummy/tmp/cache/assets/D9A/810/sprockets%2F53a9bd5325fcfa4148c273e3deb2d19d +0 -0
  134. data/test/dummy/tmp/cache/assets/D9D/BA0/sprockets%2Fa3a3f78f8e854339e32a5ab0638abbbf +0 -0
  135. data/test/dummy/tmp/cache/assets/DA7/930/sprockets%2F06db55d1b7d0c96a4ff1657e169e6ece +0 -0
  136. data/test/dummy/tmp/cache/assets/DA8/0D0/sprockets%2F74dcf71bbdf4ad56a3b4338b93d9866c +0 -0
  137. data/test/dummy/tmp/cache/assets/DAD/8E0/sprockets%2F498547cbaefbf040cfff05e9c6e53386 +0 -0
  138. data/test/dummy/tmp/cache/assets/DB0/A80/sprockets%2F9fdb8e951f975dae3836c2ccf0f65a34 +0 -0
  139. data/test/dummy/tmp/cache/assets/DBC/890/sprockets%2Fa6a1ac17a4326ab9f49d1a74de70f3aa +0 -0
  140. data/test/dummy/tmp/cache/assets/DC1/9E0/sprockets%2F4fdc113ba37308cc3d7d2dbbe1e9d625 +0 -0
  141. data/test/dummy/tmp/cache/assets/DCC/170/sprockets%2Fa2b9a6a717a82fc483c94abbe71aa95f +0 -0
  142. data/test/dummy/tmp/cache/assets/DCD/870/sprockets%2F26f53f256948ecabba69abf1e1dea282 +0 -0
  143. data/test/dummy/tmp/cache/assets/DD3/F60/sprockets%2Fde4fdc4d1f700596d5f2ce7077fbc32e +0 -0
  144. data/test/dummy/tmp/cache/assets/DD4/980/sprockets%2Fed1289bfd5270a38bd9adfcb8d0627c8 +0 -0
  145. data/test/dummy/tmp/cache/assets/DD7/110/sprockets%2Fa7626606dec6ffd4a8a4b76abb7f6a94 +0 -0
  146. data/test/dummy/tmp/cache/assets/DD7/2D0/sprockets%2F9f68c831ccc33f95a6b0a5d7aaf76d8a +0 -0
  147. data/test/dummy/tmp/cache/assets/DED/9A0/sprockets%2F1e96fab65eff8789cd8c76ffadf40814 +0 -0
  148. data/test/dummy/tmp/cache/assets/E12/820/sprockets%2Ff8ced48d293d9ae81be776bac3d3de86 +0 -0
  149. data/test/dummy/tmp/cache/assets/E2A/410/sprockets%2F73874a0edbd48f62ca7cad3c4a9e6aca +0 -0
  150. data/test/dummy/tmp/cache/assets/E3B/7A0/sprockets%2F3c7ac679f8c2cf31dec4ed6ee8064ece +0 -0
  151. data/test/dummy/tmp/cache/assets/E5A/2A0/sprockets%2Fed33dc2e47cddca2a7f3b9d850f01fef +0 -0
  152. data/test/dummy/tmp/cache/assets/E8E/C80/sprockets%2Fbcfe97b68b37db0b902decd4ea5ae8ea +0 -0
  153. data/test/dummy/tmp/pids/server.pid +1 -1
  154. metadata +78 -2
@@ -0,0 +1,577 @@
1
+ /*
2
+ * File: demo_table.css
3
+ * CVS: $Id$
4
+ * Description: CSS descriptions for DataTables demo pages
5
+ * Author: Allan Jardine
6
+ * Created: Tue May 12 06:47:22 BST 2009
7
+ * Modified: $Date$ by $Author$
8
+ * Language: CSS
9
+ * Project: DataTables
10
+ *
11
+ * Copyright 2009 Allan Jardine. All Rights Reserved.
12
+ *
13
+ * ***************************************************************************
14
+ * DESCRIPTION
15
+ *
16
+ * The styles given here are suitable for the demos that are used with the standard DataTables
17
+ * distribution (see www.datatables.net). You will most likely wish to modify these styles to
18
+ * meet the layout requirements of your site.
19
+ *
20
+ * Common issues:
21
+ * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
22
+ * no conflict between the two pagination types. If you want to use full_numbers pagination
23
+ * ensure that you either have "example_alt_pagination" as a body class name, or better yet,
24
+ * modify that selector.
25
+ * Note that the path used for Images is relative. All images are by default located in
26
+ * ../images/ - relative to this CSS file.
27
+ */
28
+
29
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
30
+ * DataTables features
31
+ */
32
+
33
+ .dataTables_wrapper {
34
+ position: relative;
35
+ clear: both;
36
+ zoom: 1; /* Feeling sorry for IE */
37
+ }
38
+
39
+ .dataTables_processing {
40
+ position: absolute;
41
+ top: 50%;
42
+ left: 50%;
43
+ width: 250px;
44
+ height: 30px;
45
+ margin-left: -125px;
46
+ margin-top: -15px;
47
+ padding: 14px 0 2px 0;
48
+ border: 1px solid #ddd;
49
+ text-align: center;
50
+ color: #999;
51
+ font-size: 14px;
52
+ background-color: white;
53
+ }
54
+
55
+ .dataTables_length {
56
+ width: 40%;
57
+ float: left;
58
+ }
59
+
60
+ .dataTables_filter {
61
+ width: 50%;
62
+ float: right;
63
+ text-align: right;
64
+ }
65
+
66
+ .dataTables_info {
67
+ width: 60%;
68
+ float: left;
69
+ }
70
+
71
+ .dataTables_paginate {
72
+ float: right;
73
+ text-align: right;
74
+ }
75
+
76
+ /* Pagination nested */
77
+ .paginate_disabled_previous, .paginate_enabled_previous,
78
+ .paginate_disabled_next, .paginate_enabled_next {
79
+ height: 19px;
80
+ float: left;
81
+ cursor: pointer;
82
+ *cursor: hand;
83
+ color: #111 !important;
84
+ }
85
+ .paginate_disabled_previous:hover, .paginate_enabled_previous:hover,
86
+ .paginate_disabled_next:hover, .paginate_enabled_next:hover {
87
+ text-decoration: none !important;
88
+ }
89
+ .paginate_disabled_previous:active, .paginate_enabled_previous:active,
90
+ .paginate_disabled_next:active, .paginate_enabled_next:active {
91
+ outline: none;
92
+ }
93
+
94
+ .paginate_disabled_previous,
95
+ .paginate_disabled_next {
96
+ color: #666 !important;
97
+ }
98
+ .paginate_disabled_previous, .paginate_enabled_previous {
99
+ padding-left: 23px;
100
+ }
101
+ .paginate_disabled_next, .paginate_enabled_next {
102
+ padding-right: 23px;
103
+ margin-left: 10px;
104
+ }
105
+
106
+ .paginate_disabled_previous {
107
+ background: url('../images/back_disabled.png') no-repeat top left;
108
+ }
109
+
110
+ .paginate_enabled_previous {
111
+ background: url('../images/back_enabled.png') no-repeat top left;
112
+ }
113
+ .paginate_enabled_previous:hover {
114
+ background: url('../images/back_enabled_hover.png') no-repeat top left;
115
+ }
116
+
117
+ .paginate_disabled_next {
118
+ background: url('../images/forward_disabled.png') no-repeat top right;
119
+ }
120
+
121
+ .paginate_enabled_next {
122
+ background: url('../images/forward_enabled.png') no-repeat top right;
123
+ }
124
+ .paginate_enabled_next:hover {
125
+ background: url('../images/forward_enabled_hover.png') no-repeat top right;
126
+ }
127
+
128
+
129
+
130
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
131
+ * DataTables display
132
+ */
133
+ table.display {
134
+ margin: 0 auto;
135
+ clear: both;
136
+ width: 100%;
137
+
138
+ /* Note Firefox 3.5 and before have a bug with border-collapse
139
+ * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
140
+ * border-spacing: 0; is one possible option. Conditional-css.com is
141
+ * useful for this kind of thing
142
+ *
143
+ * Further note IE 6/7 has problems when calculating widths with border width.
144
+ * It subtracts one px relative to the other browsers from the first column, and
145
+ * adds one to the end...
146
+ *
147
+ * If you want that effect I'd suggest setting a border-top/left on th/td's and
148
+ * then filling in the gaps with other borders.
149
+ */
150
+ }
151
+
152
+ table.display thead th {
153
+ padding: 3px 18px 3px 10px;
154
+ border-bottom: 1px solid black;
155
+ font-weight: bold;
156
+ cursor: pointer;
157
+ * cursor: hand;
158
+ }
159
+
160
+ table.display tfoot th {
161
+ padding: 3px 18px 3px 10px;
162
+ border-top: 1px solid black;
163
+ font-weight: bold;
164
+ }
165
+
166
+ table.display tr.heading2 td {
167
+ border-bottom: 1px solid #aaa;
168
+ }
169
+
170
+ table.display td {
171
+ padding: 3px 10px;
172
+ }
173
+
174
+ table.display td.center {
175
+ text-align: center;
176
+ }
177
+
178
+
179
+
180
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
181
+ * DataTables sorting
182
+ */
183
+
184
+ .sorting_asc {
185
+ background: url('../images/sort_asc.png') no-repeat center right;
186
+ }
187
+
188
+ .sorting_desc {
189
+ background: url('../images/sort_desc.png') no-repeat center right;
190
+ }
191
+
192
+ .sorting {
193
+ background: url('../images/sort_both.png') no-repeat center right;
194
+ }
195
+
196
+ .sorting_asc_disabled {
197
+ background: url('../images/sort_asc_disabled.png') no-repeat center right;
198
+ }
199
+
200
+ .sorting_desc_disabled {
201
+ background: url('../images/sort_desc_disabled.png') no-repeat center right;
202
+ }
203
+
204
+ table.display thead th:active,
205
+ table.display thead td:active {
206
+ outline: none;
207
+ }
208
+
209
+
210
+
211
+
212
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
213
+ * DataTables row classes
214
+ */
215
+ table.display tr.odd.gradeA {
216
+ background-color: #ddffdd;
217
+ }
218
+
219
+ table.display tr.even.gradeA {
220
+ background-color: #eeffee;
221
+ }
222
+
223
+ table.display tr.odd.gradeC {
224
+ background-color: #ddddff;
225
+ }
226
+
227
+ table.display tr.even.gradeC {
228
+ background-color: #eeeeff;
229
+ }
230
+
231
+ table.display tr.odd.gradeX {
232
+ background-color: #ffdddd;
233
+ }
234
+
235
+ table.display tr.even.gradeX {
236
+ background-color: #ffeeee;
237
+ }
238
+
239
+ table.display tr.odd.gradeU {
240
+ background-color: #ddd;
241
+ }
242
+
243
+ table.display tr.even.gradeU {
244
+ background-color: #eee;
245
+ }
246
+
247
+
248
+ tr.odd {
249
+ background-color: #E2E4FF;
250
+ }
251
+
252
+ tr.even {
253
+ background-color: white;
254
+ }
255
+
256
+
257
+
258
+
259
+
260
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
261
+ * Misc
262
+ */
263
+ .dataTables_scroll {
264
+ clear: both;
265
+ }
266
+
267
+ .dataTables_scrollBody {
268
+ *margin-top: -1px;
269
+ -webkit-overflow-scrolling: touch;
270
+ }
271
+
272
+ .top, .bottom {
273
+ padding: 15px;
274
+ background-color: #F5F5F5;
275
+ border: 1px solid #CCCCCC;
276
+ }
277
+
278
+ .top .dataTables_info {
279
+ float: none;
280
+ }
281
+
282
+ .clear {
283
+ clear: both;
284
+ }
285
+
286
+ .dataTables_empty {
287
+ text-align: center;
288
+ }
289
+
290
+ tfoot input {
291
+ margin: 0.5em 0;
292
+ width: 100%;
293
+ color: #444;
294
+ }
295
+
296
+ tfoot input.search_init {
297
+ color: #999;
298
+ }
299
+
300
+ td.group {
301
+ background-color: #d1cfd0;
302
+ border-bottom: 2px solid #A19B9E;
303
+ border-top: 2px solid #A19B9E;
304
+ }
305
+
306
+ td.details {
307
+ background-color: #d1cfd0;
308
+ border: 2px solid #A19B9E;
309
+ }
310
+
311
+
312
+ .example_alt_pagination div.dataTables_info {
313
+ width: 40%;
314
+ }
315
+
316
+ .paging_full_numbers {
317
+ width: 400px;
318
+ height: 22px;
319
+ line-height: 22px;
320
+ }
321
+
322
+ .paging_full_numbers a:active {
323
+ outline: none
324
+ }
325
+
326
+ .paging_full_numbers a:hover {
327
+ text-decoration: none;
328
+ }
329
+
330
+ .paging_full_numbers a.paginate_button,
331
+ .paging_full_numbers a.paginate_active {
332
+ border: 1px solid #aaa;
333
+ -webkit-border-radius: 5px;
334
+ -moz-border-radius: 5px;
335
+ padding: 2px 5px;
336
+ margin: 0 3px;
337
+ cursor: pointer;
338
+ *cursor: hand;
339
+ color: #333 !important;
340
+ }
341
+
342
+ .paging_full_numbers a.paginate_button {
343
+ background-color: #ddd;
344
+ }
345
+
346
+ .paging_full_numbers a.paginate_button:hover {
347
+ background-color: #ccc;
348
+ text-decoration: none !important;
349
+ }
350
+
351
+ .paging_full_numbers a.paginate_active {
352
+ background-color: #99B3FF;
353
+ }
354
+
355
+ table.display tr.even.row_selected td {
356
+ background-color: #B0BED9;
357
+ }
358
+
359
+ table.display tr.odd.row_selected td {
360
+ background-color: #9FAFD1;
361
+ }
362
+
363
+
364
+ /*
365
+ * Sorting classes for columns
366
+ */
367
+ /* For the standard odd/even */
368
+ tr.odd td.sorting_1 {
369
+ background-color: #D3D6FF;
370
+ }
371
+
372
+ tr.odd td.sorting_2 {
373
+ background-color: #DADCFF;
374
+ }
375
+
376
+ tr.odd td.sorting_3 {
377
+ background-color: #E0E2FF;
378
+ }
379
+
380
+ tr.even td.sorting_1 {
381
+ background-color: #EAEBFF;
382
+ }
383
+
384
+ tr.even td.sorting_2 {
385
+ background-color: #F2F3FF;
386
+ }
387
+
388
+ tr.even td.sorting_3 {
389
+ background-color: #F9F9FF;
390
+ }
391
+
392
+
393
+ /* For the Conditional-CSS grading rows */
394
+ /*
395
+ Colour calculations (based off the main row colours)
396
+ Level 1:
397
+ dd > c4
398
+ ee > d5
399
+ Level 2:
400
+ dd > d1
401
+ ee > e2
402
+ */
403
+ tr.odd.gradeA td.sorting_1 {
404
+ background-color: #c4ffc4;
405
+ }
406
+
407
+ tr.odd.gradeA td.sorting_2 {
408
+ background-color: #d1ffd1;
409
+ }
410
+
411
+ tr.odd.gradeA td.sorting_3 {
412
+ background-color: #d1ffd1;
413
+ }
414
+
415
+ tr.even.gradeA td.sorting_1 {
416
+ background-color: #d5ffd5;
417
+ }
418
+
419
+ tr.even.gradeA td.sorting_2 {
420
+ background-color: #e2ffe2;
421
+ }
422
+
423
+ tr.even.gradeA td.sorting_3 {
424
+ background-color: #e2ffe2;
425
+ }
426
+
427
+ tr.odd.gradeC td.sorting_1 {
428
+ background-color: #c4c4ff;
429
+ }
430
+
431
+ tr.odd.gradeC td.sorting_2 {
432
+ background-color: #d1d1ff;
433
+ }
434
+
435
+ tr.odd.gradeC td.sorting_3 {
436
+ background-color: #d1d1ff;
437
+ }
438
+
439
+ tr.even.gradeC td.sorting_1 {
440
+ background-color: #d5d5ff;
441
+ }
442
+
443
+ tr.even.gradeC td.sorting_2 {
444
+ background-color: #e2e2ff;
445
+ }
446
+
447
+ tr.even.gradeC td.sorting_3 {
448
+ background-color: #e2e2ff;
449
+ }
450
+
451
+ tr.odd.gradeX td.sorting_1 {
452
+ background-color: #ffc4c4;
453
+ }
454
+
455
+ tr.odd.gradeX td.sorting_2 {
456
+ background-color: #ffd1d1;
457
+ }
458
+
459
+ tr.odd.gradeX td.sorting_3 {
460
+ background-color: #ffd1d1;
461
+ }
462
+
463
+ tr.even.gradeX td.sorting_1 {
464
+ background-color: #ffd5d5;
465
+ }
466
+
467
+ tr.even.gradeX td.sorting_2 {
468
+ background-color: #ffe2e2;
469
+ }
470
+
471
+ tr.even.gradeX td.sorting_3 {
472
+ background-color: #ffe2e2;
473
+ }
474
+
475
+ tr.odd.gradeU td.sorting_1 {
476
+ background-color: #c4c4c4;
477
+ }
478
+
479
+ tr.odd.gradeU td.sorting_2 {
480
+ background-color: #d1d1d1;
481
+ }
482
+
483
+ tr.odd.gradeU td.sorting_3 {
484
+ background-color: #d1d1d1;
485
+ }
486
+
487
+ tr.even.gradeU td.sorting_1 {
488
+ background-color: #d5d5d5;
489
+ }
490
+
491
+ tr.even.gradeU td.sorting_2 {
492
+ background-color: #e2e2e2;
493
+ }
494
+
495
+ tr.even.gradeU td.sorting_3 {
496
+ background-color: #e2e2e2;
497
+ }
498
+
499
+
500
+ /*
501
+ * Row highlighting example
502
+ */
503
+ .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
504
+ background-color: #ECFFB3;
505
+ }
506
+
507
+ .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
508
+ background-color: #E6FF99;
509
+ }
510
+
511
+ .ex_highlight_row #example tr.even:hover {
512
+ background-color: #ECFFB3;
513
+ }
514
+
515
+ .ex_highlight_row #example tr.even:hover td.sorting_1 {
516
+ background-color: #DDFF75;
517
+ }
518
+
519
+ .ex_highlight_row #example tr.even:hover td.sorting_2 {
520
+ background-color: #E7FF9E;
521
+ }
522
+
523
+ .ex_highlight_row #example tr.even:hover td.sorting_3 {
524
+ background-color: #E2FF89;
525
+ }
526
+
527
+ .ex_highlight_row #example tr.odd:hover {
528
+ background-color: #E6FF99;
529
+ }
530
+
531
+ .ex_highlight_row #example tr.odd:hover td.sorting_1 {
532
+ background-color: #D6FF5C;
533
+ }
534
+
535
+ .ex_highlight_row #example tr.odd:hover td.sorting_2 {
536
+ background-color: #E0FF84;
537
+ }
538
+
539
+ .ex_highlight_row #example tr.odd:hover td.sorting_3 {
540
+ background-color: #DBFF70;
541
+ }
542
+
543
+
544
+ /*
545
+ * KeyTable
546
+ */
547
+ table.KeyTable td {
548
+ border: 3px solid transparent;
549
+ }
550
+
551
+ table.KeyTable td.focus {
552
+ border: 3px solid #3366FF;
553
+ }
554
+
555
+ table.display tr.gradeA {
556
+ background-color: #eeffee;
557
+ }
558
+
559
+ table.display tr.gradeC {
560
+ background-color: #ddddff;
561
+ }
562
+
563
+ table.display tr.gradeX {
564
+ background-color: #ffdddd;
565
+ }
566
+
567
+ table.display tr.gradeU {
568
+ background-color: #ddd;
569
+ }
570
+
571
+ div.box {
572
+ height: 100px;
573
+ padding: 10px;
574
+ overflow: auto;
575
+ border: 1px solid #8080FF;
576
+ background-color: #E5E5FF;
577
+ }
@@ -0,0 +1,9 @@
1
+ require_dependency "adherent/application_controller"
2
+
3
+ module Adherent
4
+ class AllpaymentsController < ApplicationController
5
+ def index
6
+ @payments = @organism.payments.all
7
+ end
8
+ end
9
+ end
@@ -1,13 +1,17 @@
1
1
  require_dependency "adherent/application_controller"
2
2
 
3
3
  module Adherent
4
- class PaymentsController < ApplicationController
4
+ class PaymentsController < ApplicationController
5
5
 
6
6
  before_filter :find_member
7
7
 
8
8
  def index
9
9
  @payments = @member.payments
10
10
  end
11
+
12
+ def show
13
+ @payment = @member.payments.find_by_id(params[:id])
14
+ end
11
15
 
12
16
  def new
13
17
  @payment = @member.payments.new(date:Date.today, amount:@member.unpaid_amount)
@@ -20,22 +24,41 @@ module Adherent
20
24
  flash[:notice] = 'Le paiement a été enregistré'
21
25
  redirect_to member_payments_path(@member)
22
26
  else
23
- flash[:alert] = 'Impossible d\'enregistrer ce paiement'
24
27
  render 'new'
25
28
  end
26
29
  end
27
30
 
31
+ def edit
32
+ @payment = @member.payments.find_by_id(params[:id])
33
+ end
34
+
35
+ def update
36
+ @payment = @member.payments.find_by_id(params[:id])
37
+ if @payment.update_attributes(params[:payment])
38
+
39
+ flash[:notice] = 'Le paiement a été modifié'
40
+ redirect_to member_payments_path(@member)
41
+ else
42
+
43
+ flash[:alert] = base_errors_messages(@payment)
44
+ render 'edit'
45
+ end
46
+ end
47
+
28
48
 
29
49
 
30
50
  # DELETE /payment/1
31
51
  # DELETE /coords/1.json
32
52
  def destroy
33
53
  @payment = @member.payments.find(params[:id])
34
- @payment.destroy
54
+ if @payment.destroy
55
+ flash[:notice] = 'Le paiement a été supprimé'
56
+ else
57
+ flash[:alert] = base_errors_messages(@payment)
58
+ end
35
59
 
36
60
  respond_to do |format|
37
61
  format.html { redirect_to member_payments_url(@member) }
38
-
39
62
  end
40
63
  end
41
64
 
@@ -47,5 +70,19 @@ module Adherent
47
70
  def find_member
48
71
  @member = Member.find(params[:member_id])
49
72
  end
73
+
74
+ # cette méthode permet à l'application qui intègre le gem adhérent
75
+ # de passer un message d'erreur à ce controller en ajoutant
76
+ # une erreur sur :base.
77
+ #
78
+ def base_errors_messages(pay)
79
+ perm = pay.errors.messages[:base]
80
+ Rails.logger.debug "Inspection de perm #{perm.inspect}"
81
+ if perm
82
+ perm.join('<br/>').html_safe
83
+ else
84
+ nil
85
+ end
86
+ end
50
87
  end
51
88
  end
@@ -21,6 +21,30 @@ module Adherent
21
21
  redirect_to member_payments_path(@payment.member)
22
22
 
23
23
  end
24
+
25
+ def show
26
+ @payment = Payment.find(params[:payment_id])
27
+ @reglement = @payment.reglements.find(params[:id])
28
+ end
29
+
30
+
31
+
32
+ # DELETE /reglement/1
33
+
34
+ def destroy
35
+ @payment = Payment.find(params[:payment_id])
36
+ @reglement = @payment.reglements.find(params[:id])
37
+ if @reglement.destroy
38
+ flash[:notice] = 'Le reglement a été supprimé'
39
+ else
40
+ flash[:alert] = 'Le règlement n\'a pas pu être supprimé'
41
+ end
42
+
43
+ respond_to do |format|
44
+ format.html { redirect_to member_payment_url(@payment.member, @payment) }
45
+ end
46
+ end
47
+
24
48
 
25
49
 
26
50
  end
@@ -0,0 +1,5 @@
1
+ module Adherent
2
+ module AllpaymentsHelper
3
+
4
+ end
5
+ end