Files
grecia/app/views/admin/settings/_settings_table.html.erb
taitus ca0979bd45 Allow redirect to remote census configuration tab
Currently after each update of any Settings is redirected to the first
tab by default.
As this new tab remote_census_configuation has a lot of fields to fill
in it is a bit uncomfortable to have to go back to the tab after each
update.

- Add hidden field :tag to set current tag value
- After update add tag value to request.referer
- To avoid errors when partial call has not param :tag, add the "define?"
  method on hidden_field value.
2019-07-29 13:10:09 +02:00

33 lines
998 B
Plaintext

<table>
<thead>
<tr>
<th><%= display_setting_name(setting_name) %></th>
<th><%= t("admin.settings.setting_value") %></th>
</tr>
</thead>
<tbody>
<% settings.each do |setting| %>
<tr>
<td class="small-6">
<strong><%= t("settings.#{setting.key}") %></strong>
<br>
<span class="small">
<%= t("settings.#{setting.key}_description", default: t("admin.settings.no_description")) %>
</span>
</td>
<td class="small-6">
<% if setting.content_type? %>
<%= render "admin/settings/content_types_settings_form", setting: setting %>
<% else %>
<% if defined?(tab) %>
<%= render "admin/settings/settings_form", setting: setting, tab: tab %>
<% else %>
<%= render "admin/settings/settings_form", setting: setting %>
<% end %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>