Project

General

Profile

« Previous | Next » 

Revision 58574

[Trunk | Connect]:
1. app-routing.module.ts: Add route '/subjects'.
2. app.component.ts: Group subscribe and invite buttons under id="subscribeAndInviteBtn" (keep distance between them alwayes the same) | uncomment menu item 'Subjects' in About.
3. app.module.ts: import 'SubscribeService' (singleton service to update everywhere subscriber status).
4. libUser.module.ts & subscribe.module.ts: remove import of 'SubscribeService' (singleton service to update everywhere subscriber status).
5. community.component.html:
a. Improve some checks
b. In main tabs of the page (class main-tabs) add class 'uk-text-truncate' and remove class 'uk-width-3-4' (each tab has max-width)
c. Add icon in 'Analytics' tab
d. [Bug fix] In description, fix overflow and max height of box
6. community.component.ts: Add field '@ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent' to add some checks in html.
7. curators.component.html: Remove div with class 'image-front-topbar' | Update css for title | Add <breadcrumbs> | Add user icon for each curator.
8. curators.component.ts: Initialize breadcrumb | [Bug fix] In methods 'getPageContents()' and 'getDivContents()' use communityId (instead of 'connect').
9. curators.module.ts & organizationsPage.module.ts & inviteBasic.module.ts: import 'BreadcrumbsModule'.
10. organizationsPage.component.ts: Update css for title | Add <breadcrumbs> | Initialize breadcrumb.
11. subjects.component.ts, subjects.module.ts, subjects-routing.module.ts: Add page for Subjects.
12. invite.component.html: Add <breadcrumbs> in longView | Add icon in button 'Invite users'.
13. invite.component.ts: Initialize breadcrumb.
14. subscribe.component.ts:
a. Add icon in button "Subscribe"/ "Subscribed"
b. Add class 'uk-display-inline-block' in showNumbers (members)
c. Initialize and get subscriber status with new methods of service (initIsSubscribedToCommunity() & isSubscribed - BehaviorSubject instead of isSubscribedToCommunity())
15. connect-custom.css: Group css for #subscribeBtn, #inviteBtn into #subscribeAndInviteBtn | Add css for class 'user-circle-background' (background of user icon in curators).

View differences:

community.component.html
189 189
<div *ngIf="communityInfo" class="uk-section uk-padding-remove-top uk-padding-remove-bottom">
190 190
  <div class="uk-padding-small">
191 191
    <div class="uk-container uk-container-large uk-margin-top"
192
         *ngIf="communityId != null && communityId != '' && community != null">
192
         *ngIf="communityId">
193 193
      <div>
194 194
        <div class="uk-margin-large-bottom">
195
          <div *ngIf="community.title != null" class="uk-h2 uk-margin-remove">
195
          <div *ngIf="community.title" class="uk-h2 uk-margin-remove">
196 196
            {{community.title}}
197 197
          </div>
198
          <div *ngIf="community.shortTitle != null && community.title != community.shortTitle"
198
          <div *ngIf="community.shortTitle && community.title != community.shortTitle"
199 199
               class="subtitle uk-margin-remove">
200 200
            {{community.shortTitle}}
201 201
          </div>
......
205 205
              <curators [longView]="false" [managers]="community.managers" [communityId]="communityId"></curators>
206 206
            </div>
207 207
            <div>
208
              <span *ngIf="projectTotal != null  && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)">
208
              <span *ngIf="projectTotal  && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)">
209 209
                <span class="uk-text-muted">Projects: </span>
210 210
                <a class="uk-margin-auto-vertical uk-margin-auto portal-link" [queryParams]=params
211 211
                       routerLinkActive="router-link-active" [routerLink]="searchLinkToProjects">
212 212
                  {{projectTotal|number}}
213 213
                </a>
214 214
              </span>
215
              <span *ngIf="contentProviderTotal != null  && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)"
216
                    [class]="'uk-display-inline-block '+((projectTotal != null  && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)) ? 'uk-margin-left' : '')">
215
              <span *ngIf="contentProviderTotal  && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)"
216
                    [class]="'uk-display-inline-block '+((projectTotal  && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)) ? 'uk-margin-left' : '')">
217 217
                    <span class="uk-text-muted">Content Providers: </span>
218 218
                    <a class="uk-margin-auto-vertical uk-margin-auto portal-link" [queryParams]=params
219 219
                       routerLinkActive="router-link-active" [routerLink]="searchLinkToDataProviders">
......
221 221
                    </a>
222 222
              </span>
223 223
              <span *ngIf="projectsCalculated && contentProvidersCalculated &&
224
                          ((projectTotal != null  && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects))
225
                          || (contentProviderTotal != null  && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)))"
224
                          ((projectTotal  && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects))
225
                          || (contentProviderTotal  && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)))"
226 226
                    class="uk-icon uk-text-muted uk-margin-small-left"
227 227
                    title="{{buildProjectsAndContentProvidesTooltip()}}"
228 228
                    uk-tooltip="pos:bottom-right; delay:10; cls: community-page-tooltip uk-width-medium">
......
253 253
        </div>
254 254
        <div>
255 255
          <div class="main-tabs-div">
256
          <ul uk-tab class="main-tabs uk-margin-remove uk-child-width-expand uk-width-3-4" uk-switcher="connect: .main-tabs-content">
256
          <ul uk-tab class="uk-text-truncate main-tabs uk-margin-remove uk-child-width-expand uk-width-3-4" uk-switcher="connect: .main-tabs-content">
257 257
            <li class="uk-padding-remove">
258 258
              <a class="uk-width-1-1 uk-height-1-1">
259 259
                <div class="uk-text-bold">Summary</div>
260 260
              </a>
261 261
            </li>
262
            <li *ngIf="publicationTotal != null && publicationTotal > 0 && isEntityEnabled('publication')"
262
            <li *ngIf="publicationTotal && publicationTotal > 0 && isEntityEnabled('publication')"
263 263
                class="uk-padding-remove" (click)="show='overview'; searchResearchResults('publication', publicationTotal, publicationResults)">
264 264
              <a class="uk-width-1-1 uk-height-1-1">
265
                <div class="uk-text-bold">Publications</div><div class="uk-margin-small-top number">{{publicationTotal|number}}</div>
265
                <div class="uk-text-bold">Publications</div><div class="uk-margin-top number">{{publicationTotal|number}}</div>
266 266
              </a>
267 267
            </li>
268
            <li *ngIf="researchDataTotal != null && researchDataTotal > 0 && isEntityEnabled('dataset')"
268
            <li *ngIf="researchDataTotal && researchDataTotal > 0 && isEntityEnabled('dataset')"
269 269
                class="uk-padding-remove" (click)="show='overview'; searchResearchResults('dataset', researchDataTotal, researchDataResults)">
270 270
              <a class="uk-width-1-1 uk-height-1-1">
271
                <div class="uk-text-bold">Research Data</div><div class="uk-margin-small-top number">{{researchDataTotal|number}}</div>
271
                <div class="uk-text-bold">Research Data</div><div class="uk-margin-top number">{{researchDataTotal|number}}</div>
272 272
              </a>
273 273
            </li>
274
            <li *ngIf="softwareTotal != null && softwareTotal > 0 && isEntityEnabled('software')"
274
            <li *ngIf="softwareTotal && softwareTotal > 0 && isEntityEnabled('software')"
275 275
                class="uk-padding-remove" (click)="show='overview'; searchResearchResults('software', softwareTotal, softwareResults)">
276 276
              <a class="uk-width-1-1 uk-height-1-1">
277
                <div class="uk-text-bold">Software</div><div class="uk-margin-small-top number">{{softwareTotal|number}}</div>
277
                <div class="uk-text-bold">Software</div><div class="uk-margin-top number">{{softwareTotal|number}}</div>
278 278
              </a>
279 279
            </li>
280
            <li *ngIf="orpTotal != null && orpTotal > 0 && isEntityEnabled('orp')"
280
            <li *ngIf="orpTotal && orpTotal > 0 && isEntityEnabled('orp')"
281 281
                class="uk-padding-remove" (click)="show='overview'; searchResearchResults('other', orpTotal, orpResults)">
282 282
              <a class="uk-width-1-1 uk-height-1-1">
283
                <div class="uk-text-bold">Other Research</div><div class="uk-margin-small-top number">{{orpTotal|number}}</div></a>
283
                <div class="uk-text-bold">Other Research</div><div class="uk-margin-top number">{{orpTotal|number}}</div></a>
284 284
            </li>
285 285
            <li *ngIf="statistics && statistics.statisticsDisplay && statistics.statisticsDisplay.isActive"
286 286
                class="uk-padding-remove statistics" (click)="show='analysis'; activeTab='analytics'">
287 287
              <a class="uk-width-1-1 uk-height-1-1">
288 288
                <div class="uk-text-bold">Analytics</div>
289
                <div class="uk-margin-top number">
290
                  <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
291
                    <path d="M0 0h24v24H0z" fill="none"></path>
292
                    <path d="M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"></path>
293
                  </svg>
294
                </div>
289 295
              </a>
290 296
            </li>
291 297
          </ul>
292 298
          </div>
293 299
          <ul class="uk-switcher main-tabs-content">
294 300
            <li>
295
              <div class="uk-grid uk-margin-remove">
301
              <div *ngIf="community" class="uk-grid uk-margin-remove">
296 302
                <div class="uk-width-expand uk-padding uk-inline">
297 303
                  <div>
298
                    <span *ngIf="community.date != null" class="uk-margin-right">
304
                    <span *ngIf="community.date" class="uk-margin-right">
299 305
                      <span class="lowOpacityColor uk-text-muted">Created: </span> {{community.date | date:'dd-MMM-yyyy'}}
300 306
                    </span>
301
                    <span class="uk-margin-right uk-display-inline-block">
302
                      <subscribe *ngIf="communityId != null" [communityId]="communityId" showNumbers=true class=""></subscribe>
307
                    <span>
308
                      <subscribe *ngIf="communityId" [communityId]="communityId" showNumbers=true class=""></subscribe>
303 309
                    </span>
304 310
                  </div>
305
                  <div *ngIf="community.description != null" class="uk-margin-bottom uk-margin-top">
311
                  <div *ngIf="community.description"
312
                       [class]="'uk-margin-bottom '+ ((subscribeComponent && subscribeComponent.subscribers > 0) || community.date ? 'uk-margin-top' : '')">
306 313
                    <div class="uk-text-muted">Description</div>
307 314
                    <div *ngIf="!showAllDescription" class="">
308 315
                      {{community.description.substring(0, 500)}}{{community.description.length > 500 ? '...' : ''}}</div>
309
                    <div *ngIf="showAllDescription" class="uk-height-max-medium uk-overflow-auto">
310
                      {{community.description}}
316
                    <div *ngIf="showAllDescription" class="uk-overflow-auto">
317
                      <div class="uk-height-max-medium">{{community.description}}</div>
311 318
                    </div>
312 319
                    <div *ngIf="!showAllDescription && community.description.length > 500 "
313 320
                         class="uk-animation-fade uk-margin-small-top uk-padding uk-padding-remove-top uk-position-bottom-right">
......
322 329
                    </div>
323 330
                  </div>
324 331
                </div>
325
                <div *ngIf="community.subjects && community.subjects.length > 0"
332
                <div *ngIf="isRouteEnabled('/subjects') && community.subjects && community.subjects.length > 0"
326 333
                     class="uk-width-1-3 uk-padding right-column uk-inline">
327
                  <div class="">
334
                  <div class="uk-margin-bottom">
328 335
                    <div class="uk-text-muted">Subjects</div>
329 336
                    <span *ngFor="let subject of community.subjects.slice(0,12) let i=index">
330 337
                      <span *ngIf="subject != ''">
......
336 343
                        <span *ngIf="i < community.subjects.length-1 && i != 11">, </span>
337 344
                      </span>
338 345
                    </span>
339
                    <div *ngIf="community.subjects.length > 12"
340
                         class="uk-margin-top uk-animation-fade portal-link uk-padding uk-padding-remove-top uk-position-bottom-right">
341
                      <a routerLinkActive="router-link-active" [routerLink]="'/subjects'">
346
                    <div class="uk-margin-top uk-animation-fade uk-padding uk-padding-remove-top uk-position-bottom-right">
347
                      <a class="portal-link" routerLinkActive="router-link-active" [routerLink]="'/subjects'">
342 348
                        View all
343 349
                      </a>
344 350
                    </div>
......
346 352
                </div>
347 353
              </div>
348 354
            </li>
349
            <li *ngIf="publicationTotal != null && publicationTotal > 0 && isEntityEnabled('publication')">
355
            <li *ngIf="publicationTotal && publicationTotal > 0 && isEntityEnabled('publication')">
350 356
              <ng-container *ngTemplateOutlet="tab_content; context: {
351 357
                resultType: 'publication', results: publicationResults, totalResults: publicationTotal, type: 'publication', typeName: 'publication'}">
352 358
              </ng-container>
353 359
            </li>
354
            <li *ngIf="researchDataTotal != null && researchDataTotal > 0 && isEntityEnabled('dataset')">
360
            <li *ngIf="researchDataTotal && researchDataTotal > 0 && isEntityEnabled('dataset')">
355 361
              <ng-container *ngTemplateOutlet="tab_content; context: {
356 362
                resultType: 'dataset', results: researchDataResults, totalResults: researchDataTotal, type: 'dataset', typeName: 'research fata'}">
357 363
              </ng-container>
358 364
            </li>
359
            <li *ngIf="softwareTotal != null && softwareTotal > 0 && isEntityEnabled('software')">
365
            <li *ngIf="softwareTotal && softwareTotal > 0 && isEntityEnabled('software')">
360 366
              <ng-container *ngTemplateOutlet="tab_content; context: {
361 367
                resultType: 'software', results: softwareResults, totalResults: softwareTotal, type: 'software', typeName: 'software'}">
362 368
              </ng-container>
363 369
            </li>
364
            <li *ngIf="orpTotal != null && orpTotal > 0 && isEntityEnabled('orp')">
370
            <li *ngIf="orpTotal && orpTotal > 0 && isEntityEnabled('orp')">
365 371
              <ng-container *ngTemplateOutlet="tab_content; context: {
366 372
                resultType: 'other', results: orpResults, totalResults: orpTotal, type: 'orp', typeName: 'other products'}">
367 373
              </ng-container>
......
748 754
<!--    </div>-->
749 755
<!--  </div>-->
750 756
<!--</div>-->
751
<div class="uk-section tm-middle uk-container uk-margin-top uk-padding-remove-top" id="" *ngIf="communityId != null
752
   && communityId != '' && community != null && communityInfo != null">
757
<div class="uk-section tm-middle uk-container uk-margin-top uk-padding-remove-top" id="" *ngIf="communityId && communityInfo">
753 758
  <ng-container *ngIf=" isRouteEnabled('/organizations')">
754 759
    <div class="uk-container  uk-margin-bottom uk-grid">
755 760
      <div class="uk-width-expand uk-padding-remove">
......
768 773
          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">
769 774
          No community chosen
770 775
        </div>
771
        <div *ngIf="communityId != null && communityId != '' && community != null">
776
        <div *ngIf="communityId">
772 777

  
773 778
        </div>
774 779
      </article>

Also available in: Unified diff