Project

General

Profile

« Previous | Next » 

Revision 56647

[Trunk|Connect]: Add help texts in curators and share in Zenodo pages, missed on previous commit.

View differences:

modules/uoa-connect-portal/trunk/src/app/curators/curators.component.html
1 1
<ng-container *ngIf="main else child">
2 2
  <div class="image-front-topbar  uk-section-default uk-position-relative" uk-scrollspy="{&quot;target&quot;:&quot;[uk-scrollspy-class]&quot;,&quot;cls&quot;:&quot;uk-animation-fade&quot;,&quot;delay&quot;:false}" tm-header-transparent="light">
3 3
    <div style=" min-height: 650px;"  class="uk-section uk-padding-remove-bottom uk-flex uk-flex-middle">
4
      <div class="uk-margin-top uk-align-center">
4
      <div class="uk-margin-large-top uk-align-center">
5 5
        <div class="uk-section uk-section-small">
6
          <div class="uk-container uk-container-small">
6
          <div class="uk-container">
7
            <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
7 8
            <div *ngIf="showLoading" class="uk-margin-large">
8 9
              <div class="uk-animation-fade uk-margin-top  uk-width-1-1" role="alert"><span class="loading-gif  uk-align-center" ></span></div>
9 10
            </div>
......
63 64
                </div>
64 65
              </div>
65 66
            </div>
67
            <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
66 68
          </div>
67 69
        </div>
68 70
      </div>
modules/uoa-connect-portal/trunk/src/app/curators/curators.component.ts
2 2
import {EnvProperties}    from '../openaireLibrary/utils/properties/env-properties';
3 3
import {CuratorService} from "../openaireLibrary/connect/curators/curator.service";
4 4
import {Curator} from "../openaireLibrary/utils/entities/CuratorInfo";
5
import {ActivatedRoute} from "@angular/router";
5
import {ActivatedRoute, Router} from "@angular/router";
6 6
import {CommunitiesService} from "../openaireLibrary/connect/communities/communities.service";
7 7
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
8 8
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
9
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
9 10

  
10 11
@Component({
11 12
  selector: 'curators',
......
26 27
  public maxCharacters = 500;
27 28

  
28 29
  public properties: EnvProperties;
30
  public pageContents = null;
31
  public divContents = null;
29 32

  
30 33
  constructor (private route: ActivatedRoute,
31 34
               private curatorsService: CuratorService,
32
               private communitiesService: CommunitiesService) {}
35
               private communitiesService: CommunitiesService,
36
               private _router: Router,
37
               private helper: HelperService) {}
33 38

  
34 39
  ngOnInit() {
35 40
    this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
......
53 58
          if(!this.communityId) {
54 59
            this.communityId = data['communityId'];
55 60
          }
56

  
61
          //this.getDivContents();
62
          this.getPageContents();
57 63
          this.communitiesService.getCommunities(this.properties,
58 64
            this.properties.communityAPI + this.communityId).subscribe(community => {
59 65
              this.managers = community[0].managers;
......
74 80

  
75 81
  }
76 82

  
83
  private getPageContents() {
84
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
85
      this.pageContents = contents;
86
    })
87
  }
88

  
89
  private getDivContents() {
90
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
91
      this.divContents = contents;
92
    })
93
  }
94

  
77 95
  public toggle(index: number) {
78 96
    this.showMore[index] = !this.showMore[index];
79 97
  }
modules/uoa-connect-portal/trunk/src/app/curators/curators.module.ts
7 7
import {CuratorService} from "../openaireLibrary/connect/curators/curator.service";
8 8
import {CuratorsRoutingModule} from "./curators-routing.module";
9 9
import {AffiliationsModule} from "../affiliations/affiliations.module";
10
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
10 11

  
11 12
@NgModule({
12 13
  imports: [
13 14
    CommonModule, FormsModule, RouterModule,
14
    CuratorsRoutingModule, AffiliationsModule
15
    CuratorsRoutingModule, AffiliationsModule, HelperModule
15 16
  ],
16 17
  declarations: [
17 18
    CuratorsComponent
modules/uoa-connect-portal/trunk/src/app/deposit/zenodo/shareInZenodo.module.ts
12 12

  
13 13
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
14 14
import {RouterModule} from "@angular/router";
15
import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module";
15 16

  
16 17
@NgModule({
17 18
  imports: [
18 19
    CommonModule,ShareInZenodoRoutingModule, ZenodoCommunitiesServiceModule, SearchZenodoCommunitiesServiceModule,
19
    RouterModule
20
    RouterModule, HelperModule
20 21
  ],
21 22
  declarations: [
22 23
    ShareInZenodoComponent
modules/uoa-connect-portal/trunk/src/app/deposit/zenodo/shareInZenodo.component.html
10 10
    </div>
11 11

  
12 12
    <div class=" uk-section  uk-margin-small-top tm-middle uk-container uk-container-large" id="tm-main">
13
      <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
13 14
      <div class="uk-container uk-container-large uk-margin-bottom">
14 15
          <div class="uk-h2">
15 16
            <span class="uk-text-bold">Deposit</span> in Zenodo
......
115 116
            </li>
116 117
          </ul>
117 118
      </div>
119
      <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
118 120
    </div>
modules/uoa-connect-portal/trunk/src/app/deposit/zenodo/shareInZenodo.component.ts
11 11
import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
12 12
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
13 13
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
14
import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
14 15

  
15 16
@Component({
16 17
  selector: 'share-in-zenodo',
......
20 21
  properties: EnvProperties;
21 22
  private communityId: string = null;
22 23
  private community: CommunityInfo = null;
24
  public pageContents = null;
25
  public divContents = null;
23 26

  
24 27

  
25 28
  // public warningMessage = "";
......
37 40
  depositLink = "https://zenodo.org/deposit/new?c=";
38 41

  
39 42

  
40
  constructor(private  route: ActivatedRoute, private _router: Router,
41
              private _meta: Meta, private _title: Title, private _ΖenodoCommunitieService: ZenodoCommunitiesService, private _communityService: CommunityService, private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService) {
43
  constructor(private  route: ActivatedRoute,
44
              private _router: Router,
45
              private _meta: Meta,
46
              private _title: Title,
47
              private _ΖenodoCommunitieService: ZenodoCommunitiesService,
48
              private _communityService: CommunityService,
49
              private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService,
50
              private helper: HelperService) {
42 51
  }
43 52

  
44 53
  public ngOnInit() {
......
51 60
        this.updateDescription("Zenodo, repository, deposit, share");
52 61
        this.properties = data.envSpecific;
53 62
        this.route.queryParams.subscribe(params => {
54
          this.communityId  = ConnectHelper.getCommunityFromDomain(this.properties.domain);
55
          if(!this.communityId) {
63
          this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
64
          if (!this.communityId) {
56 65
            this.communityId = params['communityId'];
57 66
          }
58

  
67
          //this.getDivContents();
68
          this.getPageContents();
59 69
          if (this.communityId) {
60 70

  
61 71
            if (this.communityId != null && this.communityId != '') {
......
74 84

  
75 85
                      },
76 86
                      error => {
77
                        // var emptyCommunity:ZenodoCommunityInfo = new ZenodoCommunityInfo();
78
                        // emptyCommunity.id = this.masterZenodoCommunityId;
79
                        // emptyCommunity.title = this.masterZenodoCommunityId;
80
                        // this.masterZenodoCommunity = emptyCommunity;
81
                        //console.error("Master Zenodo community'"+this.masterZenodoCommunityId+"' couldn't be loaded");
82 87
                        this.handleError("Error getting Master Zenodo community with id: " + this.masterZenodoCommunityId, error);
83 88

  
84 89
                      }
......
139 144
    this._meta.updateTag({content: url}, "property='og:url'");
140 145
  }
141 146

  
147
  private getPageContents() {
148
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
149
      this.pageContents = contents;
150
    })
151
  }
152

  
153
  private getDivContents() {
154
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
155
      this.divContents = contents;
156
    })
157
  }
158

  
142 159
  getZenodoCommunityById(zenodoid, openaireId) {
143 160
    this._ΖenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + zenodoid, openaireId).subscribe(
144 161
      result => {

Also available in: Unified diff