<?xml version=“1.0” ?> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”> <html xmlns=“www.w3.org/1999/xhtml”>
<head> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="expires" content="-1" /> <%= css '/css/jquery.mobile.css' %> <%= js_for '/js/jquery.js', '/js/jquery.mobile.js' %> </head> <body> <div data-role="page" id="top"> <div data-role="header"> <h1><%= h @model_name.camel_case %></h1> <a href="<%= r(:new, @model_name) %>" class="ui-btn-right" data-role="button" data-icon="plus" data-ajax="false">Add</a> </div> <div data-role="content"> <ul data-role="listview" id="list" class="ui-li-has-thumb"> <% @list.each do |resource| %> <li> <a href="<%= r(:edit, @model_name, resource.id) %>" data-ajax="false"> <% resource.class.properties.each_with_index do |property, i| %> <% unless i == 0 %> <span>,</span><% end %> <span><%= h property.name %>:<%= h resource[property.name].to_s[0..9] %> <% if resource[property.name].to_s.size > 10 %>...<% end %></span> <% end %> </a> </li> <% end unless @list.nil? %> </ul> </div> <div data-role="footer" data-position="fixed"> <form id="search" method="post" action="<%= r(@model_name) %>" data-ajax="false"> <input type="search" id="query" name="query" value="<%= @query %>"/> <a href="#" data-role="button" data-icon="search" onclick="$('#search').submit(); return false;">Search</a> </form> </div> </div> </body>
</html>