/
edit.html.erb
33 lines (33 loc) · 1.06 KB
/
edit.html.erb
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
<%= javascript 'trends' %>
<% title _("Edit Trend %s") @trend.to_label %>
<div class="span6">
<% form_tag trend_path, :method => :put do %>
<% if @trend.is_a?(FactTrend) %>
<table class="table">
<th style="width: 40%"><%= _("Fact Name") %></th><th style="width: 60%"><%= _("Display Name") %></th>
<tr>
<%= fields_for "trend[]", @trend do |f| %>
<td>
<%= @trend.fact_name %>
</td>
<td>
<%= f.text_field :name %>
</td>
<% end %>
</tr>
</table>
<% end %>
<table class="table">
<th style="width: 40%">Value</th><th style="width: 60%"><%= _("Display Name") %></th>
<% @trend.values.each do |trend| %>
<tr>
<%= fields_for "trend[]", trend do |f| %>
<%= render 'fields', :f => f, :trend => trend %>
<% end %>
</tr>
<% end %>
</table>
<%= link_to(_("Cancel"), trends_path, :class => "btn") %>
<%= submit_tag _("Submit"), :class => "btn-primary btn" %>
<% end %>
</div>