Streamline of layout and markup for user/organization in sidebar/widget and user/orzanization/ticket in popovers.

This commit is contained in:
Martin Edenhofer 2015-02-08 14:22:03 +01:00
parent 0cb3055441
commit 9a80a313ac
6 changed files with 77 additions and 53 deletions

View file

@ -1,20 +1,19 @@
<hr> <hr>
<div>
<% for row in @organizationData: %> <% for row in @organizationData: %>
<% if @organization[row.name]: %> <% if @organization[row.name]: %>
<div class="column"> <div class="popover-block">
<h3><%- @T( row.display ) %></h3> <label><%- @T( row.display ) %></label>
<div><%- @P( @organization, row.name ) %></div> <%- @P( @organization, row.name ) %>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<% if @organization.members: %> <% if @organization.members: %>
<hr> <hr>
<h3><%- @T('Members') %></h3> <div class="popover-block">
<label><%- @T('Members') %></label>
<% for user in @organization.members: %> <% for user in @organization.members: %>
<div class="person"> <div class="person"><%= user.displayName() %></div>
<%= user.displayName() %>
</div>
<% end %> <% end %>
</div>
<% end %> <% end %>

View file

@ -2,36 +2,40 @@
<span class="<%- @ticket.icon() %>" title="<%- @ticket.iconTitle() %>"></span> <span class="<%- @ticket.iconTextClass() %>"><%- @ticket.iconTitle() %></span> <span class="<%- @ticket.icon() %>" title="<%- @ticket.iconTitle() %>"></span> <span class="<%- @ticket.iconTextClass() %>"><%- @ticket.iconTitle() %></span>
</div> </div>
<hr> <hr>
<h3><%- @T('Agent') %></h3> <div class="popover-block">
<div class="person"> <label><%- @T('Agent') %></label>
<div class="person">
<%= @ticket.owner.displayName() %> <%= @ticket.owner.displayName() %>
<% if @ticket.owner.organization: %> <% if @ticket.owner.organization: %>
<span class="organization"><%= @ticket.owner.organization.displayName() %></span> <span class="organization"><%= @ticket.owner.organization.displayName() %></span>
<% end %> <% end %>
</div>
</div> </div>
<h3><%- @T('Customer') %></h3> <div class="popover-block">
<div class="person"> <label><%- @T('Customer') %></label>
<div class="person">
<%= @ticket.customer.displayName() %> <%= @ticket.customer.displayName() %>
<% if @ticket.customer.organization: %> <% if @ticket.customer.organization: %>
<span class="organization"><%= @ticket.customer.organization.displayName() %></span> <span class="organization"><%= @ticket.customer.organization.displayName() %></span>
<% end %> <% end %>
</div>
</div> </div>
<hr> <hr>
<div class="horizontal two-columns"> <div class="horizontal two-columns">
<div class="column"> <div class="column">
<h3>#</h3> <label>#</label>
<div class="u-textTruncate"><%- @P( @ticket, 'number' ) %></div> <div class="u-textTruncate"><%- @P( @ticket, 'number' ) %></div>
</div> </div>
<div class="column"> <div class="column">
<h3><%- @T( 'Priority' ) %></h3> <label><%- @T( 'Priority' ) %></label>
<div class="u-textTruncate"><%- @P( @ticket, 'priority' ) %></div> <div class="u-textTruncate"><%- @P( @ticket, 'priority' ) %></div>
</div> </div>
<div class="column"> <div class="column">
<h3><%- @T( 'Created' ) %></h3> <label><%- @T( 'Created' ) %></label>
<div class="u-textTruncate"><%- @P( @ticket, 'created_at' ) %></div> <div class="u-textTruncate"><%- @P( @ticket, 'created_at' ) %></div>
</div> </div>
<div class="column"> <div class="column">
<h3><%- @T( 'Group' ) %></h3> <label><%- @T( 'Group' ) %></label>
<div class="u-textTruncate"><%- @P( @ticket, 'group' ) %></div> <div class="u-textTruncate"><%- @P( @ticket, 'group' ) %></div>
</div> </div>
</div> </div>

View file

@ -5,15 +5,15 @@
<div> <div>
<% for row in @userData: %> <% for row in @userData: %>
<% if @user[row.name]: %> <% if @user[row.name]: %>
<div class="column"> <div class="popover-block">
<h3><%- @T( row.display ) %></h3> <label><%- @T( row.display ) %></label>
<div><%- @P( @user, row.name ) %></div> <%- @P( @user, row.name ) %>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
<% if !_.isEmpty(@user['accounts']): %> <% if !_.isEmpty(@user['accounts']): %>
<div class="customer-info"> <div class="popover-block">
<h3><%- @T( 'Linked Accounts' ) %></h3> <label><%- @T( 'Linked Accounts' ) %></label>
<% for account of @user['accounts']: %> <% for account of @user['accounts']: %>
<a href="<%= @user['accounts'][account]['link'] %>" target="_blank"><%= account %></a> <a href="<%= @user['accounts'][account]['link'] %>" target="_blank"><%= account %></a>
<% end %> <% end %>
@ -21,8 +21,8 @@
<% end %> <% end %>
<% if !_.isEmpty( @user['links'] ): %> <% if !_.isEmpty( @user['links'] ): %>
<% for link in @user['links']: %> <% for link in @user['links']: %>
<div class="customer-info"> <div class="popover-block">
<h3><%- @T( link['title'] ) %></h3> <label><%- @T( link['title'] ) %></label>
<% for item in link['items']: %> <% for item in link['items']: %>
<% if item['url']: %> <% if item['url']: %>
<a href="<%= item['url'] %>" title="<%- @Ti( item['title'] ) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>" <% if link.new_window: %>target="_blank"<% end %>> <a href="<%= item['url'] %>" title="<%- @Ti( item['title'] ) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>" <% if link.new_window: %>target="_blank"<% end %>>

View file

@ -1,7 +1,8 @@
<div class="sidebar-block"> <div class="sidebar-block">
<h3 class="u-textTruncate" title="<%- @Ti( 'Name') %>"> <div class="avatar organizationInfo-avatar size-50">
<%= @organization.displayName() %> <a href="<%- @organization.uiUrl() %>" class="organization icon"></a>
</h3> </div>
<h3 title="<%- @Ti( 'Name') %>"><%= @organization.displayName() %></h3>
</div> </div>
<% for row in @organizationData: %> <% for row in @organizationData: %>

View file

@ -1,10 +1,7 @@
<div class="userInfo"> <div class="sidebar-block">
<div class="sidebar-block">
<%- @user.avatar("50", "", "userInfo-avatar") %> <%- @user.avatar("50", "", "userInfo-avatar") %>
<h3 class="u-textTruncate" title="<%- @Ti( 'Name') %>"> <h3 title="<%- @Ti( 'Name') %>"><%= @user.displayName() %></h3>
<%= @user.displayName() %> </div>
</h3>
</div>
<% for row in @userData: %> <% for row in @userData: %>
<% if @user[row.name] || row.name is 'note': %> <% if @user[row.name] || row.name is 'note': %>
<div class="sidebar-block"> <div class="sidebar-block">
@ -46,4 +43,3 @@
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
</div>

View file

@ -2572,12 +2572,18 @@ footer {
.sidebar-block { .sidebar-block {
margin: 20px 0; margin: 20px 0;
word-wrap: break-word;
&:first-child { &:first-child {
margin-top: 0; margin-top: 0;
} }
} }
.sidebar-block,
.sidebar-block > * {
@extend .u-textTruncate;
}
.sidebar-block [contenteditable=true] {
white-space: normal; // do no u-textTruncate, we want to edit it inline
}
.main + .sidebar { .main + .sidebar {
border-right: none; border-right: none;
@ -2741,10 +2747,16 @@ footer {
} }
.popover .user-organization { .popover .user-organization {
@extend .u-textTruncate;
margin-bottom: 8px; margin-bottom: 8px;
margin-top: -4px; margin-top: -4px;
} }
.popover-block {
@extend .sidebar-block;
margin: 10px 0;
}
.popover hr { .popover hr {
margin: 8px 0; margin: 8px 0;
} }
@ -2752,7 +2764,15 @@ footer {
.popover .person .organization:before { content: '('; } .popover .person .organization:before { content: '('; }
.popover .person .organization:after { content: ')'; } .popover .person .organization:after { content: ')'; }
.popover .column h3 { .popover label {
font-size: 13px;
color: #a9bcc4;
font-weight: 200;
text-transform: uppercase;
letter-spacing: 0.07em;
}
.popover .column label {
margin: 8px 0 1px; margin: 8px 0 1px;
} }
@ -4403,22 +4423,26 @@ footer {
position: relative; position: relative;
} }
.organizationInfo-avatar {
@extend .userInfo-avatar;
padding: 18px 0 0 18px;
}
.userList { .userList {
list-style: none; list-style: none;
padding: 0; padding: 0;
li { li {
@extend .horizontal; position: relative;
@extend .center;
margin: 10px 0; margin: 10px 0;
} }
a { a {
@extend .u-textTruncate; @extend .u-textTruncate;
} position: absolute;
top: 10px;
.avatar { right: 0px;
margin-right: 7px; left: 48px;
} }
} }