プロジェクト

全般

プロフィール

プラグインハンズオン サンプル » 履歴 » バージョン 3

Haru Iida, 2011/01/22 15:19

1 1 Haru Iida
h1. プラグインハンズオン サンプル
2
3 3 Haru Iida
index.html.erb のサンプル
4
5 1 Haru Iida
<pre>
6 3 Haru Iida
<h2>IssueTemplates#index</h2>
7 1 Haru Iida
8 3 Haru Iida
<%= link_to '新規作成', :controller => 'issue_templates',
9
  :action => 'create', :id=>@project %>
10
</pre>
11 1 Haru Iida
12
create.html.erb のサンプル
13 3 Haru Iida
14
<pre>
15
16
<h2>テンプレートの作成</h2>
17
18 1 Haru Iida
19
<% labelled_tabular_form_for :issue_template, @issue_template, :action => 'update' do |f|%>
20
    <p>
21
      <%= f.text_field :title, :size => 50, :required => true %>
22
    </p>
23
    <p>
24
      <%= f.text_field :note, :size => 80, :label => l(:issue_template_note) %>
25
    </p>
26
    <p><%= f.text_area :description, :rows => 8, :cols=>60, :accesskey => accesskey(:edit), :class => 'wiki-edit' ,:required => true %></p>
27
    <%= submit_tag l(:button_apply) %>
28
  <% end %>
29
</pre>