index.html.erb
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<h1><%= _("Communities Rating Management") %> </h1>
<%= labelled_form_for(:environment, :url => {:action => 'update'}) do |f| %>
<table>
<tr>
<th><%= c_('Configuration') %></th>
<th><%= _('Value') %></th>
</tr>
<tr>
<td><%= _('Default amount of stars marked on evaluations') %></td>
<td><%= select :environment, :communities_ratings_default_rating, (Environment.communities_ratings_min_rating)..5 %></td>
</tr>
<tr>
<td><%= _('Can only vote for one community once') %></td>
<td><%= check_box :environment, :communities_ratings_vote_once %></td>
</tr>
<tr>
<td><%= _('The comments are moderated') %></td>
<td><%= check_box :environment, :communities_ratings_are_moderated %></td>
</tr>
<tr>
<td><%= _('Time cooldown between evaluations from the same user') %></td>
<% hours_options = {size: 1} %>
<% hours_options[:disabled] = "disabled" if environment.communities_ratings_vote_once %>
<td><%= text_field :environment, :communities_ratings_cooldown, hours_options %>
<%= _('hours') %>
</td>
</tr>
<tr>
<td><%= _('Order ratings by') %></td>
<td><%= select :environment, :communities_ratings_order, (Environment.communities_ratings_order_options) %></td>
</tr>
<tr>
<td><%= _('Ratings per page') %></td>
<td>
<%= select :environment, :communities_ratings_per_page, 5..20 %>
</td>
</tr>
</table>
<div>
<% button_bar do %>
<%= submit_button('save', c_('Save changes')) %>
<%= button :back, _('Back'), :controller => 'plugins' %>
<% end %>
</div>
<% end %>