list.rhtml

来自「A Hotel Management System based on Ruby 」· RHTML 代码 · 共 44 行

RHTML
44
字号
<h1>Listing customers</h1>

<table>
  <tr>
  
    <td id="listitem"><b>Name</b></td>
    <td id="listitem"><b>Street</b></td>
    <td id="listitem"><b>City</b></td>
    <td id="listitem"><b>Country</b></td>
    
  
  </tr>
  
<% for customer in @customers %>
  <tr>
  
    <td id="listitem" width="15%"><%= customer.name %></td>
    <td id="listitem" width="15%"><%= customer.street %></td>
    <td id="listitem" width="15%"><%= customer.city %></td>
    <td id="listitem" width="15%"><%= customer.country %></td>
  
    <td width="40%"><%= link_to '| Show ', :action => 'show', :id => customer %>
    <%= link_to '| Edit ', :action => 'edit', :id => customer %>
    <%= link_to '| Destroy ', { :action => 'destroy', :id => customer }, :confirm => 'Are you sure?' %>
	<%= link_to '| New Contract ', { :action => 'new', :controller => 'contract', :id => customer } %>
	<%= link_to '| List Contracts ', { :action => 'list', :controller => 'contract', :customer_id => customer.id } %></td>
  </tr>
<% end %>
</table>
<br />
<div class="roundedcornr_box_284975">
   <div class="roundedcornr_top_284975"><div></div></div>
      <div class="roundedcornr_content_284975"><p>
         <%= link_to 'Previous page', { :page => @customer_pages.current.previous } if @customer_pages.current.previous %> | <%= link_to 'Next page', { :page => @customer_pages.current.next } if @customer_pages.current.next %> 

<br /><br />

<%= link_to 'New customer', :action => 'new' %></p>
      </div>
   <div class="roundedcornr_bottom_284975"><div></div></div>
</div>


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?