<%= text_field 'query', 'id', :size => 4 %> |
<%= text_field 'query', 'name', :size => 10 %> |
<%= text_field 'query', 'date', :size => 20 %> |
<%= text_field 'query', 'memo', :size => 20 %> |
<%= text_field 'query', 'amount', :size => 10 %> |
<%=
q_bool = @query.approved
if q_bool.nil? || q_bool.to_s.empty?
q_bool = ''
elsif q_bool.to_s.upcase == 'TRUE'
q_bool = 'TRUE'
elsif q_bool.to_s.upcase == 'FALSE'
q_bool = 'FALSE'
end
select_tag 'query[approved]', [ '', 'TRUE', 'FALSE' ].
map{|x|
''}.join('')
%> |
<%= submit_tag 'Search' %> |
<% for entry in @entries %>
<%=h entry.id %> |
<%=h entry.name %> |
<%=h entry.date.strftime('%Y/%m/%d-%H:%M:%S') %> |
<%=h entry.memo %> |
<%=h entry.amount %> |
<%= check_box_tag '_dummy', '', entry.approved, :disabled => true %>| |
<%= link_to 'Show', :action => 'show', :id => entry %> |
<%= link_to 'Edit', :action => 'edit', :id => entry %> |
<%= link_to 'Destroy', { :action => 'destroy', :id => entry }, :confirm => 'Are you sure?', :post => true %> |
<% end %>