Project

General

Profile

« Previous | Next » 

Revision 58626

[Connect|Trunk]

Remove search bar in menu

Add search form back for search results, projects, datasources

Rearrange the menu items and add back search menu

Community page: add search form

View differences:

modules/uoa-connect-portal/trunk/src/app/community/community.component.html
185 185

  
186 186
</ng-template>
187 187

  
188
  <div class="publicationsSearchForm ">
189
    <div class="uk-container uk-container-large">
190
      <div class="uk-margin-large-top">
191
        <div *ngIf="community.title" class="uk-h2 uk-margin-remove">
192
          {{community.title}}
193
        </div>
194
        <div *ngIf="community.shortTitle && community.title != community.shortTitle"
195
             class="subtitle uk-margin-remove">
196
          {{community.shortTitle}}
197
        </div>
198
      </div>
199
    </div>
200
    <div class="uk-flex uk-flex-middle uk-flex-center">
188 201

  
202
      <form class=" uk-margin-large uk-margin-large-top ">
203
        <div class="uk-grid uk-margin-small-left">
204
          <div class="uk-margin-small-top uk-padding-remove-left">
205
            <entities-selection [simpleView]="true" currentEntity="result"  selectedEntity="result" [customFilter]="customFilter"
206
                                [properties]="properties" [onChangeNavigate]="false"
207
                                (selectionChange)="entityChanged($event)"
208
            ></entities-selection>
209
          </div>
210
  <!--        [class]="((selectedEntity == 'result')?'quickSelectionsBox':'')+' uk-padding-remove-left uk-margin-small-top'" -->
211
          <div class=" uk-padding-remove-left uk-margin-small-top" >
212
            <div class="uk-inline">
213
              <a *ngIf="keyword.length > 0" class="uk-form-icon uk-form-icon-flip" (click)="keyword = ''"
214
                 uk-icon="icon: close"></a>
215
              <input type="text" class="uk-input   uk-width-xlarge@l uk-width-large@m uk-width-medium"
216
                     placeholder="Search in OpenAIRE for scholarly works"
217
                     [(ngModel)]="keyword"
218
                     name="keyword">
219
            </div>
220
           <!-- <div>
221
              <quick-selections *ngIf="selectedEntity == 'result'" [resultTypes]="resultTypes"
222
                                [quickFilter]="resultsQuickFilter" [QFselected]="(resultsQuickFilter)?resultsQuickFilter.selected:null" [properties]="properties">
223
              </quick-selections>
224
            </div>-->
225
          </div>
226
          <div class="uk-padding-remove-left uk-margin-small-top">
227

  
228
            <button  (click)="goTo(true)" type="submit"
229
                     class="uk-button portal-button uk-text-bold  uk-padding uk-padding-remove-vertical uk-margin-small-left">
230
              Search
231
            </button>
232
            <div class="uk-margin-small-top  uk-margin-left"> <a *ngIf="selectedEntity!= 'all'" (click)="goTo(false)"
233
                                                                 class="portal-link">Advanced Search</a></div>
234
          </div>
235
        </div>
236
      </form>
237
    </div>
238
  </div>
239

  
189 240
<div *ngIf="communityInfo && community" class="uk-section uk-padding-remove-top uk-padding-remove-bottom">
190 241
  <div class="uk-padding-small">
191 242
    <div class="uk-container uk-container-large uk-margin-top"
192 243
         *ngIf="communityId">
193 244
      <div>
194
        <div class="uk-margin-large-bottom">
195
          <div *ngIf="community.title" class="uk-h2 uk-margin-remove">
196
            {{community.title}}
197
          </div>
198
          <div *ngIf="community.shortTitle && community.title != community.shortTitle"
199
               class="subtitle uk-margin-remove">
200
            {{community.shortTitle}}
201
          </div>
202
        </div>
245
<!--        <div class="uk-margin-large-bottom">-->
246
<!--          <div *ngIf="community.title" class="uk-h2 uk-margin-remove">-->
247
<!--            {{community.title}}-->
248
<!--          </div>-->
249
<!--          <div *ngIf="community.shortTitle && community.title != community.shortTitle"-->
250
<!--               class="subtitle uk-margin-remove">-->
251
<!--            {{community.shortTitle}}-->
252
<!--          </div>-->
253
<!--        </div>-->
203 254
        <div>
204 255
          <div class="main-tabs-div">
205 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">
......
782 833
  </div>
783 834

  
784 835
</div>
785
</div>
836
</div>
modules/uoa-connect-portal/trunk/src/app/community/community.component.ts
22 22
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
23 23
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
24 24
import {SubscribeComponent} from "../utils/subscribe/subscribe.component";
25
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
25 26

  
26 27
@Component({
27 28
  selector: 'community',
......
87 88
  private user: User;
88 89

  
89 90
  @ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent = null;
91
//Search Form
92
  selectedEntity;
93
  selectedEntitySimpleUrl;
94
  selectedEntityAdvancedUrl;
95
  keyword:string ="";
96
  customFilter;
90 97

  
91 98
  constructor(
92 99
    private element: ElementRef,
......
131 138
          this.user = user;
132 139
        });
133 140
        if (this.communityId != null && this.communityId != '') {
141
          this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
134 142
          this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
135 143
            community => {
136 144
              if (typeof document !== 'undefined') {
......
403 411
    return tooltipContent;
404 412
  }
405 413

  
414
  entityChanged($event){
415
    this.selectedEntity = $event.entity;
416
    this.selectedEntitySimpleUrl = $event.simpleUrl;
417
    this.selectedEntityAdvancedUrl = $event.advancedUrl;
418
  }
419
  goTo(simple:boolean){
420
    let url = (simple)?this.selectedEntitySimpleUrl:this.selectedEntityAdvancedUrl;
421
    let parameterNames = [];
422
    let parameterValues = [];
423
    if (this.selectedEntity == "result") {
424
     /* if (this.resultTypes) {
425
        let values = [];
426
        if (this.resultTypes.publication) {
427
          values.push("publications");
428
        }
429
        if (this.resultTypes.dataset) {
430
          values.push("datasets");
431
        }
432
        if (this.resultTypes.software) {
433
          values.push("software");
434
        }
435
        if (this.resultTypes.other) {
436
          values.push("other");
437
        }
438
        if (values.length > 0) {
439
          parameterNames.push("type");
440
          parameterValues.push(values.join(","));
441
        }
442
        if (this.resultsQuickFilter) {
443
          parameterNames.push("qf");
444
          parameterValues.push("" + this.resultsQuickFilter.selected);
445
        }
446
      }*/
447
    }
448
    if(this.keyword.length > 0) {
449
      parameterNames.push("q");
450
      parameterValues.push(this.keyword);
451
      parameterNames.push("op");
452
      parameterValues.push("and");
453
    }
454
    this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
455
  }
456

  
406 457
  public countSubscribersEvent($event){
407 458
    this.subscribers = $event.value;
408 459
  }
modules/uoa-connect-portal/trunk/src/app/community/community.module.ts
27 27
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
28 28
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
29 29
import {MatSelectModule} from "@angular/material";
30
import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtils/entitiesSelection.module";
30 31

  
31 32
@NgModule({
32 33
  imports: [
......
34 35
    SubscribeModule, StatisticsModule, ManageModule, InviteModule,
35 36
    SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule,
36 37
    SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
37
    Schema2jsonldModule, SEOServiceModule, MatSelectModule
38
    Schema2jsonldModule, SEOServiceModule, MatSelectModule, EntitiesSelectionModule
38 39
  ],
39 40
  declarations: [
40 41
    CommunityComponent, ResultsComponent
modules/uoa-connect-portal/trunk/src/app/searchPages/simple/searchDataproviders.component.ts
24 24
                          [disableForms]="disableForms"
25 25
                          [enableSearchView]="enableSearchView"
26 26
                          searchFormClass="datasourcesTableSearchForm"
27
                          formPlaceholderText="Search for Content Providers"
27
                          formPlaceholderText="Search by name..."
28 28
                          [piwikSiteId]="piwikSiteId" [hasPrefix]="false"  [customFilter]="customFilter" [enableEntitySelection]="true"
29
                          [includeOnlyResultsAndFilter]="true" [showBreadcrumb]="true">
29
                          [includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true">
30 30
    </search-page-table>
31 31
    `
32 32

  
modules/uoa-connect-portal/trunk/src/app/searchPages/simple/searchResearchResults.component.ts
10 10
    template: `
11 11
      <search-research-results resultType="result" openaireLink="https://beta.explore.openaire.eu/search/find/publications"
12 12
                               [customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false" 
13
                               [includeOnlyResultsAndFilter]="true" [showBreadcrumb]="true" [showAdvancedSearchLink]="false"></search-research-results>
13
                               [includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true" [showAdvancedSearchLink]="true"></search-research-results>
14 14
    `
15 15

  
16 16
})
modules/uoa-connect-portal/trunk/src/app/searchPages/simple/searchProjects.component.ts
26 26
                          [disableForms]="disableForms"
27 27
                          [enableSearchView]="enableSearchView"
28 28
                          searchFormClass="projectsTableSearchForm"
29
                          formPlaceholderText="Search for Projects"
29
                          formPlaceholderText="Search by project title, grant id, funder... "
30 30
                          [piwikSiteId]="piwikSiteId" [hasPrefix]="false" [customFilter]="customFilter" [enableEntitySelection]="true"
31
                          [includeOnlyResultsAndFilter]="true" [showBreadcrumb]="true">
31
                          [includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true">
32 32
    </search-page-table>
33 33
    `
34 34

  
modules/uoa-connect-portal/trunk/src/app/app.component.ts
25 25
      <navbar *ngIf="properties && showMenu  && community" [portal]="properties.dashboard" [onlyTop]=false
26 26
              [communityId]="community.id"
27 27
              [userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user"
28
              [community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="true"
28
              [community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="false"
29 29
              searchRoute="/search/find/research-outcomes"
30 30
              [showHomeMenuItem]="false"></navbar>
31 31
      <customization *ngIf="properties  && community" [properties]="properties"
......
168 168
            };
169 169
            this.menuItems = [];
170 170

  
171
           /* this.menuItems.push(
172
              {
173
                rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find", "/search/find/publications", "/search/find/datasets", "/search/find/software", "/search/find/other", "/search/find/projects", "/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
174
                items: [
175
                  new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
176
                  new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
177
                  new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
178
                ]
179
              });*/
180

  
181 171
            this.menuItems.push({
182 172
              rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
183 173
              items: []
......
186 176
              {
187 177
                rootItem: new MenuItem("link", "Link", "", "/participate/claim", false, [], ["/participate/claim"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
188 178
                items: [
189
                  /*new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
190
                  new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})*/
179
                  new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
180
                  new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})
191 181
                ]
192 182
              });
193 183
            this.menuItems.push(
194 184
              {
185
                rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find", "/search/find/publications", "/search/find/datasets", "/search/find/software", "/search/find/other", "/search/find/projects", "/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
186
                items: [
187
                  new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
188
                  new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
189
                  new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
190
                ]
191
              });
192
            this.menuItems.push(
193
              {
195 194
                rootItem: new MenuItem("about", "About", "", "", false, [], [], {}),
196 195
                items: [
197 196
                  new MenuItem("", "Supporting organizations", "", "/organizations", false, [], ["/organizations"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
modules/uoa-connect-portal/trunk/src/assets/search-background.svg
1
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 532"><defs><style>.cls-1{isolation:isolate;}.cls-2{fill:#eef7fd;mix-blend-mode:multiply;}</style></defs><title>Asset 3</title><g class="cls-1"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-2" d="M0,431s362,109,841,62,632,68,1159-9V0H0Z"/><path class="cls-2" d="M0,514s1401,71,2000-69V0H0Z"/></g></g></g></svg>
modules/uoa-connect-portal/trunk/src/assets/connect-custom.css
119 119
.datasourcesSearchForm, .compatibleDatasourcesSearchForm, .compatibleDatasourcesTableSearchForm, .datasourcesTableSearchForm,
120 120
.journalsSearchForm, .journalsTableSearchForm,
121 121
.entityRegistriesSearchForm, .entityRegistriesTableSearchForm {
122
    background: url('search-background.svg')   #F7FCFF no-repeat center bottom   ;
123
    background-size: cover !important;
124
    height: inherit;
122 125

  
123
  background: url('') !important;
124

  
125 126
}
126 127

  
127 128
.communityToolBar {
......
273 274
.connectApp .uk-grid-divider>:not(.uk-first-column)::before {
274 275
  border-left: 1px solid #DEDEDE;
275 276
}
277

  
278
#stickyNavbar{
279
    box-shadow: 0px 1px 1px #0000004D;
280
}
modules/uoa-connect-portal/trunk/src/assets/env-properties.json
2 2
  "environment" : "development",
3 3
  "dashboard" : "connect",
4 4
  "enablePiwikTrack" : false,
5
  "useCache" : false,
5
  "useCache" : true,
6 6
  "showContent" : true,
7 7
  "showAddThis" : false,
8 8
  "metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
modules/uoa-connect-portal/trunk/src/assets/customization.css
174 174
    background-color: #F7FCFF;
175 175
    color: #000000 !important;
176 176
    font-size: 14px !important;
177
    min-height: 60vh;
177 178
    /*font-weight: 400!important;*/
178 179
}
179 180

  
modules/uoa-connect-portal/trunk/src/index.html
119 119
</script>
120 120
<!-- Go to www.addthis.com/dashboard to customize your tools -->
121 121
<!-- to update addThis: https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080-->
122
<!-- <script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5a12dbd124e4e521"></script> -->
123
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080"></script>
122
<!--<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080"></script>-->
124 123
   </body>
125 124
</html>

Also available in: Unified diff