Compare commits
2 Commits
8d54218dbb
...
6615e27941
Author | SHA1 | Date |
---|---|---|
argirok | 6615e27941 | |
argirok | a5e43c4bf9 |
|
@ -102,6 +102,7 @@ export class CommunityComponent {
|
|||
let self = this;
|
||||
this.pluginTemplates.forEach(_ => {
|
||||
let plugin:Plugin = null;
|
||||
if(!_.custom) {
|
||||
for (let pl of plugins) {
|
||||
if (pl.templateId == _._id) {
|
||||
plugin = pl;
|
||||
|
@ -113,7 +114,24 @@ export class CommunityComponent {
|
|||
}
|
||||
plugin.object = PluginUtils.initializeObjectAndCompare(_.code, plugin.object)
|
||||
this.pluginsByPlacement.get(plugin.placement).push({plugin: plugin, template: _});
|
||||
}
|
||||
});
|
||||
//add custom plugins in the list
|
||||
this.plugins.forEach(_ => {
|
||||
|
||||
if(_.custom == true){
|
||||
let customTemplate = null;
|
||||
this.pluginTemplates.forEach(template => {
|
||||
if (_.templateId == template._id) {
|
||||
customTemplate = template;
|
||||
}
|
||||
});
|
||||
if(customTemplate && customTemplate.custom){
|
||||
this.pluginsByPlacement.get(customTemplate.placement).push({plugin: _, template: customTemplate});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
for(let placement of this.pluginUtils.placementsOptions){
|
||||
this.pluginsByPlacement.get(placement.value).sort(function (a, b) {
|
||||
return a.plugin.order - b.plugin.order;
|
||||
|
|
|
@ -54,19 +54,20 @@
|
|||
<div
|
||||
class="uk-animation-fade">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-card-hover">
|
||||
{{item.name}}
|
||||
<a [routerLink]="properties.searchLinkToDataProvider.split('?')[0]" [queryParams]="{datasourceId : item.openaireId}" >{{item.name}}</a>
|
||||
<hr>
|
||||
<div class="uk-text-small" [innerHTML]="item.message">
|
||||
</div>
|
||||
|
||||
<div class="uk-flex uk-flex-right uk-margin-small-top">
|
||||
<!-- update with link to dataprovider -->
|
||||
<!--<div class="uk-flex uk-flex-right uk-margin-small-top">
|
||||
<a [href]="properties.connectPortalUrl + properties.searchLinkToDataProvider + item.openaireId " class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text" target="_blank">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon>
|
||||
<span>Go to repository</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
|
Loading…
Reference in New Issue