Skip to content

Commit

Permalink
Added new user show page
Browse files Browse the repository at this point in the history
  • Loading branch information
laszlokardinal committed Jul 12, 2017
1 parent 7e25bea commit 227a8de
Showing 1 changed file with 62 additions and 29 deletions.
91 changes: 62 additions & 29 deletions web/templates/user/show.html.eex
Original file line number Diff line number Diff line change
@@ -1,31 +1,64 @@
<h2>Show user</h2>

<ul>
<li>
<strong>First Name:</strong>
<%= @user.name %>
</li>
<li>
<strong>Family Name:</strong>
<%= @user.family_name %>
</li>
<li>
<strong>Nickname:</strong>
<%= @user.nickname %>
</li>
<li>
<strong>Email:</strong>
<%= @user.email %>
</li>
<li>
<strong>Student ID:</strong>
<%= @user.student_id %>
</li>
<li>
<strong>Comments:</strong>
<%= @user.comments %>
</li>
</ul>
<div class="row">
<div class="
col-xs-12
col-sm-offset-1 col-sm-10
col-md-offset-2 col-md-8
col-lg-offset-2 col-lg-8
">
<div class="row middle-xs page-header">
<div class="col-xs-6 col-sm-9 col-md-10 page-title">
<%= CoursePlanner.SharedView.display_user_name(@user) %>
</div>
<%= if @conn.assigns.current_user.role == "Coordinator" do %>
<div class="col-xs-6 col-sm-3 col-md-2">
<%= link "Edit", to: user_path(@conn, :edit, @user),
class: "mdl-button mdl-js-button mdl-button--raised"
%>
</div>
<% end %>
</div>

<%= link "Edit", to: user_path(@conn, :edit, @user), class: "btn btn-primary" %>
<%= link "Back", to: user_path(@conn, :index), class: "btn btn-secondary" %>
<div class="page">
<%= CoursePlanner.SharedView.card do %>
<%= CoursePlanner.SharedView.card_content vpadding: true do %>
<div class="row row--hspace row--vspace middle-xs">
<div class="col-xs-3">
<img
src="<%= CoursePlanner.SharedView.get_gravatar_url(@user.email, 500) %>"
class="profile-picture"
>
</div>
<div class="col-xs-9">
<div class="detail">
<div class="detail__name">Name</div>
<div class="detail__value">
<%= CoursePlanner.SharedView.display_user_name(@user) %>
</div>
</div>
<div class="detail">
<div class="detail__name">E-mail</div>
<div class="detail__value">
<%= @user.email %>
</div>
</div>
<div class="detail">
<div class="detail__name">Phone Number</div>
<div class="detail__value">
<%= @user.phone_number %>
</div>
</div>
<div class="detail">
<div class="detail__name">Role</div>
<div class="detail__value">
<%= @user.role %>
</div>
</div>
</div>
</div>
<% end %>
<% end %>

</div>
</div>
</div>

0 comments on commit 227a8de

Please sign in to comment.