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"> <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': %>
<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': %> <% if row.tag is 'richtext': %>
<div class="profile-detailsEntry" style="width: 100%;"> <div class="profile-detailsEntry" style="width: 100%;">
<label><%- @Ti( row.display ) %></label> <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 contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @T('Add a Note') %>"><%- @organization[row.name] %></div>
</div> </div>
<% else: %>
<div class="profile-detailsEntry">
<label><%- @Ti( row.display ) %></label>
<%- @L( @P( @organization[row.name] ) ) %>
</div>
<% end %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View file

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