From 9a2bf17e81e55383b4a1c234eea3b0b88d829eec Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 27 Oct 2014 15:40:12 +0100 Subject: [PATCH] fetprofile redesign --- app/views/fetprofiles/_landscape.html.erb | 19 ++++++++++++ app/views/fetprofiles/_portrait.html.erb | 9 ++++++ app/views/fetprofiles/index.html.erb | 36 ++++++++--------------- app/views/fetprofiles/show.html.erb | 4 +++ app/views/gremien/show.html.erb | 9 +++++- 5 files changed, 52 insertions(+), 25 deletions(-) create mode 100644 app/views/fetprofiles/_landscape.html.erb create mode 100644 app/views/fetprofiles/_portrait.html.erb diff --git a/app/views/fetprofiles/_landscape.html.erb b/app/views/fetprofiles/_landscape.html.erb new file mode 100644 index 0000000..4385238 --- /dev/null +++ b/app/views/fetprofiles/_landscape.html.erb @@ -0,0 +1,19 @@ + +
+ + + <%= image_tag landscape.picture.portrait.url %> + + +
+

<%= landscape.name %>

+ +

<%= landscape.fetmail %>

+ <% if false %> +

<%= landscape.desc %>

+ <% end %> + +
+ +
+ diff --git a/app/views/fetprofiles/_portrait.html.erb b/app/views/fetprofiles/_portrait.html.erb new file mode 100644 index 0000000..2829791 --- /dev/null +++ b/app/views/fetprofiles/_portrait.html.erb @@ -0,0 +1,9 @@ +
<%= image_tag portrait.try(:picture).try(:portrait) %> +
+ <% if portrait.nil?%> + PROFIL fehlt + <% else %> + <%= portrait.name %> + <% end %> + +
diff --git a/app/views/fetprofiles/index.html.erb b/app/views/fetprofiles/index.html.erb index 0bab083..22423e1 100644 --- a/app/views/fetprofiles/index.html.erb +++ b/app/views/fetprofiles/index.html.erb @@ -15,36 +15,24 @@ -
diff --git a/app/views/fetprofiles/show.html.erb b/app/views/fetprofiles/show.html.erb index 9b33949..5af8003 100644 --- a/app/views/fetprofiles/show.html.erb +++ b/app/views/fetprofiles/show.html.erb @@ -19,6 +19,9 @@ <%= render 'fetprofiles/tabs' %> + +
+

<%= notice %>

@@ -48,3 +51,4 @@
<%= render 'layouts/pretty_toolbar' %> +
diff --git a/app/views/gremien/show.html.erb b/app/views/gremien/show.html.erb index 3fca709..10ea53e 100644 --- a/app/views/gremien/show.html.erb +++ b/app/views/gremien/show.html.erb @@ -1,6 +1,9 @@ <%= render 'fetprofiles/tabs' %> +
+

<%= notice %>

+ <%= link_to I18n.t('common.edit'), edit_gremium_path(@gremium) if can? :edit, @gremium%>

@@ -33,6 +36,9 @@ <%= render(m) %> <% end %>

+ + +

<% end %> <% end %> @@ -51,5 +57,6 @@
- <%= link_to I18n.t('common.edit'), edit_gremium_path(@gremium) %> + +