|
7 | 7 |
|
8 | 8 | @inject UserConfig userConfig |
9 | 9 |
|
10 | | -<PageSizeComponent PageSizeCallback="UpdatePageSize"></PageSizeComponent> |
| 10 | +@if (ShowPageSizeInput) |
| 11 | +{ |
| 12 | + <PageSizeComponent PageSizeCallback="UpdatePageSize"></PageSizeComponent> |
| 13 | +} |
11 | 14 | <Table class="table table-bordered th-bg-secondary sticky-header show-scrollbar table-responsive" TableItem="ModellingConnection" |
12 | 15 | Items="Connections" PageSize="PageSize" ColumnReorder="true" TableRowClass="@(con => getTableRowClass(con))" |
13 | 16 | SelectedItems="SelectedConns" RowClickAction="@(conn => ToggleSelection(conn))"> |
14 | 17 | @if (!Readonly && !SelectInterfaceView && AppHandler != null) |
15 | 18 | { |
16 | | - <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("actions"))" Field="(x => x.Id)" Sortable="false" Filterable="false"> |
17 | | - <Template> |
18 | | - <div class="btn-group"> |
19 | | - <button type="button" class="btn btn-sm btn-primary" @onclick="async () => |
| 19 | + <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("actions"))" Field="(x => x.Id)" Sortable="false" Filterable="false"> |
| 20 | + <Template> |
| 21 | + <div class="btn-group"> |
| 22 | + <button type="button" class="btn btn-sm btn-primary" @onclick="async () => |
20 | 23 | { await AppHandler.ShowDetails(context); await AppHandlerChanged.InvokeAsync(AppHandler); }"> |
21 | 24 | @(AppHandler.DisplayButton("details", Icons.Display)) |
22 | | - </button> |
| 25 | + </button> |
23 | 26 | @if (AppActive) |
24 | 27 | { |
25 | 28 | @if (!context.GetBoolProperty(ConState.InterfaceRejected.ToString()) && !context.GetBoolProperty(ConState.Rejected.ToString())) |
26 | 29 | { |
27 | | - <button type="button" class="btn btn-sm btn-warning" @onclick="async () => |
| 30 | + <button type="button" class="btn btn-sm btn-warning" @onclick="async () => |
28 | 31 | { await AppHandler.EditConn(context); await AppHandlerChanged.InvokeAsync(AppHandler); }"> |
29 | 32 | @(AppHandler.DisplayButton("edit", Icons.Edit)) |
30 | | - </button> |
| 33 | + </button> |
31 | 34 | } |
32 | | - <button type="button" class="btn btn-sm btn-danger" @onclick="async () => |
| 35 | + <button type="button" class="btn btn-sm btn-danger" @onclick="async () => |
33 | 36 | { await AppHandler.RequestDeleteConnection(context); await AppHandlerChanged.InvokeAsync(AppHandler); }"> |
34 | 37 | @(AppHandler.DisplayButton("delete", Icons.Delete)) |
35 | | - </button> |
| 38 | + </button> |
36 | 39 | } |
37 | | - </div> |
38 | | - </Template> |
39 | | - </Column> |
| 40 | + </div> |
| 41 | + </Template> |
| 42 | + </Column> |
40 | 43 | } |
41 | 44 | @if (ShowSelectionColumn) |
42 | 45 | { |
43 | | - <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("select"))" Sortable="false" Filterable="false"> |
44 | | - <Template> |
| 46 | + <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("select"))" Sortable="false" Filterable="false"> |
| 47 | + <Template> |
45 | 48 | @if (SelectionType == SelectionType.Single) |
46 | 49 | { |
47 | | - <input type="radio" checked="@(SelectedConns.Contains(context))" /> |
| 50 | + <input type="radio" checked="@(SelectedConns.Contains(context))" /> |
48 | 51 | } |
49 | 52 | else if (SelectionType == SelectionType.Multiple) |
50 | 53 | { |
51 | | - <input type="checkbox" checked="@(SelectedConns.Contains(context))" /> |
| 54 | + <input type="checkbox" checked="@(SelectedConns.Contains(context))" /> |
52 | 55 | } |
53 | | - </Template> |
54 | | - </Column> |
| 56 | + </Template> |
| 57 | + </Column> |
55 | 58 | } |
56 | 59 | <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("id"))" Field="@(x => x.Id)" Sortable="true" Filterable="true" /> |
57 | 60 | @if (!SelectInterfaceView) |
58 | 61 | { |
59 | 62 | @if (Connections.Count > 0 && Connections.First().IsInterface) |
60 | 63 | { |
61 | | - <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("published"))" Field="@(x => x.IsPublished)" Sortable="true" Filterable="true"> |
62 | | - <Template> |
| 64 | + <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("published"))" Field="@(x => x.IsPublished)" Sortable="true" Filterable="true"> |
| 65 | + <Template> |
63 | 66 | @(context.IsPublished.ShowAsHtml()) |
64 | | - </Template> |
65 | | - </Column> |
| 67 | + </Template> |
| 68 | + </Column> |
66 | 69 | } |
67 | | - <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("state"))" Field="@(x => x.Id)" Sortable="true" Filterable="false"> |
68 | | - <Template> |
| 70 | + <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("state"))" Field="@(x => x.Id)" Sortable="true" Filterable="false"> |
| 71 | + <Template> |
69 | 72 | @((MarkupString)DisplayState(context)) |
70 | | - </Template> |
71 | | - </Column> |
| 73 | + </Template> |
| 74 | + </Column> |
72 | 75 | } |
73 | 76 | @if (ShowAppName) |
74 | 77 | { |
75 | | - <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("owner"))" Field="@(x => x.App.Name)" Sortable="true" Filterable="true"> |
76 | | - <Template> |
| 78 | + <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("owner"))" Field="@(x => x.App.Name)" Sortable="true" Filterable="true"> |
| 79 | + <Template> |
77 | 80 | @(context.App?.DisplayWithoutAppId(userConfig.GetText("common_service"))) |
78 | | - </Template> |
79 | | - </Column> |
80 | | - <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("ext_app_id"))" Field="@(x => x.App.ExtAppId)" Sortable="true" Filterable="true"> |
81 | | - <Template> |
| 81 | + </Template> |
| 82 | + </Column> |
| 83 | + <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("ext_app_id"))" Field="@(x => x.App.ExtAppId)" Sortable="true" Filterable="true"> |
| 84 | + <Template> |
82 | 85 | @(context.App.ExtAppId) |
83 | | - </Template> |
84 | | - </Column> |
| 86 | + </Template> |
| 87 | + </Column> |
85 | 88 | } |
86 | 89 | <Column TableItem="ModellingConnection" Title="@(userConfig.GetText("name"))" Field="@(x => x.Name)" Sortable="true" Filterable="true"> |
87 | 90 | <Template> |
|
160 | 163 | [Parameter] |
161 | 164 | public SelectionType SelectionType { get; set; } = SelectionType.Single; |
162 | 165 |
|
| 166 | + [Parameter] |
| 167 | + public bool ShowPageSizeInput { get; set; } = false; |
| 168 | + |
163 | 169 | private int PageSize { get; set; } |
164 | 170 |
|
165 | 171 | private void UpdatePageSize(int pageSize) |
|
0 commit comments