##// END OF EJS Templates
Backported r11233 from trunk (#12833)....
Jean-Philippe Lang -
r11004:4620b8b8dbe1
parent child
Show More
@@ -1,45 +1,45
1 <%= labelled_fields_for :issue, @issue do |f| %>
1 <%= labelled_fields_for :issue, @issue do |f| %>
2 <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
2 <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
3
3
4 <% if @issue.safe_attribute? 'is_private' %>
4 <% if @issue.safe_attribute? 'is_private' %>
5 <p style="float:right; margin-right:1em;">
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>
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>
7 </p>
8 <% end %>
8 <% end %>
9
9
10 <% if @issue.safe_attribute? 'project_id' %>
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},
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>
12 :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
13 <% end %>
13 <% end %>
14
14
15 <% if @issue.safe_attribute? 'tracker_id' %>
15 <% if @issue.safe_attribute? 'tracker_id' %>
16 <p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, {:required => true},
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>
17 :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
18 <% end %>
18 <% end %>
19
19
20 <% if @issue.safe_attribute? 'subject' %>
20 <% if @issue.safe_attribute? 'subject' %>
21 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
21 <p><%= f.text_field :subject, :size => 80, :maxlength => 255, :required => true %></p>
22 <% end %>
22 <% end %>
23
23
24 <% if @issue.safe_attribute? 'description' %>
24 <% if @issue.safe_attribute? 'description' %>
25 <p>
25 <p>
26 <%= f.label_for_field :description, :required => @issue.required_attribute?('description') %>
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? %>
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 %>
28 <%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
29 <%= f.text_area :description,
29 <%= f.text_area :description,
30 :cols => 60,
30 :cols => 60,
31 :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
31 :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
32 :accesskey => accesskey(:edit),
32 :accesskey => accesskey(:edit),
33 :class => 'wiki-edit',
33 :class => 'wiki-edit',
34 :no_label => true %>
34 :no_label => true %>
35 <% end %>
35 <% end %>
36 </p>
36 </p>
37 <%= wikitoolbar_for 'issue_description' %>
37 <%= wikitoolbar_for 'issue_description' %>
38 <% end %>
38 <% end %>
39
39
40 <div id="attributes" class="attributes">
40 <div id="attributes" class="attributes">
41 <%= render :partial => 'issues/attributes' %>
41 <%= render :partial => 'issues/attributes' %>
42 </div>
42 </div>
43
43
44 <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
44 <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
45 <% end %>
45 <% end %>
@@ -1,23 +1,23
1 <%= error_messages_for 'time_entry' %>
1 <%= error_messages_for 'time_entry' %>
2 <%= back_url_hidden_field_tag %>
2 <%= back_url_hidden_field_tag %>
3
3
4 <div class="box tabular">
4 <div class="box tabular">
5 <% if @time_entry.new_record? %>
5 <% if @time_entry.new_record? %>
6 <% if params[:project_id] || @time_entry.issue %>
6 <% if params[:project_id] || @time_entry.issue %>
7 <%= f.hidden_field :project_id %>
7 <%= f.hidden_field :project_id %>
8 <% else %>
8 <% else %>
9 <p><%= f.select :project_id, project_tree_options_for_select(Project.allowed_to(:log_time).all, :selected => @time_entry.project), :required => true %></p>
9 <p><%= f.select :project_id, project_tree_options_for_select(Project.allowed_to(:log_time).all, :selected => @time_entry.project), :required => true %></p>
10 <% end %>
10 <% end %>
11 <% end %>
11 <% end %>
12 <p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p>
12 <p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p>
13 <p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
13 <p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
14 <p><%= f.text_field :hours, :size => 6, :required => true %></p>
14 <p><%= f.text_field :hours, :size => 6, :required => true %></p>
15 <p><%= f.text_field :comments, :size => 100 %></p>
15 <p><%= f.text_field :comments, :size => 100, :maxlength => 255 %></p>
16 <p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
16 <p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
17 <% @time_entry.custom_field_values.each do |value| %>
17 <% @time_entry.custom_field_values.each do |value| %>
18 <p><%= custom_field_tag_with_label :time_entry, value %></p>
18 <p><%= custom_field_tag_with_label :time_entry, value %></p>
19 <% end %>
19 <% end %>
20 <%= call_hook(:view_timelog_edit_form_bottom, { :time_entry => @time_entry, :form => f }) %>
20 <%= call_hook(:view_timelog_edit_form_bottom, { :time_entry => @time_entry, :form => f }) %>
21 </div>
21 </div>
22
22
23 <%= javascript_tag "observeAutocompleteField('time_entry_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (@project ? nil : 'all'))}')" %>
23 <%= javascript_tag "observeAutocompleteField('time_entry_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (@project ? nil : 'all'))}')" %>
General Comments 0
You need to be logged in to leave comments. Login now