|
21 | 21 | </mat-panel-description>
|
22 | 22 | </mat-expansion-panel-header>
|
23 | 23 | <div class="draft-entry-body">
|
24 |
| - @if (canDownloadBuild) { |
25 |
| - <p>{{ t("click_book_to_preview") }}</p> |
26 |
| - <p class="book-buttons"> |
27 |
| - <app-draft-preview-books [build]="entry" /> |
| 24 | + @if (requireSelectingFormattingOptions) { |
| 25 | + <p class="require-formatting-options"> |
| 26 | + {{ t("select_formatting_options") }} |
28 | 27 | </p>
|
29 |
| - <div class="draft-options"> |
30 |
| - <app-draft-download-button [build]="entry" [flat]="true" /> |
31 |
| - @if (featureFlags.usfmFormat.enabled && isLatestBuild) { |
32 |
| - <button mat-button class="format-usfm" [routerLink]="['format']"> |
33 |
| - <mat-icon>build</mat-icon> {{ t("formatting_options") }} |
34 |
| - </button> |
35 |
| - } |
| 28 | + <div class="formatting-options-container"> |
| 29 | + <button mat-flat-button class="format-usfm" [routerLink]="['format']"> |
| 30 | + <mat-icon>build</mat-icon> |
| 31 | + <div class="hide-lt-lg">{{ t("formatting_options") }}</div> |
| 32 | + <div class="hide-gt-lg">{{ t("options") }}</div> |
| 33 | + </button> |
| 34 | + <span>{{ t("new") }} {{ t("change_line_breaks_and_quotation_marks") }}</span> |
36 | 35 | </div>
|
37 |
| - } |
38 |
| - @if (buildFaulted) { |
39 |
| - <p> |
40 |
| - <strong>{{ t("error_details") }}</strong> |
41 |
| - </p> |
42 |
| - <table mat-table [dataSource]="buildFaultDetails"> |
43 |
| - <ng-container matColumnDef="heading"> |
44 |
| - <td mat-cell *matCellDef="let element">{{ element.heading }}</td> |
45 |
| - </ng-container> |
46 |
| - <ng-container matColumnDef="details"> |
47 |
| - <td mat-cell *matCellDef="let element">{{ element.details }}</td> |
48 |
| - </ng-container> |
49 |
| - <tr mat-row *matRowDef="let row; columns: ['heading', 'details']"></tr> |
50 |
| - </table> |
51 |
| - } |
52 |
| - @if (buildRequestedAtDate != null && buildRequestedByUserName != null) { |
53 |
| - <p class="requested-label"> |
54 |
| - {{ |
55 |
| - t("requested_by", { |
56 |
| - requestedAtTime: buildRequestedAtDate, |
57 |
| - requestedByUserName: buildRequestedByUserName |
58 |
| - }) |
59 |
| - }} |
60 |
| - </p> |
61 |
| - } @else if (buildRequestedAtDate != null) { |
62 |
| - <p class="requested-label"> |
63 |
| - {{ t("requested_at", { requestedAtTime: buildRequestedAtDate }) }} |
64 |
| - </p> |
65 |
| - } |
66 |
| - @if (hasTrainingConfiguration || hasTrainingDataFiles) { |
| 36 | + } @else { |
67 | 37 | @if (canDownloadBuild) {
|
68 |
| - <p> |
69 |
| - <a |
70 |
| - href="javascript:;" |
71 |
| - (click)="trainingConfigurationOpen = !trainingConfigurationOpen" |
72 |
| - class="training-configuration-link" |
73 |
| - > |
74 |
| - <mat-icon>expand_{{ trainingConfigurationOpen ? "less" : "more" }}</mat-icon> |
75 |
| - {{ |
76 |
| - t( |
77 |
| - trainingConfigurationOpen |
78 |
| - ? "hide_model_training_configuration" |
79 |
| - : "show_model_training_configuration" |
80 |
| - ) |
81 |
| - }} |
82 |
| - </a> |
| 38 | + <p>{{ t("click_book_to_preview") }}</p> |
| 39 | + <p class="book-buttons"> |
| 40 | + <app-draft-preview-books [build]="entry" /> |
83 | 41 | </p>
|
| 42 | + <div class="draft-options"> |
| 43 | + <app-draft-download-button [build]="entry" [flat]="true" /> |
| 44 | + @if (featureFlags.usfmFormat.enabled && isLatestBuild) { |
| 45 | + <button mat-button class="format-usfm" [routerLink]="['format']"> |
| 46 | + <mat-icon>build</mat-icon> {{ t("formatting_options") }} |
| 47 | + </button> |
| 48 | + } |
| 49 | + </div> |
84 | 50 | }
|
85 |
| - @if (trainingConfigurationOpen && hasTrainingConfiguration) { |
| 51 | + @if (buildFaulted) { |
86 | 52 | <p>
|
87 |
| - <strong>{{ t("training_model_description") }}</strong> |
| 53 | + <strong>{{ t("error_details") }}</strong> |
88 | 54 | </p>
|
89 |
| - <table mat-table [dataSource]="trainingConfiguration"> |
90 |
| - <ng-container matColumnDef="scriptureRange"> |
91 |
| - <th mat-header-cell *matHeaderCellDef>{{ t("training_books") }}</th> |
92 |
| - <td mat-cell *matCellDef="let element">{{ element.scriptureRange }}</td> |
93 |
| - </ng-container> |
94 |
| - <ng-container matColumnDef="source"> |
95 |
| - <th mat-header-cell *matHeaderCellDef> |
96 |
| - {{ i18n.getLanguageDisplayName(sourceLanguage) }} |
97 |
| - </th> |
98 |
| - <td mat-cell *matCellDef="let element">{{ element.source }}</td> |
| 55 | + <table mat-table [dataSource]="buildFaultDetails"> |
| 56 | + <ng-container matColumnDef="heading"> |
| 57 | + <td mat-cell *matCellDef="let element">{{ element.heading }}</td> |
99 | 58 | </ng-container>
|
100 |
| - <ng-container matColumnDef="target"> |
101 |
| - <th mat-header-cell *matHeaderCellDef> |
102 |
| - {{ i18n.getLanguageDisplayName(targetLanguage) }} |
103 |
| - </th> |
104 |
| - <td mat-cell *matCellDef="let element">{{ element.target }}</td> |
| 59 | + <ng-container matColumnDef="details"> |
| 60 | + <td mat-cell *matCellDef="let element">{{ element.details }}</td> |
105 | 61 | </ng-container>
|
106 |
| - <tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr> |
107 |
| - <tr mat-row *matRowDef="let row; columns: columnsToDisplay"></tr> |
| 62 | + <tr mat-row *matRowDef="let row; columns: ['heading', 'details']"></tr> |
108 | 63 | </table>
|
109 | 64 | }
|
110 |
| - @if (trainingConfigurationOpen && hasTrainingDataFiles) { |
111 |
| - <p> |
112 |
| - <span>{{ t("training_data_files_used") }}</span> |
113 |
| - <br /> |
114 |
| - <span class="training-files">{{ trainingFilesString(trainingDataFiles) }}</span> |
| 65 | + @if (buildRequestedAtDate != null && buildRequestedByUserName != null) { |
| 66 | + <p class="requested-label"> |
| 67 | + {{ |
| 68 | + t("requested_by", { |
| 69 | + requestedAtTime: buildRequestedAtDate, |
| 70 | + requestedByUserName: buildRequestedByUserName |
| 71 | + }) |
| 72 | + }} |
| 73 | + </p> |
| 74 | + } @else if (buildRequestedAtDate != null) { |
| 75 | + <p class="requested-label"> |
| 76 | + {{ t("requested_at", { requestedAtTime: buildRequestedAtDate }) }} |
| 77 | + </p> |
| 78 | + } |
| 79 | + @if (hasTrainingConfiguration || hasTrainingDataFiles) { |
| 80 | + @if (canDownloadBuild) { |
| 81 | + <p> |
| 82 | + <a |
| 83 | + href="javascript:;" |
| 84 | + (click)="trainingConfigurationOpen = !trainingConfigurationOpen" |
| 85 | + class="training-configuration-link" |
| 86 | + > |
| 87 | + <mat-icon>expand_{{ trainingConfigurationOpen ? "less" : "more" }}</mat-icon> |
| 88 | + {{ |
| 89 | + t( |
| 90 | + trainingConfigurationOpen |
| 91 | + ? "hide_model_training_configuration" |
| 92 | + : "show_model_training_configuration" |
| 93 | + ) |
| 94 | + }} |
| 95 | + </a> |
| 96 | + </p> |
| 97 | + } |
| 98 | + @if (trainingConfigurationOpen && hasTrainingConfiguration) { |
| 99 | + <p> |
| 100 | + <strong>{{ t("training_model_description") }}</strong> |
| 101 | + </p> |
| 102 | + <table mat-table [dataSource]="trainingConfiguration"> |
| 103 | + <ng-container matColumnDef="scriptureRange"> |
| 104 | + <th mat-header-cell *matHeaderCellDef>{{ t("training_books") }}</th> |
| 105 | + <td mat-cell *matCellDef="let element">{{ element.scriptureRange }}</td> |
| 106 | + </ng-container> |
| 107 | + <ng-container matColumnDef="source"> |
| 108 | + <th mat-header-cell *matHeaderCellDef> |
| 109 | + {{ i18n.getLanguageDisplayName(sourceLanguage) }} |
| 110 | + </th> |
| 111 | + <td mat-cell *matCellDef="let element">{{ element.source }}</td> |
| 112 | + </ng-container> |
| 113 | + <ng-container matColumnDef="target"> |
| 114 | + <th mat-header-cell *matHeaderCellDef> |
| 115 | + {{ i18n.getLanguageDisplayName(targetLanguage) }} |
| 116 | + </th> |
| 117 | + <td mat-cell *matCellDef="let element">{{ element.target }}</td> |
| 118 | + </ng-container> |
| 119 | + <tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr> |
| 120 | + <tr mat-row *matRowDef="let row; columns: columnsToDisplay"></tr> |
| 121 | + </table> |
| 122 | + } |
| 123 | + @if (trainingConfigurationOpen && hasTrainingDataFiles) { |
| 124 | + <p> |
| 125 | + <span>{{ t("training_data_files_used") }}</span> |
| 126 | + <br /> |
| 127 | + <span class="training-files">{{ trainingFilesString(trainingDataFiles) }}</span> |
| 128 | + </p> |
| 129 | + } |
| 130 | + } @else { |
| 131 | + <p class="no-training-configuration"> |
| 132 | + {{ t("training_data_not_configured") }} |
115 | 133 | </p>
|
116 | 134 | }
|
117 |
| - } @else { |
118 |
| - <p class="no-training-configuration"> |
119 |
| - {{ t("training_data_not_configured") }} |
120 |
| - </p> |
121 | 135 | }
|
122 | 136 | </div>
|
123 | 137 | </mat-expansion-panel>
|
|
0 commit comments