diff --git a/app/styles/common/top_nav.sass b/app/styles/common/top_nav.sass index 8215c2a2a..f4adc3a4e 100644 --- a/app/styles/common/top_nav.sass +++ b/app/styles/common/top_nav.sass @@ -37,6 +37,8 @@ a.disabled color: #5b5855 + text-decoration: none + cursor: default #top-nav a.navbar-brand diff --git a/app/styles/user/home.sass b/app/styles/user/home.sass index e69de29bb..0e51f28b4 100644 --- a/app/styles/user/home.sass +++ b/app/styles/user/home.sass @@ -0,0 +1,29 @@ +@import "../bootstrap/variables" +@import "../bootstrap/mixins" + +#user-home-view + margin-top: 20px + + .left-column + +make-sm-column(4) + + .right-column + +make-sm-column(8) + + .picture-wrapper + text-align: center + outline: 1px solid darkgrey + max-width: 80% + +center-block() + + > .picture + max-width: 100% + border: 4px solid white + + > .name + margin: 0px auto + padding: 10px inherit + background: white + color: white + text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000, 1px 1px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000 + diff --git a/app/templates/account/home.jade b/app/templates/account/home.jade index 20413b226..a3afdb879 100644 --- a/app/templates/account/home.jade +++ b/app/templates/account/home.jade @@ -5,7 +5,6 @@ block content .col-sm-6.clearfix h2 Account Settings hr - .panel.panel-default .panel-heading h3.panel-title diff --git a/app/templates/kinds/user.jade b/app/templates/kinds/user.jade index a6671506a..6cb134ce2 100644 --- a/app/templates/kinds/user.jade +++ b/app/templates/kinds/user.jade @@ -2,16 +2,20 @@ extends /templates/base // User pages might have some user page specific header, if not remove this block content - div - if user && viewName - ol.breadcrumb - li - - var userName = user.get('name'); - a(href="/user/#{user.id}") #{userName} - li.active - | #{viewName} + .clearfix + //- + if user && viewName + ol.breadcrumb + li + - var userName = user.get('name'); + //_a(href="/user/#{user.id}") #{userName} + li.active + //-| #{viewName} + if !userLoaded + | LOADING else if !user // TODO Ruben make this all fancy as soon as we can query users by name | User not found. + diff --git a/app/templates/user/home.jade b/app/templates/user/home.jade index f6c8b9fa0..f84b82442 100644 --- a/app/templates/user/home.jade +++ b/app/templates/user/home.jade @@ -1,3 +1,21 @@ extends /templates/kinds/user block append content + if user + .left-column + .picture-wrapper + img.picture(src="#{me.getPhotoURL(150)}" alt="") + h3.name= user.get('name') + .right-column + .panel.panel-default + .panel-heading + h3.panel-title Achievements + .panel-body + .panel.panel-default + .panel-heading + h3.panel-title S. Levels + .panel-body + .panel.panel-default + .panel-heading + h3.panel-title M. Levels + .panel-body diff --git a/app/views/kinds/UserView.coffee b/app/views/kinds/UserView.coffee index 6b146f4f8..a1e39f0a0 100644 --- a/app/views/kinds/UserView.coffee +++ b/app/views/kinds/UserView.coffee @@ -20,16 +20,18 @@ module.exports = class UserView extends RootView fetchUser: (id) -> User.getByID id, {}, true, success: (@user) => + @userLoaded = true @trigger 'userNotFound' unless @user @trigger 'userLoaded', @user error: => - console.debug 'Error while fetching user' + @userLoaded = true @trigger 'userNotFound' getRenderData: -> context = super() context.viewName = @viewName context.user = @user unless @user?.isAnonymous() + context.userLoaded = @userLoaded context isMe: -> @userID is me.id diff --git a/app/views/account/JobProfileCodeModal.coffee b/app/views/user/JobProfileCodeModal.coffee similarity index 100% rename from app/views/account/JobProfileCodeModal.coffee rename to app/views/user/JobProfileCodeModal.coffee diff --git a/app/views/user/JobProfileView.coffee b/app/views/user/JobProfileView.coffee index 480d9e7d4..488e8c397 100644 --- a/app/views/user/JobProfileView.coffee +++ b/app/views/user/JobProfileView.coffee @@ -236,7 +236,7 @@ module.exports = class ProfileView extends UserView jobProfile.name ?= (@user.get('firstName') + ' ' + @user.get('lastName')).trim() if @user?.get('firstName') context.profile = jobProfile context.user = @user - context.myProfile = @user?.id is context.me.id + context.myProfile = @isMe() context.allowedToViewJobProfile = @user and (me.isAdmin() or 'employer' in me.get('permissions') or (context.myProfile && !me.get('anonymous'))) context.allowedToEditJobProfile = @user and (me.isAdmin() or (context.myProfile && !me.get('anonymous'))) context.profileApproved = @user?.get 'jobProfileApproved'