show.html.erb 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <% provide(:title, @user.name) %>
  2. <div class="row">
  3. <aside class="col-lg-4 col-md-6">
  4. <section class="user-info">
  5. <%= link_to @user.picture.url do %>
  6. <%= image_tag @user.picture.medium.url, class: 'profile-picture' if @user.picture? %>
  7. <% end %>
  8. <h1>
  9. <%= @user.name %>
  10. </h1>
  11. <ul>
  12. <li class="user-gender">
  13. Gender: <%= @user.gender.capitalize %>
  14. </li>
  15. <li class="user-age">
  16. Age: <%= age_in_completed_years @user.birth_date %> years
  17. </li>
  18. <li class="user-email">
  19. <%= link_to fa_icon("envelope fw", text: @user.email), "mailto:#{@user.email}" %>
  20. </li>
  21. <li class="user-phone">
  22. <%= fa_icon("phone fw", text: @user.phone) %>
  23. </li>
  24. </ul>
  25. <% if current_user.is_administrator_at?(@user.school) %>
  26. <%= link_to edit_user_path(@user), class: 'btn btn-primary' do %>
  27. <%= fa_icon 'edit', text: "Edit details" %>
  28. <% end %>
  29. <% end %>
  30. </section>
  31. </aside>
  32. </div>