-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow using a library field when adding a new field to the form
- Loading branch information
karel kremer
committed
Jan 7, 2025
1 parent
662c5ec
commit 960760f
Showing
12 changed files
with
210 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<RdfInputFields::CustomFieldWrapper | ||
@field={{@field}} | ||
@form={{@form}} | ||
@formStore={{@formStore}} | ||
> | ||
<div class="au-o-box au-u-background-gray-100 au-u-margin-top-tiny"> | ||
<RdfInputFields::AddressSelector | ||
@inTable={{true}} | ||
@field={{@field}} | ||
@form={{@form}} | ||
@formStore={{@formStore}} | ||
@graphs={{@graphs}} | ||
@sourceNode={{@sourceNode}} | ||
@forceShowErrors={{@forceShowErrors}} | ||
@cacheConditionals={{@cacheConditionals}} | ||
@show={{@show}} | ||
/> | ||
</div> | ||
</RdfInputFields::CustomFieldWrapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Model, { attr } from '@ember-data/model'; | ||
|
||
export default class DisplayTypeModel extends Model { | ||
@attr label; | ||
@attr uri; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Model, { attr, belongsTo } from '@ember-data/model'; | ||
|
||
export default class LibraryEntryModel extends Model { | ||
@attr uri; | ||
@attr name; | ||
@attr path; | ||
@attr options; | ||
|
||
@belongsTo('displayType', { | ||
async: true, | ||
inverse: null, | ||
}) | ||
displayType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { module, test } from 'qunit'; | ||
|
||
import { setupTest } from 'frontend-lmb/tests/helpers'; | ||
|
||
module('Unit | Model | display type', function (hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function (assert) { | ||
let store = this.owner.lookup('service:store'); | ||
let model = store.createRecord('display-type', {}); | ||
assert.ok(model); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { module, test } from 'qunit'; | ||
|
||
import { setupTest } from 'frontend-lmb/tests/helpers'; | ||
|
||
module('Unit | Model | library entry', function (hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function (assert) { | ||
let store = this.owner.lookup('service:store'); | ||
let model = store.createRecord('library-entry', {}); | ||
assert.ok(model); | ||
}); | ||
}); |