##// END OF EJS Templates
Added an option to turn user Gravatars on or off...
Eric Davis -
r1970:ba20a678737c
parent child
Show More
@@ -561,6 +561,12 module ApplicationHelper
561 (@has_content && @has_content[name]) || false
561 (@has_content && @has_content[name]) || false
562 end
562 end
563
563
564 def gravatar_for_mail(mail, options = { })
565 if Setting.gravatar_enabled?
566 return gravatar(mail, options) rescue nil
567 end
568 end
569
564 private
570 private
565
571
566 def wiki_helper
572 def wiki_helper
@@ -2,7 +2,7
2 <%= link_to(l(:button_edit), {:controller => 'users', :action => 'edit', :id => @user}, :class => 'icon icon-edit') if User.current.admin? %>
2 <%= link_to(l(:button_edit), {:controller => 'users', :action => 'edit', :id => @user}, :class => 'icon icon-edit') if User.current.admin? %>
3 </div>
3 </div>
4
4
5 <h2><%= gravatar @user.mail unless @user.mail.empty? %> <%=h @user.name %></h2>
5 <h2><%= gravatar_for_mail @user.mail unless @user.mail.empty? %> <%=h @user.name %></h2>
6
6
7 <p>
7 <p>
8 <%= mail_to(h(@user.mail)) unless @user.pref.hide_mail %>
8 <%= mail_to(h(@user.mail)) unless @user.pref.hide_mail %>
@@ -29,4 +29,4
29 <h3><%=l(:label_activity)%></h3>
29 <h3><%=l(:label_activity)%></h3>
30 <p>
30 <p>
31 <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
31 <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
32 </p> No newline at end of file
32 </p>
@@ -4,7 +4,7
4 <h4><div style="float:right;"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
4 <h4><div style="float:right;"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
5 <%= content_tag('a', '', :name => "note-#{journal.indice}")%>
5 <%= content_tag('a', '', :name => "note-#{journal.indice}")%>
6 <%= format_time(journal.created_on) %> - <%= journal.user.name %></h4>
6 <%= format_time(journal.created_on) %> - <%= journal.user.name %></h4>
7 <%= gravatar(journal.user.mail.blank? ? "" : journal.user.mail, :size => "32") %>
7 <%= gravatar_for_mail(journal.user.mail.blank? ? "" : journal.user.mail, :size => "32") %>
8 <ul>
8 <ul>
9 <% for detail in journal.details %>
9 <% for detail in journal.details %>
10 <li><%= show_detail(detail) %></li>
10 <li><%= show_detail(detail) %></li>
@@ -10,7 +10,7
10 <h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
10 <h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
11
11
12 <div class="issue <%= "status-#{@issue.status.position} priority-#{@issue.priority.position}" %>">
12 <div class="issue <%= "status-#{@issue.status.position} priority-#{@issue.priority.position}" %>">
13 <%= gravatar(@issue.author.mail, :size => "64") rescue nil %>
13 <%= gravatar_for_mail(@issue.author.mail, :size => "64") %>
14 <h3><%=h @issue.subject %></h3>
14 <h3><%=h @issue.subject %></h3>
15 <p class="author">
15 <p class="author">
16 <%= authoring @issue.created_on, @issue.author %>.
16 <%= authoring @issue.created_on, @issue.author %>.
@@ -27,7 +27,7
27 <td class="due-date"><b><%=l(:field_due_date)%>:</b></td><td class="due-date"><%= format_date(@issue.due_date) %></td>
27 <td class="due-date"><b><%=l(:field_due_date)%>:</b></td><td class="due-date"><%= format_date(@issue.due_date) %></td>
28 </tr>
28 </tr>
29 <tr>
29 <tr>
30 <td class="assigned-to"><b><%=l(:field_assigned_to)%>:</b></td><td><%= gravatar(@issue.assigned_to.mail, :size => "14") unless @issue.assigned_to.blank?%><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
30 <td class="assigned-to"><b><%=l(:field_assigned_to)%>:</b></td><td><%= gravatar_for_mail(@issue.assigned_to.mail, :size => "14") unless @issue.assigned_to.blank?%><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
31 <td class="progress"><b><%=l(:field_done_ratio)%>:</b></td><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
31 <td class="progress"><b><%=l(:field_done_ratio)%>:</b></td><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
32 </tr>
32 </tr>
33 <tr>
33 <tr>
@@ -7,9 +7,9
7 <dl>
7 <dl>
8 <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
8 <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
9 <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
9 <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
10 <%= gravatar(e.user.mail, :size => "24") if e.respond_to?(:user) rescue nil%>
10 <%= gravatar_for_mail(e.user.mail, :size => "24") if e.respond_to?(:user) %>
11 <%= gravatar(e.author.mail, :size => "24") if e.respond_to?(:author) rescue nil%>
11 <%= gravatar_for_mail(e.author.mail, :size => "24") if e.respond_to?(:author) %>
12 <%= gravatar(e.committer.match('\\<.+?\\>')[0].gsub(/[<>]/, ''), :size => "24") if e.respond_to?(:committer) rescue nil%>
12 <%= gravatar_for_mail(e.committer.match('\\<.+?\\>')[0].gsub(/[<>]/, ''), :size => "24") if e.respond_to?(:committer) rescue nil %>
13 <span class="time"><%= format_time(e.event_datetime, false) %></span>
13 <span class="time"><%= format_time(e.event_datetime, false) %></span>
14 <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
14 <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
15 <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
15 <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
@@ -46,6 +46,9
46
46
47 <p><label><%= l(:setting_feeds_limit) %></label>
47 <p><label><%= l(:setting_feeds_limit) %></label>
48 <%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
48 <%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
49
50 <p><label><%= l(:setting_gravatar_enabled) %></label>
51 <%= check_box_tag 'settings[gravatar_enabled]', 1, Setting.gravatar_enabled? %><%= hidden_field_tag 'settings[gravatar_enabled]', 0 %></p>
49 </div>
52 </div>
50
53
51 <%= submit_tag l(:button_save) %>
54 <%= submit_tag l(:button_save) %>
@@ -29,7 +29,7
29 <tbody>
29 <tbody>
30 <% for user in @users -%>
30 <% for user in @users -%>
31 <tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>">
31 <tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>">
32 <td class="username"><%= gravatar(user.mail.blank? ? "" : user.mail, :size => "24") %><%= link_to h(user.login), :action => 'edit', :id => user %></td>
32 <td class="username"><%= gravatar_for_mail(user.mail.blank? ? "" : user.mail, :size => "24") %><%= link_to h(user.login), :action => 'edit', :id => user %></td>
33 <td class="firstname"><%= h(user.firstname) %></td>
33 <td class="firstname"><%= h(user.firstname) %></td>
34 <td class="lastname"><%= h(user.lastname) %></td>
34 <td class="lastname"><%= h(user.lastname) %></td>
35 <td class="email"><%= mail_to(h(user.mail)) %></td>
35 <td class="email"><%= mail_to(h(user.mail)) %></td>
@@ -135,4 +135,5 emails_footer:
135 default: |-
135 default: |-
136 You have received this notification because you have either subscribed to it, or are involved in it.
136 You have received this notification because you have either subscribed to it, or are involved in it.
137 To change your notification preferences, please click here: http://hostname/my/account
137 To change your notification preferences, please click here: http://hostname/my/account
138
138 gravatar_enabled:
139 default: 0
@@ -222,6 +222,7 setting_enabled_scm: Enabled SCM
222 setting_mail_handler_api_enabled: Enable WS for incoming emails
222 setting_mail_handler_api_enabled: Enable WS for incoming emails
223 setting_mail_handler_api_key: API key
223 setting_mail_handler_api_key: API key
224 setting_sequential_project_identifiers: Generate sequential project identifiers
224 setting_sequential_project_identifiers: Generate sequential project identifiers
225 setting_gravatar_enabled: Use Gravatar user icons
225
226
226 permission_edit_project: Edit project
227 permission_edit_project: Edit project
227 permission_select_project_modules: Select project modules
228 permission_select_project_modules: Select project modules
General Comments 0
You need to be logged in to leave comments. Login now