Skip to content

Commit

Permalink
Change labels for not published and not approved resources (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidQuartz authored Jan 19, 2022
1 parent 28319be commit 03b4771
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,24 @@ const ResourceStatus = ({ resource = {} }) => {
} = getResourceStatuses(resource);
return !isEmpty(resource)
? (
<p>
{(!isProcessing && !isApproved) && <span className={'gn-resource-status gn-resource-status-warning'} >
<Message msgId={'gnviewer.underApproval'} />
<p className="gn-resource-status-text">
{(!isProcessing && !isApproved) && <span className="gn-resource-status gn-resource-status-pending" >
<Message msgId="gnviewer.notApproved" />
</span>}
{(!isProcessing && !isPublished) && <span className={'gn-resource-status gn-resource-status-danger'} >
<Message msgId={'gnviewer.unpublish'} />
{(!isProcessing && !isApproved && !isPublished) && <span className="gn-resource-status gn-resource-status-pending" >
{' '}-{' '}
</span>}
{isDeleting && <span className={'gn-resource-status gn-resource-status-danger'} >
<Message msgId={'gnviewer.deleting'} />
{(!isProcessing && !isPublished) && <span className="gn-resource-status gn-resource-status-pending" >
<Message msgId="gnhome.unpublished" />
</span>}
{isDeleted && <span className={'gn-resource-status gn-resource-status-danger'} >
<Message msgId={'gnviewer.deleted'} />
{isDeleting && <span className="gn-resource-status gn-resource-status-danger" >
<Message msgId="gnviewer.deleting" />
</span>}
{isCopying && <span className={'gn-resource-status gn-resource-status-primary'} >
<Message msgId={'gnviewer.cloning'} />
{isDeleted && <span className="gn-resource-status gn-resource-status-danger" >
<Message msgId="gnviewer.deleted" />
</span>}
{isCopying && <span className="gn-resource-status gn-resource-status-primary" >
<Message msgId="gnviewer.cloning" />
</span>}
</p>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"deleteResourceTitle": "{count, plural, =1 {Möchten Sie diese Ressource wirklich löschen?} other {Möchten Sie diese Ressourcen wirklich löschen?}}",
"deleteResourceNo": "{count, plural, =1 {Nein, nicht löschen} other {Nein, lösche sie nicht}}",
"deleteResourceYes": "Ja, ich bin sicher",
"underApproval": "In Genehmigung",
"notApproved": "Nicht bestätigt",
"unpublish": "Nicht veröffentlicht",
"deleted": "Gelöscht",
"deleting": "Löschen...",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"deleteResourceTitle": "{count, plural, =1 {Are you sure you want to delete this resource?} other {Are you sure you want to delete these resources?}}",
"deleteResourceNo": "{count, plural, =1 {No, don't delete it} other {No, don't delete them}}",
"deleteResourceYes": "Yes, I am sure",
"underApproval": "Under approval",
"notApproved": "Not approved",
"unpublish": "Unpublish",
"deleted": "Deleted",
"deleting": "Deleting...",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"deleteResourceTitle": "{count, plural, =1 {¿Estás seguro de que deseas eliminar este recurso?} other {¿Está seguro de que desea eliminar estos recursos?}}",
"deleteResourceNo": "{count, plural, =1 {No, no lo borres} other {No, no los borres}}",
"deleteResourceYes": "Sí, estoy seguro",
"underApproval": "Bajo aprobación",
"notApproved": "No aprovado",
"unpublish": "No publicado",
"deleted": "Eliminado",
"deleting": "Eliminando ...",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"deleteResourceTitle": "{count, plural, =1 {Voulez-vous vraiment supprimer cette ressource?} other {Voulez-vous vraiment supprimer ces ressources?}}",
"deleteResourceNo": "{count, plural, =1 {Non, ne le supprime pas} other {Non, ne les supprime pas}}",
"deleteResourceYes": "Oui, je suis sûr",
"underApproval": "En cours d'approbation",
"notApproved": "Non approuvé",
"unpublish": "Dépublier",
"deleted": "Supprimé",
"deleting": "Suppression...",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
"deleteResourceTitle": "{count, plural, =1 {Sei sicuro di voler eliminare questa risorsa?} other {Sei sicuro di voler eliminare queste risorse?}}",
"deleteResourceNo": "{count, plural, =1 {No, non eliminarlo} other {No, non eliminarli}}",
"deleteResourceYes": "Sì, sono sicuro",
"underApproval": "In approvazione",
"notApproved": "Non approvato",
"unpublish": "Non pubblicato",
"deleted": "Eliminato",
"deleting": "Eliminazione in corso...",
Expand Down
13 changes: 13 additions & 0 deletions geonode_mapstore_client/client/themes/geonode/less/_card-grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
.background-color-var(@theme-vars[danger]);
.color-var(@theme-vars[danger-contrast]);
}
.gn-resource-status-pending {
.color-var(@theme-vars[danger]);
}
.gn-resource-status-primary {
.background-color-var(@theme-vars[primary]);
.color-var(@theme-vars[primary-contrast]);
Expand Down Expand Up @@ -108,13 +111,23 @@
}
}

p.gn-resource-status-text {
margin-top: 0;
margin-bottom: 0.3rem;
}

.gn-resource-status {
padding: 0.2em 0.5em;
border-radius: 2px;
font-size: @font-size-sm;
margin-right: 0.25rem;
}

.gn-resource-status-pending {
padding: 0;
text-transform: uppercase;
}

.gn-fixed-card-grid {
display: flex;
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
display: flex;
flex-direction: column;
flex: 1;
p{
p:not(.gn-resource-status-text) {
margin-left: 0.2rem;
margin-bottom: 0;
}
Expand Down

0 comments on commit 03b4771

Please sign in to comment.