Compare commits
2 Commits
8d54218dbb
...
6615e27941
Author | SHA1 | Date |
---|---|---|
argirok | 6615e27941 | |
argirok | a5e43c4bf9 |
|
@ -102,18 +102,36 @@ export class CommunityComponent {
|
||||||
let self = this;
|
let self = this;
|
||||||
this.pluginTemplates.forEach(_ => {
|
this.pluginTemplates.forEach(_ => {
|
||||||
let plugin:Plugin = null;
|
let plugin:Plugin = null;
|
||||||
for(let pl of plugins){
|
if(!_.custom) {
|
||||||
if (pl.templateId == _._id){
|
for (let pl of plugins) {
|
||||||
|
if (pl.templateId == _._id) {
|
||||||
plugin = pl;
|
plugin = pl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!plugin){
|
if (!plugin) {
|
||||||
plugin = new Plugin("", "",_);
|
plugin = new Plugin("", "", _);
|
||||||
this.plugins.push(plugin);
|
this.plugins.push(plugin);
|
||||||
}
|
}
|
||||||
plugin.object = PluginUtils.initializeObjectAndCompare(_.code,plugin.object)
|
plugin.object = PluginUtils.initializeObjectAndCompare(_.code, plugin.object)
|
||||||
this.pluginsByPlacement.get(plugin.placement).push({plugin: plugin, template: _ });
|
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){
|
for(let placement of this.pluginUtils.placementsOptions){
|
||||||
this.pluginsByPlacement.get(placement.value).sort(function (a, b) {
|
this.pluginsByPlacement.get(placement.value).sort(function (a, b) {
|
||||||
return a.plugin.order - b.plugin.order;
|
return a.plugin.order - b.plugin.order;
|
||||||
|
|
|
@ -54,19 +54,20 @@
|
||||||
<div
|
<div
|
||||||
class="uk-animation-fade">
|
class="uk-animation-fade">
|
||||||
<div class="uk-card uk-card-default uk-card-body uk-card-hover">
|
<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>
|
<hr>
|
||||||
<div class="uk-text-small" [innerHTML]="item.message">
|
<div class="uk-text-small" [innerHTML]="item.message">
|
||||||
</div>
|
</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">
|
<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">
|
<span class="uk-flex uk-flex-middle">
|
||||||
<icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon>
|
<icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon>
|
||||||
<span>Go to repository</span>
|
<span>Go to repository</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
Loading…
Reference in New Issue