aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html
blob: 14f28f7efe7d2f71e56cd68d5728148f483f689b (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
58
<div class="toggle-plugin-type">
  <p-selectButton [options]="pluginTypeOptions" [(ngModel)]="pluginType" (ngModelChange)="reloadPlugins()"></p-selectButton>
</div>

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

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

<div class="result-title" *ngIf="!isSearching">
  <ng-container *ngIf="!search">
    <my-global-icon iconName="trending" aria-hidden="true"></my-global-icon>
    <ng-container i18n>Popular</ng-container>
  </ng-container>

  <ng-container *ngIf="!!search">
    <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>

<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="badge badge-success">Installed</span>

        <span *ngIf="plugin.official" class="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>