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,7 +12,12 @@
<div class="profile-details horizontal wrap"> <div class="profile-details horizontal wrap">
<% for row in @organizationData: %> <% for row in @organizationData: %>
<% if @organization[row.name]: %> <% if @organization[row.name]: %>
<% if row.tag isnt 'richtext': %> <% 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"> <div class="profile-detailsEntry">
<label><%- @Ti( row.display ) %></label> <label><%- @Ti( row.display ) %></label>
<%- @L( @P( @organization[row.name] ) ) %> <%- @L( @P( @organization[row.name] ) ) %>
@ -20,14 +25,6 @@
<% end %> <% end %>
<% end %> <% 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>
<% end %>
<% end %>
</div> </div>
</div> </div>

View file

@ -14,7 +14,12 @@
<div class="profile-details horizontal wrap"> <div class="profile-details horizontal wrap">
<% for row in @userData: %> <% for row in @userData: %>
<% if @user[row.name]: %> <% if @user[row.name]: %>
<% if row.tag isnt 'richtext': %> <% 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"> <div class="profile-detailsEntry">
<label><%- @Ti( row.display ) %></label> <label><%- @Ti( row.display ) %></label>
<%- @L( @P( @user[row.name] ) ) %> <%- @L( @P( @user[row.name] ) ) %>
@ -22,14 +27,6 @@
<% end %> <% end %>
<% end %> <% 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>
<% end %>
<% end %>
</div> </div>
</div> </div>