-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Update API to reflect changes in silverstripe/framework #1271
base: 6
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,6 @@ | |
max-width: calc(100% - 60px); | ||
|
||
.badge { | ||
color: $state-draft; | ||
background-color: $state-modified-bg; | ||
Comment on lines
-32
to
-33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rely on silverstripe/admin styling for colours |
||
padding: 2px 3px 2px 4px; | ||
margin-left: 0.5rem; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,7 @@ public function apiReadElements(HTTPRequest $request): HTTPResponse | |
'canPublish' => $element->canPublish(), | ||
'canUnpublish' => $element->canUnpublish(), | ||
'canCreate' => $element->canCreate(), | ||
'statusFlags' => $element->getStatusFlags(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pulls through status flags for use in javascript |
||
]; | ||
} | ||
$this->extend('updateApiReadElementalArea', $data, $request); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're rendering potentially multiple badges now, so I've updated the logic to handle that and to pull the status flags from
BaseElement
.