cirandas.net

ref: master

plugins/organization_ratings/views/organization_ratings_plugin_admin/index.html.erb


<% config = env_organization_ratings_config %>

<%= _("Organization Rating Settings") %>

<%= labelled_form_for(:organization_ratings_config, :url => {:action => 'update'}) do |f| %> <%= labelled_fields_for(:organization_ratings_config, config) do |c| %> <% hours_options = {size: 2} %> <% hours_options[:disabled] = "disabled" if config.vote_once %> <% order_options = [] %> <% config.order_options.select{|k,v| order_options << v } %>
<%= c_('Configuration') %> <%= _('Value') %>
<%= _('Default amount of stars marked on evaluations') %> <%= c.select :default_rating, (config.minimum_ratings)..5 %>
<%= _('Users can rate an organization only once') %> <%= c.check_box :vote_once %>
<%= _('The comments are moderated') %> <%= c.check_box :are_moderated %>
<%= _('Time in hours between evaluations from the same user.') %> (?) <%= c.text_field :cooldown, hours_options %>
<%= _('Order ratings by') %><%= c.select :order, order_options %>
<%= _('Ratings amount per page') %> <%= c.select :per_page, 5..20 %>
<%= _('Ratings amount on initial page') %> <%= c.select :ratings_on_initial_page, 1..10 %>
<%= button_bar do %> <%= submit_button('save', c_('Save changes')) %> <%= button :back, _('Back'), :controller => 'plugins' %> <% end %>
<% end %> <% end %>