From 213ed288be6889d83df6f4fd16dd9b8bf45bf802 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 27 Jan 2015 23:07:06 +0100 Subject: [PATCH] Improved view mode (keep order of attributes). --- .../app/views/organization_profile.jst.eco | 15 ++++++--------- .../javascripts/app/views/user_profile.jst.eco | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/app/assets/javascripts/app/views/organization_profile.jst.eco b/app/assets/javascripts/app/views/organization_profile.jst.eco index 730a6f911..bec092e1b 100644 --- a/app/assets/javascripts/app/views/organization_profile.jst.eco +++ b/app/assets/javascripts/app/views/organization_profile.jst.eco @@ -12,7 +12,12 @@
<% for row in @organizationData: %> <% if @organization[row.name]: %> - <% if row.tag isnt 'richtext': %> + <% if row.tag is 'richtext': %> +
+ +
<%- @organization[row.name] %>
+
+ <% else: %>
<%- @L( @P( @organization[row.name] ) ) %> @@ -20,14 +25,6 @@ <% end %> <% end %> <% end %> - <% for row in @organizationData: %> - <% if row.tag is 'richtext': %> -
- -
<%- @organization[row.name] %>
-
- <% end %> - <% end %>
diff --git a/app/assets/javascripts/app/views/user_profile.jst.eco b/app/assets/javascripts/app/views/user_profile.jst.eco index c4d2e08b3..839f1622d 100644 --- a/app/assets/javascripts/app/views/user_profile.jst.eco +++ b/app/assets/javascripts/app/views/user_profile.jst.eco @@ -14,7 +14,12 @@
<% for row in @userData: %> <% if @user[row.name]: %> - <% if row.tag isnt 'richtext': %> + <% if row.tag is 'richtext': %> +
+ +
<%- @user[row.name] %>
+
+ <% else: %>
<%- @L( @P( @user[row.name] ) ) %> @@ -22,14 +27,6 @@ <% end %> <% end %> <% end %> - <% for row in @userData: %> - <% if row.tag is 'richtext': %> -
- -
<%- @user[row.name] %>
-
- <% end %> - <% end %>