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

📄 index.rhtml

📁 RubyonRailsC.zip ruby on rails的源码
💻 RHTML
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta http-equiv="content-style-type" content="text/css" />
<%= stylesheet_link_tag("taskpad") %>
<title>任务本</title>
</head>
<body>

<div id="title" width = "80%">
<h1>任务本演示</h1>
</div>

<div id="menu" width = "80%">
<p>您准备做的下一个任务是…… [已完成:<%= @success %> / 因某种原因而未完成的任务:<%= @failures %>]</p>
<% if @editable %>
	<%= start_form_tag :action => 'create' %>
	<%= text_field 'task', 'created_at', 'size' => '10', 'value' => Date.today %>
	<%= text_field 'task', 'body', 'size' => '50', 'value' => '' %>
	<%= hidden_field 'task', 'isdone', 'value' => 1 %>
	<%= submit_tag '添加任务' %>
	<%= end_form_tag %>
<% else %>
	<%= start_form_tag :action => 'eval' %>
	<%= text_field 'task', 'body', 'value' => @current_task.body, 'disabled' => 'disabled' %>
	<%= hidden_field 'task', 'id', 'value' => @current_task.id %>
	<%= submit_tag '完成任务', 'name' => 'action=done' %>
	<%= submit_tag '取消任务', 'name' => 'action=failed' %>
	<%= end_form_tag %>
<% end %>
</div>

<div id="table" width = "80%">
<p>历史记录 <%= link_to "[清除任务记录]", { :action => 'clear' }, :confirm => '确定清除任务记录?' %></p>
<table width = "80%">
 <tr class="header">
  <th class="result">状态</th>
  <th class="task">任务信息</th>
  <th class="time">完成时间</th>
 </tr>
<% @history.each {|task| %>
 <tr>
  <td><%= task['state'] %></td>
  <td class="body"><%= task['body'] %></td>
  <td><%= task['time'] %></td>
 </tr>
<% } %>
</table>
</div>
</body>
</html>

⌨️ 快捷键说明

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