Merge pull request #5111 from jsangmeister/default-to-reference-projector
Change wording from 'default' to 'reference' projector
This commit is contained in:
commit
1dcb496147
@ -130,9 +130,9 @@ export class ProjectorRepositoryService extends BaseRepository<ViewProjector, Pr
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the given projector as the new reference projector for all projectors
|
* Sets the given projector as the new reference projector for all projectors
|
||||||
* @param projector the new default projector id
|
* @param projector the new reference projector id
|
||||||
*/
|
*/
|
||||||
public async setDefaultProjector(projector_id: number): Promise<void> {
|
public async setReferenceProjector(projector_id: number): Promise<void> {
|
||||||
await this.http.post<void>(`/rest/core/projector/${projector_id}/set_default_projector/`);
|
await this.http.post<void>(`/rest/core/projector/${projector_id}/set_reference_projector/`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ export class ProjectorListEntryComponent extends BaseViewComponent implements On
|
|||||||
* Handler to set the selected projector as CLOS reference
|
* Handler to set the selected projector as CLOS reference
|
||||||
*/
|
*/
|
||||||
public onSetAsClosRef(): void {
|
public onSetAsClosRef(): void {
|
||||||
this.repo.setDefaultProjector(this.projector.id);
|
this.repo.setReferenceProjector(this.projector.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,7 +132,7 @@ class ProjectorViewSet(ModelViewSet):
|
|||||||
"destroy",
|
"destroy",
|
||||||
"control_view",
|
"control_view",
|
||||||
"set_scroll",
|
"set_scroll",
|
||||||
"set_default_projector",
|
"set_reference_projector",
|
||||||
"project",
|
"project",
|
||||||
):
|
):
|
||||||
result = has_perm(self.request.user, "core.can_see_projector") and has_perm(
|
result = has_perm(self.request.user, "core.can_see_projector") and has_perm(
|
||||||
@ -330,9 +330,9 @@ class ProjectorViewSet(ModelViewSet):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@detail_route(methods=["post"])
|
@detail_route(methods=["post"])
|
||||||
def set_default_projector(self, request, pk):
|
def set_reference_projector(self, request, pk):
|
||||||
"""
|
"""
|
||||||
REST API operation to set the projector with the given pk as the new default.
|
REST API operation to set the projector with the given pk as the new reference projector for all projectors.
|
||||||
"""
|
"""
|
||||||
reference_projector = self.get_object()
|
reference_projector = self.get_object()
|
||||||
for projector in self.queryset.all():
|
for projector in self.queryset.all():
|
||||||
|
@ -106,7 +106,7 @@ def test_project_view(client):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db(transaction=False)
|
@pytest.mark.django_db(transaction=False)
|
||||||
def test_set_default_projector(client):
|
def test_set_reference_projector(client):
|
||||||
client.login(username="admin", password="admin")
|
client.login(username="admin", password="admin")
|
||||||
Projector.objects.create(name="test_name_rePaODETymV4eFM3aOBD")
|
Projector.objects.create(name="test_name_rePaODETymV4eFM3aOBD")
|
||||||
reference_projector = Projector.objects.create(
|
reference_projector = Projector.objects.create(
|
||||||
@ -114,7 +114,7 @@ def test_set_default_projector(client):
|
|||||||
)
|
)
|
||||||
|
|
||||||
response = client.post(
|
response = client.post(
|
||||||
reverse("projector-set-default-projector", args=[reference_projector.pk])
|
reverse("projector-set-reference-projector", args=[reference_projector.pk])
|
||||||
)
|
)
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user