diff options
author | Go MAEDA <maeda@farend.jp> | 2024-10-09 21:51:52 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-10-09 21:51:52 +0000 |
commit | 8ca5d2fa1a77ccbb0773e15f56afb5003c34ad30 (patch) | |
tree | b007a2a365ef5f1ff64fe9def38ce3229f859d78 /app/views | |
parent | 52d215de4386c3c8db1f3435aaf6df4bbdbaab9c (diff) | |
download | redmine-8ca5d2fa1a77ccbb0773e15f56afb5003c34ad30.tar.gz redmine-8ca5d2fa1a77ccbb0773e15f56afb5003c34ad30.zip |
Partial quoting feature for Issues and Forums (#41294).
Patch by Katsuya HIDAKA (user:hidakatsuya).
git-svn-id: https://svn.redmine.org/redmine/trunk@23107 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/issues/show.html.erb | 8 | ||||
-rw-r--r-- | app/views/messages/show.html.erb | 27 |
2 files changed, 19 insertions, 16 deletions
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 13c1bc632..8f732032a 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,3 +1,7 @@ +<% content_for :header_tags do %> + <%= javascripts_for_quote_reply_include_tag %> +<% end %> + <%= render :partial => 'action_menu' %> <h2 class="inline-block"><%= issue_heading(@issue) %></h2><%= issue_status_type_badge(@issue.status) %> @@ -84,11 +88,11 @@ end %> <hr /> <div class="description"> <div class="contextual"> - <%= link_to icon_with_label('comment', l(:button_quote)), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment ' if @issue.notes_addable? %> + <%= quote_reply(quoted_issue_path(@issue), '#issue_description_wiki') if @issue.notes_addable? %> </div> <p><strong><%=l(:field_description)%></strong></p> - <div class="wiki"> + <div id="issue_description_wiki" class="wiki"> <%= textilizable @issue, :description, :attachments => @issue.attachments %> </div> </div> diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb index 64c69a0fe..87355e65d 100644 --- a/app/views/messages/show.html.erb +++ b/app/views/messages/show.html.erb @@ -1,13 +1,15 @@ +<% content_for :header_tags do %> + <%= javascripts_for_quote_reply_include_tag %> +<% end %> + <%= board_breadcrumb(@message) %> <div class="contextual"> <%= watcher_link(@topic, User.current) %> - <%= link_to( - icon_with_label('comment', l(:button_quote)), - {:action => 'quote', :id => @topic}, - :method => 'get', - :class => 'icon icon-comment', - :remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %> + <%= quote_reply( + url_for(:action => 'quote', :id => @topic, :format => 'js'), + '#message_topic_wiki' + ) if !@topic.locked? && authorize_for('messages', 'reply') %> <%= link_to( icon_with_label('edit', l(:button_edit)), {:action => 'edit', :id => @topic}, @@ -26,7 +28,7 @@ <div class="message"> <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> -<div class="wiki"> +<div id="message_topic_wiki" class="wiki"> <%= textilizable(@topic, :content) %> </div> <%= link_to_attachments @topic, :author => false, :thumbnails => true %> @@ -42,13 +44,10 @@ <% @replies.each do |message| %> <div class="message reply" id="<%= "message-#{message.id}" %>"> <div class="contextual"> - <%= link_to( - icon_with_label('comment', l(:button_quote), icon_only: true), - {:action => 'quote', :id => message}, - :remote => true, - :method => 'get', - :title => l(:button_quote), - :class => 'icon icon-comment' + <%= quote_reply( + url_for(:action => 'quote', :id => message, :format => 'js'), + "#message-#{message.id} .wiki", + icon_only: true ) if !@topic.locked? && authorize_for('messages', 'reply') %> <%= link_to( icon_with_label('edit', l(:button_edit), icon_only: true), |