aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html
blob: c989d2e387058bba4accfa1f5c6f05ec1a6af401 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<my-plugin-navigation [pluginType]="pluginType"></my-plugin-navigation>

<div class="alert pt-alert-primary" i18n *ngIf="pluginInstalled">
  To load your new installed plugins or themes, refresh the page.
</div>

<div class="result-and-search">
  <ng-container *ngIf="!search">
    <my-global-icon iconName="trending" aria-hidden="true"></my-global-icon>
    <ng-container *ngIf="!isThemeSearch()" i18n>Popular plugins</ng-container>
    <ng-container *ngIf="isThemeSearch()" i18n>Popular themes</ng-container>
  </ng-container>

  <ng-container *ngIf="search && !isSearching">
    <my-global-icon iconName="search"></my-global-icon>

    <ng-container i18n>
      {{ pagination.totalItems }} {pagination.totalItems, plural, =1 {result} other {results}} for "{{ search }}"
    </ng-container>
  </ng-container>

  <div class="search-bar">
    <input type="text" (input)="onSearchChange($event)" i18n-placeholder placeholder="Search..." myAutofocus />
  </div>
</div>

<div class="no-results" i18n *ngIf="pagination.totalItems === 0">
  No results.
</div>

<div class="plugins" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()">
  <ng-container *ngFor="let plugin of plugins" >
    <my-plugin-card [plugin]="plugin" [version]="plugin.latestVersion" [pluginType]="pluginType">
      <div ngProjectAs="badges">
        <span i18n *ngIf="plugin.installed" class="pt-badge badge-success">Installed</span>

        <span *ngIf="plugin.official" class="pt-badge badge-primary" i18n i18n-title title="This plugin is developed by Framasoft">
          Official
        </span>
      </div>

      <div ngProjectAs="buttons">
        <my-edit-button
          *ngIf="plugin.installed === true && !isThemeSearch()" [routerLink]="getShowRouterLink(plugin)"
          label="Settings" i18n-label [responsiveLabel]="true"
        ></my-edit-button>

        <my-button
          class="update-button" *ngIf="plugin.installed === false" (click)="install(plugin)"
          [loading]="isInstalling(plugin)" label="Install" [responsiveLabel]="true"
          icon="cloud-download" [attr.disabled]="isInstalling(plugin)"
        ></my-button>
      </div>

    </my-plugin-card>
  </ng-container>
</div>