textilization_for_spent_time_comments.patch

Marius BALTEANU, 2016-12-29 22:57

Download (1.9 KB)

View differences:

app/helpers/queries_helper.rb
183 183
      value ? (value.visible? ? link_to_issue(value, :subject => false) : "##{value.id}") : ''
184 184
    when :description
185 185
      item.description? ? content_tag('div', textilizable(item, :description), :class => "wiki") : ''
186
    when :comments
187
      item.comments? ? content_tag('div', textilizable(item, :comments), :class => "wiki") : ''
186 188
    when :done_ratio
187 189
      progress_bar(value)
188 190
    when :relations
app/views/timelog/_form.html.erb
19 19
  </p>
20 20
  <p><%= f.date_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
21 21
  <p><%= f.hours_field :hours, :size => 6, :required => true %></p>
22
  <p><%= f.text_field :comments, :size => 100, :maxlength => 1024 %></p>
23 22
  <p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
23
  <p><%= f.text_area :comments,
24
                      :class => 'wiki-edit',
25
                      :cols => 60,
26
                      :rows => [[5, @time_entry.comments.to_s.length / 50].max, 10].min,
27
                      :maxlength => 1024 %></p>
28

  
24 29
  <% @time_entry.custom_field_values.each do |value| %>
25 30
    <p><%= custom_field_tag_with_label :time_entry, value %></p>
26 31
  <% end %>
27 32
  <%= call_hook(:view_timelog_edit_form_bottom, { :time_entry => @time_entry, :form => f }) %>
28 33
</div>
29 34

  
35
<%= wikitoolbar_for 'time_entry_comments' %>
36

  
30 37
<%= javascript_tag do %>
31 38
  $(document).ready(function(){
32 39
    $('#time_entry_project_id, #time_entry_issue_id').change(function(){