Project

General

Profile

« Previous | Next » 

Revision 55283

[Trunk|Connect]

Community Page:
remove sticky toolbar for mobile view
Change statistics: add them in the result tabs per type
Add Other stats in the bottom: show the rest charts not visible in active tab

App component: comment layout service

Statistics Component: empty community page template to allow changes in Community Page

View differences:

community.component.html
1 1
<div id="stickhere">
2 2
</div>
3
  <div *ngIf="communityInfo" class="uk-section uk-margin-top uk-padding-remove-bottom" uk-sticky="top: #stickhere">
4
    <div class="uk-background-muted uk-padding-small">
3
  <div *ngIf="communityInfo" class="uk-section uk-margin-top uk-padding-remove-bottom uk-visible@m " uk-sticky="top: #stickhere">
4
    <div class="communityToolBar uk-padding-small uk-margin-small-top">
5 5
      <div class="uk-container uk-text-center uk-margin-small-top uk-margin-small-bottom">
6 6
        <manage *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" " [buttonSizeSmall]=false></manage>
7 7
        <subscribe *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=""></subscribe>
......
9 9
      </div>
10 10
    </div>
11 11
  </div>
12
  <div *ngIf="communityInfo" class="uk-section uk-margin-top uk-padding-remove-bottom uk-hidden@m"  >
13
    <div class="communityToolBar uk-padding-small">
14
      <div class="uk-container uk-text-center uk-margin-small-top uk-margin-small-bottom">
15
        <manage *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" " [buttonSizeSmall]=false></manage>
16
        <subscribe *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=""></subscribe>
17
        <invite *ngIf="showInvite()" [longView]=false [buttonSizeSmall]=false></invite>
18
      </div>
19
    </div>
20
  </div>
12 21
<div class="uk-section tm-middle uk-container uk-margin-small-top uk-padding-remove-top" id="tm-main">
13 22
<div class="uk-container  uk-margin-bottom uk-grid">
14 23
<div class="uk-width-expand uk-padding-remove">
......
16 25
    <div *ngIf="communityId == null || communityId == ''" class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-alert uk-alert-primary">
17 26
       No community chosen
18 27
    </div>
19
    <!-- <div class="uk-clearfix uk-margin-bottom">
20
      <manage *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" uk-float-right"></manage>
21
      <subscribe *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" uk-float-right"></subscribe>
22
    </div> -->
23 28
    <div *ngIf="communityId != null && communityId != '' && community != null">
24
      <div *ngIf="community.title != null" class="uk-article-title">
29
      <div *ngIf="community.title != null" class="uk-text-bold uk-h4">
25 30
        <p> {{community.title}}</p>
26 31
      </div>
27
      <div *ngIf="community.title == null && community.shortTitle != null" class="uk-article-title">
32
      <div *ngIf="community.title == null && community.shortTitle != null" class="uk-text-bold uk-h4">
28 33
        <p> {{community.shortTitle}}</p>
29 34
      </div>
30
      <div *ngIf="community.description != null" class="uk-text-lead">
35
      <div *ngIf="community.description != null" class="uk-text-large">
31 36
        <p> {{community.description}}</p>
32 37
      </div>
33 38
      <div class="uk-grid uk-grid-divider">
......
53 58
          <div *ngIf="communityId != null && communityId != ''" class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-grid uk-grid-medium ">
54 59

  
55 60
            <div *ngIf="publicationTotal != null && isEntityEnabled('publication') && isRouteEnabled('/search/find/publications')"  class="uk-padding-remove-left">
56
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
61
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1  ">
57 62
                <a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/publications" ><span class="uk-text-bold">{{publicationTotal|number}}</span>
58 63
                <br><span class="uk-text-small">publications</span></a>
59 64
              </div>
......
66 71
              </div>
67 72
            </div>
68 73
            <div *ngIf="softwareTotal != null && isEntityEnabled('software') && isRouteEnabled('/search/find/software')" class="uk-padding-remove-left">
69
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
74
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1  ">
70 75
                <a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/software"><span class="uk-text-bold">{{softwareTotal|number}}</span>
71 76
                <br><span class="uk-text-small">software</span></a>
72 77
              </div>
73 78
            </div>
74 79

  
75 80
            <div *ngIf="orpTotal != null && isEntityEnabled('orp') && isRouteEnabled('/search/find/other')" class="uk-padding-remove-left">
76
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
81
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1  ">
77 82
                <a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/other"><span class="uk-text-bold">{{orpTotal|number}}</span>
78 83
                <br><span class="uk-text-small">other products</span></a>
79 84
              </div>
......
81 86

  
82 87

  
83 88
            <div   *ngIf="projectTotal != null && isEntityEnabled('project') && isRouteEnabled('/search/find/projects')" class="uk-padding-remove-left">
84
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
89
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1  ">
85 90
                <a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/projects"><span class="uk-text-bold">{{projectTotal|number}}</span>
86 91
                <br><span class="uk-text-small">projects</span></a>
87 92
              </div>
88 93
            </div>
89 94

  
90 95
            <div *ngIf="contentProviderTotal != null && isEntityEnabled('datasource') && isRouteEnabled('/search/find/dataproviders')" class="uk-padding-remove-left">
91
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-flex">
96
               <div class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1  ">
92 97
                <a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/dataproviders"><span class="uk-text-bold">{{contentProviderTotal|number}}</span>
93 98
                <br><span class="uk-text-small">content providers</span></a>
94 99
              </div>
......
99 104
          <div *ngIf="community.subjects != null">
100 105
            <span *ngFor="let subject of community.subjects.slice(0,10) let i=index">
101 106
                <span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">{{subject}}</span>
102
                <!-- <span *ngIf=" i<9 && i<(community.subjects.length-1)">&nbsp;</span> -->
103 107
            </span>
104 108
            <span *ngIf="showAll">
105 109
                <span *ngFor="let subject of community.subjects.slice(10) let i=index">
106 110
                    <span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">{{subject}}</span>
107
                    <!-- <span *ngIf="i<(community.subjects.length-1)">&nbsp;</span> -->
108 111
                </span>
109 112
            </span>
110 113
            <span *ngIf="!showAll && community.subjects.length > 10">
......
133 136
        </div>
134 137

  
135 138
      <ul class="uk-tab uk-margin-top" data-uk-tab="{connect: '#resultTabs'">
136
          <li *ngIf="isEntityEnabled('publication')" class="uk-active"><a href="#">publications</a></li>
139
          <li *ngIf="isEntityEnabled('publication')" (click)="searchPublications()"  class="uk-active"><a href="#">publications</a></li>
137 140
          <li *ngIf="isEntityEnabled('dataset')" (click)="searchResearchData()"><a href="#">research data</a></li>
138 141
          <li *ngIf="isEntityEnabled('software')" (click)="searchSoftware()"><a href="#">software</a></li>
139 142
          <li *ngIf="isEntityEnabled('orp')" (click)="searchOrps()"><a href="#">other research products</a></li>
......
143 146
          <li *ngIf="isEntityEnabled('publication')">
144 147
            <div class="uk-grid">
145 148
              <results-comp [(results)]=publicationResults [(total)]=publicationTotal resultType="publication" [community]=community [params]=params class="uk-width-expand"></results-comp>
146
              <div class="uk-width-1-2@m uk-width-1-1@s">
149
              <div *ngIf=" activeTab == 'publication' && statistics !=null  && statistics.allowedEntities && statistics.statisticsSum && statistics.allowedCharts && statistics.statisticsSum['publication'] && statistics.allowedCharts['publication'] && statistics.statisticsSum['publication'].total>0 && statistics.allowedCharts['publication'].length>0" class="uk-width-1-2@m uk-width-1-1@s">
150
                <div *ngFor="let chart of statistics.allowedCharts['publication']" class=" uk-first-column">
151
                    <iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
152
                </div>
147 153
              </div>
148 154
            </div>
149 155
          </li>
150
          <li *ngIf="isEntityEnabled('dataset')"><results-comp [(results)]=researchDataResults [(total)]=researchDataTotal resultType="dataset" [community]=community [params]=params></results-comp></li>
151
          <li *ngIf="isEntityEnabled('software')"><results-comp [(results)]=softwareResults [(total)]=softwareTotal resultType="software" [community]=community [params]=params></results-comp></li>
152
          <li *ngIf="isEntityEnabled('orp')"><results-comp [(results)]=orpResults [(total)]=orpTotal resultType="other" [community]=community [params]=params></results-comp></li>
156
          <li *ngIf="isEntityEnabled('dataset')">
157
            <div class="uk-grid">
158
              <results-comp [(results)]=researchDataResults [(total)]=researchDataTotal resultType="dataset" [community]=community [params]=params class="uk-width-expand"></results-comp>
159
              <div *ngIf="activeTab == 'dataset' && statistics !=null  && statistics.allowedEntities && statistics.statisticsSum && statistics.allowedCharts &&
160
              statistics.statisticsSum['dataset'] && statistics.allowedCharts['dataset'] && statistics.statisticsSum['dataset'].total>0 && statistics.allowedCharts['dataset'].length>0"
161
               class="uk-width-1-2@m uk-width-1-1@s">
162
                <div *ngFor="let chart of statistics.allowedCharts['dataset']" class="uk-width-1-2@l uk-width-1-1@m uk-first-column">
163
                    <iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
164
                </div>
165
              </div>
166
            </div>
167
          </li>
168
          <li *ngIf="isEntityEnabled('software')">
169
            <div class="uk-grid">
170
              <results-comp [(results)]=softwareResults [(total)]=softwareTotal resultType="software" [community]=community [params]=params class="uk-width-expand"></results-comp>
171
              <div *ngIf="statistics !=null  && statistics.allowedEntities && statistics.statisticsSum && statistics.allowedCharts && statistics.statisticsSum['software'] && statistics.allowedCharts['software'] && statistics.statisticsSum['software'].total>0 && statistics.allowedCharts['software'].length>0" class="uk-width-1-2@m uk-width-1-1@s">
172
                <div *ngFor="let chart of statistics.allowedCharts['software']" class="uk-width-1-2@l uk-width-1-1@m uk-first-column">
173
                    <iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
174
                </div>
175
              </div>
176
            </div>
177
          </li>
178
          <li *ngIf="isEntityEnabled('orp')">
179
            <div class="uk-grid">
180
              <results-comp [(results)]=orpResults [(total)]=orpTotal resultType="other" [community]=community [params]=params class="uk-width-expand"></results-comp>
181
              <div *ngIf=" activeTab == 'orp' && statistics !=null  && statistics.allowedEntities && statistics.statisticsSum && statistics.allowedCharts && statistics.statisticsSum['orp'] && statistics.allowedCharts['orp'] && statistics.statisticsSum['orp'].total>0 && statistics.allowedCharts['orp'].length>0" class="uk-width-1-2@m uk-width-1-1@s">
182
                <div *ngFor="let chart of statistics.allowedCharts['orp']" class="uk-width-1-2@l uk-width-1-1@m uk-first-column">
183
                    <iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
184
                </div>
185
              </div>
186
            </div>
187
          </li>
153 188
      </ul>
154 189
    </div>
190
    <hr>
191
    <div *ngIf="statistics && statistics.allowedEntities &&  countOtherGraphs()>0">
192
      <div class="uk-text-large">
193
      Other Graphs
194
      </div>
195
      <div *ngIf="statistics && statistics.allowedEntities" class="uk-margin-top uk-grid">
196
         <ng-container *ngFor="let entity of statistics.allowedEntities">
197
             <ng-container *ngIf="statistics.statisticsSum[entity].total>0 && statistics.allowedCharts[entity].length>0 && activeTab!=entity">
155 198

  
156
    <statistics-for-dashboard [currentMode]="'showInDashboard'"></statistics-for-dashboard>
199
                 <ng-container *ngIf="statistics.allowedCharts[entity] " >
200
                     <div *ngFor="let chart of statistics.allowedCharts[entity]" class="uk-width-1-2@m uk-first-column">
201
                         <iframe [src]=statistics.chartsUrlMap[chart] width="750" height="450" scrolling="no"></iframe>
202
                     </div>
203
                 </ng-container>
204
             </ng-container>
205
         </ng-container>
206
      </div>
207
    </div>
208

  
209

  
210

  
157 211
  </div>
158 212
  </article>
159 213
</div>
......
161 215
</div>
162 216

  
163 217
</div>
218
<statistics-for-dashboard [currentMode]="'showInDashboard'"></statistics-for-dashboard>

Also available in: Unified diff