|
<%= javascript 'trends' %>
|
|
<% title _("Edit Trend %s") % @trend.to_label %>
|
|
<div class="col-md-6">
|
|
<%= 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 btn-default") %>
|
|
<%= submit_tag _("Submit"), :class => "btn-primary btn" %>
|
|
<% end %>
|
|
</div>
|