fetprofile redesign

This commit is contained in:
Andreas Stephanides
2014-10-27 15:40:12 +01:00
parent 9c5063b047
commit 9a2bf17e81
5 changed files with 52 additions and 25 deletions

View File

@@ -0,0 +1,19 @@
<div class="media">
<span class="pull-left">
<%= image_tag landscape.picture.portrait.url %>
</span>
<div class="media-body">
<h2><%= landscape.name %></h2>
<p><%= landscape.fetmail %></p>
<% if false %>
<p><%= landscape.desc %></p>
<% end %>
</div>
</div>

View File

@@ -0,0 +1,9 @@
<div style="margin-left:auto; margin-right:auto;text-align:center"><%= image_tag portrait.try(:picture).try(:portrait) %>
<br> <span>
<% if portrait.nil?%>
PROFIL fehlt
<% else %>
<%= portrait.name %>
<% end %>
</span>
</div>

View File

@@ -15,36 +15,24 @@
</div> </div>
</div> </div>
<ul class="unstyled fetprofile_list linkbox-list" style="width:100%">
<% @fetprofiles.each do |fetprofile| %>
<li>
<%= link_to fetprofile, {class: :linkbox} do %>
<div class="media"> <% @fetprofiles.each_slice(4) do |row| %>
<div class="row-fluid">
<% row.each do |fetprofile| %>
<div class="span3">
<span class="pull-left"> <%= link_to fetprofile do %>
<%= image_tag fetprofile.picture.portrait.url %> <%= render :partial=>"portrait", :object=>fetprofile %>
</span>
<div class="media-body">
<h2><%= fetprofile.name %></h2>
<p><%= fetprofile.fetmail %></p>
<% if false %>
<p><%= fetprofile.desc %></p>
<% end %> <% end %>
</div> </div>
<% end %>
</div> </div>
<% end %>
</li>
<% end %> <% end %>
</ul>
<div class="row-fluid"> <div class="row-fluid">

View File

@@ -19,6 +19,9 @@
<%= render 'fetprofiles/tabs' %> <%= render 'fetprofiles/tabs' %>
<div class="content-wrap content-column">
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<div style="max-width:70em"> <div style="max-width:70em">
<div class="media"> <div class="media">
@@ -48,3 +51,4 @@
</div> </div>
</div> </div>
<%= render 'layouts/pretty_toolbar' %> <%= render 'layouts/pretty_toolbar' %>
</div>

View File

@@ -1,6 +1,9 @@
<%= render 'fetprofiles/tabs' %> <%= render 'fetprofiles/tabs' %>
<div class="content-wrap content-column">
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<div class="content-wrap content-column"> <div class="content-wrap content-column">
<%= link_to I18n.t('common.edit'), edit_gremium_path(@gremium) if can? :edit, @gremium%>
<div class="container-fluid"> <div class="container-fluid">
<div class="row-fluid"> <div class="row-fluid">
<h1> <h1>
@@ -33,6 +36,9 @@
<%= render(m) %> <%= render(m) %>
<% end %> <% end %>
</p> </p>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
@@ -51,5 +57,6 @@
</div> </div>
</div> </div>
</div> </div>
<%= link_to I18n.t('common.edit'), edit_gremium_path(@gremium) %>
</div>