<%= _('Gamification Settings: Point Rules')%>
<%= form_for(:settings) do |f| %>
<%= f.fields_for :point_rules do |p| %>
<%= _('Point Rules') %>
<% Merit::PointRules::AVAILABLE_RULES.each do |category, setting| %>
<%= labelled_form_field(_(setting[:description]), p.text_field("#{category}[weight]", :value => @settings.settings.fetch(:point_rules, {}).fetch(category.to_s, {}).fetch('weight', setting[:default_weight]))) %>
<% end %>
<% end %>
<% button_bar do %>
<%= submit_button(:save, c_('Save'), :cancel => {:action => 'index'}) %>
<% end %>
<% end %>