</div>
<p><%= f.submit(_("Update")) %></p>
<%- end -%>
+<h2>設定の解説</h2>
+<div class="hikidoc">
+<%= hikidoc(@form.unit.explanation) %>
+</div>
<p><%= link_to _('Back to list'), admin_problems_path %></p>
</div>
<p><%= f.submit(_("Create")) %></p>
<%- end -%>
+<h2>設定の解説</h2>
+<div class="hikidoc">
+<%= hikidoc(@form.unit.explanation) %>
+</div>
<tr><th><%= form.label(:name) %></th><td><%= form.text_field(:name) %></td></tr>
<tr><th><%= form.label(:symbol) %></th><td><%= form.text_field(:symbol) %></td></tr>
</table>
+ <h2>説明</h2>
+ <%= form.text_area(:explanation, :size => '80x10') %>
<p><%= form.submit %></p>
<%- end -%>
<tr><th>シンボル</th><td><%=h @unit.symbol %></td></tr>
</table>
+<h2>説明</h2>
+<div class="hikidoc">
+<%= hikidoc(@unit.explanation) %>
+</div>
+
<p>
<%= link_to 'Edit', edit_admin_unit_path(@unit) %>
<%= link_to 'Destroy', admin_unit_path(@unit), :confirm => _('Are you sure?'), :method => :delete %>
content: "年";
}
-/* For help (hikidoc) */
-#help h2 {
+/* For hikidoc */
+div.hikidoc h2 {
font-size: 120%;
margin-top: 15px;
margin-bottom: 10px;
border-bottom: 1px solid #333;
}
-#help h3 {
+div.hikidoc h3 {
font-size: 100%;
margin-top: 10px;
padding-left: 5px;
border-left: 5px solid #228B22;
}
-#help p {
+div.hikidoc p {
text-indent: 1em;
margin: 5px 0;
line-height: 1.3em;
}
-#help pre {
+div.hikidoc pre {
margin: 10px 5px;
padding: 5px;
line-height: 1.5em;
background-color: #e6ffec;
border: 1px solid #8fbc8f;
}
-#help div.try {
+div.hikidoc div.try {
margin: 10px 5px;
}
-#help div.try textarea {
+div.hikidoc div.try textarea {
width: 300px;
}
-#help div.try pre.mathml {
+div.hikidoc div.try pre.mathml {
width: 300px;
margin: 0;
color: #888;
border: 1px solid #aaa;
background-color: white;
}
-#help dl {
+div.hikidoc dl {
margin: 10px;
}
-#help dl dd {
+div.hikidoc dl dd {
margin-left: 10px;
}
problem = Factory.build(problem_label)
problem.should_receive(:id).at_least(1).and_return(1)
unit = problem.unit
- Unit.should_receive(:find).and_return(unit)
+ Unit.should_receive(:find).at_least(1).and_return(unit)
assigns[:problem] = problem
assigns[:form] = unit.form_class.new
render 'admin/problems/edit'