From 9bd32efd3feaf392badb3067678474b2e8404daf Mon Sep 17 00:00:00 2001 From: Hugo Melo Date: Tue, 20 Oct 2015 13:33:11 -0200 Subject: [PATCH] Adjust new threshold location on badges --- views/gamification_plugin_badges/_form.html.erb | 1 + views/gamification_plugin_badges/show.html.erb | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/views/gamification_plugin_badges/_form.html.erb b/views/gamification_plugin_badges/_form.html.erb index 1538751..a639256 100644 --- a/views/gamification_plugin_badges/_form.html.erb +++ b/views/gamification_plugin_badges/_form.html.erb @@ -41,6 +41,7 @@ <%= d.label :threshold %>
<%= d.text_field :threshold, {value: action.fetch('threshold', "")} %> +
<% end %> <% end %> diff --git a/views/gamification_plugin_badges/show.html.erb b/views/gamification_plugin_badges/show.html.erb index 62612c3..df802d9 100644 --- a/views/gamification_plugin_badges/show.html.erb +++ b/views/gamification_plugin_badges/show.html.erb @@ -24,7 +24,10 @@

Threshold: - <%= @gamification_plugin_badge.threshold %> + <% @gamification_plugin_badge.custom_fields.is_a? Hash %> + <% @gamification_plugin_badge.custom_fields.keys.each do |key| %> +

<%= _(key) + ': ' + @gamification_plugin_badge.custom_fields[key].fetch("threshold", "") %>
+ <% end %>

-- libgit2 0.21.2