Files
codeocean/app/views/shared/_new_button.html.slim
Sebastian Serth b98c37ae64 Rename v4 FontAwesome icons to match v5/v6 name
While FontAwesome provides aliases for all icons, we switch to the new names for consistency. See all changes at:
https://fontawesome.com/docs/web/setup/upgrade/upgrade-from-v4#icons-renamed-since-version-4
2022-08-09 14:17:32 +02:00

7 lines
326 B
Plaintext

- if policy(model).new?
// default value for fetch will always be evaluated even if it is not returned
- href_target = local_assigns.fetch(:path, false) || send(:"new_#{model.model_name.singular}_path")
a.btn.btn-success href=href_target
i.fa-solid.fa-plus
= t('shared.new_model', model: model.model_name.human)