Sha256: 65cb14044193d620dbcf362ef915b4eefdb0efb3a264a57d0b8051ee603c4119
Contents?: true
Size: 1.95 KB
Versions: 3
Compression:
Stored size: 1.95 KB
Contents
%table.abilities.table.table-bordered{ html_options } - for feature in features %tr{ id: feature.slug + '_ability'} %th= feature.title %td - case feature.setting_type - when 'boolean' - if can? :use, feature.slug.to_sym = icon 'ok' - else = icon 'remove' - when 'table_rows' - if can? :own, feature.feature_model = icon 'ok' - else = icon 'remove' - if current_user.table_rows_unlimited?(feature.slug) = :unlimited.l - else - remaining = current_user.table_rows_remaining(feature.slug) - allowed = current_user.table_rows_allowed(feature.slug) - used = current_user.table_rows(feature.slug) - if remaining < 0 = :x_used_y_allowed.l x: used, y: allowed - elsif allowed == 0 = :not_allowed.l - elsif remaining == 0 = :y_remaining.l y: remaining - else = :x_of_y_remaining.l x: remaining, y: allowed - when 'rolify_rows' - if can? :own, feature.feature_model = icon 'ok' - else = icon 'remove' - if current_user.rolify_rows_unlimited?(feature.slug) = :unlimited.l - else - remaining = current_user.rolify_rows_remaining(feature.slug) - allowed = current_user.rolify_rows_allowed(feature.slug) - used = current_user.rolify_rows(feature.slug) - if remaining < 0 = :x_used_y_allowed.l x: used, y: allowed - elsif allowed == 0 = :not_allowed.l - elsif remaining == 0 = :y_remaining.l y: remaining - else = :x_of_y_remaining.l x: remaining, y: allowed - else = :error.l
Version data entries
3 entries across 3 versions & 1 rubygems