lib/generators/bootswatch_rails/sorcery/templates/show.html.erb in bootswatch_rails-3.2.0.33 vs lib/generators/bootswatch_rails/sorcery/templates/show.html.erb in bootswatch_rails-3.2.0.34

- old
+ new

@@ -16,19 +16,25 @@ </tr> <tr> <td><%%= t('activerecord.attributes.<%= name %>.comment') %></td> <td><%%= raw(@<%= name %>.comment) %></td> </tr> -<%- if has_picture? -%> - <%%- if @<%= name %>.picture.present? -%> +<%- if options.picture? -%> + <%%- if @<%= name %>.picture? -%> <tr> <td><%%= t('activerecord.attributes.<%= name %>.picture') %></td> - <td><%%= image_tag(@<%= name %>.picture_url(:avatar)) %></td> + <td><%%= image_tag(<%= name %>.picture_url(:avatar).to_s) %></td> </tr> <%%- end -%> <%- end -%> +<%- if options.gravatar? -%> <tr> + <td><%%= t('activerecord.attributes.<%= name %>.gravatar') %></td> + <td><%%= image_tag(gravatar_url(@<%= name %>, 200)) %></td> + </tr> +<%- end -%> + <tr> <td><%%= t('activerecord.attributes.<%= name %>.theme') %></td> <td><%%= @<%= name %>.theme %></td> </tr> <tr> <td><%%= t('activerecord.attributes.<%= name %>.active') %></td> @@ -36,11 +42,11 @@ </tr> <tr> <td><%%= t('activerecord.attributes.<%= name %>.sysadm') %></td> <td><%%= @<%= name %>.sysadm ? t('simple_form.yes') : t('simple_form.no') %></td> </tr> -<%- if activity_logging? -%> +<%- if options.activity_logging? -%> <%%- if @<%= name %>.last_login_at.present? -%> <tr> <td><%%= t('activerecord.attributes.<%= name %>.last_login_at') %></td> <td><%%= l(@<%= name %>.last_login_at) %></td> </tr> @@ -48,17 +54,17 @@ <td><%%= t('activerecord.attributes.<%= name %>.last_login_from_ip_address') %></td> <td><%%= @<%= name %>.last_login_from_ip_address %></td> </tr> <%%- end -%> <%- end -%> -<%- if brute_force_protection? -%> +<%- if options.brute_force_protection? -%> <tr> <td><%%= t('activerecord.attributes.<%= name %>.failed_logins_count') %></td> <td><%%= @<%= name %>.failed_logins_count %></td> </tr> <%- end -%> -<%- if activity_logging? -%> +<%- if options.activity_logging? -%> <%%- if @<%= name %>.last_logout_at.present? -%> <tr> <td><%%= t('activerecord.attributes.<%= name %>.last_logout_at') %></td> <td><%%= l(@<%= name %>.last_logout_at) %></td> </tr> @@ -68,10 +74,10 @@ <td><%%= t('activerecord.attributes.<%= name %>.last_activity_at') %></td> <td><%%= l(@<%= name %>.last_activity_at) %></td> </tr> <%%- end -%> <%- end -%> -<%- if brute_force_protection? -%> +<%- if options.brute_force_protection? -%> <%%- if @<%= name %>.lock_expires_at.present? -%> <tr> <td><%%= t('activerecord.attributes.<%= name %>.lock_expires_at') %></td> <td><%%= l(@<%= name %>.lock_expires_at) %></td> </tr>