mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add a warning message when there are no other projects to choose.
This commit is contained in:
parent
f6424ada40
commit
b3d17fc753
2 changed files with 7 additions and 0 deletions
|
@ -94,6 +94,9 @@ script(type='text/ng-template', id='newFileModalTemplate')
|
|||
ng-repeat="project in data.projects"
|
||||
value="{{ project._id }}"
|
||||
) {{ project.name }}
|
||||
small(ng-if="hasNoProjects() && shouldEnableProjectSelect() ")
|
||||
| No other projects found
|
||||
|
||||
|
||||
.form-controls.row-spaced-small(ng-if="!state.isOutputFilesMode")
|
||||
label(for="project-entity-select") Select a File
|
||||
|
|
|
@ -280,6 +280,10 @@ define [
|
|||
{ state, data } = $scope
|
||||
return !state.inFlight.projects && data.projects
|
||||
|
||||
$scope.hasNoProjects = () ->
|
||||
{ state, data } = $scope
|
||||
return !state.inFlight.projects && (data.projects.length == 0 || !data.projects?)
|
||||
|
||||
$scope.shouldEnableProjectEntitySelect = () ->
|
||||
{ state, data } = $scope
|
||||
return !state.inFlight.projects && !state.inFlight.entities && data.projects && data.selectedProjectId
|
||||
|
|
Loading…
Reference in a new issue