fetprofiles

This commit is contained in:
Andreas Stephanides
2014-09-13 16:35:10 +02:00
parent f0e5c0b192
commit f5da3ac3dc
6 changed files with 26 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ class FetprofilesController < ApplicationController
@fetprofiles = Fetprofile.order(:vorname,:nachname) if params[:filter]== "all"
@fetprofiles = Fetprofile.where(:active=>false).order(:nachname,:vorname) if params[:filter]== "notactive"
@gremientabs = Gremium.tabs
@toolbar_elements << {:hicon=>'icon-plus', :text=> I18n.t('profile.new_profile'),:path => new_fetprofile_path(@fetprofile) } if can? :new, @fetprofile
@@ -16,11 +17,11 @@ class FetprofilesController < ApplicationController
format.html # index.html.erb
end
end
def internlist
@fetprofiles = Fetprofile.order(:vorname,:nachname)
end
# GET /fetprofiles/1
# GET /fetprofiles/1.json
def show

View File

@@ -33,7 +33,7 @@ class GremienController < ApplicationController
def show
@gremium = Gremium.find(params[:id])
@gremientabs=Gremium.tabs
@memberships=@gremium.memberships.active.includes(:fetprofile).order(:typ,"fetprofiles.vorname","fetprofiles.nachname")
@memberships=@gremium.memberships.active.includes(:fetprofile).order(:typ,"fetprofiles.vorname","fetprofiles.nachname")
respond_to do |format|
format.html # show.html.erb

View File

@@ -1,7 +1,7 @@
<div class="media">
<span class="pull-left">
<%= image_tag fetprofile.picture.portrait.url %>
<%= image_tag fetprofile.picture.thumb.url %>
</span>
<div class="media-body">

View File

@@ -0,0 +1,7 @@
<tr>
<td><%= image_tag list_row.picture.thumb.url %> </td>
<td><%= list_row.name %> </td>
<td><%= list_row.short %> </td>
<td><%= list_row.fetmail %> </td>
</tr>

View File

@@ -10,6 +10,7 @@
<div class="span12">
<%= render 'layouts/pretty_toolbar' %>
<% link_to I18n.t('profile.new_profile'), new_fetprofile_path %>
</div>
</div>
@@ -45,6 +46,13 @@
</ul>
<div class="row-fluid">
<div class="span12">
<%= link_to I18n.t('profile.new_profile'), new_fetprofile_path %>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,7 @@
Liste
<table>
<tr><th></th><th>Name</th><th></th><th>E-Mail</th></tr>
<% @fetprofiles.each do |fp| %>
<%= render partial: "fetprofiles/list_row", object: fp %>
<% end %>
</table>