Project

General

Profile

« Previous | Next » 

Revision 46561

more layout changes for linking - simplify linking - easy switch between bulk and search mode

View differences:

selectedProjects.component.ts
6 6
    selector: 'claim-selected-projects',
7 7
    template: `
8 8

  
9
           <div  *ngIf="this.linkType == 'project'"  class="uk-accordion" data-uk-accordion="{showfirst:true}">
10
             <h3 class="uk-accordion-title"><i class="uk-icon-caret-square-o-right"></i> to link with Projects  ({{(projects.length)}})
9
           <div class="uk-accordion" data-uk-accordion="{showfirst:true}">
10
             <h3 class="uk-accordion-title"><i class="uk-icon-caret-square-o-right"></i> {{title}} ({{(projects.length)}})
11 11

  
12 12
             </h3>
13 13

  
......
20 20
                      <span  (click)="removeProject(project)" aria-hidden="true" class="uk-button "><i class="uk-icon-remove"></i></span>
21 21
                    </li>
22 22
                  </ul>
23
                <span *ngIf="projects.length == 0 " class="uk-alert uk-alert-primary">There are no projects</span>
23
                <div *ngIf="projects.length == 0 " class="uk-alert uk-alert-primary">There are no projects</div>
24 24
              </div>
25 25
            </div>
26
            <div  *ngIf="this.linkType != 'project'"  class="uk-accordion" data-uk-accordion="{showfirst:false}">
27
              <h3 class="uk-accordion-title"><i class="uk-icon-caret-square-o-right"></i> Projects  ({{(projects.length)}})
26
            <!--div  *ngIf="this.linkType != 'project'"  class="uk-accordion" data-uk-accordion="{showfirst:false}">
27
              <h3 class="uk-accordion-title"><i class="uk-icon-caret-square-o-right"></i> {{title}} ({{(projects.length)}})
28 28

  
29 29
              </h3>
30 30

  
......
33 33
                 <claim-projects-search-form   *ngIf=" showsearch "  [selectedProjects]="projects"   (projectSelected)="projectSelected($event)" > </claim-projects-search-form>
34 34
                   <ul class="uk-list uk-list-line">
35 35
                     <li class="list-group-item" *ngFor="let project of projects">
36
                       <a [queryParams]="routerHelper.createQueryParam('projectId',project.projectId)"   routerLinkActive="router-link-active" routerLink="/search/project" >{{project.funderName}} | {{project.projectName}} {{(project.projectAcronym)?'('+project.projectAcronym+')':''}} <!--[{{project.startDate}} - {{project.endDate}}]--></a>
36
                       <a [queryParams]="routerHelper.createQueryParam('projectId',project.projectId)"   routerLinkActive="router-link-active" routerLink="/search/project" >{{project.funderName}} | {{project.projectName}} {{(project.projectAcronym)?'('+project.projectAcronym+')':''}} </a>
37 37
                       <span  (click)="removeProject(project)" aria-hidden="true" class="uk-button "><i class="uk-icon-remove"></i></span>
38 38
                     </li>
39 39
                   </ul>
40
                 <div *ngIf="projects.length == 0 " class="uk-alert uk-alert-primary">There are no projects to link with.</div>
40

  
41 41
               </div>
42
             </div>
42
             </div-->
43 43

  
44 44
          `
45 45
})
......
50 50
   var myDate = new Date();
51 51
  this.todayDate=( myDate.getFullYear()+ "-" +myDate.getMonth() + 1) + "-" + myDate.getDate() ;
52 52
  this.nextDate= ( (myDate.getFullYear()+100)+ "-" +myDate.getMonth() + 1) + "-" + myDate.getDate() ;
53
  if(this.linkType == "project"){
53
  // if(this.linkType == "project"){
54 54
    this.showsearch = true
55
  }else{
56
    this.showsearch = false;
57
  }
55
  // }else{
56
  //   this.showsearch = false;
57
  // }
58 58
  //2015-05-01
59 59
}
60 60

  
61 61

  
62 62
@Input() projects: ClaimProject[];
63 63
@Input() show='home';
64
@Input() title='Projects';
64 65
@Input() linkType:string = "project";
65 66
@Input() hideType;
66 67
@Input() bulkMode:boolean = false;
......
91 92
}
92 93
}
93 94
projectSelected($event) {
94
  this.showsearch = false;
95
  // this.showsearch = false;
95 96
}
96 97

  
97 98

  

Also available in: Unified diff