diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-19 22:27:41 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-19 22:27:41 +0000 |
commit | f992df684fe4db936ee56c1e7d334eebfae40329 (patch) | |
tree | 901f0b13ad2abe01c93116280a0ce3d435ec515c /app/views/news | |
parent | 6f8bfab179ce785a08d13d137f849c6bfece0df9 (diff) | |
download | redmine-f992df684fe4db936ee56c1e7d334eebfae40329.tar.gz redmine-f992df684fe4db936ee56c1e7d334eebfae40329.zip |
Small refactorization of avatar methods (#31391).
* move existing methods from ApplicationHelper to a new helper file (AvatarsHelper)
* change default avatar size from 50 to 24 because most of the avatars are using the size 24
* class 'gravatar' is always added and all custom classes are appended
* added user name as default title for avatar images
* added two new methods: @assignee_avatar@ and @author_avatar@
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18175 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/news')
-rw-r--r-- | app/views/news/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/news/show.html.erb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index cd51aa950..073099f56 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -24,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> diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb index d8d098cce..932bf0083 100644 --- a/app/views/news/show.html.erb +++ b/app/views/news/show.html.erb @@ -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;"> @@ -42,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> |