Style detail page

This commit is contained in:
Tobias Eidelpes 2020-05-01 13:31:30 +02:00
parent bce58e7ea4
commit c8902d12ac
2 changed files with 33 additions and 8 deletions

View File

@ -1,3 +1,20 @@
// Place all the styles related to the details controller here. // Place all the styles related to the details controller here.
// They will automatically be included in application.css. // They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/ // You can use Sass (SCSS) here: https://sass-lang.com/
h5 {
font-weight: normal;
opacity: 0.8;
}
.profile-picture {
float: right;
width: 25%;
img {
width: 100%;
max-width: 260px;
height: auto;
object-fit: contain;
}
}

View File

@ -1,13 +1,21 @@
<% if @person != nil %> <% if @person != nil %>
<h2><%= @person['first_name'] %> <%= @person['last_name'] %></h2>
<div class="profile-picture">
<% if @person['picture_uri'] != nil %> <% if @person['picture_uri'] != nil %>
<%= image_tag @host + @person['picture_uri'] %> <%= image_tag @host + @person['picture_uri'] %>
<% end %> <% end %>
<p><%= @person['preceding_titles'] %> <%= @person['first_name'] %> <%= @person['last_name'] %>, </div>
<%= @person['gender'] %> <%= @person['postpositioned_titles'] %></p> <h5><%= @person['preceding_titles'] %> <%= @person['postpositioned_titles'] %></h5>
<% if @person['main_phone_number'] != nil %>
<p>Phone: <%= @person['main_phone_number'] %></p> <p>Phone: <%= @person['main_phone_number'] %></p>
<p>Mail: <%= @person['main_email'] %></p> <% end %>
<p>Other mails: <%= @person['other_emails'] %></p> <p>E-Mail: <%= @person['main_email'] %></p>
<p>Main addresses: <%= @person['main_addresses'] %></p> <% if @person['other_emails'] != [] %>
<p>Other E-Mails: <%= @person['other_emails'] %></p>
<% end %>
<% if @person['main_addresses'] != nil %>
<p>Address: <%= @person['main_addresses'][0]['street'] %>, <%= @person['main_addresses'][0]['zip_code'] %> <%= @person['main_addresses'][0]['city'] %></p>
<% end %>
<!-- <p>Employee: <%#= @person.employee %></p>--> <!-- <p>Employee: <%#= @person.employee %></p>-->
<%= button_to 'Add to favorites', action: :add_to_fav, tiss_id: @person['tiss_id'] %> <%= button_to 'Add to favorites', action: :add_to_fav, tiss_id: @person['tiss_id'] %>
<% end %> <% end %>