From 8ca5d2fa1a77ccbb0773e15f56afb5003c34ad30 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 9 Oct 2024 21:51:52 +0000 Subject: 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 --- app/views/issues/show.html.erb | 8 ++++++-- app/views/messages/show.html.erb | 27 +++++++++++++-------------- 2 files changed, 19 insertions(+), 16 deletions(-) (limited to 'app/views') 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' %>

<%= issue_heading(@issue) %>

<%= issue_status_type_badge(@issue.status) %> @@ -84,11 +88,11 @@ end %>
- <%= 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? %>

<%=l(:field_description)%>

-
+
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
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) %>
<%= 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 @@

<%= authoring @topic.created_on, @topic.author %>

-
+
<%= textilizable(@topic, :content) %>
<%= link_to_attachments @topic, :author => false, :thumbnails => true %> @@ -42,13 +44,10 @@ <% @replies.each do |message| %>
">
- <%= 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), -- cgit v1.2.3