kete / kete

Kete was developed by Horowhenua Library Trust and Katipo Communications Ltd. to build a digital library of Horowhenua material.

This URL has Read+Write access

kete / app / views / account / _avatar_updater.html.erb
100644 30 lines (29 sloc) 1.225 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<% if ENABLE_USER_PORTRAITS || ENABLE_GRAVATAR_SUPPORT -%>
  <img src="/images/indicator.gif" width="16" height="16" alt="Fetching Avatar. " id="user_avatar_spinner" style="display:none;" />
  <table style="display:inline; margin-left: 15px;">
  <tr>
    <td id="user_avatar_img">
      <% options = { :width => 30, :height => 30, :alt => 'Your Gravatar. ' } -%>
      <% if !current_user.nil? -%>
        <%= avatar_for(current_user, options) -%>
      <% else -%>
        <%= image_tag('no-avatar.png', options) -%>
      <% end -%>
    </td>
    <td width="280">
      <% if ENABLE_USER_PORTRAITS -%>
        <% if !current_user.nil? -%>
          <small>You may designate a picture you have uploaded to the site as your portrait from
          <%= link_to('your profile page', :action => 'show') -%>.</small>
        <% else %>
          <small>You may designate a picture you have uploaded to the site as your portrait after you signup.</small>
        <% end -%>
      <% end -%>
      <% if ENABLE_GRAVATAR_SUPPORT -%>
        <small>This site supports <a href="http://gravatar.com/">Gravatar</a>.</small>
      <% end -%>
    </td>
  </tr>
  </table>
  <%= avatar_updater_js if ENABLE_GRAVATAR_SUPPORT -%>
<% end -%>