adherent 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/adherent/icones/imputation.png +0 -0
  3. data/app/assets/stylesheets/adherent/jc_application.css.scss +4 -0
  4. data/app/controllers/adherent/application_controller.rb +2 -2
  5. data/app/controllers/adherent/payments_controller.rb +1 -1
  6. data/app/helpers/adherent/application_helper.rb +8 -0
  7. data/app/views/adherent/adhesions/_form.html.haml +1 -1
  8. data/app/views/adherent/payments/_form.html.haml +2 -2
  9. data/app/views/adherent/payments/index.html.haml +1 -1
  10. data/app/views/adherent/reglements/_form.html.haml +2 -2
  11. data/config/initializers/french_decimal_input.rb +16 -0
  12. data/lib/adherent/version.rb +1 -1
  13. data/test/dummy/log/development.log +6959 -0
  14. data/test/dummy/log/test.log +3958 -0
  15. data/test/dummy/tmp/cache/assets/BF0/070/sprockets%2F42b486109907c85c344e3428f5615140 +0 -0
  16. data/test/dummy/tmp/cache/assets/C44/670/sprockets%2Fe128312dd259094d00196a3f02f41819 +0 -0
  17. data/test/dummy/tmp/cache/assets/C4D/C10/sprockets%2Fe52bf847776498593423b635698c989c +0 -0
  18. data/test/dummy/tmp/cache/assets/C50/1E0/sprockets%2Fd687f61462083316a5947ccd9211605a +0 -0
  19. data/test/dummy/tmp/cache/assets/C53/BA0/sprockets%2F0701319e027b68d87b4d5727aa571973 +0 -0
  20. data/test/dummy/tmp/cache/assets/C8B/B50/sprockets%2F1bf0946089435ce76a87bd41668373c2 +0 -0
  21. data/test/dummy/tmp/cache/assets/C91/5E0/sprockets%2F28a1436ca683918e98c79266d19d430e +0 -0
  22. data/test/dummy/tmp/cache/assets/CA6/0A0/sprockets%2F63a72244bdf73521f399e501b341d16d +0 -0
  23. data/test/dummy/tmp/cache/assets/CAD/BF0/sprockets%2Fd27d4e6bd84d0108fc54a21959181335 +0 -0
  24. data/test/dummy/tmp/cache/assets/CB3/3E0/sprockets%2Ff03d611409c3b2c45d75f97158197ee0 +0 -0
  25. data/test/dummy/tmp/cache/assets/CC6/700/sprockets%2Fda996593aa3789391cab3d7762f13687 +0 -0
  26. data/test/dummy/tmp/cache/assets/CC7/410/sprockets%2Fc39062f6a04c41168a923ea22d701a5a +0 -0
  27. data/test/dummy/tmp/cache/assets/CCB/400/sprockets%2Fb211324ce679335840009b6a2aa45cfc +0 -0
  28. data/test/dummy/tmp/cache/assets/CD6/8A0/sprockets%2Fcb476833cd1a806e251da407a58d9520 +0 -0
  29. data/test/dummy/tmp/cache/assets/CDC/0B0/sprockets%2Ffef07c3c165353f861564ede180350a4 +0 -0
  30. data/test/dummy/tmp/cache/assets/CDD/EB0/sprockets%2F0e17703d917f6560e5c3b46ae85c09a2 +0 -0
  31. data/test/dummy/tmp/cache/assets/CE0/B90/sprockets%2F7baa8d092b9d409d47643521a8b55e62 +0 -0
  32. data/test/dummy/tmp/cache/assets/CE1/EB0/sprockets%2Fe2d34e55c19309ae4d1b8628d38514c6 +0 -0
  33. data/test/dummy/tmp/cache/assets/CE4/B80/sprockets%2Fdc146f8d1ff283ff045000f8349e3942 +0 -0
  34. data/test/dummy/tmp/cache/assets/CFA/700/sprockets%2Ff51725f304c66b6ed8ab01120cb1a593 +0 -0
  35. data/test/dummy/tmp/cache/assets/CFD/F60/sprockets%2Faac72c81c4f00133234e7d1bb46d7925 +0 -0
  36. data/test/dummy/tmp/cache/assets/D0B/520/sprockets%2Fa659c61ab2078241e32ebaf671f87e41 +0 -0
  37. data/test/dummy/tmp/cache/assets/D0D/CC0/sprockets%2F90fc5652fe6161075680fcd4cd0c45d2 +0 -0
  38. data/test/dummy/tmp/cache/assets/D14/210/sprockets%2Fb5db5427cdef8d152ae598d461178026 +0 -0
  39. data/test/dummy/tmp/cache/assets/D15/960/sprockets%2F557c56f5b8b86ba772e07281f1f3a0c7 +0 -0
  40. data/test/dummy/tmp/cache/assets/D16/870/sprockets%2F3f2a439772fcd9cd0f434f723837ae51 +0 -0
  41. data/test/dummy/tmp/cache/assets/D16/D00/sprockets%2F52e940c5c1d8089bcdf984d4d27c5520 +0 -0
  42. data/test/dummy/tmp/cache/assets/D1A/390/sprockets%2F1d08a6978a059fa2494e078ec1ac7e93 +0 -0
  43. data/test/dummy/tmp/cache/assets/D1A/820/sprockets%2F20a218b05c2726d14bd025c36ba31ddd +0 -0
  44. data/test/dummy/tmp/cache/assets/D1A/D90/sprockets%2F6c459fd8844374d4aa166c64f544fae0 +0 -0
  45. data/test/dummy/tmp/cache/assets/D20/590/sprockets%2F22948c5cb4a59a4c252888f75cdf387a +0 -0
  46. data/test/dummy/tmp/cache/assets/D25/100/sprockets%2F4b9f1fdc6f9b86cc0624a7951766d926 +0 -0
  47. data/test/dummy/tmp/cache/assets/D26/A70/sprockets%2Fbb35e749193d15ad00bf0d04513a3bd6 +0 -0
  48. data/test/dummy/tmp/cache/assets/D27/980/sprockets%2F65718e7a65fd89199b02b7cd38b90be9 +0 -0
  49. data/test/dummy/tmp/cache/assets/D2A/220/sprockets%2Fb0d6ff4608e402650ca685bc013d5d0a +0 -0
  50. data/test/dummy/tmp/cache/assets/D2B/FA0/sprockets%2F32aa9ce8b2315cc01f8a2c27374215ce +0 -0
  51. data/test/dummy/tmp/cache/assets/D32/5D0/sprockets%2F3acc8697202c55974ff0122bcf20fa2b +0 -0
  52. data/test/dummy/tmp/cache/assets/D3E/7A0/sprockets%2Ff9a1dbe464c536a11de32284fbc89192 +0 -0
  53. data/test/dummy/tmp/cache/assets/D3F/640/sprockets%2F9b448668c4c3a12d6aaa017b94e69ed2 +0 -0
  54. data/test/dummy/tmp/cache/assets/D42/040/sprockets%2F3def97f4406db752008fa340f74a6e3f +0 -0
  55. data/test/dummy/tmp/cache/assets/D44/860/sprockets%2F9157a652853bd3cea861bd767fed0b08 +0 -0
  56. data/test/dummy/tmp/cache/assets/D44/BF0/sprockets%2Fcf34626c45538b36718fd50fa9bcb2e6 +0 -0
  57. data/test/dummy/tmp/cache/assets/D45/2A0/sprockets%2F9c55f3eca763e68ded31023b7f66543a +0 -0
  58. data/test/dummy/tmp/cache/assets/D48/B20/sprockets%2F5768e2da329c68c958acde5d26124de0 +0 -0
  59. data/test/dummy/tmp/cache/assets/D48/FD0/sprockets%2F4403ce85c7fe84fe60d426553aa99b1f +0 -0
  60. data/test/dummy/tmp/cache/assets/D4B/C40/sprockets%2F2428f6c76bb4a5efb583e158681fb73d +0 -0
  61. data/test/dummy/tmp/cache/assets/D51/560/sprockets%2Ff6c8347aff37a4784ea82069ba176f5f +0 -0
  62. data/test/dummy/tmp/cache/assets/D56/090/sprockets%2F4af17d268e2ffe72af8a78b78811f666 +0 -0
  63. data/test/dummy/tmp/cache/assets/D57/2C0/sprockets%2F57e8e5954196bd14468ff5db3ae99cd0 +0 -0
  64. data/test/dummy/tmp/cache/assets/D5F/600/sprockets%2F9c4623e57da4d15adb71bd1b04188b1d +0 -0
  65. data/test/dummy/tmp/cache/assets/D63/7A0/sprockets%2Fa0d549181d4ba25b5ed57b841efc2d14 +0 -0
  66. data/test/dummy/tmp/cache/assets/D65/900/sprockets%2F4dd3fce32a54a0f8fb029c30f41d3487 +0 -0
  67. data/test/dummy/tmp/cache/assets/D68/100/sprockets%2F7d7522df5cd3ba1f22c81c653dd5d651 +0 -0
  68. data/test/dummy/tmp/cache/assets/D6A/5C0/sprockets%2F9b410af44867a4979d1aea0ab84ed24b +0 -0
  69. data/test/dummy/tmp/cache/assets/D6B/970/sprockets%2F214e29a7345faee9672bca1756e4aaf1 +0 -0
  70. data/test/dummy/tmp/cache/assets/D6B/D20/sprockets%2Fee6531726dfe6592fa84b42a420b6acd +0 -0
  71. data/test/dummy/tmp/cache/assets/D71/AF0/sprockets%2Fb289e7b3562dcfd42bd0957f27a2f52a +0 -0
  72. data/test/dummy/tmp/cache/assets/D73/0F0/sprockets%2F5ba6d2f108d33e64b84fc4dd91960d6e +0 -0
  73. data/test/dummy/tmp/cache/assets/D73/8B0/sprockets%2Fac0e6a1f5b87c2966f07864c89c0acc3 +0 -0
  74. data/test/dummy/tmp/cache/assets/D7B/800/sprockets%2F850d92cf676cc2c2c662ee8dc328f82c +0 -0
  75. data/test/dummy/tmp/cache/assets/D7D/950/sprockets%2F8259f3fc885403b4eea8dd12964c2ffc +0 -0
  76. data/test/dummy/tmp/cache/assets/D92/430/sprockets%2Fc55e2bbc3d3c5566893be021ec1c4ab7 +0 -0
  77. data/test/dummy/tmp/cache/assets/D9A/810/sprockets%2F53a9bd5325fcfa4148c273e3deb2d19d +0 -0
  78. data/test/dummy/tmp/cache/assets/D9D/BA0/sprockets%2Fa3a3f78f8e854339e32a5ab0638abbbf +0 -0
  79. data/test/dummy/tmp/cache/assets/DA7/930/sprockets%2F06db55d1b7d0c96a4ff1657e169e6ece +0 -0
  80. data/test/dummy/tmp/cache/assets/DA8/0D0/sprockets%2F74dcf71bbdf4ad56a3b4338b93d9866c +0 -0
  81. data/test/dummy/tmp/cache/assets/DB0/A80/sprockets%2F9fdb8e951f975dae3836c2ccf0f65a34 +0 -0
  82. data/test/dummy/tmp/cache/assets/DBC/890/sprockets%2Fa6a1ac17a4326ab9f49d1a74de70f3aa +0 -0
  83. data/test/dummy/tmp/cache/assets/DC1/9E0/sprockets%2F4fdc113ba37308cc3d7d2dbbe1e9d625 +0 -0
  84. data/test/dummy/tmp/cache/assets/DCC/170/sprockets%2Fa2b9a6a717a82fc483c94abbe71aa95f +0 -0
  85. data/test/dummy/tmp/cache/assets/DCD/870/sprockets%2F26f53f256948ecabba69abf1e1dea282 +0 -0
  86. data/test/dummy/tmp/cache/assets/DD4/980/sprockets%2Fed1289bfd5270a38bd9adfcb8d0627c8 +0 -0
  87. data/test/dummy/tmp/cache/assets/DD7/110/sprockets%2Fa7626606dec6ffd4a8a4b76abb7f6a94 +0 -0
  88. data/test/dummy/tmp/cache/assets/DD7/2D0/sprockets%2F9f68c831ccc33f95a6b0a5d7aaf76d8a +0 -0
  89. data/test/dummy/tmp/cache/assets/DED/9A0/sprockets%2F1e96fab65eff8789cd8c76ffadf40814 +0 -0
  90. data/test/dummy/tmp/cache/assets/E12/820/sprockets%2Ff8ced48d293d9ae81be776bac3d3de86 +0 -0
  91. data/test/dummy/tmp/cache/assets/E2A/410/sprockets%2F73874a0edbd48f62ca7cad3c4a9e6aca +0 -0
  92. data/test/dummy/tmp/cache/assets/E3B/7A0/sprockets%2F3c7ac679f8c2cf31dec4ed6ee8064ece +0 -0
  93. data/test/dummy/tmp/cache/assets/E5A/2A0/sprockets%2Fed33dc2e47cddca2a7f3b9d850f01fef +0 -0
  94. data/test/dummy/tmp/cache/assets/E8E/C80/sprockets%2Fbcfe97b68b37db0b902decd4ea5ae8ea +0 -0
  95. data/test/dummy/tmp/pids/server.pid +1 -1
  96. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc38f0e8374b387fb78018d2256a35d72eaa42a0
4
- data.tar.gz: 6da830b9cba2dfb5172b2187667515a232e913c4
3
+ metadata.gz: d6c55e7186ffae84d7243d16220587bd3d74ec7d
4
+ data.tar.gz: 8714056c137db25698e8149e1148a7f86b6f098d
5
5
  SHA512:
6
- metadata.gz: 8929f5da67a218679c1cb133780e9c64e1643c2eb638f9d4d19e5aefcdfc7f3d972fe1809fa7b8a6350eb98480dc05e92dc98ec916ef2e8ecaff7967e4b8c787
7
- data.tar.gz: 050ca3b73234556f4b891a1e9827f68478ce33386d2622970e479bfdd59e281f3fb285200ea4bc8e47da2e8d6c1a1570bd6f7e4776495572704c9711935696af
6
+ metadata.gz: f7be31ba50aa0bb3b7d125ed40362e4aa7d0969cbc628a5fd0a852e46a7ce9dd35fb62f77947f628fcac584972fb7332325f52533bb24b09d3b2fc1d65c3da06
7
+ data.tar.gz: 329917e1686688b1271101849f5dedfead85a7928f6fec244a69ef656e62d283e155abcfc934193a5436fcf898b6c8f16510b6eafcd9e8fd8d8ddd63cfa77c2f
@@ -25,6 +25,10 @@ Purpose of the stylesheet follows.
25
25
  /* font-family: sans-serif;*/
26
26
  }
27
27
 
28
+ .french_decimal {
29
+ text-align: right;
30
+ }
31
+
28
32
 
29
33
  /* stylesheets/application.css */
30
34
  /*.simple_form label {
@@ -1,6 +1,6 @@
1
1
 
2
2
  # pour avoir les méthodes d'authenfication proposées par l'ApplicationController
3
3
  # ainsi que la gestion des sessions et notamment la méthode find_organism
4
- class Adherent::ApplicationController < ApplicationController
5
- end
4
+ class Adherent::ApplicationController < ApplicationController
5
+ end
6
6
 
@@ -18,7 +18,7 @@ module Adherent
18
18
  if @payment.save
19
19
 
20
20
  flash[:notice] = 'Le paiement a été enregistré'
21
- redirect_to member_adhesions_path(@member)
21
+ redirect_to member_payments_path(@member)
22
22
  else
23
23
  flash[:alert] = 'Impossible d\'enregistrer ce paiement'
24
24
  render 'new'
@@ -18,6 +18,14 @@ module Adherent
18
18
  ActionController::Base.helpers.number_with_precision(montant, precision:2) rescue '0,00'
19
19
  end
20
20
 
21
+ # affiche un nombre avec deux décimales
22
+ # utilisé dans les vues qui demandent un montant
23
+ def two_decimals(montant)
24
+ sprintf('%0.02f',montant)
25
+ rescue
26
+ '0.00'
27
+ end
28
+
21
29
  def icon_to_users
22
30
  icon_to 'users.png', members_path, title:'Liste des membres'
23
31
  end
@@ -5,7 +5,7 @@
5
5
  .span12
6
6
  = f.input :from_date, wrapper_html:{class:'span2'}, label_html:{class: 'span4'}, input_html:{class:'span8', value:@adhesion.from_date}, :as=>:date_picker
7
7
  = f.input :to_date, wrapper_html:{class:'span2'}, label_html:{class: 'span4'}, input_html:{class:'span8', value:@adhesion.to_date}, :as=>:date_picker
8
- = f.input :amount, wrapper_html:{class:'span2'}, label_html:{class: 'span4'}, input_html:{class:'span8'}
8
+ = f.input :amount, wrapper_html:{class:'span2'}, label_html:{class: 'span5'}, input_html:{class:'span7', value:two_decimals(@adhesion.amount)}, :as=>:french_decimal
9
9
 
10
10
  .row-fluid
11
11
  .span12
@@ -4,8 +4,8 @@
4
4
  .row-fluid
5
5
  .span12
6
6
  = f.input :date, wrapper_html:{class:'span2'}, label_html:{class: 'span4'}, input_html:{class:'span8', value:@payment.date}, :as=>:date_picker
7
- = f.input :amount, wrapper_html:{class:'span2'}, label_html:{class: 'span4'}, input_html:{class:'span8'}
8
- = f.input :mode, wrapper_html:{class:'span3'}, :collection=>Adherent::MODES, prompt:'Choissisez', label_html:{class: 'span6'}, input_html:{class:'span6'}
7
+ = f.input :amount, wrapper_html:{class:'span2'}, label_html:{class: 'span6'}, input_html:{class:'span6', value:two_decimals(@payment.amount)}, :as=>:french_decimal
8
+ = f.input :mode, wrapper_html:{class:'span3'}, :collection=>Adherent::MODES, prompt:'Choisissez', label_html:{class: 'span6'}, input_html:{class:'span6'}
9
9
  .row-fluid
10
10
  .span12
11
11
  .form-actions
@@ -26,5 +26,5 @@
26
26
 
27
27
  %td
28
28
  - if (payment.non_impute != 0.0)
29
- = link_to 'imputation', new_payment_reglement_path(payment), title: 'Imputer le solde sur une autre adhésion'
29
+ = icon_to 'imputation.png', new_payment_reglement_path(payment), title: 'Imputer le solde sur une autre adhésion'
30
30
  = icon_to 'supprimer.png', [@member,payment], method: :delete, confirm: 'Etes vous sûr ?'
@@ -3,8 +3,8 @@
3
3
  =f.error_notification
4
4
  .row-fluid
5
5
  .span12
6
- = f.input :amount, wrapper_html:{class:'span2'}, label_html:{class: 'span4'}, input_html:{class:'span8', value:number_to_currency(@reglement.amount)}, :disabled=>true
7
- = f.association :adhesion, :collection=>@unpaid_adhesions, :label_method=>:to_s_for_select, :prompt=>'Choisissez une adhésion', wrapper_html:{class:'span4'}, label_html:{class: 'span2'}, input_html:{class:'span10'}
6
+ = f.input :amount, wrapper_html:{class:'span2'}, label_html:{class: 'span6'}, input_html:{class:'span6', value:number_to_currency(@reglement.amount)}, :as=>:french_decimal, :disabled=>true
7
+ = f.association :adhesion, :collection=>@unpaid_adhesions, :label_method=>:to_s_for_select, :prompt=>'Choisissez une adhésion', wrapper_html:{class:'span4'}, label_html:{class: 'span3'}, input_html:{class:'span9'}
8
8
 
9
9
  .row-fluid
10
10
  .span12
@@ -0,0 +1,16 @@
1
+ # la classe FenchDecimalInput permet d'utiliser les
2
+ # possibilités de html 5 (text pattern) mais pas numeric car Chrome
3
+ # rentre les points décimaux d'un clavier comme des points
4
+ # ce qui n'est pas accepté et tronque les décimales.
5
+ #
6
+ class FrenchDecimalInput < SimpleForm::Inputs::Base
7
+
8
+ def input
9
+ input_html_options['type'] = 'text' # probablement inutile
10
+ input_html_options['pattern'] = '\-?\d+(\.\d{0,2})?'
11
+
12
+
13
+ @builder.text_field(attribute_name, input_html_options)
14
+ end
15
+ end
16
+
@@ -1,3 +1,3 @@
1
1
  module Adherent
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end