Skip to content

Commit

Permalink
Limit badge usage to suspended state only
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Nov 15, 2021
1 parent 2c3735d commit 10a6555
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions app/resources/locales/en_US/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,13 @@ msgstr "{0,plural,=1{Pending Request} other{Pending Requests}}"
msgid "match.en.ConfidenceModeEnum.C"
msgstr "Canonical"

msgid "match.en.ConfidenceModeEnum.C.warn.level"
msgstr "Light"

msgid "match.en.ConfidenceModeEnum.P"
msgstr "Potential"

msgid "match.en.ConfidenceModeEnum.P.warn.level"
msgstr "Light"

msgid "match.en.ConfidenceModeEnum.S"
msgstr "Suspended"

msgid "match.en.ConfidenceModeEnum.S.warn.level"
msgid "match.en.ConfidenceModeEnum.S.badge"
msgstr "Danger"

msgid "match.en.PermissionEnum.A"
Expand Down Expand Up @@ -206,13 +200,10 @@ msgstr "Substring"
msgid "match.en.StatusEnum.A"
msgstr "Active"

msgid "match.en.StatusEnum.A.warn.level"
msgstr "Light"

msgid "match.en.StatusEnum.S"
msgstr "Suspended"

msgid "match.en.StatusEnum.S.warn.level"
msgid "match.en.StatusEnum.S.badge"
msgstr "Danger"

### Error Messages
Expand Down
4 changes: 2 additions & 2 deletions app/templates/Standard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ function _column_key($modelsName, $c, $tz=null) {
break;
case 'enum':
if($entity->$col) {
$warning_level = __('match.en.'.$cfg['class'].'.'.$entity->$col . '.warn.level');
$warning_level = __('match.en.'.$cfg['class'].'.'.$entity->$col . '.badge');
$title = __('match.en.'.$cfg['class'].'.'.$entity->$col);

if(!empty($warning_level) && strpos($warning_level, '.warn.level') === false) {
if(!empty($warning_level) && strpos($warning_level, '.badge') === false) {
print $this->Badge->badgeIt($title, $this->Badge->getBadgeColor($warning_level));
} else {
print $title;
Expand Down

0 comments on commit 10a6555

Please sign in to comment.