##// END OF EJS Templates
Issue forms cleanup....
Jean-Philippe Lang -
r7981:9cc1cb52810a
parent child
Show More
@@ -1,55 +1,50
1 <% labelled_tabular_form_for :issue, @issue,
1 <% labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
2 :url => {:action => 'update', :id => @issue},
3 :html => {:id => 'issue-form',
4 :class => nil,
5 :method => :put,
6 :multipart => true} do |f| %>
7 <%= error_messages_for 'issue', 'time_entry' %>
2 <%= error_messages_for 'issue', 'time_entry' %>
8 <div class="box">
3 <div class="box">
9 <% if @edit_allowed || !@allowed_statuses.empty? %>
4 <% if @edit_allowed || !@allowed_statuses.empty? %>
10 <fieldset class="tabular"><legend><%= l(:label_change_properties) %>
5 <fieldset class="tabular"><legend><%= l(:label_change_properties) %>
11 <% if !@issue.new_record? && !@issue.errors.any? && @edit_allowed %>
6 <% if !@issue.new_record? && !@issue.errors.any? && @edit_allowed %>
12 <small>(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("issue_descr_fields", "appear", {duration:0.3}); return false;' %>)</small>
7 <small>(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("issue_descr_fields", "appear", {duration:0.3}); return false;' %>)</small>
13 <% end %>
8 <% end %>
14 </legend>
9 </legend>
15 <%= render :partial => (@edit_allowed ? 'form' : 'form_update'), :locals => {:f => f} %>
10 <%= render :partial => (@edit_allowed ? 'form' : 'form_update'), :locals => {:f => f} %>
16 </fieldset>
11 </fieldset>
17 <% end %>
12 <% end %>
18 <% if User.current.allowed_to?(:log_time, @project) %>
13 <% if User.current.allowed_to?(:log_time, @project) %>
19 <fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
14 <fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
20 <% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
15 <% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
21 <div class="splitcontentleft">
16 <div class="splitcontentleft">
22 <p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
17 <p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
23 </div>
18 </div>
24 <div class="splitcontentright">
19 <div class="splitcontentright">
25 <p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
20 <p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
26 </div>
21 </div>
27 <p><%= time_entry.text_field :comments, :size => 60 %></p>
22 <p><%= time_entry.text_field :comments, :size => 60 %></p>
28 <% @time_entry.custom_field_values.each do |value| %>
23 <% @time_entry.custom_field_values.each do |value| %>
29 <p><%= custom_field_tag_with_label :time_entry, value %></p>
24 <p><%= custom_field_tag_with_label :time_entry, value %></p>
30 <% end %>
25 <% end %>
31 <% end %>
26 <% end %>
32 </fieldset>
27 </fieldset>
33 <% end %>
28 <% end %>
34
29
35 <fieldset><legend><%= l(:field_notes) %></legend>
30 <fieldset><legend><%= l(:field_notes) %></legend>
36 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
31 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
37 <%= wikitoolbar_for 'notes' %>
32 <%= wikitoolbar_for 'notes' %>
38 <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
33 <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
39
34
40 <p><%=l(:label_attachment_plural)%><br /><%= render :partial => 'attachments/form' %></p>
35 <p><%=l(:label_attachment_plural)%><br /><%= render :partial => 'attachments/form' %></p>
41 </fieldset>
36 </fieldset>
42 </div>
37 </div>
43
38
44 <%= f.hidden_field :lock_version %>
39 <%= f.hidden_field :lock_version %>
45 <%= submit_tag l(:button_submit) %>
40 <%= submit_tag l(:button_submit) %>
46 <%= link_to_remote l(:label_preview),
41 <%= link_to_remote l(:label_preview),
47 { :url => preview_issue_path(:project_id => @project, :id => @issue),
42 { :url => preview_issue_path(:project_id => @project, :id => @issue),
48 :method => 'post',
43 :method => 'post',
49 :update => 'preview',
44 :update => 'preview',
50 :with => 'Form.serialize("issue-form")',
45 :with => 'Form.serialize("issue-form")',
51 :complete => "Element.scrollTo('preview')"
46 :complete => "Element.scrollTo('preview')"
52 }, :accesskey => accesskey(:preview) %>
47 }, :accesskey => accesskey(:preview) %>
53 <% end %>
48 <% end %>
54
49
55 <div id="preview" class="wiki"></div>
50 <div id="preview" class="wiki"></div>
@@ -1,27 +1,27
1 <h2><%=l(:label_issue_new)%></h2>
1 <h2><%=l(:label_issue_new)%></h2>
2
2
3 <% labelled_tabular_form_for :issue, @issue, :url => {:controller => 'issues', :action => 'create', :project_id => @project},
3 <% labelled_form_for @issue, :url => project_issues_path(@project),
4 :html => {:multipart => true, :id => 'issue-form', :class => 'tabular new-issue-form'} do |f| %>
4 :html => {:id => 'issue-form', :multipart => true} do |f| %>
5 <%= error_messages_for 'issue' %>
5 <%= error_messages_for 'issue' %>
6 <div class="box">
6 <div class="box tabular">
7 <%= render :partial => 'issues/form', :locals => {:f => f} %>
7 <%= render :partial => 'issues/form', :locals => {:f => f} %>
8 </div>
8 </div>
9 <%= submit_tag l(:button_create) %>
9 <%= submit_tag l(:button_create) %>
10 <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
10 <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
11 <%= link_to_remote l(:label_preview),
11 <%= link_to_remote l(:label_preview),
12 { :url => preview_issue_path(:project_id => @project),
12 { :url => preview_issue_path(:project_id => @project),
13 :method => 'post',
13 :method => 'post',
14 :update => 'preview',
14 :update => 'preview',
15 :with => "Form.serialize('issue-form')",
15 :with => "Form.serialize('issue-form')",
16 :complete => "Element.scrollTo('preview')"
16 :complete => "Element.scrollTo('preview')"
17 }, :accesskey => accesskey(:preview) %>
17 }, :accesskey => accesskey(:preview) %>
18
18
19 <%= javascript_tag "Form.Element.focus('issue_subject');" %>
19 <%= javascript_tag "Form.Element.focus('issue_subject');" %>
20 <% end %>
20 <% end %>
21
21
22 <div id="preview" class="wiki"></div>
22 <div id="preview" class="wiki"></div>
23
23
24 <% content_for :header_tags do %>
24 <% content_for :header_tags do %>
25 <%= stylesheet_link_tag 'scm' %>
25 <%= stylesheet_link_tag 'scm' %>
26 <%= robot_exclusion_tag %>
26 <%= robot_exclusion_tag %>
27 <% end %>
27 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now