Project

General

Profile

« Previous | Next » 

Revision 58583

[Admin | Trunk]: Add message when no statistics exist. Disable customization route.

View differences:

modules/uoa-admin-portal/trunk/src/app/pages/dashboard/dashboard.component.html
15 15
                    <div>
16 16
                      <a routerLink="/community-edit-form"  [queryParams]="{communityId: this.communityId}" class="uk-button uk-button-text">Community Profile</a><br>
17 17
                      <a routerLink="/organizations"  [queryParams]="{communityId: this.communityId}" class="uk-button uk-button-text">Organizations</a><br>
18
                      <a routerLink="/customize-layout"
18
                      <!--<a routerLink="/customize-layout"
19 19
                         [queryParams]="{communityId: this.communityId}"
20
                          class="uk-button uk-button-text">Customize Layout</a>
20
                          class="uk-button uk-button-text">Customize Layout</a>-->
21 21
                    </div>
22 22
                  </div>
23 23
                  <div *ngIf="communityId != 'openaire' && this.communityId !== 'connect'" class="uk-card uk-card-default uk-card-body uk-card-hover">
modules/uoa-admin-portal/trunk/src/app/pages/stats/stats.component.html
1 1
<div id="stats">
2
    <div class="menubar ">
3
        <div *ngIf="statisticsSum" class="page-title uk-article-title">
4
            Statistics
5
            <mat-slide-toggle class="uk-margin-small-left" *ngIf="statisticsDisplay" title="Show/Hide all indicators" [checked]="statisticsDisplay.isActive"
6
                              (change)="toggleShowGraphAnalysisView()"></mat-slide-toggle>
7
        </div>
8
    </div>
9

  
10 2
    <div id="contentWrapper" class="content-wrapper">
11 3
        <div>
12 4
            <div class="contentPanel uk-margin-top">
......
15 7
                    <div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">{{ loadingMessage }}</div>
16 8
                    <div class="whiteFilm"></div>
17 9
                </div> -->
10
                <div *ngIf="statisticsSum" class="page-title uk-article-title">
11
                    Statistics
12
                    <mat-slide-toggle class="uk-margin-small-left" *ngIf="statisticsDisplay" title="Show/Hide all indicators" [checked]="statisticsDisplay.isActive"
13
                                      (change)="toggleShowGraphAnalysisView()"></mat-slide-toggle>
14
                </div>
18 15
                <div *ngIf="updateErrorMessage" class="uk-alert uk-alert-danger" role="alert">{{updateErrorMessage}}</div>
19 16
                <div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
20
                <div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
17
                <div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
21 18

  
22
                <div class="uk-alert uk-alert-primary uk-margin-top-large">
19
                <div *ngIf="statisticsSum" class="uk-alert uk-alert-primary uk-margin-top-large">
23 20
                    <div class="uk-flex uk-flex-middle">
24 21
                        <span class="uk-margin-small-right uk-icon uk-icon-justify" uk-icon="warning"></span>
25 22
                        <span>
......
28 25
                        </span>
29 26
                    </div>
30 27
                </div>
31
                <div *ngIf="communityId">
28
                <div *ngIf="!statisticsSum" class="uk-alert uk-alert-primary uk-margin-top-large">
29
                    <div class="uk-flex uk-flex-middle">
30
                        <span class="uk-margin-small-right uk-icon uk-icon-justify" uk-icon="warning"></span>
31
                        <span>
32
                            There are no available statistics for your community yet.<br>
33
                        </span>
34
                    </div>
35
                </div>
36
                <div *ngIf="communityId && statisticsSum">
32 37
                    <div class="users-list">
33 38
                        <div class="col-md-12">
34 39
                            <article class="uk-article ">
modules/uoa-admin-portal/trunk/src/app/pages/stats/stats.component.ts
87 87
        this.statisticsDisplay = null;
88 88
        this.contentService.getCommunityStatistics(this.properties.statisticsAPIURL, this.communityId).subscribe(
89 89
            stats => {
90
              this.statisticsSum = stats;
91
              if(stats["other"]){ //hack because in stats API the entity name is "other" while in admin API is "orp". This component uses also "orp" name
92
                this.statisticsSum["orp"]=stats["other"];
90
              if(stats) {
91
                this.statisticsSum = stats;
92
                if(stats["other"]){ //hack because in stats API the entity name is "other" while in admin API is "orp". This component uses also "orp" name
93
                  this.statisticsSum["orp"]=stats["other"];
94
                }
93 95
              }
94 96
            },
95 97
            error => {
modules/uoa-admin-portal/trunk/src/app/app.component.ts
242 242
            '/organizations', false, [], [], {communityId: this.communityId}),
243 243
          items: []
244 244
        });
245
        community.items.push({
245
        /*community.items.push({
246 246
          rootItem: new MenuItem('layout', 'Customize Layout', '/customize-layout',
247 247
            '/customize-layout', false, [], [], {communityId: this.communityId}),
248 248
          items: []
249
        });
250
        /*community.items.push({
251
          rootItem: new MenuItem('communityLayout', 'Community Layout', '/community-layout',
252
            '/community-layout', false, [], [], {communityId: this.communityId}),
253
          items: []
254
        })*/
249
        });*/
255 250
        this.sideMenuItems.push(community);
256 251
        const communityContent: SideMenuItem = {
257 252
          rootItem: new MenuItem('communityContent', 'Community Content', '',
modules/uoa-admin-portal/trunk/src/app/app.routing.ts
143 143
        loadChildren: './pages/community/content-providers/communityContentProviders.module#CommunityContentProvidersModule',
144 144
        resolve: { envSpecific: EnvironmentSpecificResolver  }
145 145
    },
146
    {
146
    /*{
147 147
        path: 'customize-layout',
148 148
        loadChildren: './pages/customization/customization.module#CustomizationModule',
149 149
        resolve: { envSpecific: EnvironmentSpecificResolver  }
150
    },
150
    },*/
151 151
    {
152 152
        path: 'manage-content-providers/criteria',
153 153
        loadChildren: './pages/community/content-providers/criteria/criteria.module#CriteriaModule',

Also available in: Unified diff