##// END OF EJS Templates
Merged r14795 (#21150)....
Jean-Philippe Lang -
r14457:88fcb8c3f9cf
parent child
Show More
@@ -1,34 +1,34
1 1 <%= error_messages_for 'time_entry' %>
2 2 <%= back_url_hidden_field_tag %>
3 3
4 4 <div class="box tabular">
5 5 <% if @time_entry.new_record? %>
6 6 <% if params[:project_id] %>
7 7 <%= hidden_field_tag 'project_id', params[:project_id] %>
8 8 <% elsif params[:issue_id] %>
9 9 <%= hidden_field_tag 'issue_id', params[:issue_id] %>
10 10 <% else %>
11 11 <p><%= f.select :project_id, project_tree_options_for_select(Project.allowed_to(:log_time).all, :selected => @time_entry.project, :include_blank => true) %></p>
12 12 <% end %>
13 13 <% end %>
14 14 <p>
15 15 <%= f.text_field :issue_id, :size => 6 %>
16 <span id="time_entry_issue"><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></span>
16 <span id="time_entry_issue"><%= "#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}" if @time_entry.issue.try(:visible?) %></span>
17 17 </p>
18 18 <p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
19 19 <p><%= f.text_field :hours, :size => 6, :required => true %></p>
20 20 <p><%= f.text_field :comments, :size => 100, :maxlength => 255 %></p>
21 21 <p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
22 22 <% @time_entry.custom_field_values.each do |value| %>
23 23 <p><%= custom_field_tag_with_label :time_entry, value %></p>
24 24 <% end %>
25 25 <%= call_hook(:view_timelog_edit_form_bottom, { :time_entry => @time_entry, :form => f }) %>
26 26 </div>
27 27
28 28 <%= javascript_tag do %>
29 29 observeAutocompleteField('time_entry_issue_id', '<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (@project ? nil : 'all'))%>', {
30 30 select: function(event, ui) {
31 31 $('#time_entry_issue').text(ui.item.label);
32 32 }
33 33 });
34 34 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now