[develop | CHANGED | DONE] Plugins: add pluginUrl Component, replace code in plugin-card, plugin-graph-info, plugin search/link/deposit
This commit is contained in:
parent
4d670e416d
commit
54624cd5dd
|
@ -18,11 +18,14 @@
|
|||
<div class="uk-text-center uk-margin-bottom description">
|
||||
{{card.description}}
|
||||
</div>
|
||||
<a *ngFor="let url of card.urlsArray" [href]="card.url" [class.uk-hidden]="!(url.url && url.url.length > 0)"
|
||||
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-text-default"
|
||||
[target]="url.target" [routerLink]="url.route?url.url:null" [class.uk-disabled] =previewInAdmin>
|
||||
<ng-container *ngFor="let url of card.urlsArray">
|
||||
<plugin-url [url]="url" [previewInAdmin]="previewInAdmin" classAttribute="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-text-default"></plugin-url>
|
||||
</ng-container>
|
||||
|
||||
<!--<a *ngFor="let url of card.urlsArray" [route]="url.url" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-text-default" [target]="url.target"
|
||||
[class.uk-hidden]="!(url.url && url.url.length > 0)" [routerLink]="url.route?url.url:null" [class.uk-disabled] =previewInAdmin>
|
||||
{{url.linkText}}
|
||||
</a>
|
||||
</a>-->
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
|
|
@ -9,10 +9,11 @@ import {IconsService} from "../../../../utils/icons/icons.service";
|
|||
import {SearchResearchResultsServiceModule} from "../../../../services/searchResearchResultsService.module";
|
||||
import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module";
|
||||
import {PluginCardInfoComponent} from "./plugin-card-info.component";
|
||||
import {PluginUrlComponent} from "../../utils/pluginUrl.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule
|
||||
CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule, PluginUrlComponent
|
||||
],
|
||||
providers:[PluginsService],
|
||||
declarations: [PluginCardInfoComponent],
|
||||
|
|
|
@ -23,10 +23,8 @@
|
|||
<div [innerHTML]="pluginObject.paragraph2"></div>
|
||||
|
||||
<div class="uk-margin-top">
|
||||
<a [href]="pluginObject.url.url" [target]="pluginObject.url.target"
|
||||
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
|
||||
{{pluginObject.url.linkText}}
|
||||
</a>
|
||||
<plugin-url [url]="pluginObject.url" [previewInAdmin]="previewInAdmin" classAttribute="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"></plugin-url>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,10 +6,11 @@ import {PluginsService} from "../../../../services/plugins.service";
|
|||
import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module";
|
||||
import {InputModule} from "../../../../sharedComponents/input/input.module";
|
||||
import {PluginGraphInfoComponent} from "./plugin-graph-info.component";
|
||||
import {PluginUrlComponent} from "../../utils/pluginUrl.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, FormsModule, PluginFieldEditModule, InputModule
|
||||
CommonModule, RouterModule, FormsModule, PluginFieldEditModule, InputModule, PluginUrlComponent
|
||||
],
|
||||
providers: [
|
||||
PluginsService
|
||||
|
|
|
@ -16,10 +16,9 @@
|
|||
{{card.title}}
|
||||
</div>
|
||||
<div class="uk-text-small">{{card.description}}</div>
|
||||
<a *ngFor="let url of card.urlsArray" [route]="url.url" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-text-default" [target]="url.target"
|
||||
[class.uk-hidden]="!(url.url && url.url.length > 0)" [routerLink]="url.route?url.url:null" [class.uk-disabled] =previewInAdmin>
|
||||
{{url.linkText}}
|
||||
</a>
|
||||
<ng-container *ngFor="let url of card.urlsArray">
|
||||
<plugin-url [url]="url" [previewInAdmin]="previewInAdmin" classAttribute="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-text-default"></plugin-url>
|
||||
</ng-container>
|
||||
</slider-nav-item>
|
||||
</ng-container>
|
||||
</slider-column>
|
||||
|
|
|
@ -10,11 +10,12 @@ import {SearchResearchResultsServiceModule} from "../../../../services/searchRes
|
|||
import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module";
|
||||
import {PluginSearchDepositLinkComponent} from './plugin-search-deposit-link.component';
|
||||
import {SliderUtilsModule} from "../../../../sharedComponents/slider-utils/slider-utils.module";
|
||||
import {PluginUrlComponent} from "../../utils/pluginUrl.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule,
|
||||
PluginFieldEditModule, SliderUtilsModule
|
||||
PluginFieldEditModule, SliderUtilsModule, PluginUrlComponent
|
||||
],
|
||||
providers:[PluginsService],
|
||||
declarations: [PluginSearchDepositLinkComponent],
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {PluginURL} from "./base-plugin.component";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {RouterModule} from "@angular/router";
|
||||
|
||||
|
||||
@Component({
|
||||
imports:[CommonModule, RouterModule],
|
||||
selector: 'plugin-url',
|
||||
template: `
|
||||
|
||||
<a *ngIf="url.route"
|
||||
[class]="classAttribute"
|
||||
[routerLink]="url.url" [class.uk-disabled]=previewInAdmin>
|
||||
{{url.linkText}}
|
||||
</a>
|
||||
<a *ngIf="!url.route" [href]="url.url" [class.uk-hidden]="!(url.url && url.url.length > 0)"
|
||||
[class]="classAttribute"
|
||||
[target]="url.target" [class.uk-disabled]=previewInAdmin>
|
||||
{{url.linkText}}
|
||||
</a>
|
||||
`,
|
||||
|
||||
standalone :true
|
||||
|
||||
})
|
||||
export class PluginUrlComponent {
|
||||
|
||||
@Input() url:PluginURL;
|
||||
@Input() previewInAdmin:boolean;
|
||||
@Input() classAttribute;
|
||||
htmlEditorView = false;
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue