Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions src/app/templates/view-template/view-template.component.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,43 @@
<div class="container m-b-20 layout-row align-end gap-20px">
<button mat-raised-button color="primary" [routerLink]="['edit']" *mifosxHasPermission="'UPDATE_TEMPLATE'">
<fa-icon icon="edit" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Edit' | translate }}
</button>

<button mat-raised-button color="warn" (click)="delete()" *mifosxHasPermission="'DELETE_TEMPLATE'">
<fa-icon icon="trash" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Delete' | translate }}
</button>
</div>

<div class="container">
<div class="layout-row align-end gap-10px m-b-20">
<button mat-raised-button color="primary" [routerLink]="['edit']" *mifosxHasPermission="'UPDATE_TEMPLATE'">
<fa-icon icon="edit" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Edit' | translate }}
</button>

<button mat-raised-button color="warn" (click)="delete()" *mifosxHasPermission="'DELETE_TEMPLATE'">
<fa-icon icon="trash" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Delete' | translate }}
</button>
</div>

<mat-card>
<mat-card-content>
<div class="layout-row-wrap">
<div class="flex-50 mat-body-strong">
{{ 'labels.inputs.name' | translate }}
</div>

<div class="flex-50">
{{ templateData.name }}
</div>

<div class="flex-50 mat-body-strong">
{{ 'labels.inputs.Entity' | translate }}
</div>

<div class="flex-50">
{{ templateData.entity }}
</div>

<div class="flex-50 mat-body-strong">
{{ 'labels.inputs.Type' | translate }}
</div>

<div class="flex-50">
{{ templateData.type }}
</div>

<div class="flex-50 mat-body-strong">
{{ 'labels.inputs.Text' | translate }}
</div>

<div class="flex-50" [innerHTML]="templateData.text"></div>
</div>
</mat-card-content>
Expand Down
44 changes: 39 additions & 5 deletions src/app/templates/view-template/view-template.component.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
// Component-specific styles - minimal overrides to global styles
// Follows existing patterns from general-tab components

.container {
max-width: 37rem;
max-width: 32rem;
margin: 0 auto;
width: 85%;
}

mat-card {
mat-card-content {
padding: 1.5rem;

.layout-row-wrap {
display: grid;
grid-template-columns: 50% 50%;

@media (width <= 768px) {
grid-template-columns: 100%;
}
}

.flex-50 {
padding: 0.625rem 0;
display: flex;
align-items: center;
font-size: 0.875rem;
overflow-wrap: break-word;
line-height: 1.6;

&.mat-body-strong {
font-weight: 600;
}

&:not(:last-child, :nth-last-child(2)) {
border-bottom: 1px solid #ddd;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for this, but I think If we want to have this line, we should add in all the similar views, my suggestion is to remove and keep the same style with the other views.

}
}

.content {
div {
margin: 1rem 0;
word-wrap: break-word;
@media (width <= 480px) {
padding: 1rem;
}
}
}