Improved view mode (keep order of attributes).

This commit is contained in:
Martin Edenhofer 2015-01-27 23:07:06 +01:00
parent 82bd74d73d
commit 213ed288be
2 changed files with 12 additions and 18 deletions

View file

@ -12,20 +12,17 @@
<div class="profile-details horizontal wrap">
<% for row in @organizationData: %>
<% if @organization[row.name]: %>
<% if row.tag isnt 'richtext': %>
<div class="profile-detailsEntry">
<label><%- @Ti( row.display ) %></label>
<%- @L( @P( @organization[row.name] ) ) %>
</div>
<% end %>
<% end %>
<% end %>
<% for row in @organizationData: %>
<% if row.tag is 'richtext': %>
<div class="profile-detailsEntry" style="width: 100%;">
<label><%- @Ti( row.display ) %></label>
<div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @T('Add a Note') %>"><%- @organization[row.name] %></div>
</div>
<% else: %>
<div class="profile-detailsEntry">
<label><%- @Ti( row.display ) %></label>
<%- @L( @P( @organization[row.name] ) ) %>
</div>
<% end %>
<% end %>
<% end %>
</div>

View file

@ -14,20 +14,17 @@
<div class="profile-details horizontal wrap">
<% for row in @userData: %>
<% if @user[row.name]: %>
<% if row.tag isnt 'richtext': %>
<div class="profile-detailsEntry">
<label><%- @Ti( row.display ) %></label>
<%- @L( @P( @user[row.name] ) ) %>
</div>
<% end %>
<% end %>
<% end %>
<% for row in @userData: %>
<% if row.tag is 'richtext': %>
<div class="profile-detailsEntry" style="width: 100%;">
<label><%- @Ti( row.display ) %></label>
<div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @T('Add a Note') %>"><%- @user[row.name] %></div>
</div>
<% else: %>
<div class="profile-detailsEntry">
<label><%- @Ti( row.display ) %></label>
<%- @L( @P( @user[row.name] ) ) %>
</div>
<% end %>
<% end %>
<% end %>
</div>