mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Record the source project display name, to render with the file
This commit is contained in:
parent
f533674dbd
commit
9624e2a290
2 changed files with 9 additions and 7 deletions
|
@ -52,9 +52,9 @@ div.binary-file.full-size(
|
|||
i.fa.fa-fw.fa-external-link-square.fa-rotate-180.linked-file-icon
|
||||
| Imported from
|
||||
|
|
||||
a(ng-href='/project/{{openFile.linkedFileData.source_project_id}}')
|
||||
| {{ displayUrl(openFile.linkedFileData.source_project_id) }}
|
||||
| / {{ openFile.linkedFileData.source_entity_path.slice(1) }},
|
||||
a(ng-href='/project/{{openFile.linkedFileData.source_project_id}}' target="_blank")
|
||||
| {{ openFile.linkedFileData.source_project_display_name }}
|
||||
| {{ openFile.linkedFileData.source_entity_path.slice(1) }},
|
||||
|
|
||||
| at {{ openFile.created | formatDate:'h:mm a' }} {{ openFile.created | relativeDate }}
|
||||
|
||||
|
|
|
@ -302,17 +302,19 @@ define [
|
|||
$timeout($scope.init, 100)
|
||||
|
||||
$scope.create = () ->
|
||||
project = $scope.data.selectedProjectId
|
||||
projectId = $scope.data.selectedProjectId
|
||||
projectDisplayName = _.find($scope.data.projects, (p) -> p._id == projectId).name
|
||||
path = $scope.data.selectedProjectEntity
|
||||
name = $scope.data.name
|
||||
if !name || !path || !project
|
||||
if !name || !path || !projectId || !projectDisplayName
|
||||
$scope._reset(err: true)
|
||||
return
|
||||
$scope._setInFlight('create')
|
||||
ide.fileTreeManager
|
||||
.createLinkedFile(name, parent_folder, 'project_file', {
|
||||
source_project_id: project,
|
||||
source_entity_path: path
|
||||
source_project_id: projectId,
|
||||
source_entity_path: path,
|
||||
source_project_display_name: projectDisplayName
|
||||
})
|
||||
.then () ->
|
||||
$scope._reset(err: false)
|
||||
|
|
Loading…
Reference in a new issue