rename zoom to profile for users and organizations

This commit is contained in:
Felix Niklas 2014-11-10 12:09:01 +01:00
parent 88ef274c63
commit a000655ea4
13 changed files with 94 additions and 88 deletions

View file

@ -249,7 +249,7 @@ class App.Controller extends Spine.Controller
if !@isRole('Customer') if !@isRole('Customer')
@el.find('.user-popover').bind('click', (e) => @el.find('.user-popover').bind('click', (e) =>
user_id = $(e.target).data('id') user_id = $(e.target).data('id')
@navigate "#user/zoom/#{user_id}" @navigate "#user/profile/#{user_id}"
); );
@userPopupsDestroy() @userPopupsDestroy()

View file

@ -579,15 +579,15 @@ class ImportWizard extends App.ControllerContent
App.Config.set( 'layout_ref/import_wizard', ImportWizard, 'Routes' ) App.Config.set( 'layout_ref/import_wizard', ImportWizard, 'Routes' )
class UserZoom extends App.ControllerContent class ReferenceUserProfile extends App.ControllerContent
constructor: -> constructor: ->
super super
@render() @render()
render: -> render: ->
@html App.view('layout_ref/user_zoom')() @html App.view('layout_ref/user_profile')()
App.Config.set( 'layout_ref/user_zoom', UserZoom, 'Routes' ) App.Config.set( 'layout_ref/user_profile', ReferenceUserProfile, 'Routes' )
App.Config.set( 'LayoutRef', { prio: 1700, parent: '#current_user', name: 'Layout Reference', target: '#layout_ref', role: [ 'Admin' ] }, 'NavBarRight' ) App.Config.set( 'LayoutRef', { prio: 1700, parent: '#current_user', name: 'Layout Reference', target: '#layout_ref', role: [ 'Admin' ] }, 'NavBarRight' )

View file

@ -1,4 +1,4 @@
class App.OrganizationZoom extends App.Controller class App.OrganizationProfile extends App.Controller
constructor: (params) -> constructor: (params) ->
super super
@ -30,7 +30,7 @@ class App.OrganizationZoom extends App.Controller
meta meta
url: => url: =>
'#organization/zoom/' + @organization_id '#organization/profile/' + @organization_id
show: => show: =>
App.OnlineNotification.seen( 'Organization', @organization_id ) App.OnlineNotification.seen( 'Organization', @organization_id )
@ -64,7 +64,7 @@ class App.OrganizationZoom extends App.Controller
if item.info if item.info
organizationData.push item organizationData.push item
@html App.view('organization_zoom')( @html App.view('organization_profile')(
organization: organization organization: organization
organizationData: organizationData organizationData: organizationData
) )
@ -124,6 +124,6 @@ class Router extends App.ControllerPermanent
clean_params = clean_params =
organization_id: params.organization_id organization_id: params.organization_id
App.TaskManager.add( 'Organization-' + @organization_id, 'OrganizationZoom', clean_params ) App.TaskManager.add( 'Organization-' + @organization_id, 'OrganizationProfile', clean_params )
App.Config.set( 'organization/zoom/:organization_id', Router, 'Routes' ) App.Config.set( 'organization/profile/:organization_id', Router, 'Routes' )

View file

@ -1,4 +1,4 @@
class App.UserZoom extends App.Controller class App.UserProfile extends App.Controller
events: events:
'focusout [data-type=update]': 'update', 'focusout [data-type=update]': 'update',
@ -32,7 +32,7 @@ class App.UserZoom extends App.Controller
meta meta
url: => url: =>
'#user/zoom/' + @user_id '#user/profile/' + @user_id
show: => show: =>
App.OnlineNotification.seen( 'User', @user_id ) App.OnlineNotification.seen( 'User', @user_id )
@ -66,7 +66,7 @@ class App.UserZoom extends App.Controller
if item.info if item.info
userData.push item userData.push item
@html App.view('user_zoom')( @html App.view('user_profile')(
user: user user: user
userData: userData userData: userData
) )
@ -135,6 +135,6 @@ class Router extends App.ControllerPermanent
clean_params = clean_params =
user_id: params.user_id user_id: params.user_id
App.TaskManager.add( 'User-' + @user_id, 'UserZoom', clean_params ) App.TaskManager.add( 'User-' + @user_id, 'UserProfile', clean_params )
App.Config.set( 'user/zoom/:user_id', Router, 'Routes' ) App.Config.set( 'user/profile/:user_id', Router, 'Routes' )

View file

@ -1,4 +1,10 @@
class App.TicketStats extends App.Controller class App.TicketStats extends App.Controller
elements:
'.js-userTab': 'userTabButton'
'.js-orgTab': 'orgTabButton'
'.js-user': 'userTab'
'.js-org': 'orgTab'
events: events:
'click .js-userTab': 'showUserTab' 'click .js-userTab': 'showUserTab'
'click .js-orgTab': 'showOrgTab' 'click .js-orgTab': 'showOrgTab'
@ -39,16 +45,16 @@ class App.TicketStats extends App.Controller
) )
showOrgTab: => showOrgTab: =>
@$('.js-userTab').removeClass('active') @userTabButton.removeClass('active')
@$('.js-orgTab').addClass('active') @orgTabButton.addClass('active')
@$('.js-user').addClass('hide') @userTab.addClass('hide')
@$('.js-org').removeClass('hide') @orgTab.removeClass('hide')
showUserTab: => showUserTab: =>
@$('.js-userTab').addClass('active') @userTabButton.addClass('active')
@$('.js-orgTab').removeClass('active') @orgTabButton.removeClass('active')
@$('.js-user').removeClass('hide') @userTab.removeClass('hide')
@$('.js-org').addClass('hide') @orgTab.addClass('hide')
render: (data) => render: (data) =>

View file

@ -15,7 +15,7 @@ class App.Organization extends App.Model
] ]
uiUrl: -> uiUrl: ->
'#organization/zoom/' + @id '#organization/profile/' + @id
icon: (user) -> icon: (user) ->
"organisation icon" "organisation icon"

View file

@ -31,7 +31,7 @@ class App.User extends App.Model
] ]
uiUrl: -> uiUrl: ->
'#user/zoom/' + @id '#user/profile/' + @id
icon: (user) -> icon: (user) ->
"user icon" "user icon"

View file

@ -15,7 +15,7 @@
<li>Communication Reply - with content <a href="#layout_ref/communication_reply/content">Example</a></li> <li>Communication Reply - with content <a href="#layout_ref/communication_reply/content">Example</a></li>
<li>Communication Reply - with multiline content <a href="#layout_ref/communication_reply/mulit_line_content">Example</a></li> <li>Communication Reply - with multiline content <a href="#layout_ref/communication_reply/mulit_line_content">Example</a></li>
<li><a href="#layout_ref/import_wizard">Import Wizard</a></li> <li><a href="#layout_ref/import_wizard">Import Wizard</a></li>
<li><a href="#layout_ref/user_zoom">User Profile</a></li> <li><a href="#layout_ref/user_profile">User Profile</a></li>
</ul> </ul>
</div> </div>

View file

@ -1,14 +1,14 @@
<div class="flex userZoom"> <div class="flex profile">
<div class="userZoom-window"> <div class="profile-window">
<div class="userZoom-section vertical centered"> <div class="profile-section vertical centered">
<div class="align-right userZoom-action dropdown dropdown--actions"> <div class="align-right profile-action dropdown dropdown--actions">
<div class="dropdown-toggle horizontal center" id="userAction" data-toggle="dropdown"> <div class="dropdown-toggle horizontal center" id="profileAction" data-toggle="dropdown">
<div class="light cog icon"></div> <div class="light cog icon"></div>
<label>Aktion</label> <label>Aktion</label>
<span class="select-arrow icon"></span> <span class="select-arrow icon"></span>
</div> </div>
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="userAction"> <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="profileAction">
<li role="presentation"><a role="menuitem" tabindex="-1">Kontaktdaten bearbeiten</a> <li role="presentation"><a role="menuitem" tabindex="-1">Kontaktdaten bearbeiten</a>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Änderungsprotokoll</a> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Änderungsprotokoll</a>
<li role="presentation"><a role="menuitem" tabindex="-1">Benutzer zusammenführen</a> <li role="presentation"><a role="menuitem" tabindex="-1">Benutzer zusammenführen</a>
@ -17,53 +17,53 @@
</div> </div>
<div class="avatar size-80" style="background-image: url(https://pbs.twimg.com/profile_images/1216362658/DSC_0084-p_bigger.jpg)"></div> <div class="avatar size-80" style="background-image: url(https://pbs.twimg.com/profile_images/1216362658/DSC_0084-p_bigger.jpg)"></div>
<h1>Doreen Kubiak</h1> <h1>Doreen Kubiak</h1>
<div class="userZoom-organisation">Steuerbüro C. Kaik</div> <div class="profile-subtitle">Steuerbüro C. Kaik</div>
</div> </div>
<div class="userZoom-section"> <div class="profile-section">
<div class="userZoom-details horizontal wrap"> <div class="profile-details horizontal wrap">
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<label>Email</label> <label>Email</label>
<a href="mailto:doreen.kubiak@gmail.com">doreen.kubiak@gmail.com</a> <a href="mailto:doreen.kubiak@gmail.com">doreen.kubiak@gmail.com</a>
</div> </div>
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<label>Organisation</label> <label>Organisation</label>
Steuerbüro C. Kaik Steuerbüro C. Kaik
</div> </div>
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<label>Web</label> <label>Web</label>
<a href="http://ckaik.com" target="_blank">chaik.com</a> <a href="http://ckaik.com" target="_blank">chaik.com</a>
</div> </div>
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<label>Strasse</label> <label>Strasse</label>
Johannitergasse 2/2 Johannitergasse 2/2
</div> </div>
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<label>Telefon</label> <label>Telefon</label>
+43 5522 36346 +43 5522 36346
</div> </div>
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<label>PLZ, ORT</label> <label>PLZ, ORT</label>
6800 Feldkirch 6800 Feldkirch
</div> </div>
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<label>Mobile-Nr.</label> <label>Mobile-Nr.</label>
+43 699 4565789 +43 699 4565789
</div> </div>
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<label>Land</label> <label>Land</label>
Österreich Österreich
</div> </div>
</div> </div>
</div> </div>
<div class="userZoom-section"> <div class="profile-section">
<!-- if user has organisation --> <!-- if user has organisation -->
<div class="tabs wide-tabs horizontal"> <div class="tabs wide-tabs horizontal">
<div class="tab js-userTickets active">Tickets von Doreen Kubiak</div> <div class="tab js-userTickets active">Tickets von Doreen Kubiak</div>
<div class="tab js-organisationTickets">Tickets von Steuerbüro C. Kaik</div> <div class="tab js-organisationTickets">Tickets von Steuerbüro C. Kaik</div>
</div> </div>
<!-- endif --> <!-- endif -->
<div class="userZoom-ticketLists horizontal"> <div class="profile-ticketLists horizontal">
<div class="userZoom-ticketList"> <div class="profile-ticketList">
<label>Offene Tickets (23)</label> <label>Offene Tickets (23)</label>
<ol class="tasks tasks--standalone"> <ol class="tasks tasks--standalone">
<li class="task level-2"> <li class="task level-2">
@ -101,7 +101,7 @@
</ol> </ol>
<a href="#">Alle Tickets von Doreen Kubiak …</a> <a href="#">Alle Tickets von Doreen Kubiak …</a>
</div> </div>
<div class="userZoom-ticketList"> <div class="profile-ticketList">
<label>Bearbeitete Tickets (12)</label> <label>Bearbeitete Tickets (12)</label>
<ol class="tasks tasks--standalone"> <ol class="tasks tasks--standalone">
<li class="task level-1"> <li class="task level-1">
@ -141,7 +141,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="userZoom-section horizontal two-columns"> <div class="profile-section horizontal two-columns">
<div class="column status stat-widget vertical"> <div class="column status stat-widget vertical">
<h3>Status</h3> <h3>Status</h3>
<div class="stat-graphic"> <div class="stat-graphic">
@ -170,7 +170,7 @@
<div class="stat-detail">Average: 17%</div> <div class="stat-detail">Average: 17%</div>
</div> </div>
</div> </div>
<div class="userZoom-section"> <div class="profile-section">
<div class="frequency stat-widget vertical"> <div class="frequency stat-widget vertical">
<h3>Frequency</h3> <h3>Frequency</h3>
<div class="stat-graphic"> <div class="stat-graphic">

View file

@ -1,16 +1,16 @@
<div class="flex userZoom"> <div class="flex profile">
<div class="userZoom-window"> <div class="profile-window">
<div class="userZoom-section vertical centered"> <div class="profile-section vertical centered">
<div class="align-right userZoom-action dropdown dropdown--actions action"></div> <div class="align-right profile-action dropdown dropdown--actions action"></div>
<h1><%= @organization.displayName() %></h1> <h1><%= @organization.displayName() %></h1>
</div> </div>
<div class="userZoom-section"> <div class="profile-section">
<div class="userZoom-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 'textarea': %> <% if row.tag isnt 'textarea': %>
<div class="userZoom-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] ) ) %>
</div> </div>
@ -19,7 +19,7 @@
<% end %> <% end %>
<% for row in @organizationData: %> <% for row in @organizationData: %>
<% if row.tag is 'textarea': %> <% if row.tag is 'textarea': %>
<div class="userZoom-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>
@ -29,12 +29,12 @@
</div> </div>
<% if @organization.members: %> <% if @organization.members: %>
<div class="userZoom-section"> <div class="profile-section">
<label><%- @T('Member') %></label> <label><%- @T('Member') %></label>
<div class="userZoom-details horizontal wrap"> <div class="profile-details horizontal wrap">
<% for user in @organization.members: %> <% for user in @organization.members: %>
<div class="userZoom-detailsEntry"> <div class="profile-detailsEntry">
<a href="<%- user.uiUrl() %>" class="user-popover" data-id="<%- user.id %>"><%= user.displayName() %></a> <a href="<%- user.uiUrl() %>" class="user-popover" data-id="<%- user.id %>"><%= user.displayName() %></a>
</div> </div>
<% end %> <% end %>
@ -43,7 +43,7 @@
</div> </div>
<% end %> <% end %>
<div class="userZoom-section js-ticket-stats"></div> <div class="profile-section js-ticket-stats"></div>
</div> </div>
</div> </div>

View file

@ -1,21 +1,21 @@
<div class="flex userZoom"> <div class="flex profile">
<div class="userZoom-window"> <div class="profile-window">
<div class="userZoom-section vertical centered"> <div class="profile-section vertical centered">
<div class="align-right userZoom-action dropdown dropdown--actions action"></div> <div class="align-right profile-action dropdown dropdown--actions action"></div>
<%- @user.avatar("80") %> <%- @user.avatar("80") %>
<h1><%= @user.displayName() %></h1> <h1><%= @user.displayName() %></h1>
<% if @user.organization: %> <% if @user.organization: %>
<div class="userZoom-organisation"><a href="<%- @user.organization.uiUrl() %>"><%= @user.organization.displayName() %></a></div> <div class="profile-organisation"><a href="<%- @user.organization.uiUrl() %>"><%= @user.organization.displayName() %></a></div>
<% end %> <% end %>
</div> </div>
<div class="userZoom-section"> <div class="profile-section">
<div class="userZoom-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 'textarea': %> <% if row.tag isnt 'textarea': %>
<div class="userZoom-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] ) ) %>
</div> </div>
@ -24,7 +24,7 @@
<% end %> <% end %>
<% for row in @userData: %> <% for row in @userData: %>
<% if row.tag is 'textarea': %> <% if row.tag is 'textarea': %>
<div class="userZoom-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>
@ -33,7 +33,7 @@
</div> </div>
</div> </div>
<div class="userZoom-section js-ticket-stats"></div> <div class="profile-section js-ticket-stats"></div>
</div> </div>

View file

@ -6,18 +6,18 @@
<% end %> <% end %>
<div class="js-user"> <div class="js-user">
<div class="userZoom-ticketLists horizontal"> <div class="profile-ticketLists horizontal">
<div class="userZoom-ticketList js-user-open-tickets"></div> <div class="profile-ticketList js-user-open-tickets"></div>
<div class="userZoom-ticketList js-user-closed-tickets"></div> <div class="profile-ticketList js-user-closed-tickets"></div>
</div> </div>
<div class="frequency stat-widget vertical js-user-frequency"></div> <div class="frequency stat-widget vertical js-user-frequency"></div>
</div> </div>
<div class="js-org hide"> <div class="js-org hide">
<div class="userZoom-ticketLists horizontal"> <div class="profile-ticketLists horizontal">
<div class="userZoom-ticketList js-org-open-tickets"></div> <div class="profile-ticketList js-org-open-tickets"></div>
<div class="userZoom-ticketList js-org-closed-tickets"></div> <div class="profile-ticketList js-org-closed-tickets"></div>
</div> </div>
<div class="frequency stat-widget vertical js-org-frequency"></div> <div class="frequency stat-widget vertical js-org-frequency"></div>

View file

@ -4157,7 +4157,7 @@ footer {
left: 0 !important; left: 0 !important;
} }
.userZoom { .profile {
padding: 60px; padding: 60px;
overflow: auto; overflow: auto;
@ -4171,22 +4171,22 @@ footer {
} }
} }
.userZoom-window { .profile-window {
background: white; background: white;
max-width: 660px; max-width: 660px;
margin: 0 auto; margin: 0 auto;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
} }
.userZoom-section { .profile-section {
padding: 20px 50px; padding: 20px 50px;
} }
.userZoom-section:not(:last-child) { .profile-section:not(:last-child) {
border-bottom: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2;
} }
.userZoom-action { .profile-action {
margin-right: -20px; margin-right: -20px;
.dropdown-toggle { .dropdown-toggle {
@ -4207,28 +4207,28 @@ footer {
} }
} }
.userZoom-organisation { .profile-subtitle {
font-size: 16px; font-size: 16px;
@extend .u-highlight; @extend .u-highlight;
} }
.userZoom-details { .profile-details {
margin-left: -50px; margin-left: -50px;
} }
.userZoom-detailsEntry { .profile-detailsEntry {
margin: 8px 0; margin: 8px 0;
padding-left: 50px; padding-left: 50px;
width: 50%; width: 50%;
} }
.userZoom-detailsEntry label { .profile-detailsEntry label {
padding: 0; padding: 0;
margin-bottom: 2px; margin-bottom: 2px;
display: block; display: block;
} }
.userZoom-ticketList { .profile-ticketList {
@extend .flex; @extend .flex;
&:not(:last-child) { &:not(:last-child) {
@ -4236,7 +4236,7 @@ footer {
} }
} }
.userZoom-ticketList { .profile-ticketList {
ol { ol {
padding: 0; padding: 0;
} }
@ -4246,7 +4246,7 @@ footer {
} }
} }
.userZoom .frequency.stat-widget { .profile .frequency.stat-widget {
height: 230px; height: 230px;
.stat-bars { .stat-bars {