@@ -1,46 +1,34 | |||||
1 | <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %> |
|
1 | <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %> | |
2 |
|
2 | |||
3 | <% if @issue.safe_attribute_names.include?('is_private') %> |
|
3 | <% if @issue.safe_attribute_names.include?('is_private') %> | |
4 | <p style="float:right; margin-right:1em;"> |
|
4 | <p style="float:right; margin-right:1em;"> | |
5 | <label class="inline" for="issue_is_private" id="issue_is_private_label"><%= f.check_box :is_private, :no_label => true %> <%= l(:field_is_private) %></label> |
|
5 | <label class="inline" for="issue_is_private" id="issue_is_private_label"><%= f.check_box :is_private, :no_label => true %> <%= l(:field_is_private) %></label> | |
6 | </p> |
|
6 | </p> | |
7 | <% end %> |
|
7 | <% end %> | |
8 | <p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p> |
|
8 | <p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p> | |
9 | <%= observe_field :issue_tracker_id, :url => project_issue_form_path(@project, :id => @issue), |
|
9 | <%= observe_field :issue_tracker_id, :url => project_issue_form_path(@project, :id => @issue), | |
10 | :update => :attributes, |
|
10 | :update => :attributes, | |
11 | :with => "Form.serialize('issue-form')" %> |
|
11 | :with => "Form.serialize('issue-form')" %> | |
12 |
|
12 | |||
13 | <p><%= f.text_field :subject, :size => 80, :required => true %></p> |
|
13 | <p><%= f.text_field :subject, :size => 80, :required => true %></p> | |
14 | <p> |
|
14 | <p> | |
15 | <label><%= l(:field_description) %></label> |
|
15 | <label><%= l(:field_description) %></label> | |
16 | <%= link_to_function image_tag('edit.png'), |
|
16 | <%= link_to_function image_tag('edit.png'), | |
17 | 'Element.hide(this); Effect.toggle("issue_description_and_toolbar", "appear", {duration:0.3})' unless @issue.new_record? %> |
|
17 | 'Element.hide(this); Effect.toggle("issue_description_and_toolbar", "appear", {duration:0.3})' unless @issue.new_record? %> | |
18 | <% content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %> |
|
18 | <% content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %> | |
19 | <%= f.text_area :description, |
|
19 | <%= f.text_area :description, | |
20 | :cols => 60, |
|
20 | :cols => 60, | |
21 | :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), |
|
21 | :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), | |
22 | :accesskey => accesskey(:edit), |
|
22 | :accesskey => accesskey(:edit), | |
23 | :class => 'wiki-edit', |
|
23 | :class => 'wiki-edit', | |
24 | :no_label => true %> |
|
24 | :no_label => true %> | |
25 | <% end %> |
|
25 | <% end %> | |
26 | </p> |
|
26 | </p> | |
27 |
|
27 | |||
28 | <div id="attributes" class="attributes"> |
|
28 | <div id="attributes" class="attributes"> | |
29 | <%= render :partial => 'issues/attributes' %> |
|
29 | <%= render :partial => 'issues/attributes' %> | |
30 | </div> |
|
30 | </div> | |
31 |
|
31 | |||
32 | <% if @issue.new_record? %> |
|
|||
33 | <p id="attachments_form"><%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form' %></p> |
|
|||
34 | <% end %> |
|
|||
35 |
|
||||
36 | <% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%> |
|
|||
37 | <p id="watchers_form"><label><%= l(:label_issue_watchers) %></label> |
|
|||
38 | <% @issue.project.users.sort.each do |user| -%> |
|
|||
39 | <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watched_by?(user) %> <%=h user %></label> |
|
|||
40 | <% end -%> |
|
|||
41 | </p> |
|
|||
42 | <% end %> |
|
|||
43 |
|
||||
44 | <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> |
|
32 | <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> | |
45 |
|
33 | |||
46 | <%= wikitoolbar_for 'issue_description' %> |
|
34 | <%= wikitoolbar_for 'issue_description' %> |
@@ -1,29 +1,40 | |||||
1 | <h2><%=l(:label_issue_new)%></h2> |
|
1 | <h2><%=l(:label_issue_new)%></h2> | |
2 |
|
2 | |||
3 | <%= call_hook(:view_issues_new_top, {:issue => @issue}) %> |
|
3 | <%= call_hook(:view_issues_new_top, {:issue => @issue}) %> | |
4 |
|
4 | |||
5 | <% labelled_form_for @issue, :url => project_issues_path(@project), |
|
5 | <% labelled_form_for @issue, :url => project_issues_path(@project), | |
6 | :html => {:id => 'issue-form', :multipart => true} do |f| %> |
|
6 | :html => {:id => 'issue-form', :multipart => true} do |f| %> | |
7 |
|
|
7 | <%= error_messages_for 'issue' %> | |
8 |
|
|
8 | <div class="box tabular"> | |
9 | <%= render :partial => 'issues/form', :locals => {:f => f} %> |
|
9 | <%= render :partial => 'issues/form', :locals => {:f => f} %> | |
10 | </div> |
|
10 | ||
|
11 | <p id="attachments_form"><%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form' %></p> | |||
|
12 | ||||
|
13 | <% if User.current.allowed_to?(:add_issue_watchers, @project) -%> | |||
|
14 | <p id="watchers_form"><label><%= l(:label_issue_watchers) %></label> | |||
|
15 | <% @issue.project.users.sort.each do |user| -%> | |||
|
16 | <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watched_by?(user) %> <%=h user %></label> | |||
|
17 | <% end -%> | |||
|
18 | </p> | |||
|
19 | <% end %> | |||
|
20 | </div> | |||
|
21 | ||||
11 | <%= submit_tag l(:button_create) %> |
|
22 | <%= submit_tag l(:button_create) %> | |
12 | <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> |
|
23 | <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> | |
13 | <%= link_to_remote l(:label_preview), |
|
24 | <%= link_to_remote l(:label_preview), | |
14 | { :url => preview_issue_path(:project_id => @project), |
|
25 | { :url => preview_issue_path(:project_id => @project), | |
15 | :method => 'post', |
|
26 | :method => 'post', | |
16 | :update => 'preview', |
|
27 | :update => 'preview', | |
17 | :with => "Form.serialize('issue-form')", |
|
28 | :with => "Form.serialize('issue-form')", | |
18 | :complete => "Element.scrollTo('preview')" |
|
29 | :complete => "Element.scrollTo('preview')" | |
19 | }, :accesskey => accesskey(:preview) %> |
|
30 | }, :accesskey => accesskey(:preview) %> | |
20 |
|
31 | |||
21 | <%= javascript_tag "Form.Element.focus('issue_subject');" %> |
|
32 | <%= javascript_tag "Form.Element.focus('issue_subject');" %> | |
22 | <% end %> |
|
33 | <% end %> | |
23 |
|
34 | |||
24 | <div id="preview" class="wiki"></div> |
|
35 | <div id="preview" class="wiki"></div> | |
25 |
|
36 | |||
26 | <% content_for :header_tags do %> |
|
37 | <% content_for :header_tags do %> | |
27 | <%= stylesheet_link_tag 'scm' %> |
|
38 | <%= stylesheet_link_tag 'scm' %> | |
28 | <%= robot_exclusion_tag %> |
|
39 | <%= robot_exclusion_tag %> | |
29 | <% end %> |
|
40 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now