Fix edit button in backend show page.
This commit is contained in:
parent
d202a8ad0a
commit
0a3fc812c4
|
@ -27,13 +27,13 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% can_edit = can_edit_or_delete?(@entries.first.u_table) if !(@entries.first.nil?) %>
|
||||
<% can_edit = can_edit_or_delete?(@table) %>
|
||||
<% @entries.each do |entry| %>
|
||||
<tr>
|
||||
<% @columns.each_with_index do |column, index| %>
|
||||
<% ce = entry.column_entries.where(:table_column_id => column.id).first rescue nil %>
|
||||
<% if !ce.nil? %>
|
||||
<td>
|
||||
<% if !ce.nil? %>
|
||||
<% case ce.type %>
|
||||
<% when "text" %>
|
||||
<%= ce.text %>
|
||||
|
@ -54,6 +54,9 @@
|
|||
<%= format_date(ce.period_from, column.date_format) %> ~ <%= format_date(ce.period_to, column.date_format) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
||||
<% end %>
|
||||
<% if index == 0 && can_edit %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
|
@ -63,11 +66,6 @@
|
|||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue