diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index cbf54f306..20d00beed 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -17,7 +17,7 @@ import { OpenSlidesTranslateModule } from './core/translate/openslides-translate // PWA import { ServiceWorkerModule } from '@angular/service-worker'; import { environment } from '../environments/environment'; -import { GlobalSpinnerComponent } from './site/global-spinner/global-spinner.component'; +import { GlobalSpinnerComponent } from './site/common/components/global-spinner/global-spinner.component'; /** * Returns a function that returns a promis that will be resolved, if all apps are loaded. diff --git a/client/src/app/core/core-services/app-load.service.ts b/client/src/app/core/core-services/app-load.service.ts index 86febe4f2..804680683 100644 --- a/client/src/app/core/core-services/app-load.service.ts +++ b/client/src/app/core/core-services/app-load.service.ts @@ -19,6 +19,7 @@ import { ProjectorAppConfig } from 'app/site/projector/projector.config'; import { BaseRepository } from 'app/core/repositories/base-repository'; import { OnAfterAppsLoaded } from '../onAfterAppsLoaded'; import { ServicesToLoadOnAppsLoaded } from '../core.module'; +import { TopicsAppConfig } from 'app/site/topics/topics.config'; /** * A list of all app configurations of all delivered apps. @@ -33,7 +34,8 @@ const appConfigs: AppConfig[] = [ TagAppConfig, UsersAppConfig, HistoryAppConfig, - ProjectorAppConfig + ProjectorAppConfig, + TopicsAppConfig ]; /** diff --git a/client/src/app/core/repositories/topics/topic-repository.service.ts b/client/src/app/core/repositories/topics/topic-repository.service.ts index 43335abcf..f4b684f28 100644 --- a/client/src/app/core/repositories/topics/topic-repository.service.ts +++ b/client/src/app/core/repositories/topics/topic-repository.service.ts @@ -7,7 +7,7 @@ import { DataStoreService } from 'app/core/core-services/data-store.service'; import { DataSendService } from 'app/core/core-services/data-send.service'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; import { Topic } from 'app/shared/models/topics/topic'; -import { ViewTopic, TopicTitleInformation } from 'app/site/agenda/models/view-topic'; +import { ViewTopic, TopicTitleInformation } from 'app/site/topics/models/view-topic'; import { ViewModelStoreService } from 'app/core/core-services/view-model-store.service'; import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; import { ViewItem } from 'app/site/agenda/models/view-item'; diff --git a/client/src/app/core/core-services/poll-pdf-service.ts b/client/src/app/core/ui-services/poll-pdf-service.ts similarity index 100% rename from client/src/app/core/core-services/poll-pdf-service.ts rename to client/src/app/core/ui-services/poll-pdf-service.ts diff --git a/client/src/app/site/agenda/agenda-routing.module.ts b/client/src/app/site/agenda/agenda-routing.module.ts index 2190e1168..9c46877b0 100644 --- a/client/src/app/site/agenda/agenda-routing.module.ts +++ b/client/src/app/site/agenda/agenda-routing.module.ts @@ -5,13 +5,11 @@ import { AgendaImportListComponent } from './components/agenda-import-list/agend import { AgendaListComponent } from './components/agenda-list/agenda-list.component'; import { AgendaSortComponent } from './components/agenda-sort/agenda-sort.component'; import { ListOfSpeakersComponent } from './components/list-of-speakers/list-of-speakers.component'; -import { TopicDetailComponent } from './components/topic-detail/topic-detail.component'; import { WatchSortingTreeGuard } from 'app/shared/utils/watch-sorting-tree.guard'; const routes: Routes = [ { path: '', component: AgendaListComponent, pathMatch: 'full' }, { path: 'import', component: AgendaImportListComponent, data: { basePerm: 'agenda.can_manage' } }, - { path: 'topics/new', component: TopicDetailComponent, data: { basePerm: 'agenda.can_manage' } }, { path: 'sort-agenda', component: AgendaSortComponent, @@ -19,8 +17,7 @@ const routes: Routes = [ data: { basePerm: 'agenda.can_manage' } }, { path: 'speakers', component: ListOfSpeakersComponent, data: { basePerm: 'agenda.can_see_list_of_speakers' } }, - { path: 'speakers/:id', component: ListOfSpeakersComponent, data: { basePerm: 'agenda.can_see_list_of_speakers' } }, - { path: 'topics/:id', component: TopicDetailComponent, data: { basePerm: 'agenda.can_see' } } + { path: 'speakers/:id', component: ListOfSpeakersComponent, data: { basePerm: 'agenda.can_see_list_of_speakers' } } ]; @NgModule({ diff --git a/client/src/app/site/agenda/agenda.config.ts b/client/src/app/site/agenda/agenda.config.ts index 5d2de4223..495b104bb 100644 --- a/client/src/app/site/agenda/agenda.config.ts +++ b/client/src/app/site/agenda/agenda.config.ts @@ -1,9 +1,6 @@ import { AppConfig } from '../../core/app-config'; import { Item } from '../../shared/models/agenda/item'; -import { Topic } from '../../shared/models/topics/topic'; import { ItemRepositoryService } from 'app/core/repositories/agenda/item-repository.service'; -import { TopicRepositoryService } from 'app/core/repositories/topics/topic-repository.service'; -import { ViewTopic } from './models/view-topic'; import { ViewItem } from './models/view-item'; import { ListOfSpeakers } from 'app/shared/models/agenda/list-of-speakers'; import { ViewListOfSpeakers } from './models/view-list-of-speakers'; @@ -18,13 +15,6 @@ export const AgendaAppConfig: AppConfig = { model: ListOfSpeakers, viewModel: ViewListOfSpeakers, repository: ListOfSpeakersRepositoryService - }, - { - collectionString: 'topics/topic', - model: Topic, - viewModel: ViewTopic, - searchOrder: 1, - repository: TopicRepositoryService } ], mainMenuEntries: [ diff --git a/client/src/app/site/agenda/agenda.module.ts b/client/src/app/site/agenda/agenda.module.ts index 815a1985d..7c548e660 100644 --- a/client/src/app/site/agenda/agenda.module.ts +++ b/client/src/app/site/agenda/agenda.module.ts @@ -6,7 +6,6 @@ import { AgendaListComponent } from './components/agenda-list/agenda-list.compon import { ItemInfoDialogComponent } from './components/item-info-dialog/item-info-dialog.component'; import { AgendaRoutingModule } from './agenda-routing.module'; import { SharedModule } from '../../shared/shared.module'; -import { TopicDetailComponent } from './components/topic-detail/topic-detail.component'; import { AgendaSortComponent } from './components/agenda-sort/agenda-sort.component'; import { ListOfSpeakersComponent } from './components/list-of-speakers/list-of-speakers.component'; @@ -18,7 +17,6 @@ import { ListOfSpeakersComponent } from './components/list-of-speakers/list-of-s entryComponents: [ItemInfoDialogComponent], declarations: [ AgendaListComponent, - TopicDetailComponent, ItemInfoDialogComponent, AgendaImportListComponent, AgendaSortComponent, diff --git a/client/src/app/site/agenda/components/agenda-import-list/agenda-import-list.component.ts b/client/src/app/site/agenda/components/agenda-import-list/agenda-import-list.component.ts index 561aaf382..fdf229765 100644 --- a/client/src/app/site/agenda/components/agenda-import-list/agenda-import-list.component.ts +++ b/client/src/app/site/agenda/components/agenda-import-list/agenda-import-list.component.ts @@ -4,12 +4,12 @@ import { MatSnackBar } from '@angular/material'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; -import { AgendaImportService } from '../../agenda-import.service'; +import { AgendaImportService } from '../../services/agenda-import.service'; import { BaseImportListComponent } from 'app/site/base/base-import-list'; import { CsvExportService } from 'app/core/ui-services/csv-export.service'; import { DurationService } from 'app/core/ui-services/duration.service'; import { ItemVisibilityChoices } from 'app/shared/models/agenda/item'; -import { ViewCreateTopic } from '../../models/view-create-topic'; +import { ViewCreateTopic } from 'app/site/topics/models/view-create-topic'; /** * Component for the agenda import list view. diff --git a/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts b/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts index 585a5915a..789e6a08b 100644 --- a/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts +++ b/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { MatSnackBar, MatDialog } from '@angular/material'; -import { Router, ActivatedRoute } from '@angular/router'; +import { Router } from '@angular/router'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; @@ -16,7 +16,7 @@ import { DurationService } from 'app/core/ui-services/duration.service'; import { ItemInfoDialogComponent } from '../item-info-dialog/item-info-dialog.component'; import { ItemRepositoryService } from 'app/core/repositories/agenda/item-repository.service'; import { ListOfSpeakersRepositoryService } from 'app/core/repositories/agenda/list-of-speakers-repository.service'; -import { ListViewBaseComponent } from 'app/site/base/list-view-base'; +import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { OperatorService } from 'app/core/core-services/operator.service'; import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; import { PromptService } from 'app/core/ui-services/prompt.service'; @@ -26,7 +26,7 @@ import { TopicRepositoryService } from 'app/core/repositories/topics/topic-repos import { ViewportService } from 'app/core/ui-services/viewport.service'; import { ViewItem } from '../../models/view-item'; import { ViewListOfSpeakers } from '../../models/view-list-of-speakers'; -import { ViewTopic } from '../../models/view-topic'; +import { ViewTopic } from 'app/site/topics/models/view-topic'; /** * List view for the agenda. @@ -36,7 +36,7 @@ import { ViewTopic } from '../../models/view-topic'; templateUrl: './agenda-list.component.html', styleUrls: ['./agenda-list.component.scss'] }) -export class AgendaListComponent extends ListViewBaseComponent implements OnInit { +export class AgendaListComponent extends BaseListViewComponent implements OnInit { /** * Show or hide the numbering button */ @@ -111,7 +111,6 @@ export class AgendaListComponent extends ListViewBaseComponent impleme * @param translate translations * @param matSnackBar Shows errors and messages * @param operator The current user - * @param route Angulars ActivatedRoute * @param router Angulars router * @param repo the agenda repository, * @param promptService the delete prompt @@ -130,7 +129,6 @@ export class AgendaListComponent extends ListViewBaseComponent impleme matSnackBar: MatSnackBar, storage: StorageService, private operator: OperatorService, - protected route: ActivatedRoute, private router: Router, public repo: ItemRepositoryService, private promptService: PromptService, @@ -231,7 +229,7 @@ export class AgendaListComponent extends ListViewBaseComponent impleme * Comes from the HeadBar Component */ public onPlusButton(): void { - this.router.navigate(['topics/new'], { relativeTo: this.route }); + this.router.navigate(['/topics/new']); } /** diff --git a/client/src/app/site/agenda/agenda-import.service.spec.ts b/client/src/app/site/agenda/services/agenda-import.service.spec.ts similarity index 100% rename from client/src/app/site/agenda/agenda-import.service.spec.ts rename to client/src/app/site/agenda/services/agenda-import.service.spec.ts diff --git a/client/src/app/site/agenda/agenda-import.service.ts b/client/src/app/site/agenda/services/agenda-import.service.ts similarity index 96% rename from client/src/app/site/agenda/agenda-import.service.ts rename to client/src/app/site/agenda/services/agenda-import.service.ts index 4bf262c92..c751281f6 100644 --- a/client/src/app/site/agenda/agenda-import.service.ts +++ b/client/src/app/site/agenda/services/agenda-import.service.ts @@ -1,14 +1,15 @@ import { Injectable } from '@angular/core'; import { MatSnackBar } from '@angular/material'; + import { Papa } from 'ngx-papaparse'; import { TranslateService } from '@ngx-translate/core'; import { BaseImportService, NewEntry } from 'app/core/ui-services/base-import.service'; -import { CreateTopic } from './models/create-topic'; +import { CreateTopic } from '../../topics/models/create-topic'; import { DurationService } from 'app/core/ui-services/duration.service'; import { ItemVisibilityChoices } from 'app/shared/models/agenda/item'; -import { TopicRepositoryService } from '../../core/repositories/topics/topic-repository.service'; -import { ViewCreateTopic } from './models/view-create-topic'; +import { TopicRepositoryService } from 'app/core/repositories/topics/topic-repository.service'; +import { ViewCreateTopic } from 'app/site/topics/models/view-create-topic'; @Injectable({ providedIn: 'root' diff --git a/client/src/app/site/assignments/components/assignment-list/assignment-list.component.ts b/client/src/app/site/assignments/components/assignment-list/assignment-list.component.ts index 49f11f5f9..231e68fd6 100644 --- a/client/src/app/site/assignments/components/assignment-list/assignment-list.component.ts +++ b/client/src/app/site/assignments/components/assignment-list/assignment-list.component.ts @@ -9,7 +9,7 @@ import { PblColumnDefinition } from '@pebula/ngrid'; import { AssignmentFilterListService } from '../../services/assignment-filter.service'; import { AssignmentSortListService } from '../../services/assignment-sort-list.service'; import { AssignmentRepositoryService } from 'app/core/repositories/assignments/assignment-repository.service'; -import { ListViewBaseComponent } from 'app/site/base/list-view-base'; +import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { OperatorService } from 'app/core/core-services/operator.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { StorageService } from 'app/core/core-services/storage.service'; @@ -24,7 +24,7 @@ import { AssignmentPdfExportService } from '../../services/assignment-pdf-export templateUrl: './assignment-list.component.html', styleUrls: ['./assignment-list.component.scss'] }) -export class AssignmentListComponent extends ListViewBaseComponent implements OnInit { +export class AssignmentListComponent extends BaseListViewComponent implements OnInit { /** * The different phases of an assignment. Info is fetched from server */ diff --git a/client/src/app/site/assignments/services/assignment-poll-pdf.service.ts b/client/src/app/site/assignments/services/assignment-poll-pdf.service.ts index c8ad58629..49dc09d99 100644 --- a/client/src/app/site/assignments/services/assignment-poll-pdf.service.ts +++ b/client/src/app/site/assignments/services/assignment-poll-pdf.service.ts @@ -8,7 +8,7 @@ import { UserRepositoryService } from 'app/core/repositories/users/user-reposito import { AssignmentRepositoryService } from 'app/core/repositories/assignments/assignment-repository.service'; import { ViewAssignmentPoll } from '../models/view-assignment-poll'; import { AssignmentPollMethod } from './assignment-poll.service'; -import { PollPdfService, BallotCountChoices, AbstractPollData } from 'app/core/core-services/poll-pdf-service'; +import { PollPdfService, BallotCountChoices, AbstractPollData } from 'app/core/ui-services/poll-pdf-service'; /** * Creates a pdf for a motion poll. Takes as input any motionPoll diff --git a/client/src/app/site/base/list-view-base.ts b/client/src/app/site/base/base-list-view.ts similarity index 98% rename from client/src/app/site/base/list-view-base.ts rename to client/src/app/site/base/base-list-view.ts index 2212b5a72..c0a566522 100644 --- a/client/src/app/site/base/list-view-base.ts +++ b/client/src/app/site/base/base-list-view.ts @@ -10,7 +10,7 @@ import { BaseViewModel } from './base-view-model'; import { StorageService } from 'app/core/core-services/storage.service'; import { ViewUser } from '../users/models/view-user'; -export abstract class ListViewBaseComponent extends BaseViewComponent implements OnDestroy { +export abstract class BaseListViewComponent extends BaseViewComponent implements OnDestroy { /** * The source of the table data, will be filled by an event emitter */ diff --git a/client/src/app/site/global-spinner/global-spinner.component.html b/client/src/app/site/common/components/global-spinner/global-spinner.component.html similarity index 100% rename from client/src/app/site/global-spinner/global-spinner.component.html rename to client/src/app/site/common/components/global-spinner/global-spinner.component.html diff --git a/client/src/app/site/global-spinner/global-spinner.component.scss b/client/src/app/site/common/components/global-spinner/global-spinner.component.scss similarity index 100% rename from client/src/app/site/global-spinner/global-spinner.component.scss rename to client/src/app/site/common/components/global-spinner/global-spinner.component.scss diff --git a/client/src/app/site/global-spinner/global-spinner.component.spec.ts b/client/src/app/site/common/components/global-spinner/global-spinner.component.spec.ts similarity index 100% rename from client/src/app/site/global-spinner/global-spinner.component.spec.ts rename to client/src/app/site/common/components/global-spinner/global-spinner.component.spec.ts diff --git a/client/src/app/site/global-spinner/global-spinner.component.ts b/client/src/app/site/common/components/global-spinner/global-spinner.component.ts similarity index 100% rename from client/src/app/site/global-spinner/global-spinner.component.ts rename to client/src/app/site/common/components/global-spinner/global-spinner.component.ts diff --git a/client/src/app/site/mediafiles/components/mediafile-list/mediafile-list.component.ts b/client/src/app/site/mediafiles/components/mediafile-list/mediafile-list.component.ts index 8e68d3360..b57531f92 100644 --- a/client/src/app/site/mediafiles/components/mediafile-list/mediafile-list.component.ts +++ b/client/src/app/site/mediafiles/components/mediafile-list/mediafile-list.component.ts @@ -8,7 +8,8 @@ import { TranslateService } from '@ngx-translate/core'; import { PblColumnDefinition } from '@pebula/ngrid'; import { ColumnRestriction } from 'app/shared/components/list-view-table/list-view-table.component'; -import { ListViewBaseComponent } from 'app/site/base/list-view-base'; +import { BaseListViewComponent } from 'app/site/base/base-list-view'; +import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service'; import { MediaManageService } from 'app/core/ui-services/media-manage.service'; import { MediafileFilterListService } from '../../services/mediafile-filter.service'; @@ -17,7 +18,6 @@ import { OperatorService } from 'app/core/core-services/operator.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { StorageService } from 'app/core/core-services/storage.service'; import { ViewportService } from 'app/core/ui-services/viewport.service'; -import { ViewMediafile } from '../../models/view-mediafile'; /** * Lists all the uploaded files. @@ -27,7 +27,7 @@ import { ViewMediafile } from '../../models/view-mediafile'; templateUrl: './mediafile-list.component.html', styleUrls: ['./mediafile-list.component.scss'] }) -export class MediafileListComponent extends ListViewBaseComponent implements OnInit { +export class MediafileListComponent extends BaseListViewComponent implements OnInit { /** * Holds the actions for logos. Updated via an observable */ diff --git a/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts index 7d6bb0074..a71ebbf3e 100644 --- a/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts +++ b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts @@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core'; import { PblColumnDefinition } from '@pebula/ngrid'; import { ItemRepositoryService } from 'app/core/repositories/agenda/item-repository.service'; -import { ListViewBaseComponent } from 'app/site/base/list-view-base'; +import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; import { MotionBlockSortService } from 'app/site/motions/services/motion-block-sort.service'; @@ -25,7 +25,7 @@ import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block'; templateUrl: './motion-block-list.component.html', styleUrls: ['./motion-block-list.component.scss'] }) -export class MotionBlockListComponent extends ListViewBaseComponent implements OnInit { +export class MotionBlockListComponent extends BaseListViewComponent implements OnInit { /** * Holds the create form */ diff --git a/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.ts b/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.ts index 7686e4f44..00a733479 100644 --- a/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.ts +++ b/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.ts @@ -8,7 +8,7 @@ import { PblColumnDefinition } from '@pebula/ngrid'; import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; import { ConfigService } from 'app/core/ui-services/config.service'; -import { ListViewBaseComponent } from 'app/site/base/list-view-base'; +import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; @@ -72,7 +72,7 @@ interface InfoDialog { templateUrl: './motion-list.component.html', styleUrls: ['./motion-list.component.scss'] }) -export class MotionListComponent extends ListViewBaseComponent implements OnInit { +export class MotionListComponent extends BaseListViewComponent implements OnInit { /** * Reference to the dialog for quick editing meta information. */ diff --git a/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.ts b/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.ts index 006427dcf..65fb8d2bc 100644 --- a/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.ts +++ b/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.ts @@ -4,7 +4,7 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { PblColumnDefinition } from '@pebula/ngrid'; -import { ListViewBaseComponent } from 'app/site/base/list-view-base'; +import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { MatSnackBar, MatDialog } from '@angular/material'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { ViewWorkflow } from 'app/site/motions/models/view-workflow'; @@ -20,7 +20,7 @@ import { StorageService } from 'app/core/core-services/storage.service'; templateUrl: './workflow-list.component.html', styleUrls: ['./workflow-list.component.scss'] }) -export class WorkflowListComponent extends ListViewBaseComponent implements OnInit { +export class WorkflowListComponent extends BaseListViewComponent implements OnInit { /** * Holds the new workflow title */ diff --git a/client/src/app/site/motions/services/motion-csv-export.service.ts b/client/src/app/site/motions/services/motion-csv-export.service.ts index 51cd617d7..2fc8ea18e 100644 --- a/client/src/app/site/motions/services/motion-csv-export.service.ts +++ b/client/src/app/site/motions/services/motion-csv-export.service.ts @@ -10,10 +10,10 @@ import { import { sortMotionPropertyList } from '../motion-import-export-order'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { ChangeRecoMode, ViewMotion } from '../models/view-motion'; -import { ChangeRecommendationRepositoryService } from '../../../core/repositories/motions/change-recommendation-repository.service'; -import { ConfigService } from '../../../core/ui-services/config.service'; -import { ViewUnifiedChange } from '../../../shared/models/motions/view-unified-change'; -import { LinenumberingService } from '../../../core/ui-services/linenumbering.service'; +import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change'; +import { LinenumberingService } from 'app/core/ui-services/linenumbering.service'; /** * Exports CSVs for motions. Collect all CSV types here to have them in one place. diff --git a/client/src/app/site/motions/services/motion-poll-pdf.service.ts b/client/src/app/site/motions/services/motion-poll-pdf.service.ts index d45b979d0..28a744d75 100644 --- a/client/src/app/site/motions/services/motion-poll-pdf.service.ts +++ b/client/src/app/site/motions/services/motion-poll-pdf.service.ts @@ -6,7 +6,7 @@ import { ConfigService } from 'app/core/ui-services/config.service'; import { MotionPoll } from 'app/shared/models/motions/motion-poll'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { PdfDocumentService } from 'app/core/ui-services/pdf-document.service'; -import { PollPdfService, AbstractPollData } from 'app/core/core-services/poll-pdf-service'; +import { PollPdfService, AbstractPollData } from 'app/core/ui-services/poll-pdf-service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; type BallotCountChoices = 'NUMBER_OF_DELEGATES' | 'NUMBER_OF_ALL_PARTICIPANTS' | 'CUSTOM_NUMBER'; diff --git a/client/src/app/site/projector/components/countdown-controls/countdown-controls.component.ts b/client/src/app/site/projector/components/countdown-controls/countdown-controls.component.ts index 4e9ab595c..109c4a90d 100644 --- a/client/src/app/site/projector/components/countdown-controls/countdown-controls.component.ts +++ b/client/src/app/site/projector/components/countdown-controls/countdown-controls.component.ts @@ -4,7 +4,7 @@ import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; -import { BaseViewComponent } from '../../../base/base-view'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { ViewCountdown } from '../../models/view-countdown'; import { CountdownRepositoryService } from 'app/core/repositories/projector/countdown-repository.service'; import { ConfigService } from 'app/core/ui-services/config.service'; diff --git a/client/src/app/site/site-routing.module.ts b/client/src/app/site/site-routing.module.ts index f0715741b..7e052ee96 100644 --- a/client/src/app/site/site-routing.module.ts +++ b/client/src/app/site/site-routing.module.ts @@ -23,6 +23,11 @@ const routes: Routes = [ loadChildren: './agenda/agenda.module#AgendaModule', data: { basePerm: 'agenda.can_see' } }, + { + path: 'topics', + loadChildren: './topics/topics.module#TopicsModule', + data: { basePerm: 'agenda.can_see' } + }, { path: 'assignments', loadChildren: './assignments/assignments.module#AssignmentsModule', diff --git a/client/src/app/site/tags/components/tag-list/tag-list.component.ts b/client/src/app/site/tags/components/tag-list/tag-list.component.ts index 6f74def4f..603980d67 100644 --- a/client/src/app/site/tags/components/tag-list/tag-list.component.ts +++ b/client/src/app/site/tags/components/tag-list/tag-list.component.ts @@ -6,7 +6,7 @@ import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; import { PblColumnDefinition } from '@pebula/ngrid'; -import { ListViewBaseComponent } from '../../../base/list-view-base'; +import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { Tag } from 'app/shared/models/core/tag'; import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; @@ -24,7 +24,7 @@ import { ViewTag } from '../../models/view-tag'; templateUrl: './tag-list.component.html', styleUrls: ['./tag-list.component.scss'] }) -export class TagListComponent extends ListViewBaseComponent implements OnInit { +export class TagListComponent extends BaseListViewComponent implements OnInit { public editTag = false; public newTag = false; public selectedTag: ViewTag; diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html b/client/src/app/site/topics/components/topic-detail/topic-detail.component.html similarity index 100% rename from client/src/app/site/agenda/components/topic-detail/topic-detail.component.html rename to client/src/app/site/topics/components/topic-detail/topic-detail.component.html diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.scss b/client/src/app/site/topics/components/topic-detail/topic-detail.component.scss similarity index 100% rename from client/src/app/site/agenda/components/topic-detail/topic-detail.component.scss rename to client/src/app/site/topics/components/topic-detail/topic-detail.component.scss diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.spec.ts b/client/src/app/site/topics/components/topic-detail/topic-detail.component.spec.ts similarity index 100% rename from client/src/app/site/agenda/components/topic-detail/topic-detail.component.spec.ts rename to client/src/app/site/topics/components/topic-detail/topic-detail.component.spec.ts diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts b/client/src/app/site/topics/components/topic-detail/topic-detail.component.ts similarity index 98% rename from client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts rename to client/src/app/site/topics/components/topic-detail/topic-detail.component.ts index 7cad1089b..498485101 100644 --- a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts +++ b/client/src/app/site/topics/components/topic-detail/topic-detail.component.ts @@ -16,7 +16,7 @@ import { ItemVisibilityChoices } from 'app/shared/models/agenda/item'; import { CreateTopic } from '../../models/create-topic'; import { Topic } from 'app/shared/models/topics/topic'; import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; -import { ViewItem } from '../../models/view-item'; +import { ViewItem } from 'app/site/agenda/models/view-item'; import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service'; import { ItemRepositoryService } from 'app/core/repositories/agenda/item-repository.service'; @@ -163,7 +163,7 @@ export class TopicDetailComponent extends BaseViewComponent { * be loaded using the ID from the URL */ public getTopicByUrl(): void { - if (this.route.snapshot.url[1] && this.route.snapshot.url[1].path === 'new') { + if (this.route.snapshot.url[0] && this.route.snapshot.url[0].path === 'new') { // creates a new topic this.newTopic = true; this.editTopic = true; diff --git a/client/src/app/site/agenda/models/create-topic.ts b/client/src/app/site/topics/models/create-topic.ts similarity index 100% rename from client/src/app/site/agenda/models/create-topic.ts rename to client/src/app/site/topics/models/create-topic.ts diff --git a/client/src/app/site/agenda/models/view-create-topic.ts b/client/src/app/site/topics/models/view-create-topic.ts similarity index 100% rename from client/src/app/site/agenda/models/view-create-topic.ts rename to client/src/app/site/topics/models/view-create-topic.ts diff --git a/client/src/app/site/agenda/models/view-topic.ts b/client/src/app/site/topics/models/view-topic.ts similarity index 94% rename from client/src/app/site/agenda/models/view-topic.ts rename to client/src/app/site/topics/models/view-topic.ts index aa8f6c644..751eca253 100644 --- a/client/src/app/site/agenda/models/view-topic.ts +++ b/client/src/app/site/topics/models/view-topic.ts @@ -2,9 +2,9 @@ import { Topic } from 'app/shared/models/topics/topic'; import { SearchRepresentation } from 'app/core/ui-services/search.service'; import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; -import { ViewItem } from './view-item'; +import { ViewItem } from '../../agenda/models/view-item'; import { BaseViewModel } from 'app/site/base/base-view-model'; -import { ViewListOfSpeakers } from './view-list-of-speakers'; +import { ViewListOfSpeakers } from '../../agenda/models/view-list-of-speakers'; import { BaseViewModelWithAgendaItemAndListOfSpeakers } from 'app/site/base/base-view-model-with-agenda-item-and-list-of-speakers'; import { TitleInformationWithAgendaItem } from 'app/site/base/base-view-model-with-agenda-item'; @@ -62,7 +62,7 @@ export class ViewTopic extends BaseViewModelWithAgendaItemAndListOfSpeakers impl } public getDetailStateURL(): string { - return `/agenda/topics/${this.id}`; + return `/topics/${this.id}`; } /** diff --git a/client/src/app/site/topics/topics-routing.module.ts b/client/src/app/site/topics/topics-routing.module.ts new file mode 100644 index 000000000..10e0872bf --- /dev/null +++ b/client/src/app/site/topics/topics-routing.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { TopicDetailComponent } from './components/topic-detail/topic-detail.component'; + +const routes: Routes = [ + { path: 'new', component: TopicDetailComponent, data: { basePerm: 'agenda.can_manage' } }, + { path: ':id', component: TopicDetailComponent, data: { basePerm: 'agenda.can_see' } } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class TopicsRoutingModule {} diff --git a/client/src/app/site/topics/topics.config.ts b/client/src/app/site/topics/topics.config.ts new file mode 100644 index 000000000..e00324137 --- /dev/null +++ b/client/src/app/site/topics/topics.config.ts @@ -0,0 +1,17 @@ +import { AppConfig } from '../../core/app-config'; +import { Topic } from '../../shared/models/topics/topic'; +import { TopicRepositoryService } from 'app/core/repositories/topics/topic-repository.service'; +import { ViewTopic } from './models/view-topic'; + +export const TopicsAppConfig: AppConfig = { + name: 'topics', + models: [ + { + collectionString: 'topics/topic', + model: Topic, + viewModel: ViewTopic, + searchOrder: 1, + repository: TopicRepositoryService + } + ] +}; diff --git a/client/src/app/site/topics/topics.module.spec.ts b/client/src/app/site/topics/topics.module.spec.ts new file mode 100644 index 000000000..a9c41fa7c --- /dev/null +++ b/client/src/app/site/topics/topics.module.spec.ts @@ -0,0 +1,13 @@ +import { TopicsModule } from './topics.module'; + +describe('TopicsModule', () => { + let topicsModule: TopicsModule; + + beforeEach(() => { + topicsModule = new TopicsModule(); + }); + + it('should create an instance', () => { + expect(topicsModule).toBeTruthy(); + }); +}); diff --git a/client/src/app/site/topics/topics.module.ts b/client/src/app/site/topics/topics.module.ts new file mode 100644 index 000000000..e135c4842 --- /dev/null +++ b/client/src/app/site/topics/topics.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { SharedModule } from 'app/shared/shared.module'; +import { TopicDetailComponent } from './components/topic-detail/topic-detail.component'; +import { TopicsRoutingModule } from './topics-routing.module'; + +/** + * AppModule for the agenda and it's children. + */ +@NgModule({ + imports: [CommonModule, TopicsRoutingModule, SharedModule], + declarations: [TopicDetailComponent] +}) +export class TopicsModule {} diff --git a/client/src/app/site/users/components/group-list/group-list.component.ts b/client/src/app/site/users/components/group-list/group-list.component.ts index a2985114a..5c31f83b6 100644 --- a/client/src/app/site/users/components/group-list/group-list.component.ts +++ b/client/src/app/site/users/components/group-list/group-list.component.ts @@ -7,7 +7,7 @@ import { FormGroup, Validators, FormBuilder } from '@angular/forms'; import { GroupRepositoryService, AppPermissions } from 'app/core/repositories/users/group-repository.service'; import { ViewGroup } from '../../models/view-group'; import { Group } from 'app/shared/models/users/group'; -import { BaseViewComponent } from '../../../base/base-view'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { PromptService } from 'app/core/ui-services/prompt.service'; /** diff --git a/client/src/app/site/users/components/user-detail/user-detail.component.ts b/client/src/app/site/users/components/user-detail/user-detail.component.ts index c4263d9cf..c057a043f 100644 --- a/client/src/app/site/users/components/user-detail/user-detail.component.ts +++ b/client/src/app/site/users/components/user-detail/user-detail.component.ts @@ -6,7 +6,7 @@ import { Title, SafeHtml, DomSanitizer } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; -import { BaseViewComponent } from '../../../base/base-view'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { genders, User } from 'app/shared/models/users/user'; import { OperatorService } from 'app/core/core-services/operator.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; diff --git a/client/src/app/site/users/components/user-list/user-list.component.ts b/client/src/app/site/users/components/user-list/user-list.component.ts index 68e19f513..57c17e414 100644 --- a/client/src/app/site/users/components/user-list/user-list.component.ts +++ b/client/src/app/site/users/components/user-list/user-list.component.ts @@ -10,7 +10,7 @@ import { ChoiceService } from 'app/core/ui-services/choice.service'; import { ConfigService } from 'app/core/ui-services/config.service'; import { CsvExportService } from 'app/core/ui-services/csv-export.service'; import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service'; -import { ListViewBaseComponent } from '../../../base/list-view-base'; +import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { UserFilterListService } from '../../services/user-filter-list.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; @@ -62,7 +62,7 @@ interface InfoDialog { templateUrl: './user-list.component.html', styleUrls: ['./user-list.component.scss'] }) -export class UserListComponent extends ListViewBaseComponent implements OnInit { +export class UserListComponent extends BaseListViewComponent implements OnInit { /** * The reference to the template. */ diff --git a/client/src/app/slides/agenda/common/common-list-of-speakers-slide.module.ts b/client/src/app/slides/agenda/common/common-list-of-speakers-slide.module.ts index a1297cecc..9efad369e 100644 --- a/client/src/app/slides/agenda/common/common-list-of-speakers-slide.module.ts +++ b/client/src/app/slides/agenda/common/common-list-of-speakers-slide.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { CommonListOfSpeakersSlideComponent } from './common-list-of-speakers-slide.component'; -import { SharedModule } from '../../../shared/shared.module'; +import { SharedModule } from 'app/shared/shared.module'; @NgModule({ declarations: [CommonListOfSpeakersSlideComponent], diff --git a/client/src/app/slides/motions/motion/motion-slide-data.ts b/client/src/app/slides/motions/motion/motion-slide-data.ts index 2c3387457..f44a14fb1 100644 --- a/client/src/app/slides/motions/motion/motion-slide-data.ts +++ b/client/src/app/slides/motions/motion/motion-slide-data.ts @@ -1,4 +1,4 @@ -import { ChangeRecoMode, LineNumberingMode } from '../../../site/motions/models/view-motion'; +import { ChangeRecoMode, LineNumberingMode } from 'app/site/motions/models/view-motion'; import { ReferencedMotions } from '../base/base-motion-slide'; /** diff --git a/client/src/app/slides/motions/motion/motion-slide-obj-amendment-paragraph.ts b/client/src/app/slides/motions/motion/motion-slide-obj-amendment-paragraph.ts index c81357ad9..10f280e7d 100644 --- a/client/src/app/slides/motions/motion/motion-slide-obj-amendment-paragraph.ts +++ b/client/src/app/slides/motions/motion/motion-slide-obj-amendment-paragraph.ts @@ -1,6 +1,6 @@ -import { ViewUnifiedChange, ViewUnifiedChangeType } from '../../../shared/models/motions/view-unified-change'; +import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change'; import { MotionSlideDataAmendment } from './motion-slide-data'; -import { LineRange } from '../../../core/ui-services/diff.service'; +import { LineRange } from 'app/core/ui-services/diff.service'; /** * This class adds methods to the MotionsMotionSlideDataChangeReco data object diff --git a/client/src/app/slides/motions/motion/motion-slide-obj-change-reco.ts b/client/src/app/slides/motions/motion/motion-slide-obj-change-reco.ts index a68bd3df6..765f899b3 100644 --- a/client/src/app/slides/motions/motion/motion-slide-obj-change-reco.ts +++ b/client/src/app/slides/motions/motion/motion-slide-obj-change-reco.ts @@ -1,4 +1,4 @@ -import { ViewUnifiedChange, ViewUnifiedChangeType } from '../../../shared/models/motions/view-unified-change'; +import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change'; import { MotionSlideDataChangeReco } from './motion-slide-data'; /** diff --git a/client/src/app/slides/motions/motion/motion-slide.component.ts b/client/src/app/slides/motions/motion/motion-slide.component.ts index 623c2ba5c..16c6075ff 100644 --- a/client/src/app/slides/motions/motion/motion-slide.component.ts +++ b/client/src/app/slides/motions/motion/motion-slide.component.ts @@ -4,12 +4,12 @@ import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { MotionSlideData, MotionSlideDataAmendment } from './motion-slide-data'; -import { ChangeRecoMode, LineNumberingMode } from '../../../site/motions/models/view-motion'; -import { DiffLinesInParagraph, DiffService, LineRange } from '../../../core/ui-services/diff.service'; -import { LinenumberingService } from '../../../core/ui-services/linenumbering.service'; -import { ViewUnifiedChange } from '../../../shared/models/motions/view-unified-change'; +import { ChangeRecoMode, LineNumberingMode } from 'app/site/motions/models/view-motion'; +import { DiffLinesInParagraph, DiffService, LineRange } from 'app/core/ui-services/diff.service'; +import { LinenumberingService } from 'app/core/ui-services/linenumbering.service'; +import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change'; import { MotionSlideObjChangeReco } from './motion-slide-obj-change-reco'; -import { SlideData } from '../../../core/core-services/projector-data.service'; +import { SlideData } from 'app/core/core-services/projector-data.service'; import { MotionSlideObjAmendmentParagraph } from './motion-slide-obj-amendment-paragraph'; import { BaseMotionSlideComponent } from '../base/base-motion-slide'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; diff --git a/client/src/styles.scss b/client/src/styles.scss index 3b3db5d6a..8164cede4 100644 --- a/client/src/styles.scss +++ b/client/src/styles.scss @@ -15,7 +15,7 @@ @import './app/shared/components/projector-button/projector-button.component.scss'; @import './app/site/agenda/components/list-of-speakers/list-of-speakers.component.scss-theme.scss'; @import './app/shared/components/sorting-tree/sorting-tree.component.scss'; -@import './app/site/global-spinner/global-spinner.component.scss'; +@import './app/site/common/components/global-spinner/global-spinner.component.scss'; @import './app/shared/components/tile/tile.component.scss'; @import './app/shared/components/block-tile/block-tile.component.scss'; @import './app/shared/components/icon-container/icon-container.component.scss';