Project

General

Profile

1 56563 konstantin
import {Component, Input}           from '@angular/core';
2
import {ZenodoInformationClass} from './utils/zenodoInformation.class';
3 56570 konstantin
import {EnvProperties} from "../utils/properties/env-properties";
4 56644 k.triantaf
import {ActivatedRoute, Router} from "@angular/router";
5 56622 konstantin
import {PiwikService} from "../utils/piwik/piwik.service";
6 56644 k.triantaf
import {HelperService} from "../utils/helper/helper.service";
7 56816 konstantin
import {RouterHelper} from "../utils/routerHelper.class";
8 56840 konstantin
import {SEOService} from "../sharedComponents/SEO/SEO.service";
9
import {Meta, Title} from "@angular/platform-browser";
10 58563 argiro.kok
import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component";
11 56563 konstantin
12
@Component({
13
  selector: 'deposit-first-page',
14
  template: `
15 58563 argiro.kok
16 56840 konstantin
17 56677 argiro.kok
    <div class="uk-section uk-padding-remove-bottom uk-padding-remove-top">
18 58625 argiro.kok
      <div class="explorePanelBackground communityPanelBackground uk-padding-small">
19 58666 argiro.kok
        <div class="uk-align-center uk-container uk-container-large uk-margin-medium-top uk-margin-large-bottom">
20 58571 argiro.kok
          <breadcrumbs [breadcrumbs]="breadcrumbs" [light]="!!(this.communityId)"></breadcrumbs>
21 58563 argiro.kok
          <div class="uk-h1 uk-width-1-2@m uk-width-1-1@s ">
22
            <span class="uk-text-bold">Deposit</span> or <span class="uk-text-bold">publish</span> your research in <span class="uk-text-bold">Open Access</span>
23 56563 konstantin
          </div>
24
25 56736 argiro.kok
          <div class="uk-container uk-container-large uk-margin-medium-top">
26 59152 argiro.kok
            <div class="uk-grid-divider uk-grid" uk-grid>
27 56563 konstantin
              <div class="uk-width-1-2@m uk-width-1-1@s">
28 57406 konstantin
<!--                <p class="uk-margin-auto uk-text-large">How to <span class="uk-text-bold">deposit</span> your research...</p>-->
29 56563 konstantin
                <span class="uk-grid">
30
                  <span class="uk-margin-top uk-icon"><svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="search"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg></span>
31
<!--                  <span class="uk-margin-small-right" uk-icon="search"></span>-->
32
                  <span class="uk-width-expand">
33 58563 argiro.kok
                    <div class="uk-margin-small-bottom uk-h6 uk-text-normal"><span class="uk-text-bold"> Find </span><span class="uk-text-normal">the appropriate</span> <span class="uk-text-bold"> repository </span> or <span class="uk-text-bold"> journal </span></div>
34 58606 argiro.kok
                    <div class="">
35 57406 konstantin
                      Find the appropriate repository to deposit your research products of any type (publication, data, software, other) or to include in your data management plan.
36 56563 konstantin
                      Search and browse for OpenAIRE compliant repositories registered in OpenDOAR and re3data.
37 57423 konstantin
                      <br>
38
                      Looking for Open Access journals? Find those that suit your
39
                      <span *ngIf="communityId && communityId != 'openaire'">community </span><span *ngIf="!communityId || communityId == 'openaire'">needs </span>
40
                      among the journals registered in the Directory of Open Access Journals (DOAJ).
41
                      <br>
42
                      To know more, read the OpenAIRE Open Access primer (<a target="_blank" href="https://www.openaire.eu/oa-basics">https://www.openaire.eu/oa-basics</a>)
43 56563 konstantin
                    </div>
44
                  </span>
45
                </span>
46
                <span class="uk-margin-top uk-grid">
47
                  <span class="uk-margin-top uk-icon"><svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="upload"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg></span>
48
<!--                  <span class="uk-margin-small-right" uk-icon="upload"></span>-->
49
                  <span class="uk-width-expand">
50 57406 konstantin
                    <div class="uk-margin-small-bottom uk-h6">Deposit</div>
51 58606 argiro.kok
                    <div class="">
52 57406 konstantin
                      Find the repository to deposit your research or use the Zenodo<span *ngIf="communityId && communityId != 'openaire'"> communities suggested by the community curators</span><span *ngIf="!communityId || communityId == 'openaire'"> repository</span>.
53 56563 konstantin
                    </div>
54
                  </span>
55 57406 konstantin
                  <span class="uk-margin-top uk-grid">
56
                  <span class="uk-margin-top uk-icon">
57
<!--                    <svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="upload"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg>-->
58
                    <svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="push"><polygon points="12.15,4 9.5,1.4 6.85,4 6.15,3.3 9.5,0 12.85,3.3"></polygon><line fill="none" stroke="#000" x1="9.5" y1="10" x2="9.5" y2="1"></line><polyline fill="none" stroke="#000" points="6 5.5 3.5 5.5 3.5 18.5 15.5 18.5 15.5 5.5 13 5.5"></polyline></svg>
59
                  </span>
60
<!--                                      <span class="uk-margin-small-right" uk-icon="push"></span>-->
61
                  <span class="uk-width-expand">
62
                    <div class="uk-margin-small-bottom uk-h6">Publish</div>
63 58606 argiro.kok
                    <div class="">
64 57408 konstantin
                      Find the Open Access journals that suit your
65
                      <span *ngIf="communityId && communityId != 'openaire'">community </span><span *ngIf="!communityId || communityId == 'openaire'">needs </span>
66 57406 konstantin
                      among those registered in the Directory of Open Access Journals (DOAJ).
67
                    </div>
68
                  </span>
69
                  </span>
70 56563 konstantin
                </span>
71
                <div></div>
72
              </div>
73
              <div class="uk-width-1-2@m uk-width-1-1@s">
74 58552 argiro.kok
                <!--<p class="uk-margin-auto-top uk-margin-remove-bottom uk-h5">
75 57406 konstantin
                  Start by <span class="uk-text-bold">searching</span> repositories and journals
76 58552 argiro.kok
                </p>-->
77 58606 argiro.kok
                <div class="">
78
                  <form class=" uk-flex uk-margin">
79 56563 konstantin
<!--                    <span uk-search-icon class="uk-icon"></span>-->
80 58552 argiro.kok
<!--                    <button routerLinkActive="uk-link"-->
81
<!--                       routerLink="{{depositRoute}}" [queryParams]="{keyword: keyword}"  class="uk-search-icon uk-icon" uk-search-icon>-->
82
<!--                    </button>-->
83
                    <input class="uk-search-input uk-input uk-width-expand uk-margin-small-right"
84 56563 konstantin
                           type="search"  [(ngModel)]="keyword"  name="keyword"
85
                           placeholder="{{searchPlaceHolder}}">
86 58552 argiro.kok
                    <div class="uk-padding-remove-left">
87 58606 argiro.kok
                      <button routerLinkActive="uk-link" routerLink="{{depositRoute}}" [queryParams]="{'f0':'q','fv0': keyword}" [class]="'uk-button  uk-text-bold '+ (!!(communityId)?'':' portal-button')"> Search
88 58552 argiro.kok
                      </button>
89
                      <div class="uk-padding-small">
90
                        <a  [queryParams]="properties.environment!='development'?{}:routerHelper.createQueryParam('communityId',communityId)" routerLinkActive="router-link-active" [routerLink]="depositRoute"
91
                            type="submit" class=" ">
92
                          <span><span>Browse all </span><!--<span uk-icon="arrow-right"></span>--></span>
93
                        </a>
94
                      </div>
95
                    </div>
96 56563 konstantin
                  </form>
97
                </div>
98 57406 konstantin
                <div class="uk-width-1-6 uk-text-right">
99 56677 argiro.kok
<!--                  <hr class="uk-divider-vertical">-->
100 57406 konstantin
<!--                  <div class=" uk-margin-top uk-margin-bottom uk-padding-small uk-text-bold">OR</div>-->
101
<!--                  <img src="assets/common-assets/OR.svg">-->
102
                  <div class="uk-margin-bottom">
103
                    <svg xmlns="http://www.w3.org/2000/svg" width="27" height="88" viewBox="0 0 27 88">
104
                      <g id="Group_749" data-name="Group 749" transform="translate(-872.168 -490.5)">
105 57421 konstantin
                        <text class="fill_text" id="OR" transform="translate(872.168 540.271)" font-size="18" font-family="OpenSans-Bold, Open Sans" font-weight="700" opacity="0.8"><tspan x="0" y="0">OR</tspan></text>
106
                        <line class="stroke_line" id="Line_225" data-name="Line 225" y2="30" transform="translate(885.5 490.5)" fill="none" stroke="#000" stroke-width="1" opacity="0.2"/>
107
                        <line class="stroke_line" id="Line_226" data-name="Line 226" y2="30" transform="translate(885.5 548.5)" fill="none" stroke="#000" stroke-width="1" opacity="0.2"/>
108 57406 konstantin
                      </g>
109
                    </svg>
110
                  </div>
111
                  <!--                  <hr class="uk-divider-vertical">-->
112 56563 konstantin
                </div>
113
114
                <div>
115 58552 argiro.kok
                  <!--<a  [queryParams]="properties.environment!='development'?{}:routerHelper.createQueryParam('communityId',communityId)" routerLinkActive="router-link-active" [routerLink]="depositRoute"
116 57406 konstantin
                      type="submit" class="uk-button uk-button-large portal-button uk-padding uk-padding-remove-vertical">
117
                    <span><span>Browse all </span><span uk-icon="arrow-right"></span></span>
118 58552 argiro.kok
                  </a>-->
119
                  <a *ngIf="zenodoInformation.shareInZenodoUrl" type="submit"
120
                     [queryParams]="properties.environment!='development'?{}:routerHelper.createQueryParam('communityId',communityId)"
121
                     routerLinkActive="router-link-active" [routerLink]="zenodoInformation.shareInZenodoUrl"
122 58563 argiro.kok
                     class="uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-medium-top uk-margin-bottom zenodoButton ignoreCommunityPanelBackground">
123 58552 argiro.kok
                    <span><span> Use related zenodo communities</span><span uk-icon="arrow-right"></span></span>
124 56563 konstantin
                  </a>
125 58552 argiro.kok
                  <a *ngIf="!zenodoInformation.shareInZenodoUrl" target="_blank" href="{{zenodoInformation.url}}" type="submit"
126 58563 argiro.kok
                     [class]="'uk-button uk-padding uk-padding-remove-vertical uk-margin-medium-top uk-margin-bottom zenodoButton ignoreCommunityPanelBackground ' +
127 58552 argiro.kok
                        ((communityId && communityId != 'openaire') ? ' portal-button' : ' uk-button-primary')">
128
                    <span><span>Deposit in Zenodo</span><span uk-icon="arrow-right"></span></span>
129
                  </a>
130 58563 argiro.kok
<!--                    <a class="uk-flex">View more info</a>-->
131 56563 konstantin
                </div>
132
              </div>
133
            </div>
134
          </div>
135
        </div>
136
      </div>
137
    </div>
138 58649 konstantin
    <div class="">
139 59152 argiro.kok
      <schema2jsonld *ngIf="url" [URL]="url" [name]="title" type="other" description=" Find the appropriate repository to deposit your research products of any type (publication, data, software, other) or to include in your data management plan. Search and browse for OpenAIRE compliant repositories registered in OpenDOAR and re3data. "></schema2jsonld>
140 58563 argiro.kok
    <div class="uk-section tm-middle uk-container uk-container-large uk-margin-small-top uk-padding-remove-top uk-padding-remove-bottom ">
141 58606 argiro.kok
      <div class="uk-container uk-container-large uk-margin-bottom uk-margin-medium-top">
142 56572 konstantin
        <div class="uk-grid uk-padding">
143 56563 konstantin
          <div class="uk-width-1-2 uk-text-center">
144
            <div class="uk-margin-top">
145
              <svg xmlns="http://www.w3.org/2000/svg" width="173" height="56.685" viewBox="0 0 173 56.685"><defs><style>.a{fill:#191919;}</style></defs><path class="a" d="M171.749,22.311a16.158,16.158,0,0,0-3.364-4.953A15.511,15.511,0,0,0,157.4,12.837a15.213,15.213,0,0,0-6.074,1.206,16.4,16.4,0,0,0-2.63,1.424,16.2,16.2,0,0,0-2.325,1.891,14.893,14.893,0,0,0-1.242,1.383,19.241,19.241,0,0,0-1.173,1.7,19.372,19.372,0,0,0-1.482,3.343c.048-1.943.332-4.842,1.482-6.468V3.272a3.081,3.081,0,0,0-.993-2.323,3.251,3.251,0,0,0-5.556,2.323V15.765a17.084,17.084,0,0,0-4.261-2.156,14.8,14.8,0,0,0-4.781-.773,15.314,15.314,0,0,0-6.028,1.206,15.575,15.575,0,0,0-4.959,3.316,16.056,16.056,0,0,0-3.352,4.953c-.063.142-.118.286-.177.43-.056-.144-.111-.288-.173-.43a16.158,16.158,0,0,0-3.364-4.953,15.519,15.519,0,0,0-4.95-3.316,15.795,15.795,0,0,0-12.105,0,16.068,16.068,0,0,0-4.954,3.316,15.182,15.182,0,0,0-3.359,4.953c-.058.136-.109.272-.162.407-.056-.135-.109-.271-.167-.407a16.056,16.056,0,0,0-3.357-4.953,15.532,15.532,0,0,0-4.956-3.316,15.795,15.795,0,0,0-12.105,0,16.084,16.084,0,0,0-4.948,3.316,15.129,15.129,0,0,0-3.366,4.953c-.051.125-.1.253-.148.378-.051-.125-.1-.253-.155-.378a16.165,16.165,0,0,0-3.366-4.953,15.489,15.489,0,0,0-10.979-4.521,15.185,15.185,0,0,0-6.072,1.206,16.01,16.01,0,0,0-4.622,3.017v-.521A3.335,3.335,0,0,0,27.211,13.2H3.837a3.334,3.334,0,0,0,0,6.669h18.37L.658,48.884A3.333,3.333,0,0,0,0,50.872v2.176a3.337,3.337,0,0,0,3.336,3.336H28.214a3.335,3.335,0,0,0,3.324-3.09,15.693,15.693,0,0,0,3.675,2.184,15.189,15.189,0,0,0,6.031,1.207A14.892,14.892,0,0,0,49.857,54.1a15.447,15.447,0,0,0,4.827-5.188v4.5a3.245,3.245,0,0,0,3.277,3.275,3.194,3.194,0,0,0,2.281-.949,3.077,3.077,0,0,0,.991-2.326V41.733h-.012a.087.087,0,0,1,.012-.015h-8.17a3.175,3.175,0,0,0-1.851.558,3.007,3.007,0,0,0-1.161,1.507l-.535,1.1a8.969,8.969,0,0,1-8.271,5.254,9.141,9.141,0,0,1-3.493-.684,8.463,8.463,0,0,1-2.883-1.939,9.963,9.963,0,0,1-1.94-2.888,8.4,8.4,0,0,1-.729-3.447V38.252H61.234V28.34a8.74,8.74,0,0,1,.688-3.442,8.959,8.959,0,0,1,8.355-5.515,9.117,9.117,0,0,1,3.493.687,8.459,8.459,0,0,1,2.883,1.94,10.032,10.032,0,0,1,1.94,2.889,8.36,8.36,0,0,1,.734,3.442V53.409A3.233,3.233,0,0,0,82.6,56.684a3.211,3.211,0,0,0,2.286-.949,3.107,3.107,0,0,0,.986-2.326v-4.5a15.828,15.828,0,0,0,2.482,3.249,15.454,15.454,0,0,0,4.954,3.314,15.671,15.671,0,0,0,12.061,0,16.035,16.035,0,0,0,5-3.314,15.226,15.226,0,0,0,3.359-4.951c.044-.112.087-.225.129-.338.046.113.087.226.134.338a15.068,15.068,0,0,0,3.359,4.951,16.075,16.075,0,0,0,4.951,3.314,15.79,15.79,0,0,0,12.109,0,15.476,15.476,0,0,0,4.946-3.314,16.166,16.166,0,0,0,3.366-4.951c.06-.142.116-.283.173-.426.058.143.111.284.173.426a16.07,16.07,0,0,0,3.359,4.951,15.454,15.454,0,0,0,4.954,3.314,15.671,15.671,0,0,0,12.061,0,16.008,16.008,0,0,0,5-3.314A15.314,15.314,0,0,0,173,41.178V28.341A14.991,14.991,0,0,0,171.749,22.311ZM8.35,49.716,25.794,26.224a16.054,16.054,0,0,0-.143,2.117V41.178A14.759,14.759,0,0,0,26.9,47.211a16.514,16.514,0,0,0,1.366,2.5H8.35ZM50.285,31.7H32.2V28.34a8.738,8.738,0,0,1,.686-3.442,8.951,8.951,0,0,1,8.36-5.515,9.1,9.1,0,0,1,3.486.687,8.423,8.423,0,0,1,2.885,1.94,10.033,10.033,0,0,1,1.94,2.889,8.318,8.318,0,0,1,.729,3.442V31.7Zm58.093,9.48a8.7,8.7,0,0,1-.688,3.447,8.941,8.941,0,0,1-8.352,5.511,9.141,9.141,0,0,1-3.493-.684,8.417,8.417,0,0,1-2.883-1.939,9.917,9.917,0,0,1-1.94-2.888,8.353,8.353,0,0,1-.729-3.447V28.341A8.74,8.74,0,0,1,90.98,24.9a8.935,8.935,0,0,1,1.937-2.889,9.165,9.165,0,0,1,9.9-1.94,8.433,8.433,0,0,1,2.888,1.94,10.129,10.129,0,0,1,1.94,2.889,8.356,8.356,0,0,1,.729,3.442V41.178Zm29.035,0a8.32,8.32,0,0,1-.729,3.447,9.947,9.947,0,0,1-1.94,2.888,8.358,8.358,0,0,1-2.888,1.939,9.337,9.337,0,0,1-7.018,0,9.046,9.046,0,0,1-4.825-4.826,8.735,8.735,0,0,1-.69-3.447V28.341a8.439,8.439,0,0,1,.732-3.442,10.1,10.1,0,0,1,1.94-2.889,8.522,8.522,0,0,1,2.883-1.94,9.152,9.152,0,0,1,3.493-.687,8.985,8.985,0,0,1,8.357,5.515,8.775,8.775,0,0,1,.686,3.442V41.178Zm29.035,0a8.82,8.82,0,0,1-.686,3.447,9.129,9.129,0,0,1-11.85,4.826,8.424,8.424,0,0,1-2.882-1.939,9.946,9.946,0,0,1-1.942-2.888,8.337,8.337,0,0,1-.732-3.447V28.341a8.742,8.742,0,0,1,.69-3.442,8.935,8.935,0,0,1,1.937-2.889,9.169,9.169,0,0,1,9.905-1.94,8.423,8.423,0,0,1,2.885,1.94,10.088,10.088,0,0,1,1.942,2.889,8.356,8.356,0,0,1,.729,3.442V41.178Z"/></svg>
146
            </div>
147
            <div class="uk-margin-top">
148 57410 konstantin
              <span class="uk-text-bold">Deposit</span> your research now. <span class="uk-text-bold">Instantly and easily.</span>
149 56563 konstantin
            </div>
150 56816 konstantin
            <a *ngIf="zenodoInformation.shareInZenodoUrl" type="submit"
151
               [queryParams]="properties.environment!='development'?{}:routerHelper.createQueryParam('communityId',communityId)"
152
               routerLinkActive="router-link-active" [routerLink]="zenodoInformation.shareInZenodoUrl"
153 58563 argiro.kok
               class="uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-medium-top uk-margin-bottom zenodoButton">
154 56563 konstantin
              <span><span>Related zenodo communities</span><span uk-icon="arrow-right"></span></span>
155
            </a>
156
            <a *ngIf="!zenodoInformation.shareInZenodoUrl" target="_blank" href="{{zenodoInformation.url}}" type="submit"
157 58563 argiro.kok
               [class]="'uk-button uk-padding uk-padding-remove-vertical uk-margin-medium-top uk-margin-bottom zenodoButton ' +
158 57410 konstantin
                        ((communityId && communityId != 'openaire') ? ' portal-button' : ' uk-button-primary')">
159 56563 konstantin
              <span><span>Deposit in Zenodo</span><span uk-icon="arrow-right"></span></span>
160
            </a>
161
          </div>
162
          <div class="uk-width-1-2">
163
            <div class="uk-margin-top">
164
              <div class="uk-text-bold">Research. Shared.</div>
165 56572 konstantin
              <div>
166
                All research outputs from across all fields of research are welcome! Sciences and Humanities, really!              </div>
167 56563 konstantin
            </div>
168
            <div class="uk-margin-top">
169
              <div class="uk-text-bold">Citeable. Discoverable. </div>
170 56572 konstantin
              <div>
171 56563 konstantin
                Uploads gets a Digital Object Identifier (DOI) to make them easily and uniquely citeable.
172 56572 konstantin
              </div>
173 56563 konstantin
            </div>
174
            <div class="uk-margin-top">
175
              <div class="uk-text-bold">Funding</div>
176 56572 konstantin
              <div>
177 57423 konstantin
<!--                Identify grants, integrated in reporting lines for research funded by the European Commission via OpenAIRE.-->
178
                Link your upload to its funding projects. For research funded by the European Commission, your upload will automatically be available for reporting on the EC participant portal.
179 56572 konstantin
              </div>
180 56563 konstantin
            </div>
181
            <div class="uk-margin-top">
182
              <div class="uk-text-bold">Flexible licensing</div>
183 56572 konstantin
              <div>
184 56563 konstantin
                Because not everything is under Creative Commons.
185 56572 konstantin
              </div>
186 56563 konstantin
            </div>
187
            <div class="uk-margin-top">
188
              <div class="uk-text-bold">Safe</div>
189 56572 konstantin
              <div>
190 56563 konstantin
                Your research output is stored safely for the future in the same cloud infrastructure as CERN's own LHC research data.
191 56572 konstantin
              </div>
192 56563 konstantin
            </div>
193
          </div>
194
        </div>
195
      </div>
196
    </div>
197
198 56630 k.triantaf
    <!--<div class="uk-section uk-section-muted uk-margin-large-top uk-padding-remove-bottom uk-padding-remove-top">
199
&lt;!&ndash;      grey-background&ndash;&gt;
200 56563 konstantin
      <div class="uk-margin-top uk-padding-small">
201
        <div class="uk-align-center uk-container uk-container-large uk-margin-top uk-margin-bottom">
202 56644 k.triantaf
          <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
203 56563 konstantin
        </div>
204
      </div>
205 56630 k.triantaf
    </div>-->
206 58649 konstantin
   <div class="uk-section">
207
      <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
208
   </div>
209
    </div>
210 56563 konstantin
  `
211
})
212
213
export class DepositFirstPageComponent {
214 56840 konstantin
  public url: string = null;
215
  public title: string = "Deposit your research - Learn How";
216
217 56570 konstantin
  @Input() public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
218 56563 konstantin
  @Input() piwikSiteId = null;
219 56622 konstantin
  piwiksub:any;
220 56563 konstantin
221 56644 k.triantaf
  @Input() communityId = null;
222 56630 k.triantaf
223 56644 k.triantaf
  public pageContents = null;
224
  public divContents = null;
225
226 56563 konstantin
  public keyword: string;
227 56816 konstantin
  public depositRoute: string;
228 57485 konstantin
  public searchPlaceHolder = "Search by title, country, organization, subject, type...";
229 56570 konstantin
  properties:EnvProperties;
230 56816 konstantin
  public routerHelper:RouterHelper = new RouterHelper();
231 58563 argiro.kok
  @Input() showBreadcrumb:boolean = false;
232
  breadcrumbs:Breadcrumb[] = [];
233 56644 k.triantaf
  constructor (private  route: ActivatedRoute, private _piwikService:PiwikService,
234
               private helper: HelperService,
235 56840 konstantin
               private _router: Router,
236
               private _meta: Meta, private _title: Title,
237
               private seoService: SEOService) {
238
  }
239 56644 k.triantaf
240
241 56563 konstantin
  ngOnInit() {
242
    this.route.data
243
      .subscribe((data: { envSpecific: EnvProperties }) => {
244
        this.properties = data.envSpecific;
245 56840 konstantin
        this.url = this.properties.baseLink+this._router.url;
246
        this.seoService.createLinkForCanonicalURL(this.url, false);
247
248
        var description = "Openaire, Zenodo, repositories, open access, content provider, compatibility, deposit";
249
        this.updateTitle(this.title);
250
        this.updateDescription(description);
251
        this.updateUrl(this.url);
252
253 56816 konstantin
        this.depositRoute = this.properties.depositSearchPage;
254 56644 k.triantaf
        //this.getDivContents();
255
        this.getPageContents();
256 56570 konstantin
        if (!this.zenodoInformation) {
257
          this.zenodoInformation = new ZenodoInformationClass();
258
        }
259
        if (!this.zenodoInformation.shareInZenodoUrl) {
260
          this.zenodoInformation.url = this.properties.zenodo;
261
        }
262
        if (!this.zenodoInformation.name) {
263
          this.zenodoInformation.name = "Zenodo";
264
        }
265 56622 konstantin
266
        if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
267 56840 konstantin
          this.piwiksub = this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe();
268 56622 konstantin
        }
269 58563 argiro.kok
        this.breadcrumbs.push({name: 'home', route: '/'}, {name: "Deposit", route: null});
270 56563 konstantin
      });
271
  }
272 56622 konstantin
273 56644 k.triantaf
  public getPageContents() {
274 58417 konstantin
    this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
275 56644 k.triantaf
      this.pageContents = contents;
276
    })
277
  }
278
279
  public getDivContents() {
280 58417 konstantin
    this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
281 56644 k.triantaf
      this.divContents = contents;
282
    })
283
  }
284
285 56622 konstantin
  ngOnDestroy() {
286
    if(this.piwiksub){
287
      this.piwiksub.unsubscribe();
288
    }
289
  }
290 56840 konstantin
291
  private updateDescription(description:string) {
292
    this._meta.updateTag({content:description},"name='description'");
293
    this._meta.updateTag({content:description},"property='og:description'");
294
  }
295
  private updateTitle(title:string) {
296
    var _prefix ="";
297
    if(!this.communityId) {
298
      _prefix ="OpenAIRE | ";
299
    }
300
    var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
301
    this._title.setTitle(_title);
302
    this._meta.updateTag({content:_title},"property='og:title'");
303
  }
304
  private updateUrl(url:string) {
305
    this._meta.updateTag({content:url},"property='og:url'");
306
  }
307 56563 konstantin
}