From f5da3ac3dcb33799230daba6a86ff4d487c0a079 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 13 Sep 2014 16:35:10 +0200 Subject: [PATCH] fetprofiles --- app/controllers/fetprofiles_controller.rb | 3 ++- app/controllers/gremien_controller.rb | 2 +- app/views/fetprofiles/_compact.html.erb | 2 +- app/views/fetprofiles/_list_row.html.erb | 7 +++++++ app/views/fetprofiles/index.html.erb | 8 ++++++++ app/views/fetprofiles/intern_list.html.erb | 7 +++++++ 6 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 app/views/fetprofiles/_list_row.html.erb create mode 100644 app/views/fetprofiles/intern_list.html.erb diff --git a/app/controllers/fetprofiles_controller.rb b/app/controllers/fetprofiles_controller.rb index fc8e881..ae58913 100644 --- a/app/controllers/fetprofiles_controller.rb +++ b/app/controllers/fetprofiles_controller.rb @@ -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 diff --git a/app/controllers/gremien_controller.rb b/app/controllers/gremien_controller.rb index 6612e8c..93c3b42 100644 --- a/app/controllers/gremien_controller.rb +++ b/app/controllers/gremien_controller.rb @@ -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 diff --git a/app/views/fetprofiles/_compact.html.erb b/app/views/fetprofiles/_compact.html.erb index fe1f3df..bd4fe07 100644 --- a/app/views/fetprofiles/_compact.html.erb +++ b/app/views/fetprofiles/_compact.html.erb @@ -1,7 +1,7 @@
- <%= image_tag fetprofile.picture.portrait.url %> + <%= image_tag fetprofile.picture.thumb.url %>
diff --git a/app/views/fetprofiles/_list_row.html.erb b/app/views/fetprofiles/_list_row.html.erb new file mode 100644 index 0000000..e3856f0 --- /dev/null +++ b/app/views/fetprofiles/_list_row.html.erb @@ -0,0 +1,7 @@ + +<%= image_tag list_row.picture.thumb.url %> +<%= list_row.name %> +<%= list_row.short %> +<%= list_row.fetmail %> + + diff --git a/app/views/fetprofiles/index.html.erb b/app/views/fetprofiles/index.html.erb index 21c64a6..0bab083 100644 --- a/app/views/fetprofiles/index.html.erb +++ b/app/views/fetprofiles/index.html.erb @@ -10,6 +10,7 @@
<%= render 'layouts/pretty_toolbar' %> + <% link_to I18n.t('profile.new_profile'), new_fetprofile_path %>
@@ -45,6 +46,13 @@ + +
+
+ <%= link_to I18n.t('profile.new_profile'), new_fetprofile_path %> +
+
+
diff --git a/app/views/fetprofiles/intern_list.html.erb b/app/views/fetprofiles/intern_list.html.erb new file mode 100644 index 0000000..6a31724 --- /dev/null +++ b/app/views/fetprofiles/intern_list.html.erb @@ -0,0 +1,7 @@ +Liste + + +<% @fetprofiles.each do |fp| %> +<%= render partial: "fetprofiles/list_row", object: fp %> +<% end %> +
NameE-Mail