Compare commits
No commits in common. "6615e279417a00dbd0915d06d5ffca06a4fcfc0f" and "8d54218dbbcbe6e193e512478e8d7644d20cc514" have entirely different histories.
6615e27941
...
8d54218dbb
|
@ -102,36 +102,18 @@ export class CommunityComponent {
|
|||
let self = this;
|
||||
this.pluginTemplates.forEach(_ => {
|
||||
let plugin:Plugin = null;
|
||||
if(!_.custom) {
|
||||
for (let pl of plugins) {
|
||||
if (pl.templateId == _._id) {
|
||||
for(let pl of plugins){
|
||||
if (pl.templateId == _._id){
|
||||
plugin = pl;
|
||||
}
|
||||
}
|
||||
if (!plugin) {
|
||||
plugin = new Plugin("", "", _);
|
||||
if(!plugin){
|
||||
plugin = new Plugin("", "",_);
|
||||
this.plugins.push(plugin);
|
||||
}
|
||||
plugin.object = PluginUtils.initializeObjectAndCompare(_.code, plugin.object)
|
||||
this.pluginsByPlacement.get(plugin.placement).push({plugin: plugin, template: _});
|
||||
}
|
||||
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,20 +54,19 @@
|
|||
<div
|
||||
class="uk-animation-fade">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-card-hover">
|
||||
<a [routerLink]="properties.searchLinkToDataProvider.split('?')[0]" [queryParams]="{datasourceId : item.openaireId}" >{{item.name}}</a>
|
||||
{{item.name}}
|
||||
<hr>
|
||||
<div class="uk-text-small" [innerHTML]="item.message">
|
||||
</div>
|
||||
|
||||
<!-- update with link to dataprovider -->
|
||||
<!--<div class="uk-flex uk-flex-right uk-margin-small-top">
|
||||
<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