Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added link to Gravatar website if Gravatars are enabled. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
28 changes: 14 additions & 14 deletions app/views/my/_avatar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ element.setAttributeNode(attr);

<fieldset class='box tabular'>
<legend><%= l(:label_avatar)%></legend>
<div style="width: 128px; height: 128px; border: 1px silver solid;">
<%= avatar(@user, :size => "128") %>
<% av = user.attachments.find_by_description('avatar') %>
<% if not av.nil? %>
<%= link_to image_tag('delete.png'), { :controller => 'attachments', :action => 'destroy', :id => av },
:confirm => l(:text_are_you_sure),
:method => :delete,
:class => 'delete',
:title => l(:button_delete) %>
<% end %>
</div><br>

<%= file_field_tag "avatar" %><br />

<p><label><%=h l(:label_avatar) %></label><%= avatar(@user, :size => "64") %></p>
<% av = user.attachments.find_by_description('avatar') %>
<% if Setting.gravatar_enabled? %>
<p><label><%=h l(:label_gravatar) %></label><%= link_to(l(:label_change_gravatar), 'http://gravatar.com/', {:target=>'_blank'}) %></p>
<% end %>
<% if not av.nil? %>
<p><label><%=h l(:label_delete) %></label>
<%= link_to image_tag('delete.png'), { :controller => 'attachments', :action => 'destroy', :id => av },
:confirm => l(:text_are_you_sure),
:method => :delete,
:class => 'delete',
:title => l(:button_delete) %></p>
<% end %>
<p><label><%=h l(:label_add_avatar) %></label><%= file_field_tag "avatar" %></p>
22 changes: 14 additions & 8 deletions app/views/users/_avatar.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
<div class="box">
<h3><%= l(:label_avatar)%></h3>
<div style="width: 128px; height: 128px; border: 1px silver solid;">
<%= avatar(@user, :size => "128") %>
</div><br>
<%= form_tag( { :action => 'save_avatar', :id => @user }, :multipart => true) do %>
<%= file_field_tag "avatar" %><br />
<div class="box tabular">
<p><label><%=h l(:label_avatar) %></label><%= avatar(@user, :size => "64") %></p>
<% av = @user.attachments.find_by_description('avatar') %>
<% if not av.nil? %>
<p><label><%=h l(:label_delete) %></label>
<%= link_to image_tag('delete.png'), { :controller => 'attachments', :action => 'destroy', :id => av },
:confirm => l(:text_are_you_sure),
:method => :delete,
:class => 'delete',
:title => l(:button_delete) %></p>
<% end %>
<p><label><%=h l(:label_add_avatar) %></label><%= file_field_tag "avatar" %></p>
</div>
<%= submit_tag l(:button_save) %>
<% end %>
</div>
<% end %>
4 changes: 4 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# German strings go here
de:
label_avatar: "Avatar"
label_gravatar: "Gravatar"
label_change_gravatar: "Change gravatar"
label_delete: "Delete local avatar"
label_add_avatar: "Add local avatar"
message_avatar_uploaded: "Avatar erfolgreich hochgeladen"
4 changes: 4 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# English strings go here
en:
label_avatar: "Avatar"
label_gravatar: "Gravatar"
label_change_gravatar: "Change gravatar"
label_delete: "Delete local avatar"
label_add_avatar: "Add local avatar"
message_avatar_uploaded: "Avatar uploaded successfully"
4 changes: 4 additions & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
es:
label_avatar: "Avatar"
label_gravatar: "Gravatar"
label_change_gravatar: "Change gravatar"
label_delete: "Delete local avatar"
label_add_avatar: "Add local avatar"
message_avatar_uploaded: "Avatar cargado correctamente"
4 changes: 4 additions & 0 deletions config/locales/ja.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Japanese strings go here
ja:
label_avatar: "アバター"
label_gravatar: "Gravatar"
label_change_gravatar: "Change gravatar"
label_delete: "Delete local avatar"
label_add_avatar: "Add local avatar"
message_avatar_uploaded: "アバターのアップロードを完了しました"

4 changes: 4 additions & 0 deletions config/locales/pl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Polish strings go here
pl:
label_avatar: "Awatar"
label_gravatar: "Gravatar"
label_change_gravatar: "Change gravatar"
label_delete: "Delete local avatar"
label_add_avatar: "Add local avatar"
message_avatar_uploaded: "Awatar został poprawnie załadowany"
4 changes: 4 additions & 0 deletions config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Brazilian portuguese strings go here
pt-BR:
label_avatar: "Avatar"
label_gravatar: "Gravatar"
label_change_gravatar: "Change gravatar"
label_delete: "Delete local avatar"
label_add_avatar: "Add local avatar"
message_avatar_uploaded: "Avatar carregado com sucesso"
4 changes: 4 additions & 0 deletions config/locales/pt.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# portuguese strings go here
pt:
label_avatar: "Avatar"
label_gravatar: "Gravatar"
label_change_gravatar: "Change gravatar"
label_delete: "Delete local avatar"
label_add_avatar: "Add local avatar"
message_avatar_uploaded: "Avatar carregado com sucesso"
4 changes: 4 additions & 0 deletions config/locales/ru.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Russian strings go here
ru:
label_avatar: "Аватар"
label_gravatar: "Gravatar"
label_change_gravatar: "Change gravatar"
label_delete: "Delete local avatar"
label_add_avatar: "Add local avatar"
message_avatar_uploaded: "Аватар успешно загружен"
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
name 'Redmine Local Avatars plugin'
author 'A. Chaika'
description 'This is a plugin for Redmine'
version '0.0.3-forked'
version '0.0.4-forked'
end
2 changes: 0 additions & 2 deletions lang/en.yml

This file was deleted.

5 changes: 0 additions & 5 deletions test/test_helper.rb

This file was deleted.