Revision c2f514c4
Added by Amos Benari over 11 years ago
- ID c2f514c410ed16b23c6ecdf307a850368b8b7e7d
app/views/settings/index.html.erb | ||
---|---|---|
<% title "Settings" %>
|
||
|
||
<table class="table table-bordered table-striped">
|
||
<tr>
|
||
<th><%= sort :name %></th>
|
||
<th>Value</th>
|
||
<th>Description</th>
|
||
<th><%= sort :category %></th>
|
||
</tr>
|
||
<% for setting in @settings %>
|
||
<tr class="<%= cycle("even", "odd") -%>">
|
||
<td><%=h setting.name %></td>
|
||
<td class="setting_value"><%= value(setting) %></td>
|
||
<td><%=h setting.description %></td>
|
||
<td><%=h setting.category %></td>
|
||
</tr>
|
||
<ul class="nav nav-tabs" data-tabs="tabs">
|
||
<% @settings.group_by(&:category).each do |category, setting| %>
|
||
<li class='<%= category == @settings.first.category ? "active" : ""%>'>
|
||
<a href='<%= "##{category}" %>' data-toggle="tab"><%= "#{category}" %></a>
|
||
</li>
|
||
<% end %>
|
||
</ul>
|
||
<div class="tab-content">
|
||
<% @settings.group_by(&:category).each do |category, setting| %>
|
||
<div class='<%= category == @settings.first.category ? "tab-pane active" : "tab-pane" %>' id='<%= category %>' >
|
||
<table class="table table-bordered table-striped">
|
||
<tr>
|
||
<th>Name</th>
|
||
<th>Value</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
<% setting.each do |item| %>
|
||
<tr>
|
||
<td><%=h item.name %></td>
|
||
<td class="setting_value"><%= value(item) %></td>
|
||
<td><%=h item.description %></td>
|
||
</tr>
|
||
<% end %>
|
||
</table>
|
||
</div>
|
||
<% end %>
|
||
</table>
|
||
</div>
|
||
|
||
<%= page_entries_info @settings %>
|
||
<%= will_paginate @settings %>
|
Also available in: Unified diff
setting page has tabs for categories, yeh!
this also fixes #1742