Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 73 additions & 1 deletion cap-notebook/demoapp/app/common.cds
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ annotate my.Books.attachments with @UI: {
TypeNamePlural: '{i18n>Attachments}',
},
LineItem : [
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
Expand Down Expand Up @@ -150,7 +158,15 @@ annotate my.Books.references with @UI: {
TypeNamePlural: '{i18n>Attachments}',
},
LineItem : [
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
{Value: createdAt, @HTML5.CssDefaults: {width: '15%'}},
Expand Down Expand Up @@ -231,6 +247,14 @@ annotate my.Books.footnotes with @UI: {
TypeNamePlural: '{i18n>Attachments}',
},
LineItem : [
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
Expand Down Expand Up @@ -312,6 +336,14 @@ annotate my.Chapters.attachments with @UI: {
TypeNamePlural: '{i18n>Attachments}',
},
LineItem : [
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
Expand Down Expand Up @@ -393,6 +425,14 @@ annotate my.Chapters.references with @UI: {
TypeNamePlural: '{i18n>References}',
},
LineItem : [
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
Expand Down Expand Up @@ -474,6 +514,14 @@ annotate my.Chapters.footnotes with @UI: {
TypeNamePlural: '{i18n>Footnotes}',
},
LineItem : [
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
Expand Down Expand Up @@ -555,6 +603,14 @@ annotate my.Pages.attachments with @UI: {
TypeNamePlural: '{i18n>Attachments}',
},
LineItem : [
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
Expand Down Expand Up @@ -636,6 +692,14 @@ annotate my.Pages.references with @UI: {
TypeNamePlural: '{i18n>References}',
},
LineItem : [
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
Expand Down Expand Up @@ -717,6 +781,14 @@ annotate my.Pages.footnotes with @UI: {
TypeNamePlural: '{i18n>Footnotes}',
},
LineItem : [
{
$Type : 'UI.DataFieldForAction',
Action: 'AdminService.createAttachmentInActive',
Label : 'Create Attachment',
Inline: false,
RequiresSelection: false,
![@UI.Hidden]: {$edmJson: {$Ne: [ {$Path: 'IsActiveEntity'}, true ]}}
},
{Value: type, @HTML5.CssDefaults: {width: '10%'}},
{Value: fileName, @HTML5.CssDefaults: {width: '20%'}},
{Value: content, @HTML5.CssDefaults: {width: '0%'}},
Expand Down
18 changes: 18 additions & 0 deletions cap-notebook/demoapp/srv/admin-service.cds
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Books.attachments as projection on my.Books.attachments
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down Expand Up @@ -43,6 +45,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Books.references as projection on my.Books.references
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down Expand Up @@ -72,6 +76,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Books.footnotes as projection on my.Books.footnotes
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down Expand Up @@ -101,6 +107,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Pages.attachments as projection on my.Pages.attachments
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down Expand Up @@ -130,6 +138,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Pages.references as projection on my.Pages.references
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down Expand Up @@ -159,6 +169,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Chapters.attachments as projection on my.Chapters.attachments
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down Expand Up @@ -188,6 +200,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Chapters.references as projection on my.Chapters.references
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down Expand Up @@ -217,6 +231,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Chapters.footnotes as projection on my.Chapters.footnotes
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down Expand Up @@ -247,6 +263,8 @@ service AdminService @(requires: ['admin','system-user']) {
entity Pages.footnotes as projection on my.Pages.footnotes
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action createAttachmentInActive(in:many $self);
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
// moveAttachments action signature
@(Common.SideEffects : {TargetEntities: ['']})
Expand Down
Loading
Loading