@lblod/ember-rdfa-editor-lblod-plugins 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-it.json +14 -0
- package/.woodpecker/.release.yml +15 -0
- package/.woodpecker/.test.yml +23 -0
- package/CHANGELOG.md +84 -0
- package/README.md +311 -14
- package/RELEASE.md +60 -0
- package/addon/commands/generate-template-command.js +35 -0
- package/addon/commands/insert-and-collapse.js +32 -0
- package/addon/commands/modify-date-command.js +42 -0
- package/addon/components/besluit-type-plugin/besluit-type-select.hbs +28 -0
- package/addon/components/besluit-type-plugin/besluit-type-select.js +21 -0
- package/addon/components/besluit-type-plugin/toolbar-dropdown.hbs +83 -0
- package/addon/components/besluit-type-plugin/toolbar-dropdown.js +188 -0
- package/addon/components/citaten-plugin/citaat-card.hbs +76 -0
- package/addon/components/citaten-plugin/citaat-card.js +286 -0
- package/addon/components/citaten-plugin/citaat-insert.hbs +20 -0
- package/addon/components/citaten-plugin/citaat-insert.js +68 -0
- package/addon/components/citaten-plugin/citations/article-list.hbs +13 -0
- package/addon/components/citaten-plugin/citations/article-preview.hbs +16 -0
- package/addon/components/citaten-plugin/citations/decision-detail.hbs +110 -0
- package/addon/components/citaten-plugin/citations/decision-detail.js +94 -0
- package/addon/components/citaten-plugin/citations/decision-list.hbs +15 -0
- package/addon/components/citaten-plugin/citations/decision-preview.hbs +53 -0
- package/addon/components/citaten-plugin/citations/search-modal.hbs +175 -0
- package/addon/components/citaten-plugin/citations/search-modal.js +244 -0
- package/addon/components/citaten-plugin/helpers/alert-load-error.hbs +21 -0
- package/addon/components/citaten-plugin/helpers/alert-no-items.hbs +10 -0
- package/addon/components/import-snippet-plugin/card.hbs +17 -0
- package/addon/components/import-snippet-plugin/card.js +95 -0
- package/addon/components/insert-variable-plugin/insert-variable-card.hbs +33 -0
- package/addon/components/insert-variable-plugin/insert-variable-card.js +125 -0
- package/addon/components/rdfa-date-plugin/rdfa-date-plugin-card.hbs +22 -0
- package/addon/components/rdfa-date-plugin/rdfa-date-plugin-card.js +64 -0
- package/addon/components/rdfa-date-plugin/rdfa-date-plugin-insert.hbs +18 -0
- package/addon/components/rdfa-date-plugin/rdfa-date-plugin-insert.js +24 -0
- package/addon/components/rdfa-date-plugin/rdfa-date-time-picker.hbs +21 -0
- package/addon/components/rdfa-date-plugin/rdfa-date-time-picker.js +73 -0
- package/addon/components/roadsign-regulation-plugin/expanded-measure.hbs +44 -0
- package/addon/components/roadsign-regulation-plugin/expanded-measure.js +38 -0
- package/addon/components/roadsign-regulation-plugin/measure-template.hbs +5 -0
- package/addon/components/roadsign-regulation-plugin/measure-template.js +30 -0
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.hbs +12 -0
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.js +101 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-modal.hbs +92 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-modal.js +268 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-pagination.hbs +25 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-pagination.js +55 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.hbs +73 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.js +24 -0
- package/addon/components/standard-template-plugin/template-card.hbs +16 -0
- package/addon/components/standard-template-plugin/template-card.js +7 -0
- package/addon/components/standard-template-plugin/template-provider.hbs +6 -0
- package/addon/components/standard-template-plugin/template-provider.js +75 -0
- package/addon/components/table-of-contents-plugin/card.hbs +5 -0
- package/addon/components/table-of-contents-plugin/card.js +53 -0
- package/addon/components/table-of-contents-plugin/inline-components/outline.hbs +21 -0
- package/addon/components/table-of-contents-plugin/inline-components/table-of-contents.hbs +9 -0
- package/addon/components/table-of-contents-plugin/inline-components/table-of-contents.js +100 -0
- package/addon/components/template-variable-plugin/template-variable-card.hbs +34 -0
- package/addon/components/template-variable-plugin/template-variable-card.js +230 -0
- package/addon/constants.js +24 -0
- package/{dist → addon}/helpers/limit-text.js +1 -4
- package/addon/initializers/plugin-initializer.js +75 -0
- package/addon/inline-components/table-of-contents.js +43 -0
- package/addon/marks/citaten-mark.js +32 -0
- package/addon/models/instruction.js +19 -0
- package/addon/models/measure.js +46 -0
- package/{dist → addon}/models/sign.js +12 -13
- package/addon/models/template.js +9 -0
- package/addon/plugins/besluit-type-plugin.js +16 -0
- package/addon/plugins/citaten-plugin.js +22 -0
- package/addon/plugins/generate-template-plugin.js +16 -0
- package/addon/plugins/import-snippet-plugin.js +16 -0
- package/addon/plugins/insert-variable-plugin.js +19 -0
- package/addon/plugins/rdfa-date-plugin.js +26 -0
- package/addon/plugins/roadsign-regulation-plugin.js +24 -0
- package/addon/plugins/standard-template-plugin.js +33 -0
- package/addon/plugins/table-of-contents-plugin.js +27 -0
- package/addon/plugins/template-variable-plugin.js +21 -0
- package/addon/serializers/application.js +8 -0
- package/{dist → addon}/services/import-rdfa-snippet.js +28 -18
- package/{dist → addon}/services/roadsign-registry.js +67 -121
- package/addon/services/standard-template-plugin.js +45 -0
- package/addon/utils/fetchBesluitTypes.js +90 -0
- package/addon/utils/generate-template-plugin/default-resources.js +9 -0
- package/addon/utils/instantiate-uuids.js +34 -0
- package/addon/utils/legislation-types.js +32 -0
- package/addon/utils/memoize.js +8 -0
- package/addon/utils/processMatch.js +80 -0
- package/addon/utils/roadsign-regulation-plugin/fetchData.js +78 -0
- package/addon/utils/roadsign-regulation-plugin/includeInstructions.js +10 -0
- package/addon/utils/variable-plugins/default-variable-types.js +56 -0
- package/{dist/fetch-data-284bf106.js → addon/utils/variable-plugins/fetch-data.js} +36 -18
- package/{dist/vlaamse-codex-187fe526.js → addon/utils/vlaamse-codex.js} +159 -63
- package/app/components/besluit-type-plugin/besluit-type-select.js +1 -0
- package/app/components/besluit-type-plugin/toolbar-dropdown.js +1 -0
- package/app/components/citaten-plugin/citaat-card.js +1 -0
- package/app/components/citaten-plugin/citaat-insert.js +1 -0
- package/app/components/citaten-plugin/citations/article-list.js +1 -0
- package/app/components/citaten-plugin/citations/article-preview.js +1 -0
- package/app/components/citaten-plugin/citations/decision-detail.js +1 -0
- package/app/components/citaten-plugin/citations/decision-list.js +1 -0
- package/app/components/citaten-plugin/citations/decision-preview.js +1 -0
- package/app/components/citaten-plugin/citations/modal.js +1 -0
- package/app/components/citaten-plugin/citations/search-modal.js +1 -0
- package/app/components/citaten-plugin/helpers/alert-load-error.js +1 -0
- package/app/components/citaten-plugin/helpers/alert-no-items.js +1 -0
- package/app/components/import-snippet-plugin/card.js +1 -0
- package/app/components/insert-variable-plugin/insert-variable-card.js +1 -0
- package/app/components/rdfa-date-plugin/rdfa-date-plugin-card.js +1 -0
- package/app/components/rdfa-date-plugin/rdfa-date-plugin-insert.js +1 -0
- package/app/components/rdfa-date-plugin/rdfa-date-time-picker.js +1 -0
- package/app/components/roadsign-regulation-plugin/expanded-measure.js +1 -0
- package/app/components/roadsign-regulation-plugin/measure-template.js +1 -0
- package/app/components/roadsign-regulation-plugin/roadsign-regulation-card.js +1 -0
- package/app/components/roadsign-regulation-plugin/roadsigns-modal.js +1 -0
- package/app/components/roadsign-regulation-plugin/roadsigns-pagination.js +1 -0
- package/app/components/roadsign-regulation-plugin/roadsigns-table.js +1 -0
- package/app/components/standard-template-plugin/template-card.js +1 -0
- package/app/components/standard-template-plugin/template-provider.js +1 -0
- package/app/components/table-of-contents-plugin/card.js +1 -0
- package/app/components/table-of-contents-plugin/inline-components/outline.js +1 -0
- package/app/components/table-of-contents-plugin/inline-components/table-of-contents.js +1 -0
- package/app/components/template-variable-plugin/template-variable-card.js +1 -0
- package/app/helpers/limit-text.js +4 -0
- package/app/initializers/plugin-initializer.js +4 -0
- package/app/models/instruction.js +1 -0
- package/app/models/measure.js +1 -0
- package/app/models/sign.js +1 -0
- package/app/models/template.js +1 -0
- package/app/serializers/application.js +1 -0
- package/app/services/import-rdfa-snippet.js +1 -0
- package/app/services/rdfa-editor-roadsign-regulation-plugin.js +1 -0
- package/app/services/roadsign-registry.js +1 -0
- package/app/services/standard-template-plugin.js +1 -0
- package/{dist → app}/styles/citaten-plugin.scss +0 -0
- package/config/environment.js +0 -1
- package/index.js +8 -0
- package/package.json +112 -107
- package/tsconfig.json +42 -0
- package/types/dummy/index.d.ts +1 -0
- package/types/ember-data/types/registries/model.d.ts +6 -0
- package/types/global.d.ts +7 -0
- package/addon-main.js +0 -4
- package/dist/_app_/components/besluit-type-plugin/besluit-type-select.js +0 -1
- package/dist/_app_/components/besluit-type-plugin/toolbar-dropdown.js +0 -1
- package/dist/_app_/components/citaten-plugin/citaat-card.js +0 -1
- package/dist/_app_/components/citaten-plugin/citaat-insert.js +0 -1
- package/dist/_app_/components/citaten-plugin/citations/article-list.js +0 -1
- package/dist/_app_/components/citaten-plugin/citations/article-preview.js +0 -1
- package/dist/_app_/components/citaten-plugin/citations/decision-detail.js +0 -1
- package/dist/_app_/components/citaten-plugin/citations/decision-list.js +0 -1
- package/dist/_app_/components/citaten-plugin/citations/decision-preview.js +0 -1
- package/dist/_app_/components/citaten-plugin/citations/search-modal.js +0 -1
- package/dist/_app_/components/citaten-plugin/helpers/alert-load-error.js +0 -1
- package/dist/_app_/components/citaten-plugin/helpers/alert-no-items.js +0 -1
- package/dist/_app_/components/import-snippet-plugin/card.js +0 -1
- package/dist/_app_/components/insert-variable-plugin/insert-variable-card.js +0 -1
- package/dist/_app_/components/rdfa-date-plugin/rdfa-date-plugin-card.js +0 -1
- package/dist/_app_/components/rdfa-date-plugin/rdfa-date-plugin-insert.js +0 -1
- package/dist/_app_/components/rdfa-date-plugin/rdfa-date-time-picker.js +0 -1
- package/dist/_app_/components/roadsign-regulation-plugin/expanded-measure.js +0 -1
- package/dist/_app_/components/roadsign-regulation-plugin/measure-template.js +0 -1
- package/dist/_app_/components/roadsign-regulation-plugin/roadsign-regulation-card.js +0 -1
- package/dist/_app_/components/roadsign-regulation-plugin/roadsigns-modal.js +0 -1
- package/dist/_app_/components/roadsign-regulation-plugin/roadsigns-pagination.js +0 -1
- package/dist/_app_/components/roadsign-regulation-plugin/roadsigns-table.js +0 -1
- package/dist/_app_/components/standard-template-plugin/template-card.js +0 -1
- package/dist/_app_/components/standard-template-plugin/template-provider.js +0 -1
- package/dist/_app_/components/table-of-contents-plugin/card.js +0 -1
- package/dist/_app_/components/table-of-contents-plugin/inline-components/outline.js +0 -1
- package/dist/_app_/components/table-of-contents-plugin/inline-components/table-of-contents.js +0 -1
- package/dist/_app_/components/template-variable-plugin/template-variable-card.js +0 -1
- package/dist/_app_/helpers/limit-text.js +0 -1
- package/dist/_app_/initializers/plugin-initializer.js +0 -1
- package/dist/_app_/models/instruction.js +0 -1
- package/dist/_app_/models/measure.js +0 -1
- package/dist/_app_/models/sign.js +0 -1
- package/dist/_app_/models/template.js +0 -1
- package/dist/_app_/serializers/application.js +0 -1
- package/dist/_app_/services/import-rdfa-snippet.js +0 -1
- package/dist/_app_/services/roadsign-registry.js +0 -1
- package/dist/_app_/services/standard-template-plugin.js +0 -1
- package/dist/_rollupPluginBabelHelpers-537ad14b.js +0 -48
- package/dist/_rollupPluginBabelHelpers-537ad14b.js.map +0 -1
- package/dist/components/besluit-type-plugin/besluit-type-select.js +0 -30
- package/dist/components/besluit-type-plugin/besluit-type-select.js.map +0 -1
- package/dist/components/besluit-type-plugin/toolbar-dropdown.js +0 -292
- package/dist/components/besluit-type-plugin/toolbar-dropdown.js.map +0 -1
- package/dist/components/citaten-plugin/citaat-card.js +0 -367
- package/dist/components/citaten-plugin/citaat-card.js.map +0 -1
- package/dist/components/citaten-plugin/citaat-insert.js +0 -84
- package/dist/components/citaten-plugin/citaat-insert.js.map +0 -1
- package/dist/components/citaten-plugin/citations/article-list.js +0 -10
- package/dist/components/citaten-plugin/citations/article-list.js.map +0 -1
- package/dist/components/citaten-plugin/citations/article-preview.js +0 -10
- package/dist/components/citaten-plugin/citations/article-preview.js.map +0 -1
- package/dist/components/citaten-plugin/citations/decision-detail.js +0 -123
- package/dist/components/citaten-plugin/citations/decision-detail.js.map +0 -1
- package/dist/components/citaten-plugin/citations/decision-list.js +0 -10
- package/dist/components/citaten-plugin/citations/decision-list.js.map +0 -1
- package/dist/components/citaten-plugin/citations/decision-preview.js +0 -10
- package/dist/components/citaten-plugin/citations/decision-preview.js.map +0 -1
- package/dist/components/citaten-plugin/citations/search-modal.js +0 -282
- package/dist/components/citaten-plugin/citations/search-modal.js.map +0 -1
- package/dist/components/citaten-plugin/helpers/alert-load-error.js +0 -10
- package/dist/components/citaten-plugin/helpers/alert-load-error.js.map +0 -1
- package/dist/components/citaten-plugin/helpers/alert-no-items.js +0 -10
- package/dist/components/citaten-plugin/helpers/alert-no-items.js.map +0 -1
- package/dist/components/import-snippet-plugin/card.js +0 -99
- package/dist/components/import-snippet-plugin/card.js.map +0 -1
- package/dist/components/insert-variable-plugin/insert-variable-card.js +0 -190
- package/dist/components/insert-variable-plugin/insert-variable-card.js.map +0 -1
- package/dist/components/rdfa-date-plugin/rdfa-date-plugin-card.js +0 -85
- package/dist/components/rdfa-date-plugin/rdfa-date-plugin-card.js.map +0 -1
- package/dist/components/rdfa-date-plugin/rdfa-date-plugin-insert.js +0 -23
- package/dist/components/rdfa-date-plugin/rdfa-date-plugin-insert.js.map +0 -1
- package/dist/components/rdfa-date-plugin/rdfa-date-time-picker.js +0 -91
- package/dist/components/rdfa-date-plugin/rdfa-date-time-picker.js.map +0 -1
- package/dist/components/roadsign-regulation-plugin/expanded-measure.js +0 -52
- package/dist/components/roadsign-regulation-plugin/expanded-measure.js.map +0 -1
- package/dist/components/roadsign-regulation-plugin/measure-template.js +0 -42
- package/dist/components/roadsign-regulation-plugin/measure-template.js.map +0 -1
- package/dist/components/roadsign-regulation-plugin/roadsign-regulation-card.js +0 -82
- package/dist/components/roadsign-regulation-plugin/roadsign-regulation-card.js.map +0 -1
- package/dist/components/roadsign-regulation-plugin/roadsigns-modal.js +0 -251
- package/dist/components/roadsign-regulation-plugin/roadsigns-modal.js.map +0 -1
- package/dist/components/roadsign-regulation-plugin/roadsigns-pagination.js +0 -71
- package/dist/components/roadsign-regulation-plugin/roadsigns-pagination.js.map +0 -1
- package/dist/components/roadsign-regulation-plugin/roadsigns-table.js +0 -36
- package/dist/components/roadsign-regulation-plugin/roadsigns-table.js.map +0 -1
- package/dist/components/standard-template-plugin/template-card.js +0 -15
- package/dist/components/standard-template-plugin/template-card.js.map +0 -1
- package/dist/components/standard-template-plugin/template-provider.js +0 -109
- package/dist/components/standard-template-plugin/template-provider.js.map +0 -1
- package/dist/components/table-of-contents-plugin/card.js +0 -52
- package/dist/components/table-of-contents-plugin/card.js.map +0 -1
- package/dist/components/table-of-contents-plugin/inline-components/outline.js +0 -10
- package/dist/components/table-of-contents-plugin/inline-components/outline.js.map +0 -1
- package/dist/components/table-of-contents-plugin/inline-components/table-of-contents.js +0 -92
- package/dist/components/table-of-contents-plugin/inline-components/table-of-contents.js.map +0 -1
- package/dist/components/template-variable-plugin/template-variable-card.js +0 -178
- package/dist/components/template-variable-plugin/template-variable-card.js.map +0 -1
- package/dist/constants-c77fd478.js +0 -16
- package/dist/constants-c77fd478.js.map +0 -1
- package/dist/fetch-data-284bf106.js.map +0 -1
- package/dist/helpers/limit-text.js.map +0 -1
- package/dist/includeInstructions-a32c24e6.js +0 -10
- package/dist/includeInstructions-a32c24e6.js.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/initializers/plugin-initializer.js +0 -401
- package/dist/initializers/plugin-initializer.js.map +0 -1
- package/dist/legislation-types-4d487cb9.js +0 -26
- package/dist/legislation-types-4d487cb9.js.map +0 -1
- package/dist/models/instruction.js +0 -18
- package/dist/models/instruction.js.map +0 -1
- package/dist/models/measure.js +0 -41
- package/dist/models/measure.js.map +0 -1
- package/dist/models/sign.js.map +0 -1
- package/dist/models/template.js +0 -48
- package/dist/models/template.js.map +0 -1
- package/dist/serializers/application.js +0 -10
- package/dist/serializers/application.js.map +0 -1
- package/dist/services/import-rdfa-snippet.js.map +0 -1
- package/dist/services/roadsign-registry.js.map +0 -1
- package/dist/services/standard-template-plugin.js +0 -53
- package/dist/services/standard-template-plugin.js.map +0 -1
- package/dist/styles/test.css +0 -0
- package/dist/vlaamse-codex-187fe526.js.map +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { action } from '@ember/object';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { LEGISLATION_TYPES } from '../../utils/legislation-types';
|
|
5
|
+
export default class EditorPluginsCitaatInsertComponent extends Component {
|
|
6
|
+
@tracked disableInsert = false;
|
|
7
|
+
@tracked showModal = false;
|
|
8
|
+
@tracked legislationTypeUri = LEGISLATION_TYPES.decreet;
|
|
9
|
+
@tracked text = '';
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.args.controller.onEvent(
|
|
14
|
+
'selectionChanged',
|
|
15
|
+
this.onSelectionChanged.bind(this)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
onSelectionChanged() {
|
|
20
|
+
const selectedRange = this.args.controller.selection.lastRange;
|
|
21
|
+
if (!selectedRange) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const limitedDatastore = this.args.controller.datastore.limitToRange(
|
|
25
|
+
selectedRange,
|
|
26
|
+
'rangeIsInside'
|
|
27
|
+
);
|
|
28
|
+
const motivering = limitedDatastore
|
|
29
|
+
.match(null, '>http://data.vlaanderen.be/ns/besluit#motivering')
|
|
30
|
+
.asQuads()
|
|
31
|
+
.next().value;
|
|
32
|
+
this.disableInsert = motivering ? false : true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@action
|
|
36
|
+
openModal() {
|
|
37
|
+
this.showModal = true;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@action
|
|
41
|
+
closeModal() {
|
|
42
|
+
this.showModal = false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@action
|
|
46
|
+
insertDecisionCitation(decision) {
|
|
47
|
+
const type = decision.legislationType.label;
|
|
48
|
+
const uri = decision.uri;
|
|
49
|
+
const title = decision.title;
|
|
50
|
+
const range = this.args.controller.selection.lastRange;
|
|
51
|
+
const citationHtml = `${
|
|
52
|
+
type ? type : ''
|
|
53
|
+
} <a class="annotation" href="${uri}" property="eli:cites" typeof="eli:LegalExpression">${title}</a> `;
|
|
54
|
+
this.args.controller.executeCommand('insert-html', citationHtml, range);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@action
|
|
58
|
+
insertArticleCitation(decision, article) {
|
|
59
|
+
const type = decision.legislationType.label;
|
|
60
|
+
const uri = article.uri;
|
|
61
|
+
const title = `${decision.title}, ${article.number}`;
|
|
62
|
+
const range = this.args.controller.selection.lastRange;
|
|
63
|
+
const citationHtml = `${
|
|
64
|
+
type ? type : ''
|
|
65
|
+
} <a class="annotation" href="${uri}" property="eli:cites" typeof="eli:LegalExpression">${title}</a> `;
|
|
66
|
+
this.args.controller.executeCommand('insert-html', citationHtml, range);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{{#if @articles.length}}
|
|
2
|
+
<AuList @direction="vertical" @divider={{true}}>
|
|
3
|
+
{{#each @articles as |article|}}
|
|
4
|
+
<AuList::Item>
|
|
5
|
+
<CitatenPlugin::Citations::ArticlePreview
|
|
6
|
+
@insertArticleCitation={{fn @insertArticleCitation article}}
|
|
7
|
+
@article={{article}} />
|
|
8
|
+
</AuList::Item>
|
|
9
|
+
{{/each}}
|
|
10
|
+
</AuList>
|
|
11
|
+
{{else}}
|
|
12
|
+
<CitatenPlugin::Helpers::AlertNoItems @fullSize={{@fullSize}} class={{if @fullSize "au-u-margin"}}/>
|
|
13
|
+
{{/if}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div class="au-u-margin" ...attributes>
|
|
2
|
+
<AuHeading @level="3" @skin="5" class="au-u-margin-bottom-small">
|
|
3
|
+
{{@article.number}} ({{@article.dateInForce}} - {{if @article.dateNoLongerInForce @article.dateNoLongerInForce "…"}})
|
|
4
|
+
</AuHeading>
|
|
5
|
+
<p>
|
|
6
|
+
{{@article.content}}
|
|
7
|
+
</p>
|
|
8
|
+
<AuButton
|
|
9
|
+
@skin="primary"
|
|
10
|
+
@icon="plus-text"
|
|
11
|
+
@iconAlignment="left"
|
|
12
|
+
class="au-u-margin-top-small"
|
|
13
|
+
{{on "click" @insertArticleCitation}}>
|
|
14
|
+
{{t "citaten-plugin.references.refer-article"}}
|
|
15
|
+
</AuButton>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<div class="citaten--main-container au-u-flex au-u-flex--column au-u-flex--between">
|
|
2
|
+
<div class="citaten--container-content">
|
|
3
|
+
{{! Heading with title and actions }}
|
|
4
|
+
<div class="citaten--container-header au-u-background-gray-100 au-o-box">
|
|
5
|
+
<AuHeading @level="2" @skin="4">
|
|
6
|
+
{{capitalize @decision.fullTitle}}
|
|
7
|
+
</AuHeading>
|
|
8
|
+
{{#if @decision.publicationDate}}
|
|
9
|
+
<AuPill
|
|
10
|
+
class="au-u-margin-top-small au-u-margin-bottom-small"
|
|
11
|
+
@skin="border"
|
|
12
|
+
@icon="calendar"
|
|
13
|
+
@iconAlignment="left">
|
|
14
|
+
{{@decision.publicationDate}}
|
|
15
|
+
</AuPill>
|
|
16
|
+
{{/if}}
|
|
17
|
+
<br />
|
|
18
|
+
<AuButton
|
|
19
|
+
@skin="primary"
|
|
20
|
+
@icon="plus-text"
|
|
21
|
+
@iconAlignment="left"
|
|
22
|
+
class="au-u-margin-right"
|
|
23
|
+
{{on "click" (fn @insertDecisionCitation @decision)}}>
|
|
24
|
+
{{t "citaten-plugin.references.refer-whole"}}
|
|
25
|
+
</AuButton>
|
|
26
|
+
<AuLinkExternal
|
|
27
|
+
@skin="primary"
|
|
28
|
+
@icon="link-external"
|
|
29
|
+
@iconAlignment="left"
|
|
30
|
+
href={{@decision.uri}}
|
|
31
|
+
rel="noreferrer noopener">
|
|
32
|
+
{{t "citaten-plugin.references.lookup-codex"}}
|
|
33
|
+
</AuLinkExternal>
|
|
34
|
+
{{! Search field }}
|
|
35
|
+
<AuLabel class="au-u-margin-top-small au-margin-bottom-small" for="searchCodex" @inline={{true}} @required={{false}} @error={{false}} @warning={{false}}>{{t "citaten-plugin.search.article"}}</AuLabel>
|
|
36
|
+
<AuInput id="searchCodex" placeholder="{{t "citaten-plugin.citaten-plugin.search.article-placeholder"}}" @type="text" @width="default" @icon="search" @iconAlignment="right" @value={{this.articleFilter}} {{on "input" (perform this.updateArticleFilter)}}/>
|
|
37
|
+
</div>
|
|
38
|
+
{{! Search results }}
|
|
39
|
+
<div>
|
|
40
|
+
{{#if this.articleResource.isRunning}}
|
|
41
|
+
<div class="au-o-box">
|
|
42
|
+
<AuLoader @padding="large" />
|
|
43
|
+
<span class="au-u-hidden-visually">{{t "citaten-plugin.alert.loading"}}</span>
|
|
44
|
+
</div>
|
|
45
|
+
{{else}}
|
|
46
|
+
{{#if this.error}}
|
|
47
|
+
<CitatenPlugin::Helpers::AlertLoadError @fullSize={{true}} @error={{this.error}} class="au-o-box" />
|
|
48
|
+
{{else}}
|
|
49
|
+
<CitatenPlugin::Citations::ArticleList
|
|
50
|
+
@insertArticleCitation={{fn @insertArticleCitation @decision}}
|
|
51
|
+
@articles={{this.articleResource.value}}
|
|
52
|
+
@fullSize={{true}}/>
|
|
53
|
+
{{/if}}
|
|
54
|
+
{{/if}}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
{{! Footer }}
|
|
58
|
+
<div>
|
|
59
|
+
<div class="citaten--container-footer au-u-background-gray-100">
|
|
60
|
+
<AuToolbar
|
|
61
|
+
@border="top"
|
|
62
|
+
@size="large"
|
|
63
|
+
@nowrap={{true}}>
|
|
64
|
+
<div class="au-c-pagination">
|
|
65
|
+
{{! Always shown, back to main dialog }}
|
|
66
|
+
<div class="au-c-pagination__list-item">
|
|
67
|
+
<AuButton
|
|
68
|
+
@skin="link"
|
|
69
|
+
@icon="hierarchical-back"
|
|
70
|
+
@iconAlignment="left"
|
|
71
|
+
{{on "click" this.close}}>
|
|
72
|
+
{{t "citaten-plugin.search.back"}}
|
|
73
|
+
</AuButton>
|
|
74
|
+
</div>
|
|
75
|
+
{{! Pagination of articles }}
|
|
76
|
+
{{#if this.articleResource.value.length}}
|
|
77
|
+
<p>
|
|
78
|
+
<span class="au-u-hidden-visually">{{t "citaten-plugin.search.results"}}</span>
|
|
79
|
+
<strong>
|
|
80
|
+
{{this.rangeStart}} - {{this.rangeEnd}}
|
|
81
|
+
</strong>
|
|
82
|
+
{{t "citaten-plugin.pagination.of"}}
|
|
83
|
+
{{this.totalCount}}
|
|
84
|
+
</p>
|
|
85
|
+
<div class="au-c-pagination__list-item">
|
|
86
|
+
{{#unless this.isFirstPage}}
|
|
87
|
+
<AuButton
|
|
88
|
+
@skin="link"
|
|
89
|
+
@icon="nav-left"
|
|
90
|
+
@iconAlignment="left"
|
|
91
|
+
{{on "click" this.previousPage}}>
|
|
92
|
+
{{t "citaten-plugin.pagination.previous"}}
|
|
93
|
+
</AuButton>
|
|
94
|
+
{{/unless}}
|
|
95
|
+
{{#unless this.isLastPage}}
|
|
96
|
+
<AuButton
|
|
97
|
+
@skin="link"
|
|
98
|
+
@icon="nav-right"
|
|
99
|
+
@iconAlignment="right"
|
|
100
|
+
{{on "click" this.nextPage}}>
|
|
101
|
+
{{t "citaten-plugin.pagination.next"}}
|
|
102
|
+
</AuButton>
|
|
103
|
+
{{/unless}}
|
|
104
|
+
</div>
|
|
105
|
+
{{/if}}
|
|
106
|
+
</div>
|
|
107
|
+
</AuToolbar>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { timeout } from 'ember-concurrency';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { fetchArticles } from '../../../utils/vlaamse-codex';
|
|
6
|
+
import { task } from 'ember-concurrency';
|
|
7
|
+
import { task as trackedTask } from 'ember-resources/util/ember-concurrency';
|
|
8
|
+
|
|
9
|
+
export default class EditorPluginsCitationsDecisionDetailComponent extends Component {
|
|
10
|
+
@tracked error;
|
|
11
|
+
@tracked pageNumber = 0;
|
|
12
|
+
@tracked pageSize = 5;
|
|
13
|
+
@tracked totalCount;
|
|
14
|
+
@tracked articles = [];
|
|
15
|
+
@tracked articleFilter;
|
|
16
|
+
@tracked articleFilterAfterTimeout;
|
|
17
|
+
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@task({ restartable: true })
|
|
23
|
+
*updateArticleFilter() {
|
|
24
|
+
yield timeout(500);
|
|
25
|
+
this.pageNumber = 0;
|
|
26
|
+
this.articleFilterAfterTimeout = this.articleFilter;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
articleResource = trackedTask(this, this.resourceSearch, () => [
|
|
30
|
+
this.pageNumber,
|
|
31
|
+
this.pageSize,
|
|
32
|
+
this.articleFilterAfterTimeout,
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
@task({ restartable: true })
|
|
36
|
+
*resourceSearch() {
|
|
37
|
+
this.error = null;
|
|
38
|
+
const abortController = new AbortController();
|
|
39
|
+
const signal = abortController.signal;
|
|
40
|
+
try {
|
|
41
|
+
const results = yield fetchArticles(
|
|
42
|
+
this.args.decision.uri,
|
|
43
|
+
this.pageNumber,
|
|
44
|
+
this.pageSize,
|
|
45
|
+
this.articleFilterAfterTimeout,
|
|
46
|
+
signal
|
|
47
|
+
);
|
|
48
|
+
this.totalCount = results.totalCount;
|
|
49
|
+
return results.articles;
|
|
50
|
+
} catch (e) {
|
|
51
|
+
console.warn(e); // eslint-ignore-line no-console
|
|
52
|
+
this.totalCount = 0;
|
|
53
|
+
this.error = e;
|
|
54
|
+
return [];
|
|
55
|
+
} finally {
|
|
56
|
+
abortController.abort();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@action
|
|
61
|
+
close() {
|
|
62
|
+
this.articleResource.cancel();
|
|
63
|
+
this.args.close();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Pagination
|
|
67
|
+
|
|
68
|
+
@action
|
|
69
|
+
previousPage() {
|
|
70
|
+
--this.pageNumber;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@action
|
|
74
|
+
nextPage() {
|
|
75
|
+
++this.pageNumber;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
get rangeStart() {
|
|
79
|
+
return this.pageNumber * this.pageSize + 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
get rangeEnd() {
|
|
83
|
+
const end = this.rangeStart + this.pageSize - 1;
|
|
84
|
+
return end > this.totalCount ? this.totalCount : end;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
get isFirstPage() {
|
|
88
|
+
return this.pageNumber == 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
get isLastPage() {
|
|
92
|
+
return this.rangeEnd == this.totalCount;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{{#if @decisions.length}}
|
|
2
|
+
<AuList @direction="vertical" @divider={{true}}>
|
|
3
|
+
{{#each @decisions as |decision|}}
|
|
4
|
+
<AuList::Item class="au-u-padding-left-small au-u-padding-right-small">
|
|
5
|
+
<CitatenPlugin::Citations::DecisionPreview
|
|
6
|
+
@decision={{decision}}
|
|
7
|
+
@onCitationInsert={{fn @onCitationInsert decision}}
|
|
8
|
+
@onCitationDetails={{fn @onCitationDetails decision}}
|
|
9
|
+
@fullSize={{@fullSize}} />
|
|
10
|
+
</AuList::Item>
|
|
11
|
+
{{/each}}
|
|
12
|
+
</AuList>
|
|
13
|
+
{{else}}
|
|
14
|
+
<CitatenPlugin::Helpers::AlertNoItems @fullSize={{@fullSize}} class={{if @fullSize "au-u-margin"}}/>
|
|
15
|
+
{{/if}}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<div class="citaten--decision-list-item {{if @fullSize "au-u-padding-small"}}" ...attributes>
|
|
2
|
+
<p class="citaten--decision-title {{if @fullSize "au-u-h6 au-u-medium" "au-u-h-functional"}}">
|
|
3
|
+
{{if @fullSize (capitalize @decision.fullTitle) @decision.title}}
|
|
4
|
+
</p>
|
|
5
|
+
{{#if (and @fullSize @decision.publicationDate)}}
|
|
6
|
+
<AuPill
|
|
7
|
+
class="au-u-margin-top-small au-u-margin-bottom-small"
|
|
8
|
+
@skin="border"
|
|
9
|
+
@icon="calendar"
|
|
10
|
+
@iconAlignment="left">
|
|
11
|
+
{{@decision.publicationDate}}
|
|
12
|
+
</AuPill>
|
|
13
|
+
{{/if}}
|
|
14
|
+
{{#if @fullSize}}
|
|
15
|
+
<div>
|
|
16
|
+
<AuButtonGroup @inline={{false}}>
|
|
17
|
+
<AuButton
|
|
18
|
+
@skin="primary"
|
|
19
|
+
@icon="plus-text"
|
|
20
|
+
@iconAlignment="left"
|
|
21
|
+
{{on "click" @onCitationInsert}}>
|
|
22
|
+
{{t "citaten-plugin.references.insert"}}
|
|
23
|
+
</AuButton>
|
|
24
|
+
<AuButton
|
|
25
|
+
@skin="secondary"
|
|
26
|
+
@icon="manual"
|
|
27
|
+
@iconAlignment="left"
|
|
28
|
+
{{on "click" @onCitationDetails}}>
|
|
29
|
+
{{t "citaten-plugin.references.details"}}
|
|
30
|
+
</AuButton>
|
|
31
|
+
</AuButtonGroup>
|
|
32
|
+
</div>
|
|
33
|
+
{{else}}
|
|
34
|
+
<div class="au-u-flex au-u-flex--row au-u-flex--no-wrap au-u-flex--between au-u-margin-top-tiny">
|
|
35
|
+
<AuButton
|
|
36
|
+
@skin="link-secondary"
|
|
37
|
+
@icon="plus-text"
|
|
38
|
+
@iconAlignment="left"
|
|
39
|
+
class="au-u-h-functional"
|
|
40
|
+
{{on "click" @onCitationInsert}}>
|
|
41
|
+
{{t "citaten-plugin.references.insert"}}
|
|
42
|
+
</AuButton>
|
|
43
|
+
<AuButton
|
|
44
|
+
@skin="link"
|
|
45
|
+
@icon="manual"
|
|
46
|
+
@iconAlignment="left"
|
|
47
|
+
class="au-u-h-functional"
|
|
48
|
+
{{on "click" @onCitationDetails}}>
|
|
49
|
+
{{t "citaten-plugin.references.details"}}
|
|
50
|
+
</AuButton>
|
|
51
|
+
</div>
|
|
52
|
+
{{/if}}
|
|
53
|
+
</div>
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<AuModal
|
|
2
|
+
@modalOpen={{true}}
|
|
3
|
+
@closeModal={{fn this.closeModal this.legislationTypeUri this.text}}
|
|
4
|
+
@title={{t "citaten-plugin.card.title"}}
|
|
5
|
+
@size="large"
|
|
6
|
+
@padding="none" as |modal|>
|
|
7
|
+
{{#if this.selectedDecision}}
|
|
8
|
+
<modal.Body>
|
|
9
|
+
<CitatenPlugin::Citations::DecisionDetail
|
|
10
|
+
@insertDecisionCitation={{this.insertDecisionCitation}}
|
|
11
|
+
@insertArticleCitation={{this.insertArticleCitation}}
|
|
12
|
+
@close={{this.closeDecisionDetail}}
|
|
13
|
+
@decision={{this.selectedDecision}} />
|
|
14
|
+
</modal.Body>
|
|
15
|
+
{{else}}
|
|
16
|
+
<modal.Body>
|
|
17
|
+
<AuMainContainer class="citaten--main-container" as |mc|>
|
|
18
|
+
<mc.sidebar class="citaten--sidebar" @scroll={{true}}>
|
|
19
|
+
<div class="au-c-sidebar">
|
|
20
|
+
<div class="au-c-sidebar__content au-u-padding">
|
|
21
|
+
<AuLabel class="au-margin-bottom-small" for="typeofdocumentexpanded" @inline={{false}} @required={{false}} @error={{false}} @warning={{false}}>{{t "citaten-plugin.search.type"}}</AuLabel>
|
|
22
|
+
<PowerSelect
|
|
23
|
+
id="typeofdocumentexpanded"
|
|
24
|
+
@renderInPlace={{true}}
|
|
25
|
+
@allowClear={{false}}
|
|
26
|
+
@disabled={{false}}
|
|
27
|
+
@searchEnabled={{true}}
|
|
28
|
+
@loadingMessage={{t "citaten-plugin.alert.loading"}}
|
|
29
|
+
@noMatchesMessage={{t "citaten-plugin.alert.no-results"}}
|
|
30
|
+
@searchMessage={{t "citaten-plugin.search.placeholder"}}
|
|
31
|
+
@options={{this.legislationTypes}}
|
|
32
|
+
@selected={{this.legislationSelected}}
|
|
33
|
+
@onChange={{this.selectLegislationType}}
|
|
34
|
+
as |type|>
|
|
35
|
+
{{type}}
|
|
36
|
+
</PowerSelect>
|
|
37
|
+
<AuLabel class="au-u-margin-top au-margin-bottom-small" for="searchtermexpanded" @inline={{false}} @required={{false}} @error={{false}} @warning={{false}}>{{t "citaten-plugin.search.term"}}</AuLabel>
|
|
38
|
+
<AuInput
|
|
39
|
+
id="searchtermexpanded"
|
|
40
|
+
@type="text"
|
|
41
|
+
@width="block"
|
|
42
|
+
@icon="search"
|
|
43
|
+
@iconAlignment="right"
|
|
44
|
+
@value={{this.text}}
|
|
45
|
+
placeholder={{t "citaten-plugin.search.placeholder"}}
|
|
46
|
+
{{on "input" (perform this.updateSearch)}}/>
|
|
47
|
+
<AuHr @size="large" />
|
|
48
|
+
{{! Date of document }}
|
|
49
|
+
<AuLabel class="au-u-margin-top au-u-margin-bottom-small" for="search-codex-datum-document-van" @inline={{false}}>{{t "citaten-plugin.search.date-document"}}</AuLabel>
|
|
50
|
+
{{! From }}
|
|
51
|
+
<AuFormRow @alignment="pre" class="au-u-margin-bottom-tiny">
|
|
52
|
+
<AuLabel for="search-codex-datum-document-van" class="au-u-hidden-visually">{{t "citaten-plugin.search.date-document-from"}}</AuLabel>
|
|
53
|
+
<AuLabel for="search-codex-datum-document-van" aria-hidden="true" class="au-u-1-4" @inline={{true}}>{{t "citaten-plugin.search.from"}}</AuLabel>
|
|
54
|
+
<AuDatePicker
|
|
55
|
+
@id="search-codex-datum-document-van"
|
|
56
|
+
@alignment="top"
|
|
57
|
+
@onChange={{this.updateDocumentDateFrom}}
|
|
58
|
+
@value={{this.documentDateFrom}}
|
|
59
|
+
@min={{this.minDate}}
|
|
60
|
+
@max={{this.maxDate}}
|
|
61
|
+
@localization={{this.datePickerLocalization}} />
|
|
62
|
+
</AuFormRow>
|
|
63
|
+
{{! To }}
|
|
64
|
+
<AuFormRow @alignment="pre">
|
|
65
|
+
<AuLabel for="search-codex-datum-document-tot" class="au-u-hidden-visually">{{t "citaten-plugin.search.date-document-to"}}</AuLabel>
|
|
66
|
+
<AuLabel for="search-codex-datum-document-tot" aria-hidden="true" class="au-u-1-4" @inline={{true}}>{{t "citaten-plugin.search.to"}}</AuLabel>
|
|
67
|
+
<AuDatePicker
|
|
68
|
+
@id="search-codex-datum-document-tot"
|
|
69
|
+
@alignment="top"
|
|
70
|
+
@onChange={{this.updateDocumentDateTo}}
|
|
71
|
+
@value={{this.documentDateTo}}
|
|
72
|
+
@min={{this.minDate}}
|
|
73
|
+
@max={{this.maxDate}}
|
|
74
|
+
@localization={{this.datePickerLocalization}} />
|
|
75
|
+
</AuFormRow>
|
|
76
|
+
|
|
77
|
+
{{! Date of staatsblad }}
|
|
78
|
+
<AuLabel class="au-u-margin-top au-u-margin-bottom-small" for="search-codex-datum-staatsblad-van" @inline={{false}}>{{t "citaten-plugin.search.date-publication"}}</AuLabel>
|
|
79
|
+
{{! From }}
|
|
80
|
+
<AuFormRow @alignment="pre" class="au-u-margin-bottom-tiny">
|
|
81
|
+
<AuLabel for="search-codex-datum-staatsblad-van" class="au-u-hidden-visually">{{t "citaten-plugin.search.date-publication-from"}}</AuLabel>
|
|
82
|
+
<AuLabel for="search-codex-datum-staatsblad-van" aria-hidden="true" class="au-u-1-4" @inline={{true}}>{{t "citaten-plugin.search.from"}}</AuLabel>
|
|
83
|
+
<AuDatePicker
|
|
84
|
+
@id="search-codex-datum-staatsblad-van"
|
|
85
|
+
@alignment="top"
|
|
86
|
+
@onChange={{this.updatePublicationDateFrom}}
|
|
87
|
+
@value={{this.publicationDateFrom}}
|
|
88
|
+
@min={{this.minDate}}
|
|
89
|
+
@max={{this.maxDate}}
|
|
90
|
+
@localization={{this.datePickerLocalization}} />
|
|
91
|
+
</AuFormRow>
|
|
92
|
+
{{! To }}
|
|
93
|
+
<AuFormRow @alignment="pre">
|
|
94
|
+
<AuLabel for="search-codex-datum-staatsblad-tot" class="au-u-hidden-visually">{{t "citaten-plugin.search.date-publication-to"}}</AuLabel>
|
|
95
|
+
<AuLabel for="search-codex-datum-staatsblad-tot" aria-hidden="true" class="au-u-1-4" @inline={{true}}>{{t "citaten-plugin.search.to"}}</AuLabel>
|
|
96
|
+
<AuDatePicker
|
|
97
|
+
@id="search-codex-datum-staatsblad-tot"
|
|
98
|
+
@alignment="top"
|
|
99
|
+
@onChange={{this.updatePublicationDateTo}}
|
|
100
|
+
@value={{this.publicationDateTo}}
|
|
101
|
+
@min={{this.minDate}}
|
|
102
|
+
@max={{this.maxDate}}
|
|
103
|
+
@localization={{this.datePickerLocalization}} />
|
|
104
|
+
</AuFormRow>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</mc.sidebar>
|
|
108
|
+
<mc.content>
|
|
109
|
+
{{#if this.decisionResource.isRunning}}
|
|
110
|
+
<div class="au-u-margin">
|
|
111
|
+
<AuLoader @padding="large" />
|
|
112
|
+
<span class="au-u-hidden-visually">{{t "citaten-plugin.alert.loading"}}</span>
|
|
113
|
+
</div>
|
|
114
|
+
{{else}}
|
|
115
|
+
{{#if this.error}}
|
|
116
|
+
<CitatenPlugin::Helpers::AlertLoadError @fullSize={{true}} @error={{this.error}} class="au-u-margin"/>
|
|
117
|
+
{{else}}
|
|
118
|
+
{{#if this.decisionResource.value.length}}
|
|
119
|
+
<div class="citaten--container-content au-u-padding-top-small au-u-padding-bottom-small">
|
|
120
|
+
<CitatenPlugin::Citations::DecisionList
|
|
121
|
+
@decisions={{this.decisionResource.value}}
|
|
122
|
+
@onCitationInsert={{this.insertDecisionCitation}}
|
|
123
|
+
@onCitationDetails={{this.openDecisionDetail}}
|
|
124
|
+
@fullSize={{true}} />
|
|
125
|
+
</div>
|
|
126
|
+
{{else}}
|
|
127
|
+
<CitatenPlugin::Helpers::AlertNoItems @fullSize={{true}} class="au-u-margin" />
|
|
128
|
+
{{/if}}
|
|
129
|
+
{{/if}}
|
|
130
|
+
{{/if}}
|
|
131
|
+
{{#if this.decisionResource.value.length}}
|
|
132
|
+
{{! Pagination in the footer of the dialog }}
|
|
133
|
+
<div class="citaten--container-footer au-u-background-gray-100">
|
|
134
|
+
<AuToolbar
|
|
135
|
+
@border="top"
|
|
136
|
+
@size="large"
|
|
137
|
+
@nowrap={{true}}>
|
|
138
|
+
<div class="au-c-pagination">
|
|
139
|
+
<p>
|
|
140
|
+
<span class="au-u-hidden-visually">{{t "citaten-plugin.search.results"}}</span>
|
|
141
|
+
<strong>
|
|
142
|
+
{{this.rangeStart}} - {{this.rangeEnd}}
|
|
143
|
+
</strong>
|
|
144
|
+
{{t "citaten-plugin.pagination.of"}}
|
|
145
|
+
{{this.totalCount}}
|
|
146
|
+
</p>
|
|
147
|
+
<div class="au-c-pagination__list-item">
|
|
148
|
+
{{#unless this.isFirstPage}}
|
|
149
|
+
<AuButton
|
|
150
|
+
@skin="link"
|
|
151
|
+
@icon="nav-left"
|
|
152
|
+
@iconAlignment="left"
|
|
153
|
+
{{on "click" this.previousPage}}>
|
|
154
|
+
{{t "citaten-plugin.pagination.previous"}}
|
|
155
|
+
</AuButton>
|
|
156
|
+
{{/unless}}
|
|
157
|
+
{{#unless this.isLastPage}}
|
|
158
|
+
<AuButton
|
|
159
|
+
@skin="link"
|
|
160
|
+
@icon="nav-right"
|
|
161
|
+
@iconAlignment="right"
|
|
162
|
+
{{on "click" this.nextPage}}>
|
|
163
|
+
{{t "citaten-plugin.pagination.next"}}
|
|
164
|
+
</AuButton>
|
|
165
|
+
{{/unless}}
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</AuToolbar>
|
|
169
|
+
</div>
|
|
170
|
+
{{/if}}
|
|
171
|
+
</mc.content>
|
|
172
|
+
</AuMainContainer>
|
|
173
|
+
</modal.Body>
|
|
174
|
+
{{/if}}
|
|
175
|
+
</AuModal>
|