adherent 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/adherent/demo_table.css +1 -1
  3. data/app/assets/stylesheets/adherent/jc_application.css.scss +2 -3
  4. data/app/assets/stylesheets/adherent/layouts.css.scss +70 -21
  5. data/app/assets/stylesheets/adherent/old_bootstrap.css +2 -1
  6. data/app/controllers/adherent/allpayments_controller.rb +6 -0
  7. data/app/controllers/adherent/members_controller.rb +1 -1
  8. data/app/controllers/adherent/payments_controller.rb +3 -1
  9. data/app/models/adherent/member.rb +3 -1
  10. data/app/views/adherent/adhesions/edit.html.erb +1 -1
  11. data/app/views/adherent/adhesions/index.html.haml +2 -2
  12. data/app/views/adherent/adhesions/new.html.erb +1 -1
  13. data/app/views/adherent/coords/edit.html.erb +1 -1
  14. data/app/views/adherent/coords/new.html.erb +1 -1
  15. data/app/views/adherent/coords/show.html.erb +1 -1
  16. data/app/views/adherent/members/edit.html.erb +1 -1
  17. data/app/views/adherent/members/index.html.erb +1 -1
  18. data/app/views/adherent/members/new.html.erb +1 -1
  19. data/app/views/adherent/members/show.html.erb +1 -1
  20. data/app/views/adherent/payments/_form.html.haml +9 -7
  21. data/app/views/adherent/payments/edit.html.erb +2 -2
  22. data/app/views/adherent/payments/index.html.haml +1 -1
  23. data/app/views/adherent/payments/new.html.haml +1 -1
  24. data/app/views/adherent/reglements/_form.html.haml +12 -6
  25. data/app/views/adherent/reglements/new.html.erb +3 -2
  26. data/app/views/layouts/adherent/_flash_partial.html.haml +1 -1
  27. data/app/views/layouts/adherent/_header.html.haml +7 -3
  28. data/app/views/layouts/adherent/application.html.erb +11 -17
  29. data/lib/adherent/version.rb +3 -1
  30. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64841cf07a63bed3254ba5b29f6d2ddf7da0350a
4
- data.tar.gz: 0ab619abb3cf2ecdf2fd51939b3bab6defcd0da6
3
+ metadata.gz: 57de52f14f6ddcc8f2f93886ef2be954a3f16b58
4
+ data.tar.gz: 6c0aff1293229fcf00eeb541c0a714bad9736a9b
5
5
  SHA512:
6
- metadata.gz: f381444b9e9c5d48122ba7dabc0c399705045f303bf1dd7140975e88485d97eb230358f9a20f064c14ed8a06c3042f46fadaac0a42ec6129258800b97cd987e3
7
- data.tar.gz: db7a8a4f307e109042ca07c61128c42ad01c83a288b9429e19ad42daeb9b0d0d89f4422e61b54138b71454556f3b68fbb2b50f797fe6dbf80e419db9e6e6edf2
6
+ metadata.gz: f22e98d85d043eb923a9d95bfc647367880c76d3f1cf7f8b0d5cf803f2c2b5c44dbbd6dedbebe6e2db4bb87ec907b0b118ddf4c6999ec98f2c2973f2bcd01afe
7
+ data.tar.gz: 205015f4768510e29c6e3e805e23143b6445f00d0d01e72efdcb0a6c1b24da6cc9e38a7411ad1dff6c840c198784a93c26be53debf053f1a304687ef33782024
@@ -154,7 +154,7 @@ table.display thead th {
154
154
  border-bottom: 1px solid black;
155
155
  font-weight: bold;
156
156
  cursor: pointer;
157
- * cursor: hand;
157
+ *cursor: hand;
158
158
  }
159
159
 
160
160
  table.display tfoot th {
@@ -19,20 +19,19 @@ Purpose of the stylesheet follows.
19
19
  color: #fff;
20
20
  background: #235993;
21
21
  padding-left: 20px;
22
- margin-top: 10px;
22
+ margin-top: 4px;
23
23
  border-radius: 4px 4px 0px 0px;
24
24
  font-size: 20px;
25
25
 
26
26
  /* font-family: sans-serif;*/
27
27
  }
28
28
 
29
- .french_decimal {
29
+ input.french_decimal {
30
30
  text-align: right;
31
31
  }
32
32
 
33
33
 
34
34
 
35
-
36
35
  .picker_date img {
37
36
  float: left;
38
37
  padding-top: 4px;
@@ -14,60 +14,109 @@ html, body {
14
14
  padding: 0px;
15
15
  margin: 0px;
16
16
  height:100%;
17
+ background-color: #fff;
18
+ color: #333;
19
+ font-family: verdana, arial, helvetica, sans-serif;
20
+ font-size: 13px;
21
+ line-height: 18px;
17
22
  }
18
23
 
24
+ body {
25
+ padding-top: 90px;
26
+ }
27
+
28
+ .navbar {
29
+ padding-left: 15px;
30
+ padding-right: 15px;
31
+ }
32
+
33
+
34
+
35
+ #top_navigation {
36
+ background-image: linear-gradient(to bottom, #013771, #235993);
37
+ background-repeat: repeat-x;
38
+ border: 1px solid #235993;
39
+ border-radius: 4px;
40
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.067);
41
+ min-height: 40px;
42
+ padding-left: 10px;
43
+ padding-right: 10px;
44
+ margin-bottom: 0;
45
+ }
46
+
47
+ .navbar .home .nav > .active > a, .navbar .home .nav > .active > a:hover,
48
+ .navbar .home .nav > .active > a:focus {
49
+ background-color: #013771;
50
+ box-shadow: 0 3px 8px rgba(0, 0, 0, 0.125) inset;
51
+ color: #ffffff;
52
+ text-decoration: none;
53
+ }
19
54
 
20
55
 
21
56
 
22
- .brand {
57
+ .home {
58
+ display: block;
23
59
  background-image: image-url("sigma.png");
24
60
  background-repeat: no-repeat;
25
61
  background-position: 3px 3px;
26
- a {color: #bbb}
27
- a:hover { text-decoration: none;}
62
+ color: #bbb;
63
+ a:hover {
64
+ text-decoration: none;
65
+ color: #fff; }
28
66
  a:visited {
29
67
  color: #bbbbbb;
30
68
  }
31
- }
32
-
33
- .navbar .brand {
34
- padding-top:4px;
69
+ padding:4px;
35
70
  padding-bottom: 4px;
36
- height: 2em;
71
+ padding-left: 48px;
72
+ height: 48px;
73
+ font-size: 1.5em;
74
+
75
+
37
76
  }
38
77
 
39
- .navbar-inner {
40
- margin-bottom: 4px;
41
- background-image: linear-gradient(to bottom, #013771, #235993);
42
- }
78
+
43
79
 
44
80
  #login_logout {
45
81
  margin-top: 4px;
82
+ color: #bbb;
46
83
  font-size: 50%;
47
84
  span {
48
85
  font-weight: bold;
49
86
  }
87
+
50
88
  a {
51
- color: #fff;
89
+ color: #fff;
90
+ text-decoration: underline;
91
+ }
92
+ a:hover {
93
+ font-style: italic;
52
94
  }
53
95
  }
54
96
 
55
- .navbar .nav > .active > a,
56
- .navbar .nav > .active > a:hover,
57
- .navbar .nav > .active > a:focus {
58
-
59
- background-color: #013771;
97
+ p, ol, ul, td {
98
+ font-size: 13px;
99
+ }
100
+
101
+ #main_nav {
102
+ width: 100%;
60
103
  }
61
104
 
62
105
 
63
106
  .container-fluid {
107
+
64
108
  min-height: 100%;
65
109
  height: auto !important;
110
+ height: 100%;
66
111
  margin: 0 auto -1.5em; /* the bottom margin is the negative value of the footer's height */
67
112
 
68
113
  // position:relative;
69
114
  }
70
115
 
116
+ #main-zone {
117
+ padding-bottom:0.8em;
118
+ }
119
+
71
120
  .push {
72
121
  clear: both;
73
122
  height: 1.5em;
@@ -84,7 +133,7 @@ html, body {
84
133
  width: 100%;
85
134
 
86
135
  background-color: #CBEECB;
87
- border-top: 1px solid #1b431b;
136
+ border-top: 1px solid #235993;
88
137
 
89
138
 
90
139
  ul {
@@ -97,8 +146,8 @@ html, body {
97
146
  li { display: inline;
98
147
  list-style: none;
99
148
  font-size: 80%;
100
- a { color: #1b431b; }
101
- a:visited { color: #1b431b;}
149
+ a { color: #235993; }
150
+ a:visited { color: #235993;}
102
151
  a:hover {color: #fff;}
103
152
 
104
153
 
@@ -19,7 +19,8 @@ table a img
19
19
  .nav {margin-bottom: 4px;}
20
20
 
21
21
  .nav > li > a:hover {
22
- background-color: #CBEECB;
22
+ color: #fff;
23
+ background-color: transparent;
23
24
  }
24
25
 
25
26
  /* rajouté pour avoir link_to_if et link_to_unless qui affichent le lien en grisé */
@@ -1,6 +1,12 @@
1
1
  require_dependency "adherent/application_controller"
2
2
 
3
3
  module Adherent
4
+
5
+ # les routes vers payments sont traitées par ce controller quand elles ne sont
6
+ # pas dépendantes d'un membre.
7
+ # Si elles sont dépendantes d'un membre, alors, le controller est
8
+ # PaymentsController. Voir le fichier routes.rb
9
+
4
10
  class AllpaymentsController < ApplicationController
5
11
  def index
6
12
  @payments = @organism.payments
@@ -49,7 +49,7 @@ module Adherent
49
49
 
50
50
  respond_to do |format|
51
51
  if @member.save
52
- format.html { redirect_to new_member_coord_url(@member.id), notice: 'Le membre a été créé avec succès ; Enregistrez maintenant les coordonnées' }
52
+ format.html { redirect_to new_member_coord_url(@member.id), notice: 'Le membre a été créé ; Enregistrez maintenant les coordonnées' }
53
53
  format.json { render json: @member, status: :created, location: @member }
54
54
  else
55
55
  format.html { render action: "new" }
@@ -33,7 +33,9 @@ module Adherent
33
33
  end
34
34
 
35
35
  def update
36
- @payment = @member.payments.find_by_id(payment_params[:id])
36
+ @payment = @member.payments.find_by_id(params[:id])
37
+ Rails.logger.debug payment_params
38
+ Rails.logger.debug "payment #{@payment.inspect}"
37
39
  if @payment.update_attributes(payment_params)
38
40
 
39
41
  flash[:notice] = 'Le paiement a été modifié'
@@ -6,9 +6,11 @@ module Adherent
6
6
 
7
7
  belongs_to :organism, class_name: '::Organism'
8
8
  has_one :coord, dependent: :destroy
9
- has_many :adhesions
9
+ has_many :adhesions, dependent: :destroy
10
10
  has_many :payments
11
11
 
12
+ # TODO rajouter un before_destroy sur les paiements
13
+
12
14
  validates :number, :name, :forname , :organism_id, :presence=>true
13
15
  validates_uniqueness_of :number, :scope=>:organism_id
14
16
 
@@ -3,7 +3,7 @@
3
3
  <%= icon_to 'bandaid.png', member_adhesions_path(@member) %>
4
4
  <% end -%>
5
5
 
6
- <div class="champ col-lg-12">
6
+ <div class="champ">
7
7
  <h3>Modification adhésion pour <%= @member.to_s %></h3>
8
8
 
9
9
  <div class="inner-champ">
@@ -3,7 +3,7 @@
3
3
  = icon_to 'nouveau.png', new_member_adhesion_path(@member), title:'Nouvelle adhésion ou renouvellement'
4
4
 
5
5
 
6
- .champ.col-lg-12
6
+ .champ
7
7
  %h3 Historique des adhésions pour #{@member.to_s}
8
8
 
9
9
  %table.table.table-striped.table-bordered.table-condensed(cellpadding="0" cellspacing="0" border="0")
@@ -20,7 +20,7 @@
20
20
  %td= adhesion.from_date
21
21
  %td= adhesion.to_date
22
22
  %td= number_to_currency(adhesion.amount, locale: :fr)
23
- %td= adhesion.due
23
+ %td= number_to_currency(adhesion.due, locale: :fr)
24
24
  %td
25
25
  = icon_to 'modifier.png', edit_member_adhesion_path(@member, adhesion)
26
26
  = icon_to 'supprimer.png', [@member,adhesion], method: :delete, data: {confirm: 'Etes vous sûr ?'}
@@ -3,7 +3,7 @@
3
3
  <%= icon_to_users %>
4
4
  <% end -%>
5
5
 
6
- <div class="champ col-lg-12">
6
+ <div class="champ">
7
7
  <h3>Renouvellement ou nouvelle adhésion pour <%= @member.to_s %></h3>
8
8
 
9
9
  <div class="inner-champ">
@@ -3,7 +3,7 @@
3
3
 
4
4
  <% end -%>
5
5
 
6
- <div class="champ col-lg-12">
6
+ <div class="champ">
7
7
  <h3>Modification <%= I18n.t('coord').pluralize %></h3>
8
8
 
9
9
  <div class="inner-champ">
@@ -3,7 +3,7 @@
3
3
  <%= icon_to_users %>
4
4
  <% end -%>
5
5
 
6
- <div class="champ col-lg-12">
6
+ <div class="champ">
7
7
  <h3>Saisie des coordonnées de <%= @member.to_s %></h3>
8
8
 
9
9
  <div class="inner-champ">
@@ -5,7 +5,7 @@
5
5
 
6
6
  <% end -%>
7
7
 
8
- <div class="champ col-lg-12">
8
+ <div class="champ">
9
9
  <h3>Fiche <%= I18n::t('coord').pluralize %> <%= "#{@member.to_s}" %></h3>
10
10
 
11
11
  <div class="inner-champ">
@@ -4,7 +4,7 @@
4
4
 
5
5
  <% end -%>
6
6
 
7
- <div class="champ col-lg-12">
7
+ <div class="champ">
8
8
  <h3>Modification <%= I18n.t('member') %></h3>
9
9
 
10
10
  <div class="inner-champ">
@@ -5,7 +5,7 @@
5
5
  <% end -%>
6
6
 
7
7
 
8
- <div class="champ col-lg-12">
8
+ <div class="champ">
9
9
 
10
10
 
11
11
  <h3>Liste des <%= I18n::t('members') %></h3>
@@ -3,7 +3,7 @@
3
3
  <%= icon_to 'users.png', members_path %>
4
4
  <% end -%>
5
5
 
6
- <div class="champ col-lg-12">
6
+ <div class="champ">
7
7
  <h3>
8
8
  Nouveau <%= I18n::t('member') %>
9
9
  </h3>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <% end -%>
9
9
 
10
- <div class="champ col-lg-12">
10
+ <div class="champ">
11
11
  <h3>Fiche <%= I18n::t('member') %></h3>
12
12
 
13
13
  <div class='inner-champ'>
@@ -1,14 +1,16 @@
1
1
  .panel-body#transfer
2
- = simple_form_for([@member, @payment], :html=>{class:'form-inline'}) do |f|
2
+ = simple_form_for([@member, @payment]) do |f|
3
3
  =f.error_notification
4
4
  .form-inputs
5
- = f.input :date, wrapper_html:{class:'span2'},
6
- label_html:{class: 'span4'},
7
- input_html:{class:'span8', value:@payment.date,
5
+ = f.input :date, wrapper_html:{class:'col-lg-2'},
6
+ input_html:{value:@payment.date,
8
7
  date_min:min_date,
9
8
  date_max:max_date},
10
9
  :as=>:date_picker
11
- = f.input :amount, wrapper_html:{class:'span2'}, label_html:{class: 'span6'}, input_html:{class:'span6', value:two_decimals(@payment.amount)}, :as=>:french_decimal
12
- = f.input :mode, wrapper_html:{class:'span3'}, :collection=>Adherent::MODES, prompt:'Choisissez', label_html:{class: 'span6'}, input_html:{class:'span6'}
10
+ = f.input :amount, wrapper_html:{class:'col-lg-2'},
11
+ input_html:{value:two_decimals(@payment.amount)}, :as=>:french_decimal
12
+ = f.input :mode, wrapper_html:{class:'col-lg-3'},
13
+ :collection=>Adherent::MODES, prompt:'Choisissez'
14
+
13
15
  .form-actions
14
- = f.button :submit, id: 'new_payement', class: "btn-primary span2"
16
+ = f.button :submit, id: 'new_payement', class: "btn-primary col-lg-offset-6"
@@ -3,8 +3,8 @@
3
3
  <%= icon_to 'payment.png', member_payments_path(@member) %>
4
4
  <% end -%>
5
5
 
6
- <div class="champ col-lg-12">
7
- <h3>Enregistrement d'un paiement de <%= @member.to_s %></h3>
6
+ <div class="champ">
7
+ <h3>Modification d'un paiement de <%= @member.to_s %></h3>
8
8
 
9
9
  <div class="inner-champ">
10
10
 
@@ -3,7 +3,7 @@
3
3
  = icon_to 'money-plus.png', new_member_payment_path(@member), title:'Nouveau paiement'
4
4
 
5
5
 
6
- .champ.col-lg-12
6
+ .champ
7
7
  %h3 Historique des paiements reçus de #{@member.to_s}
8
8
 
9
9
  %table.table.table-striped.table-bordered.table-condensed(cellpadding="0" cellspacing="0" border="0")
@@ -1,6 +1,6 @@
1
1
  =content_for :menu do
2
2
  = icon_to 'payment.png', member_payments_path(@member)
3
- .champ.col-lg-12
3
+ .champ
4
4
  %h3 Enregistrement d'un paiement de #{@member.to_s}
5
5
  .inner-champ
6
6
  = render 'form'
@@ -1,8 +1,14 @@
1
1
  .panel-body#transfer
2
- = simple_form_for([@payment, @reglement], :html=>{class:'form-inline'}) do |f|
2
+ = simple_form_for([@payment, @reglement]) do |f|
3
3
  =f.error_notification
4
- .form-action
5
- = 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
6
- = 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'}
7
- .form-actions
8
- = f.button :submit, id: 'new_reglement', class: "btn-primary span2"
4
+ .row
5
+ .form-action
6
+ = f.input :amount, wrapper_html:{class:'col-lg-2'},
7
+ input_html:{value:number_to_currency(@reglement.amount)},
8
+ :as=>:french_decimal, :disabled=>true
9
+ = f.association :adhesion, :collection=>@unpaid_adhesions,
10
+ wrapper_html:{class:'col-lg-5'},
11
+ :label_method=>:to_s_for_select, :prompt=>'Choisissez une adhésion'
12
+ .row
13
+ .form-actions
14
+ = f.button :submit, id: 'new_reglement', class: "btn-primary col-lg-offset-6"
@@ -1,10 +1,11 @@
1
1
  <%= content_for :menu do %>
2
2
 
3
3
  <%= icon_to_users %>
4
+ <%= icon_to 'retour.png', :back %>
4
5
  <% end -%>
5
6
 
6
- <div class="champ col-lg-12">
7
- <h3>Imputation du montant restant (<%= @payment.non_impute %>) payé par <%= @member.to_s %></h3>
7
+ <div class="champ">
8
+ <h3>Imputation du montant restant (<%= number_to_currency(@payment.non_impute, locale: :fr) %>) payé par <%= @member.to_s %></h3>
8
9
 
9
10
  <div class="inner-champ">
10
11
 
@@ -1,4 +1,4 @@
1
- .col-lg-12
1
+ %div
2
2
  - if flash[:notice]
3
3
  .alert.notice
4
4
  %a.close(data-dismiss ="alert") ×
@@ -1,4 +1,8 @@
1
1
  %div#adherent_header
2
- Place pour le Header : surcharger le partial _header dans votre application principale pour y adapter votre Header
3
- ou masquer ce div par un style display: hidden; si vous ne voulez pas personnaliser ce header.
4
- L'id de ce header est #adherent_header
2
+ -#Place pour le Header : surcharger le partial _header dans votre application principale pour y adapter votre Header
3
+ -#ou masquer ce div par un style display: hidden; si vous ne voulez pas personnaliser ce header.
4
+ -#L'id de ce header est #adherent_header
5
+ %ul.nav.nav-tabs#menu_general
6
+ -# pas très bien nommé, la suite affiche les icones
7
+ %li.horizontal_icons
8
+ = yield :menu
@@ -8,30 +8,24 @@
8
8
  </head>
9
9
  <body class="adherent">
10
10
 
11
- <div class="container-fluid">
11
+
12
12
 
13
13
  <%= render 'layouts/adherent/header' %>
14
+ <div> <%= yield :modal %> </div>
14
15
 
16
+
17
+ <div class="container-fluid" >
18
+
15
19
 
16
- <div class="row">
17
-
18
- <div>
19
-
20
- <ul class="nav nav-tabs" id="menu_general">
21
- <!-- pas très bien nommé, la suite affiche les icones -->
22
- <li class="horizontal_icons">
23
- <%= yield :menu %>
24
- </li>
25
- </ul>
26
- </div>
27
- </div>
28
- <div class='row' id="main-zone">
20
+
21
+
22
+ <div id="main-zone">
29
23
 
30
24
 
31
- <%= render 'layouts/adherent/flash_partial' %>
32
-
25
+ <div> <%= render 'layouts/adherent/flash_partial' %> </div>
26
+ <div id="message" class="row"></div><%# pour les messages utilisés par produce_pdf.js_erb%>
33
27
 
34
- <%= yield %>
28
+ <%= yield %>
35
29
 
36
30
  </div>
37
31
 
@@ -6,6 +6,8 @@ module Adherent
6
6
  # VERSION = "0.1.9" # ajout d'une fonctionnalité reçu
7
7
  # VERSION = "0.1.10" # passage à rails 3.2.20
8
8
  # VERSION = "0.2.0" # passage à rails 4.0 et bootstrap 3
9
- VERSION = "0.2.1" # reconstruction du gemfile.lock
9
+ # VERSION = "0.2.1" # reconstruction du gemfile.lock
10
+ # VERSION = "0.2.1.1" # correction coquille dans demo_table.scss
11
+ VERSION = "0.2.2" # refonte des formulaires suites bootstrap 3
10
12
 
11
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adherent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Claude Lepage
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-27 00:00:00.000000000 Z
11
+ date: 2015-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets-rails