Merge pull request #159 from sharelatex/as-show-v1-owner

Show v1 project owner's name in project list
This commit is contained in:
Alasdair Smith 2017-11-28 09:51:04 +00:00 committed by GitHub
commit c5f459a531
2 changed files with 10 additions and 2 deletions

View file

@ -396,8 +396,13 @@ module.exports = ProjectController =
id: project.id
name: project.title
lastUpdated: new Date(project.updated_at * 1000) # Convert from epoch
accessLevel: "readOnly",
accessLevel: if project.owner?.user_is_owner then "owner" else "readOnly"
archived: project.removed || project.archived
owner: {
# Unlisted V1 projects don't have an owner, so just show N/A
first_name: if project.owner then project.owner.name else 'N/A'
last_name: ''
}
isV1Project: true
}

View file

@ -1,4 +1,4 @@
.col-xs-8
.col-xs-6
span.v1-badge(
aria-label=translate("v1_badge")
tooltip-template="'v1ProjectTooltipTemplate'"
@ -11,5 +11,8 @@
stop-propagation="click"
) {{project.name}}
.col-xs-2
span.owner {{ownerName()}}
.col-xs-4
span.last-modified {{project.lastUpdated | formatDate}}