forked from bofh/fetsite
Views & Logik Membership, Fetprofile, Gremium
This commit is contained in:
12
app/views/fetprofiles/_fetprofile.html.erb
Normal file
12
app/views/fetprofiles/_fetprofile.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
<div class="media">
|
||||
<div class="pull-left">
|
||||
<%= image_tag fetprofile.picture.portrait.url %>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
|
||||
<h2><%= link_to fetprofile.name, fetprofile %></h2>
|
||||
<p><%= fetprofile.fetmail %></p>
|
||||
<p><%= fetprofile.desc.split(" ")[1..20].join(" ") %></p>
|
||||
<p><%= fetprofile.active %> </p>
|
||||
</div>
|
||||
24
app/views/fetprofiles/_tabs.html.erb
Normal file
24
app/views/fetprofiles/_tabs.html.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li <%= (request.fullpath == fetprofiles_path(filter: "active")|| request.fullpath == fetprofiles_path) ? 'class="active"'.html_safe : ''%> >
|
||||
<%= link_to "Aktive Mitglieder" , fetprofiles_path( filter: "active") %> </li>
|
||||
|
||||
<% for g in @gremientabs %>
|
||||
<li <%= (!@gremium.nil? && g == @gremium) ? 'class="active"'.html_safe : '' %> title="<%= g.name %>">
|
||||
<%= link_to g.name, g %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li <%= (request.fullpath == fetprofiles_path(filter: "all")) ? 'class="active"'.html_safe : ''%> >
|
||||
<%= link_to "Alle Mitglieder" , fetprofiles_path( filter: "all") %> </li>
|
||||
|
||||
|
||||
<% if can?(:verwalten,Gremium) %>
|
||||
<% if request.fullpath == gremien_path %>
|
||||
<li class="active pull-right">
|
||||
<% else %>
|
||||
<li class="pull-right">
|
||||
<% end %>
|
||||
<%= link_to "Verwaltung", gremien_path %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
@@ -1,19 +1,29 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h1>Listing fetprofiles</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% @fetprofiles.each do |fetprofile| %>
|
||||
<div class="row-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= render 'fetprofiles/tabs' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h1>
|
||||
<%= I18n.t 'fetprofiles.all' if params[:filter] == "all" %>
|
||||
<%= I18n.t 'fetprofiles.active' if params[:filter].nil? || params[:filter]== "active"
|
||||
%>
|
||||
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<% @fetprofiles.each do |fetprofile| %>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<%= image_tag fetprofile.picture.portrait.url %>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<h2><%= link_to fetprofile.name, fetprofile %></h2>
|
||||
<p><%= fetprofile.fetmailalias %></p>
|
||||
<p><%= fetprofile.fetmail %></p>
|
||||
<p><%= fetprofile.desc %></p>
|
||||
<p><%= fetprofile.active %> </p>
|
||||
</div>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= render 'fetprofiles/tabs' %>
|
||||
<h1>
|
||||
<%= @gremium.name %>
|
||||
</h1>
|
||||
<p>
|
||||
<%= @gremium.desc %>
|
||||
</p>
|
||||
|
||||
<% @gremium.memberships.order(:typ).active.each do |m| %>
|
||||
<%= image_tag m.fetprofile.picture.portrait %>
|
||||
<%= m.fetprofile.name + " ist" + render(m) %>
|
||||
<% end %>
|
||||
<p>
|
||||
<b>Desc:</b>
|
||||
<%= @gremium.desc %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Typ:</b>
|
||||
<%= Gremium::TYPEN[@gremium.typ.to_i].to_s %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_gremium_path(@gremium) %> |
|
||||
<%= link_to 'Back', gremien_path %>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<%= "seit" if membership.stop.nil? %>
|
||||
<%= membership.stop.nil? ? "seit " : "von " %>
|
||||
<%=membership.start.to_s %>
|
||||
<%= " bis "+membership.stop.to_s unless membership.stop.nil? %>
|
||||
<%= Membership::TYPEN[membership.typ.to_i] %>
|
||||
|
||||
Reference in New Issue
Block a user