feat(exports): humanize status name
This commit is contained in:
parent
3af93735a3
commit
307ba68970
6 changed files with 42 additions and 15 deletions
|
@ -1,4 +1,25 @@
|
|||
module TabsHelper
|
||||
def tab_i18n_key_from_status(status)
|
||||
case status
|
||||
when 'a-suivre'
|
||||
'views.instructeurs.dossiers.tab_steps.to_follow' # i18n-tasks-use t('views.instructeurs.dossiers.tab_steps.to_follow')
|
||||
when 'suivis'
|
||||
'pluralize.followed'
|
||||
when 'traites'
|
||||
'pluralize.processed'
|
||||
when 'tous'
|
||||
'views.instructeurs.dossiers.tab_steps.total' # i18n-tasks-use t('views.instructeurs.dossiers.tab_steps.total')
|
||||
when 'supprimes_recemment'
|
||||
'pluralize.dossiers_supprimes_recemment'
|
||||
when 'expirant'
|
||||
'pluralize.dossiers_close_to_expiration'
|
||||
when 'archives'
|
||||
'pluralize.archived'
|
||||
else
|
||||
fail ArgumentError, "Unknown tab status: #{status}"
|
||||
end
|
||||
end
|
||||
|
||||
def tab_item(label, url, active: false, badge: nil, notification: false)
|
||||
render partial: 'shared/tab_item', locals: {
|
||||
label: label,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue