⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit.rhtml

📁 A Hotel Management System based on Ruby on Rails.
💻 RHTML
字号:
<h1>Editing price data for: <%= @price.room.name %></h1>

<%= start_form_tag :action => 'update', :id => @price %>
<p><label for="price_adults">Adults</label><br/>
<%= text_field 'price', 'adults'  %></p>
 <p><label for="price_children">Children</label><br/>
<%= text_field 'price', 'children'  %></p>

  


  <p><b>Room:</b><br>

  <select name="price[room_id]">
   <% @rooms.each do |room| %>
       <option value="<%= room.id %>"
	   <%= ' selected' if room.id == @price.room_id %>>
         <%= room.name %>
       </option>
   <% end %>
  </select>
  <%= submit_tag 'Edit' %>
<%= end_form_tag %>
<h1>Editing price schema for: <%= @price.room.name %></h1>
A is a placeholder for an price scheme like 1,4,50;5,8,40
<br><br>
<table width="600">
  <% (1 .. 12).each do |x|
     @month = month_vars(x) %>
  <tr><td valign="top"><b><%= @month["name"] %></b></td>
  <% (1 .. @month["end"].to_i).each do |y| %>
  
  
  
       <td width="20"><%= y %><br><% if @prl["#{x}"]["#{y}"].class == Array %>
       A
       <% else %>
       <%= @prl["#{x}"]["#{y}"] %>
       <% end %>
              
	   </td>
  <% end %>
 </tr> <% end %></table>
New Price: 
<%= start_form_tag :action => 'new_price', :id => @price %>
<select size="1" name="start_day">
<% (1 .. 31).each do |x| %>
<option><%= x %></option>
<% end %>
</select>
<select size="1" name="start_month">
<% (1 .. 12).each do |x| %>
<option value="<%= x %>"><%= month_vars(x)["name"] %></option>
<% end %>
</select> - 
<select size="1" name="stop_day">
<% (1 .. 31).each do |x| %>
<option><%= x %></option>
<% end %>
</select>
<select size="1" name="stop_month">
<% (1 .. 12).each do |x| %>
<option value="<%= x %>"><%= month_vars(x)["name"] %></option>
<% end %>
</select> 
<input type="text" name="new_price" size="40">
<%= submit_tag 'Edit' %>
<%= end_form_tag %>

⌨️ 快捷键说明

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