Commit 9bd32efd3feaf392badb3067678474b2e8404daf

Authored by Hugo Melo
1 parent 76a472db

Adjust new threshold location on badges

views/gamification_plugin_badges/_form.html.erb
... ... @@ -41,6 +41,7 @@
41 41 <%= d.label :threshold %><br />
42 42 <%= d.text_field :threshold, {value: action.fetch('threshold', "")} %>
43 43 </div>
  44 + <br>
44 45 <% end %>
45 46 <% end %>
46 47 </div>
... ...
views/gamification_plugin_badges/show.html.erb
... ... @@ -24,7 +24,10 @@
24 24  
25 25 <p>
26 26 <b>Threshold:</b>
27   - <%= @gamification_plugin_badge.threshold %>
  27 + <% @gamification_plugin_badge.custom_fields.is_a? Hash %>
  28 + <% @gamification_plugin_badge.custom_fields.keys.each do |key| %>
  29 + <div><%= _(key) + ': ' + @gamification_plugin_badge.custom_fields[key].fetch("threshold", "") %></div>
  30 + <% end %>
28 31 </p>
29 32  
30 33  
... ...