list.rhtml

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

RHTML
43
字号
<h1><%= "Listing rooms".t %></h1>

<table>
  <tr>
  <th align="left" width="15%"><%= "ID".t %></th>
  <th align="left" width="15%"><%= "Name".t %></th>
  <th align="left" width="15%"><%= "Property".t %></th>
  <th align="left" width="15%"></th>
  </tr>



  <% @rooms.each do |room| %>
  <tr>
  <td width="15%"><%= room.id %></td>
    <td width="15%"><%= room.name %></td>
    <td width="15%"><%= room.property.name %></td>


    <td width="55%">| <%= link_to 'Show'.t, :action => 'show', :id => room %>
    | <%= link_to 'Edit'.t, :action => 'edit', :id => room %>
    | <%= link_to 'Destroy'.t, {:action => 'destroy', :id => room}, :confirm => 'Are you sure?' %>
    | <%= link_to 'Edit Minimum Stay'.t, {:action => 'edit_minimum_stay', :id => room} %></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'.t, { :page => @room_pages.current.previous } if @room_pages.current.previous %> | <%= link_to 'Next page'.t, { :page => @room_pages.current.next } if @room_pages.current.next %>
 

<br /><br />

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

<br><br>Please note: You have to assign at least one price per room.

⌨️ 快捷键说明

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