Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/issues/_action_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="contextual">
<%= link_to l(:button_edit), edit_issue_path(@issue),
:onclick => 'showAndScrollTo("update", "issue_notes"); return false;',
:onclick => 'showAndScrollTo("update", "issue_notes"); if ($("#issue-notes-form").length) {$("#issue-notes-form").hide();}; return false;',
:class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue),
:class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
Expand Down
24 changes: 24 additions & 0 deletions app/views/issues/_action_menu_edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,27 @@
<%= render :partial => 'edit' %>
</div>
<% end %>

<% if @issue.notes_addable? %>
<%= labelled_form_for @issue, :html => {:id => 'issue-notes-form', :multipart => true} do |f| %>
<%= render :partial => 'conflict' if @conflict %>
<div class="box">
<fieldset><legend><%= l(:field_notes) %></legend>
<%= f.text_area :notes, :cols => 60, :rows => 4, :class => 'wiki-edit',
:data => {
:auto_complete => true
},
:no_label => true, :id => 'only-issue-notes' %>
<%= wikitoolbar_for 'only-issue-notes', preview_issue_path(:project_id => @project, :issue_id => @issue) %>

<% if @issue.safe_attribute? 'private_notes' %>
<%= f.check_box :private_notes, :no_label => true %> <label for="issue_private_notes"><%= l(:field_private_notes) %></label>
<% end %>

<%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
</fieldset>
</div>

<%= submit_tag l(:button_submit) %>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/issues/_edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<%= submit_tag l(:button_submit) %>
<%= link_to(
l(:button_cancel), issue_path(id: @issue.id),
:onclick => params[:action] == 'show' ? "$('#update').hide(); return false;" : ''
:onclick => params[:action] == 'show' ? "$('#update').hide(); if($('#issue-notes-form').length) {$('#issue-notes-form').show();}; return false;" : ''
) %>
<%= hidden_field_tag 'prev_issue_id', @prev_issue_id if @prev_issue_id %>
<%= hidden_field_tag 'next_issue_id', @next_issue_id if @next_issue_id %>
Expand Down