Rethink permissions in CodeOcean for usage in schools and adopt views
This commit is contained in:
@@ -11,12 +11,12 @@ h1 = FileType.model_name.human(count: 2)
|
||||
tbody
|
||||
- @file_types.each do |file_type|
|
||||
tr
|
||||
td = link_to(file_type.name, file_type)
|
||||
td = link_to(file_type.author, file_type.author)
|
||||
td = link_to_if(policy(file_type).show?, file_type.name, file_type)
|
||||
td = link_to_if(policy(file_type.author).show?, file_type.author, file_type.author)
|
||||
td = file_type.file_extension
|
||||
td = link_to(t('shared.show'), file_type)
|
||||
td = link_to(t('shared.edit'), edit_file_type_path(file_type))
|
||||
td = link_to(t('shared.destroy'), file_type, data: {confirm: t('shared.confirm_destroy')}, method: :delete)
|
||||
td = link_to(t('shared.show'), file_type) if policy(file_type).show?
|
||||
td = link_to(t('shared.edit'), edit_file_type_path(file_type)) if policy(file_type).edit?
|
||||
td = link_to(t('shared.destroy'), file_type, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(file_type).destroy?
|
||||
|
||||
= render('shared/pagination', collection: @file_types)
|
||||
p = render('shared/new_button', model: FileType)
|
||||
|
Reference in New Issue
Block a user