Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -3,8 +3,13 @@
<div class="box tabular">
<p><%= f.text_field :title, :required => true, :size => 60 %></p>
<p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p>
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit' %></p>
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit',
:data => {
:auto_complete => true,
:issues_url => auto_complete_issues_path(:project_id => @project, :q => '')
}
%></p>
<p id="attachments_form"><label><%= l(:label_attachment_plural) %></label><%= render :partial => 'attachments/form', :locals => {:container => @news} %></p>
</div>
<%= wikitoolbar_for 'news_description' %>
<%= wikitoolbar_for 'news_description', preview_news_path(:project_id => @project, :id => @news) %>

View file

@ -3,9 +3,7 @@
<%= labelled_form_for @news, :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %>
<% end %>
<div id="preview" class="wiki"></div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'scm' %>

View file

@ -12,10 +12,8 @@
:html => { :id => 'news-form', :multipart => true } do |f| %>
<%= render :partial => 'news/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
<% end if @project %>
<div id="preview" class="wiki"></div>
</div>
<h2><%=l(:label_news_plural)%></h2>
@ -26,7 +24,7 @@
<% @newss.each do |news| %>
<article class="news-article">
<header>
<h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
<h3><%= avatar(news.author) %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
<%= link_to h(news.title), news_path(news) %>
<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
<p class="author"><%= authoring news.created_on, news.author %></p>

View file

@ -4,6 +4,4 @@
:html => { :id => 'news-form', :multipart => true } do |f| %>
<%= render :partial => 'news/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %>
<% end %>
<div id="preview" class="wiki"></div>

View file

@ -0,0 +1,24 @@
api.news do
api.id @news.id
api.project(:id => @news.project_id, :name => @news.project.name) unless @news.project.nil?
api.author(:id => @news.author_id, :name => @news.author.name) unless @news.author.nil?
api.title @news.title
api.summary @news.summary unless @news.summary.blank?
api.description @news.description
api.created_on @news.created_on
api.array :attachments do
@news.attachments.each do |attachment|
render_api_attachment(attachment, api)
end
end if include_in_api_response?('attachments')
api.array :comments do
@comments.each do |comment|
api.comment :id => comment.id do
api.author(:id => comment.author_id, :name => comment.author.name) unless comment.author.nil?
api.content comment.content
end
end
end if include_in_api_response?('comments')
end

View file

@ -8,7 +8,7 @@
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
</div>
<h2><%= avatar(@news.author, :size => "24") %> <%=h @news.title %></h2>
<h2><%= avatar(@news.author) %> <%=h @news.title %></h2>
<% if authorize_for('news', 'edit') %>
<div id="edit-news" style="display:none;">
@ -16,10 +16,8 @@
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
<% end %>
<div id="preview" class="wiki"></div>
</div>
<% end %>
@ -44,7 +42,7 @@
:title => l(:button_delete),
:class => 'icon-only icon-del' %>
</div>
<h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
<h4><%= avatar(comment.author) %><%= authoring comment.created_on, comment.author %></h4>
<div class="wiki">
<%= textilizable(comment.comments) %>
</div>
@ -55,8 +53,13 @@
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
<div class="box">
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'comment_comments' %>
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit',
:data => {
:auto_complete => true,
:issues_url => auto_complete_issues_path(:project_id => @project, :q => '')
}
%>
<%= wikitoolbar_for 'comment_comments', preview_news_path(:project_id => @project, :id => @news) %>
</div>
<p><%= submit_tag l(:button_add) %></p>
<% end %>