To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / issues / _form.html.erb @ 1298:4f746d8966dd
History | View | Annotate | Download (2.63 KB)
| 1 |
<%= labelled_fields_for :issue, @issue do |f| %>
|
|---|---|
| 2 |
<%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
|
| 3 |
|
| 4 |
<% if @issue.safe_attribute? 'is_private' %>
|
| 5 |
<p style="float:right; margin-right:1em;"> |
| 6 |
<%= f.check_box :is_private, :no_label => true %><label class="inline" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label> |
| 7 |
</p>
|
| 8 |
<% end %>
|
| 9 |
|
| 10 |
<% if @issue.safe_attribute? 'project_id' %>
|
| 11 |
<p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true}, |
| 12 |
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p> |
| 13 |
<% end %>
|
| 14 |
|
| 15 |
<% if @issue.safe_attribute? 'tracker_id' %>
|
| 16 |
<p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, {:required => true}, |
| 17 |
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p> |
| 18 |
<% end %>
|
| 19 |
|
| 20 |
<% if @issue.safe_attribute? 'subject' %>
|
| 21 |
<p><%= f.text_field :subject, :size => 80, :maxlength => 255, :required => true %></p> |
| 22 |
<% end %>
|
| 23 |
|
| 24 |
<% if @issue.safe_attribute? 'description' %>
|
| 25 |
<p>
|
| 26 |
<%= f.label_for_field :description, :required => @issue.required_attribute?('description') %>
|
| 27 |
<%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
| 28 |
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
|
| 29 |
<%= f.text_area :description,
|
| 30 |
:cols => 60,
|
| 31 |
:rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
|
| 32 |
:accesskey => accesskey(:edit),
|
| 33 |
:class => 'wiki-edit',
|
| 34 |
:no_label => true %>
|
| 35 |
<% end %>
|
| 36 |
</p>
|
| 37 |
<%= wikitoolbar_for 'issue_description' %>
|
| 38 |
<% end %>
|
| 39 |
|
| 40 |
<div id="attributes" class="attributes"> |
| 41 |
<%= render :partial => 'issues/attributes' %>
|
| 42 |
</div>
|
| 43 |
|
| 44 |
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
|
| 45 |
<% end %>
|
| 46 |
|
| 47 |
<% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%>
|
| 48 |
<p id="watchers_form"><label><%= l(:label_issue_watchers) %></label> |
| 49 |
<% @issue.project.users.sort.each do |user| -%>
|
| 50 |
<label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, !!(@issue.watched_by?(user) or user == User.current) %> <%=h user %></label> |
| 51 |
<% end -%>
|
| 52 |
</p>
|
| 53 |
<% end %>
|
| 54 |
|
| 55 |
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
|
| 56 |
|
| 57 |
<%= wikitoolbar_for 'issue_description' %>
|