Merge pull request #4523 from tsiegleauq/motion-amendment-fixes
Add motion to motion change observation
This commit is contained in:
commit
b9a3308b60
@ -101,7 +101,8 @@ export class MotionRepositoryService extends BaseAgendaContentObjectRepository<V
|
||||
Mediafile,
|
||||
Tag,
|
||||
MotionChangeRecommendation,
|
||||
PersonalNote
|
||||
PersonalNote,
|
||||
Motion
|
||||
]);
|
||||
config.get<SortProperty>('motions_motions_sorting').subscribe(conf => {
|
||||
this.sortProperty = conf;
|
||||
|
@ -628,7 +628,10 @@ export class ViewMotion extends BaseAgendaViewModel implements Searchable {
|
||||
|
||||
public getSlide(configService: ConfigService): ProjectorElementBuildDeskriptor {
|
||||
const slideOptions = [];
|
||||
if ((this.changeRecommendations && this.changeRecommendations.length) || this.amendments) {
|
||||
if (
|
||||
(this.changeRecommendations && this.changeRecommendations.length) ||
|
||||
(this.amendments && this.amendments.length)
|
||||
) {
|
||||
slideOptions.push({
|
||||
key: 'mode',
|
||||
displayName: _('Which version?'),
|
||||
|
@ -1,7 +1,7 @@
|
||||
<os-head-bar
|
||||
[mainButton]="perms.isAllowed('update', motion)"
|
||||
mainButtonIcon="edit"
|
||||
[prevUrl]="backTarget"
|
||||
[prevUrl]="getPrevUrl()"
|
||||
[nav]="false"
|
||||
[editMode]="editMotion"
|
||||
(mainEvent)="setEditMode(!editMotion)"
|
||||
|
@ -336,13 +336,6 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
||||
*/
|
||||
private editNotificationSubscription: Subscription;
|
||||
|
||||
/**
|
||||
* Determine what to "return" to.
|
||||
* Handles the target for clicking the back button
|
||||
* Several angular peculiarities prevent dynamic changing from working right now
|
||||
*/
|
||||
public backTarget = '../..';
|
||||
|
||||
/**
|
||||
* Hold the subscription to the navigation.
|
||||
* This cannot go into the subscription-list, since it should
|
||||
@ -1479,6 +1472,20 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
||||
this.raiseError(error);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to "logically" navigate back. If the motion has a parent, it will
|
||||
* try to navigate to the parent
|
||||
* rather than just into the list view.
|
||||
*
|
||||
* @returns the target to navigate to
|
||||
*/
|
||||
public getPrevUrl(): string {
|
||||
if (this.motion.parent_id) {
|
||||
return `../../${this.motion.parent_id}`;
|
||||
}
|
||||
return '../..';
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to prevent automatically closing the window/tab,
|
||||
* if the user is editing a motion.
|
||||
|
Loading…
Reference in New Issue
Block a user